Merge pull request #44190 from yuanbopeng:patch-fix
PiperOrigin-RevId: 338685635 Change-Id: If2cc18d6f300fc55a55d9c0644ea5ec43e1f4c90
This commit is contained in:
commit
7bd0d8f06d
tensorflow
c/experimental/filesystem/plugins/hadoop
core/platform/hadoop
@ -219,7 +219,7 @@ hdfsFS Connect(tf_hadoop_filesystem::HadoopFile* hadoop_file,
|
|||||||
builder, namenode.empty() ? nullptr : namenode.c_str());
|
builder, namenode.empty() ? nullptr : namenode.c_str());
|
||||||
auto cacheFs = libhdfs->hdfsBuilderConnect(builder);
|
auto cacheFs = libhdfs->hdfsBuilderConnect(builder);
|
||||||
if (cacheFs == nullptr) {
|
if (cacheFs == nullptr) {
|
||||||
TF_SetStatusFromIOError(status, TF_NOT_FOUND, strerror(errno));
|
TF_SetStatusFromIOError(status, TF_ABORTED, strerror(errno));
|
||||||
return cacheFs;
|
return cacheFs;
|
||||||
}
|
}
|
||||||
hadoop_file->connection_cache[cacheKey] = cacheFs;
|
hadoop_file->connection_cache[cacheKey] = cacheFs;
|
||||||
|
@ -197,7 +197,7 @@ Status HadoopFileSystem::Connect(StringPiece fname, hdfsFS* fs) {
|
|||||||
nn.empty() ? nullptr : nn.c_str());
|
nn.empty() ? nullptr : nn.c_str());
|
||||||
hdfsFS cacheFs = libhdfs()->hdfsBuilderConnect(builder);
|
hdfsFS cacheFs = libhdfs()->hdfsBuilderConnect(builder);
|
||||||
if (cacheFs == nullptr) {
|
if (cacheFs == nullptr) {
|
||||||
return errors::NotFound(strerror(errno));
|
return errors::Aborted(strerror(errno));
|
||||||
}
|
}
|
||||||
connectionCache_[cacheKey] = cacheFs;
|
connectionCache_[cacheKey] = cacheFs;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user