Package alluxio.table.common.udb
Class PathTranslator
- java.lang.Object
-
- alluxio.table.common.udb.PathTranslator
-
public class PathTranslator extends java.lang.ObjectUtilities to convert to and from ufs paths and alluxio paths.
-
-
Constructor Summary
Constructors Constructor Description PathTranslator()Construct a path translator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PathTranslatoraddMapping(java.lang.String alluxioPath, java.lang.String ufsPath)Add a mapping to the path translator.java.lang.StringtoAlluxioPath(java.lang.String ufsPath)Returns the corresponding alluxio path, for the specified ufs path.
-
-
-
Method Detail
-
addMapping
public PathTranslator addMapping(java.lang.String alluxioPath, java.lang.String ufsPath)
Add a mapping to the path translator.- Parameters:
alluxioPath- the alluxio pathufsPath- the corresponding ufs path- Returns:
- PathTranslator object
-
toAlluxioPath
public java.lang.String toAlluxioPath(java.lang.String ufsPath) throws java.io.IOExceptionReturns the corresponding alluxio path, for the specified ufs path.- Parameters:
ufsPath- the ufs path to translate- Returns:
- the corresponding alluxio path
- Throws:
java.io.IOException- if the ufs path is not mounted
-
-