Apache9 commented on code in PR #5853: URL: https://github.com/apache/hbase/pull/5853#discussion_r1596471275
########## hbase-common/src/main/java/org/apache/hadoop/hbase/util/Strings.java: ########## @@ -94,4 +102,37 @@ public static String padFront(String input, char padding, int length) { int numPaddingCharacters = length - input.length(); return StringUtils.repeat(padding, numPaddingCharacters) + input; } + + /** + * Parse the query string of an URI to a key value map. If a single key occurred multiple times, + * only the first one will take effect. + */ + public static Map<String, String> parseURIQueries(URI uri) { + if (StringUtils.isBlank(uri.getRawQuery())) { + return Collections.emptyMap(); + } + return Splitter.on('&').trimResults().splitToStream(uri.getRawQuery()).map(kv -> { Review Comment: Not sure but I'm trying to not rely on libs other than guava as much as possible, to minimize our dependency scope... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org