You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2020/03/26 13:48:38 UTC

[GitHub] [carbondata] vikramahuja1001 commented on a change in pull request #3678: [WIP]: index server concurrency fix

vikramahuja1001 commented on a change in pull request #3678: [WIP]: index server concurrency fix
URL: https://github.com/apache/carbondata/pull/3678#discussion_r398585301
 
 

 ##########
 File path: integration/spark/src/main/scala/org/apache/carbondata/indexserver/DistributedCountRDD.scala
 ##########
 @@ -96,20 +99,78 @@ class DistributedCountRDD(@transient ss: SparkSession, dataMapFormat: Distributa
     new DistributedPruneRDD(ss, dataMapFormat).partitions
   }
 
-  private def generateFuture(split: Seq[InputSplit])
+  private def generateFuture(split: Seq[InputSplit], globalQueue: SegmentProcessor)
     (implicit executionContext: ExecutionContext) = {
     Future {
-      val segments = split.map { inputSplit =>
+
+      var segmentsWorkStatus = split.map { inputSplit =>
         val distributable = inputSplit.asInstanceOf[DataMapDistributableWrapper]
         distributable.getDistributable.getSegment
           .setReadCommittedScope(dataMapFormat.getReadCommittedScope)
-        distributable.getDistributable.getSegment
+
+        val processedSegments = globalQueue.ifProcessSegment(distributable.getDistributable
+          .getSegment.getSegmentNo, dataMapFormat.getCarbonTable.getTableId)
+
+        val segmentWorkStatusList = new SegmentWorkStatus(distributable.getDistributable
+          .getSegment, !processedSegments)
+
+        // if ifprocesssegment = true, iswaiting = false
+        val processedSegmentsList = globalQueue.processSegment(segmentWorkStatusList,
+          dataMapFormat.getCarbonTable.getTableId)
+        segmentWorkStatusList
+      }
+
+      val queueSize = globalQueue.queueSize()
+      val getGlobalworkQueue = globalQueue.getGlobalWorkQueue
 
 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:
users@infra.apache.org


With regards,
Apache Git Services