You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/04/19 10:51:30 UTC

[GitHub] [hbase] anoopsjohn commented on a change in pull request #3177: HBASE-25781 Add cacheBlocks option to RowCounter

anoopsjohn commented on a change in pull request #3177:
URL: https://github.com/apache/hbase/pull/3177#discussion_r615743504



##########
File path: hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java
##########
@@ -318,12 +324,10 @@ protected void processOptions(CommandLine cmd) throws IllegalArgumentException{
     if(cmd.getOptionValue(OPT_RANGE)!=null) {
       this.rowRangeList = parseRowRangeParameter(cmd.getOptionValue(OPT_RANGE));
     }
-    this.endTime = cmd.getOptionValue(OPT_END_TIME) == null ? HConstants.LATEST_TIMESTAMP :
-        Long.parseLong(cmd.getOptionValue(OPT_END_TIME));
-    this.expectedCount = cmd.getOptionValue(OPT_EXPECTED_COUNT) == null ? Long.MIN_VALUE :
-        Long.parseLong(cmd.getOptionValue(OPT_EXPECTED_COUNT));
-    this.startTime = cmd.getOptionValue(OPT_START_TIME) == null ? 0 :
-        Long.parseLong(cmd.getOptionValue(OPT_START_TIME));
+    this.startTime = getOptionAsLong(cmd, OPT_START_TIME, 0L);
+    this.endTime = getOptionAsLong(cmd, OPT_END_TIME, HConstants.LATEST_TIMESTAMP);
+    this.expectedCount = getOptionAsLong(cmd, OPT_EXPECTED_COUNT, Long.MIN_VALUE);
+    this.cacheBlocks = cmd.hasOption(OPT_CACHE_BLOCKS) ? true : false;

Review comment:
       this.cacheBlocks = cmd.hasOption(OPT_CACHE_BLOCKS);
   Is enough no?




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org