Class PathTranslator


  • public class PathTranslator
    extends java.lang.Object
    Utilities 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
      PathTranslator addMapping​(java.lang.String alluxioPath, java.lang.String ufsPath)
      Add a mapping to the path translator.
      java.lang.String toAlluxioPath​(java.lang.String ufsPath)
      Returns the corresponding alluxio path, for the specified ufs path.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PathTranslator

        public PathTranslator()
        Construct a path translator.
    • 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 path
        ufsPath - the corresponding ufs path
        Returns:
        PathTranslator object
      • toAlluxioPath

        public java.lang.String toAlluxioPath​(java.lang.String ufsPath)
                                       throws java.io.IOException
        Returns 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