* Returns the location where the inputPath will be copied.
* - hfiles are encoded as hfile links hfile-region-table
* - logs are encoded as serverName/logName
*/
private Path getOutputPath(final Path inputPath) throws IOException {
Path path;
if (HFileLink.isHFileLink(inputPath)) {
String family = inputPath.getParent().getName();
String table = HFileLink.getReferencedTableName(inputPath.getName());
String region = HFileLink.getReferencedRegionName(inputPath.getName());
String hfile = HFileLink.getReferencedHFileName(inputPath.getName());
path = new Path(table, new Path(region, new Path(family, hfile)));
} else if (isHLogLinkPath(inputPath)) {
String logName = inputPath.getName();
path = new Path(new Path(outputRoot, HConstants.HREGION_OLDLOGDIR_NAME), logName);
} else {
path = inputPath;
}
return new Path(outputArchive, path);
}