Indhumathi27 commented on a change in pull request #3714: [CARBONDATA-3773]
Skip Validate partition info in Indexserver count star flow
URL: https://github.com/apache/carbondata/pull/3714#discussion_r410675473
##########
File path: core/src/main/java/org/apache/carbondata/core/index/TableIndex.java
##########
@@ -595,6 +595,29 @@ public void onEvent(Event event, OperationContext
opContext) {
throws IOException {
List<Segment> segments = getCarbonSegments(allsegments);
Map<String, Long> blockletToRowCountMap = new HashMap<>();
+ for (Segment segment : segments) {
+ List<CoarseGrainIndex> indexes =
defaultIndex.getIndexFactory().getIndexes(segment);
+ for (CoarseGrainIndex index : indexes) {
+ if (null != partitions) {
+ // if it has partitioned index but there is no partitioned
information stored, it means
+ // partitions are dropped so return empty list.
+ if (!index.validatePartitionInfo(partitions)) {
+ return new HashMap<>();
+ }
+ }
+ index.getRowCountForEachBlock(segment, partitions,
blockletToRowCountMap);
+ }
+ }
+ return blockletToRowCountMap;
+ }
+
+ /**
+ * Prune the index of the given segments and return the Map of blocklet path
and row count
+ */
+ public Map<String, Long> getRowCountForBlock(List<Segment> allsegments,
Review comment:
done
----------------------------------------------------------------
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