Class PathUtils

java.lang.Object
org.apache.drill.exec.coord.zk.PathUtils

public final class PathUtils extends Object
A convenience class used to expedite zookeeper paths manipulations.
  • Constructor Details

    • PathUtils

      public PathUtils()
  • Method Details

    • join

      public static String join(String... parts)
      Returns a normalized, combined path out of the given path segments.
      Parameters:
      parts - path segments to combine
      See Also:
    • normalize

      public static String normalize(String path)
      Normalizes the given path eliminating repeated forward slashes.
      Returns:
      normalized path
    • getPathWithProtocol

      public static String getPathWithProtocol(URL url)
      Creates and returns path with the protocol at the beginning from specified url.
      Parameters:
      url - the source of path and protocol
      Returns:
      string with protocol and path divided by colon