Merge pull request #44190 from yuanbopeng:patch-fix

PiperOrigin-RevId: 338685635
Change-Id: If2cc18d6f300fc55a55d9c0644ea5ec43e1f4c90
This commit is contained in:
TensorFlower Gardener 2020-10-23 09:19:26 -07:00
commit 7bd0d8f06d
2 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ hdfsFS Connect(tf_hadoop_filesystem::HadoopFile* hadoop_file,
builder, namenode.empty() ? nullptr : namenode.c_str());
auto cacheFs = libhdfs->hdfsBuilderConnect(builder);
if (cacheFs == nullptr) {
TF_SetStatusFromIOError(status, TF_NOT_FOUND, strerror(errno));
TF_SetStatusFromIOError(status, TF_ABORTED, strerror(errno));
return cacheFs;
}
hadoop_file->connection_cache[cacheKey] = cacheFs;

View File

@ -197,7 +197,7 @@ Status HadoopFileSystem::Connect(StringPiece fname, hdfsFS* fs) {
nn.empty() ? nullptr : nn.c_str());
hdfsFS cacheFs = libhdfs()->hdfsBuilderConnect(builder);
if (cacheFs == nullptr) {
return errors::NotFound(strerror(errno));
return errors::Aborted(strerror(errno));
}
connectionCache_[cacheKey] = cacheFs;
}