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

    https://github.com/apache/carbondata/pull/2528#discussion_r205022866
  
    --- 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 --
    
    It doesn't want to exclude local machine.
    Because maybe all machines have configured  "127.0.0.1 localhost", 
"localhost" is unuseful.


---

Reply via email to