Merge pull request #44190 from yuanbopeng:patch-fix
PiperOrigin-RevId: 338685635 Change-Id: If2cc18d6f300fc55a55d9c0644ea5ec43e1f4c90
This commit is contained in:
commit
7bd0d8f06d
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user