gjacoby126 commented on a change in pull request #672: PHOENIX-5658 IndexTool 
to verify index rows inline
URL: https://github.com/apache/phoenix/pull/672#discussion_r363868559
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
 ##########
 @@ -1089,30 +1109,40 @@ private static PTable deserializeTable(byte[] b) {
         }
     }
     private class IndexRebuildRegionScanner extends BaseRegionScanner {
+        public static final String 
NUM_CONCURRENT_INDEX_VERIFY_THREADS_CONF_KEY = "index.verify.threads.max";
+        private static final int DEFAULT_CONCURRENT_INDEX_VERIFY_THREADS = 17;
+        public static final String INDEX_VERIFY_ROW_COUNTS_PER_TASK_CONF_KEY = 
"index.verify.threads.max";
+        private static final int DEFAULT_INDEX_VERIFY_ROW_COUNTS_PER_TASK = 
2048;
         private long pageSizeInRows = Long.MAX_VALUE;
+        private int rowCountPerTask;
         private boolean hasMore;
         private final int maxBatchSize;
         private MutationList mutations;
         private final long maxBatchSizeBytes;
         private final long blockingMemstoreSize;
         private final byte[] clientVersionBytes;
-        private List<Cell> results = new ArrayList<Cell>();
         private byte[] indexMetaData;
         private boolean useProto = true;
         private Scan scan;
         private RegionScanner innerScanner;
         private Region region;
         private IndexMaintainer indexMaintainer;
         private byte[] indexRowKey = null;
+        private Table indexHTable = null;
+        private boolean verify = false;
+        Map<byte[], Put> dataPutMap;
+        private TaskRunner pool;
+        TaskBatch<Boolean> tasks;
+        String exceptionMessage;
 
         IndexRebuildRegionScanner (final RegionScanner innerScanner, final 
Region region, final Scan scan,
 
 Review comment:
   Given the massive size of UngroupedAggregateRegionObserver and the 
newly-added complexity of IndexRebuildRegionScanner, I think it's time for an 
Extract Class on IndexRebuildRegionScanner to make it a first-class citizen. 
Ideally I'd also split the verification methods in IndexRebuildRegionScanner 
into their own class as well to make things nice and cohesive, but that can be 
future work if you prefer not to take it on now. 

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


With regards,
Apache Git Services

Reply via email to