Fix a bug that the file copied by TF from HDFS to local may be wrong, when HDFS file is being overwritten #42597
diff --git a/tensorflow/core/platform/hadoop/hadoop_file_system.cc b/tensorflow/core/platform/hadoop/hadoop_file_system.cc
index 3b373e4..a18ab15 100644
--- a/tensorflow/core/platform/hadoop/hadoop_file_system.cc
+++ b/tensorflow/core/platform/hadoop/hadoop_file_system.cc
@@ -228,7 +228,7 @@
Status s;
char* dst = scratch;
bool eof_retried = false;
- const char* disable_eof_retried = getenv("DISABLE_HDFS_READ_EOF_RETRIED");
+ const char* disable_eof_retried = getenv("HDFS_DISABLE_READ_EOF_RETRIED");
if (disable_eof_retried && disable_eof_retried[0] == '1') {
// eof_retried = true, avoid calling hdfsOpenFile in Read, Fixes #42597
eof_retried = true;