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

    https://github.com/apache/carbondata/pull/2824#discussion_r227289015
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/datasources/SparkCarbonTableFormat.scala
 ---
    @@ -172,33 +172,8 @@ with Serializable {
               dataSchema: StructType,
               context: TaskAttemptContext): OutputWriter = {
             val model = 
CarbonTableOutputFormat.getLoadModel(context.getConfiguration)
    -        val isCarbonUseMultiDir = 
CarbonProperties.getInstance().isUseMultiTempDir
    -        var storeLocation: Array[String] = Array[String]()
    -        val isCarbonUseLocalDir = CarbonProperties.getInstance()
    -          .getProperty("carbon.use.local.dir", 
"false").equalsIgnoreCase("true")
    -
    -
             val taskNumber = generateTaskNumber(path, context, 
model.getSegmentId)
    -        val tmpLocationSuffix =
    -          File.separator + "carbon" + System.nanoTime() + File.separator + 
taskNumber
    -        if (isCarbonUseLocalDir) {
    -          val yarnStoreLocations = 
Util.getConfiguredLocalDirs(SparkEnv.get.conf)
    -          if (!isCarbonUseMultiDir && null != yarnStoreLocations && 
yarnStoreLocations.nonEmpty) {
    -            // use single dir
    -            storeLocation = storeLocation :+
    -              
(yarnStoreLocations(Random.nextInt(yarnStoreLocations.length)) + 
tmpLocationSuffix)
    -            if (storeLocation == null || storeLocation.isEmpty) {
    -              storeLocation = storeLocation :+
    -                (System.getProperty("java.io.tmpdir") + tmpLocationSuffix)
    -            }
    -          } else {
    -            // use all the yarn dirs
    -            storeLocation = yarnStoreLocations.map(_ + tmpLocationSuffix)
    -          }
    -        } else {
    -          storeLocation =
    -            storeLocation :+ (System.getProperty("java.io.tmpdir") + 
tmpLocationSuffix)
    -        }
    +        val storeLocation = CommonUtil.getTempStoreLocations(taskNumber)
    --- End diff --
    
    the old tmpLocationSuffix  is different from the method 
CommonUtil.getTempStoreLocations.
    please check whether is ok or not


---

Reply via email to