Package org.apache.drill.exec.coord.zk
Class PathUtils
java.lang.Object
org.apache.drill.exec.coord.zk.PathUtils
A convenience class used to expedite zookeeper paths manipulations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getPathWithProtocol
(URL url) Creates and returns path with the protocol at the beginning from specifiedurl
.static String
Returns a normalized, combined path out of the given path segments.static String
Normalizes the given path eliminating repeated forward slashes.
-
Constructor Details
-
PathUtils
public PathUtils()
-
-
Method Details
-
join
Returns a normalized, combined path out of the given path segments.- Parameters:
parts
- path segments to combine- See Also:
-
normalize
Normalizes the given path eliminating repeated forward slashes.- Returns:
- normalized path
-
getPathWithProtocol
Creates and returns path with the protocol at the beginning from specifiedurl
.- Parameters:
url
- the source of path and protocol- Returns:
- string with protocol and path divided by colon
-