liufangqi commented on a change in pull request #17958:
URL: https://github.com/apache/flink/pull/17958#discussion_r785393405



##########
File path: 
flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopFsFactory.java
##########
@@ -75,6 +75,12 @@ public FileSystem create(URI fsUri) throws IOException {
         // from here on, we need to handle errors due to missing optional
         // dependency classes
         try {
+            // -- (0) set hadoop caller context
+
+            if (getCurrent() != null && flinkConfig != null) {
+                HadoopUtils.setCallerContext(getCurrent(), flinkConfig);

Review comment:
       Second, I think your idea is good, there are actually some corner-cases 
that are not coverd. ContextAwareFileSystem interface maybe a good solution to 
cover all the filesystem-call. But there are still one thing we should think 
about is how to get the "descriptive" context and re-set before every 
filesystem-call (we can not get the "descriptive" context easily and set it 
easily).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to