Github user xuchuanyin commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2528#discussion_r204968370
  
    --- Diff: 
integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala
 ---
    @@ -739,9 +741,16 @@ class CarbonScanRDD[T: ClassTag](
        * Get the preferred locations where to launch this task.
        */
       override def getPreferredLocations(split: Partition): Seq[String] = {
    -    val theSplit = split.asInstanceOf[CarbonSparkPartition]
    -    val firstOptionLocation = theSplit.split.value.getLocations.filter(_ 
!= "localhost")
    -    firstOptionLocation
    +    if (isTaskLocality) {
    +      split.asInstanceOf[CarbonSparkPartition]
    +        .split
    +        .value
    +        .getLocations
    +        .filter(_ != "localhost")
    --- End diff --
    
    What will happen if I configure TaskLocality and run the job in local 
machine or local pseudo distributed mode?
    Besides, if you really want to exclude local machine, except 'localhost',  
why host name of local machine is not considered?


---

Reply via email to