[GitHub] [carbondata] ravipesala commented on a change in pull request #3281: [WIP]Index server performance improvement

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] ravipesala commented on a change in pull request #3281: [WIP]Index server performance improvement

GitBox
ravipesala commented on a change in pull request #3281: [WIP]Index server performance improvement
URL: https://github.com/apache/carbondata/pull/3281#discussion_r293269822
 
 

 ##########
 File path: integration/spark2/src/main/scala/org/apache/carbondata/indexserver/DistributedRDDUtils.scala
 ##########
 @@ -64,11 +64,21 @@ object DistributedRDDUtils {
     if (invalidExecutorIds.nonEmpty) {
       DistributedRDDUtils.invalidateExecutors(invalidExecutorIds.toSeq)
     }
-    (convertToPartition(legacySegments, tableUniqueName, executorsList) ++
-     convertToPartition(sortedPartitions, tableUniqueName, executorsList)).zipWithIndex.map {
-      case (dataMapDistributable, index) =>
-        new DataMapRDDPartition(rddId, index, dataMapDistributable)
-    }
+    val groupedPartitions = (convertToPartition(legacySegments, tableUniqueName, executorsList) ++
+                             convertToPartition(sortedPartitions, tableUniqueName, executorsList))
+      .groupBy {
+        partition =>
+          partition.getLocations.head
+      }
+    groupedPartitions.map {
+      case (location, dataMapDistributable) =>
 
 Review comment:
   Please remove this case

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


With regards,
Apache Git Services