Source:
<code>private Path getCurrentLoadPath() throws IOException, SemanticException { Path loadPathBase = new Path(conf.getVar(HiveConf.ConfVars.REPLDIR), Base64.getEncoder().encodeToString(sourceDbNameOrPattern.toLowerCase() .getBytes(StandardCharsets.UTF_8.name()))); final FileSystem fs = loadPathBase.getFileSystem(conf); loadPathBase = fs.makeQualified(loadPathBase); if (!fs.exists(loadPathBase)) { LOG.error("File not found " + loadPathBase.toUri().toString()); throw new FileNotFoundException(ErrorMsg.REPL_LOAD_PATH_NOT_FOUND.getMsg()); } FileStatus[] statuses = loadPathBase.getFileSystem(conf).listStatus(loadPathBase); if (statuses.length > 0) { Arrays.sort(statuses, new Comparator<FileStatus>() { public int compare(FileStatus f1, FileStatus f2) { return Long.compare(f1.getModificationTime(), f2.getModificationTime()); } }); if (replScope.getDbName() != null) { String currentReplStatusOfTarget = getReplStatus(replScope.getDbName()); if (currentReplStatusOfTarget == null) { return statuses[0].getPath(); } else { DumpMetaData latestDump = new DumpMetaData(statuses[statuses.length - 1].getPath(), conf); <START> if (Long.parseLong(currentReplStatusOfTarget) >= latestDump.getEventTo().longValue()) { <END> isTargetAlreadyLoaded = true; } else { for (FileStatus status : statuses) { DumpMetaData dmd = new DumpMetaData(status.getPath(), conf); if (dmd.isIncrementalDump() && Long.parseLong(currentReplStatusOfTarget) < dmd.getEventTo().longValue()) { return status.getPath(); } } } } } return statuses[statuses.length - 1].getPath(); } return null; }</code><technical_language>want do a trim of currentReplStatusOfTarget, dont parser for long it</technical_language>

Target:
private Path getCurrentLoadPath() throws IOException, SemanticException { Path loadPathBase = new Path(conf.getVar(HiveConf.ConfVars.REPLDIR), Base64.getEncoder().encodeToString(sourceDbNameOrPattern.toLowerCase() .getBytes(StandardCharsets.UTF_8.name()))); final FileSystem fs = loadPathBase.getFileSystem(conf); loadPathBase = fs.makeQualified(loadPathBase); if (!fs.exists(loadPathBase)) { LOG.error("File not found " + loadPathBase.toUri().toString()); throw new FileNotFoundException(ErrorMsg.REPL_LOAD_PATH_NOT_FOUND.getMsg()); } FileStatus[] statuses = loadPathBase.getFileSystem(conf).listStatus(loadPathBase); if (statuses.length > 0) { Arrays.sort(statuses, new Comparator<FileStatus>() { public int compare(FileStatus f1, FileStatus f2) { return Long.compare(f1.getModificationTime(), f2.getModificationTime()); } }); if (replScope.getDbName() != null) { String currentReplStatusOfTarget = getReplStatus(replScope.getDbName()); if (currentReplStatusOfTarget == null) { return statuses[0].getPath(); } else { DumpMetaData latestDump = new DumpMetaData(statuses[statuses.length - 1].getPath(), conf); if (Long.parseLong(currentReplStatusOfTarget.trim()) >= latestDump.getEventTo()) { isTargetAlreadyLoaded = true; } else { for (FileStatus status : statuses) { DumpMetaData dmd = new DumpMetaData(status.getPath(), conf); if (dmd.isIncrementalDump() && Long.parseLong(currentReplStatusOfTarget.trim()) < dmd.getEventTo()) { return status.getPath(); } } } } } else { throw new UnsupportedOperationException("REPL LOAD * is not supported"); } } return null; }