diff --git hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/HDFSCleanup.java hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/HDFSCleanup.java index 1202ffe..c5ac0e5 100644 --- hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/HDFSCleanup.java +++ hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/HDFSCleanup.java @@ -91,15 +91,12 @@ public static void startInstance(Configuration appConf) throws IOException { * */ public void run() { - FileSystem fs = null; while (!stop) { try { // Put each check in a separate try/catch, so if that particular // cycle fails, it'll try again on the next cycle. try { - if (fs == null) { - fs = new Path(storage_root).getFileSystem(appConf); - } + FileSystem fs = new Path(storage_root).getFileSystem(appConf); checkFiles(fs); } catch (Exception e) { LOG.error("Cleanup cycle failed: " + e.getMessage());