aasha commented on a change in pull request #1550: URL: https://github.com/apache/hive/pull/1550#discussion_r499540414
########## File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/util/ReplUtils.java ########## @@ -280,6 +299,49 @@ public static PathFilter getBootstrapDirectoryFilter(final FileSystem fs) { }; } + public static Path getMetricPath(MessageHandler.Context context, HiveConf hiveConf) throws Exception{ + DumpType dumpType; + Path metricPath = null; + String dumpMetaFile = DumpMetaData.getDmdFileName(); + FileSystem fs = null; + if(context.dmd != null) { + dumpType = context.dmd.getDumpType(); + fs = context.dmd.getDumpFilePath().getFileSystem(hiveConf); + metricPath = context.dmd.getDumpFilePath().getParent(); + } + else { + dumpType = null; + if(context.location != null){ + metricPath = (new Path(context.location)).getParent(); + fs = (new Path(context.location)).getFileSystem(hiveConf); + } + } + //traverse to hiveDumpRoot required by metric-collector + while (metricPath != null && fs != null && dumpType != DumpType.BOOTSTRAP && dumpType != DumpType.INCREMENTAL) { Review comment: this may be error prone. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org