kunal642 commented on a change in pull request #3177: 
[CARBONDATA-3337][CARBONDATA-3306] Distributed index server
URL: https://github.com/apache/carbondata/pull/3177#discussion_r281006653
 
 

 ##########
 File path: 
hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonInputFormat.java
 ##########
 @@ -555,33 +629,16 @@ private int getBlockCount(List<ExtendedBlocklet> 
blocklets) {
     return prunedBlocklets;
   }
 
-  /**
-   * Prune the segments from the already pruned blocklets.
-   * @param segments
-   * @param prunedBlocklets
-   */
-  private void pruneSegments(List<Segment> segments, List<ExtendedBlocklet> 
prunedBlocklets) {
-    List<Segment> toBeRemovedSegments = new ArrayList<>();
-    for (Segment segment : segments) {
-      boolean found = false;
-      // Clear the old pruned index files if any present
-      segment.getFilteredIndexShardNames().clear();
-      // Check the segment exist in any of the pruned blocklets.
-      for (ExtendedBlocklet blocklet : prunedBlocklets) {
-        if (blocklet.getSegment().toString().equals(segment.toString())) {
-          found = true;
-          // Set the pruned index file to the segment for further pruning.
-          String shardName = 
CarbonTablePath.getShardName(blocklet.getFilePath());
-          segment.setFilteredIndexShardName(shardName);
-        }
-      }
-      // Add to remove segments list if not present in pruned blocklets.
-      if (!found) {
-        toBeRemovedSegments.add(segment);
+
+  static List<InputSplit> convertToCarbonInputSplit(
+      List<ExtendedBlocklet> extendedBlocklets) {
+    List<InputSplit> resultFilteredBlocks = new ArrayList<>();
+    for (ExtendedBlocklet blocklet : extendedBlocklets) {
+      if (blocklet != null) {
 
 Review comment:
   The whole method is just moved here. Was an existing check.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to