List of usage examples for org.apache.hadoop.hdfs.web.resources Param toSortedString
public static String toSortedString(final String separator, final Param<?, ?>... parameters)
From source file:com.bigstep.datalake.DLFileSystem.java
License:Apache License
/** * Compute the path associated to a specific operation * @param op the operation to be executed * @param fspath the path, can be relative * @param parameters various params depending on the operation * @return the full HTTP url/*from www .j a v a 2 s .c o m*/ * @throws IOException */ @VisibleForTesting private URL toUrl(final HttpOpParam.Op op, final Path fspath, final Param<?, ?>... parameters) throws IOException { //initialize URI path and query final String path = PATH_PREFIX + (fspath == null ? "/" : makeQualified(fspath).toUri().getRawPath()); final String query = op.toQueryString() + Param.toSortedString("&", getAuthParameters(op)) + Param.toSortedString("&", parameters); //TODO: add loadbalancing final URL url = getNamenodeURL(path, query); if (LOG.isTraceEnabled()) { LOG.trace("url=" + url); } return url; }