ndimiduk commented on code in PR #5853: URL: https://github.com/apache/hbase/pull/5853#discussion_r1596475339
########## 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: I agree, I would also prioritize a smaller dependency set. There's an [open PR](https://github.com/google/guava/issues/1005) for Guava to add some support, but I guess nothing there yet. -- 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