You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by GitBox <gi...@apache.org> on 2018/11/20 20:13:39 UTC

[GitHub] swagle commented on a change in pull request #33: AMBARI-24833. Do not open FS on main thread.

swagle commented on a change in pull request #33: AMBARI-24833. Do not open FS on main thread.
URL: https://github.com/apache/ambari-logsearch/pull/33#discussion_r235153497
 
 

 ##########
 File path: ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/cloud/upload/HDFSUploadClient.java
 ##########
 @@ -85,17 +84,16 @@ public void init(LogFeederProps logFeederProps) {
     }
     logger.info("HDFS client - will use '{}' permission for uploaded files", hdfsOutputConfig.getHdfsFilePermissions());
     LogFeederHDFSUtil.overrideFileSystemConfigs(logFeederProps, configuration);
-    this.fs = LogFeederHDFSUtil.buildFileSystem(configuration);
   }
 
   @Override
   public void upload(String source, String target) throws Exception {
+    final FileSystem fs = LogFeederHDFSUtil.buildFileSystem(configuration);
 
 Review comment:
   Should this be a try..finally block with close?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services