deniskuzZ commented on code in PR #5466:
URL: https://github.com/apache/hive/pull/5466#discussion_r1778421797


##########
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:
##########
@@ -7247,7 +7247,7 @@ public List<Map.Entry<String, String>> 
getMatchingEntries(Pattern regex) {
     for (Map.Entry<String, String> entry : this) {

Review Comment:
   that is some crazy code, could you please refactor it with below snippet and 
extract to HS2 (where it's used)
   ````
     public Map<String, Integer> getCompactorPoolConf(HiveConf hiveConf) {
       Map<String, Integer> poolConf = new HashMap<>();
       for (Map.Entry<String, String> entry : hiveConf) {
         Matcher matcher = COMPACTION_POOLS_PATTERN.matcher(entry.getKey());
         if (matcher.matches()) {
           poolConf.put(matcher.group(1), NumberUtils.toInt(entry.getValue(), 
0));
         }
       }
       return poolConf;
     }
   ````
   wonder how it was even tested?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to