Example usage for org.apache.hadoop.tools.util DistCpUtils getRelativePath

List of usage examples for org.apache.hadoop.tools.util DistCpUtils getRelativePath

Introduction

In this page you can find the example usage for org.apache.hadoop.tools.util DistCpUtils getRelativePath.

Prototype

public static String getRelativePath(Path sourceRootPath, Path childPath) 

Source Link

Document

Gets relative path of child path with respect to a root path For ex.

Usage

From source file:org.apache.falcon.replication.FilteredCopyListingTest.java

License:Apache License

private static void recordInExpectedValues(String path) throws Exception {
    FileSystem fileSystem = FileSystem.getLocal(new Configuration());
    Path sourcePath = new Path(fileSystem.getUri().toString() + path);
    EXPECTED_VALUES.put(sourcePath.toString(),
            DistCpUtils.getRelativePath(new Path("/tmp/source"), sourcePath));
}