You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by jackylk <gi...@git.apache.org> on 2016/09/28 14:31:01 UTC

[GitHub] incubator-carbondata pull request #203: [CARBONDATA-279]Load RDD to carbonda...

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

    https://github.com/apache/incubator-carbondata/pull/203#discussion_r80915025
  
    --- Diff: integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataLoadRDD.scala ---
    @@ -145,92 +232,28 @@ class CarbonDataLoadRDD[K, V](
       override def compute(theSplit: Partition, context: TaskContext): Iterator[(K, V)] = {
         val LOGGER = LogServiceFactory.getLogService(this.getClass.getName)
         val iter = new Iterator[(K, V)] {
    -      var dataloadStatus = CarbonCommonConstants.STORE_LOADSTATUS_FAILURE
           var partitionID = "0"
    +      val loadMetadataDetails = new LoadMetadataDetails()
           var model: CarbonLoadModel = _
           var uniqueLoadStatusId = carbonLoadModel.getTableName + CarbonCommonConstants.UNDERSCORE +
                                    theSplit.index
           try {
    -        val carbonPropertiesFilePath = System.getProperty("carbon.properties.filepath", null)
    -        if (null == carbonPropertiesFilePath) {
    -          System.setProperty("carbon.properties.filepath",
    -            System.getProperty("user.dir") + '/' + "conf" + '/' + "carbon.properties")
    -        }
    +        loadMetadataDetails.setPartitionCount(partitionID)
    +        loadMetadataDetails.setLoadStatus(CarbonCommonConstants.STORE_LOADSTATUS_FAILURE)
    +
             carbonLoadModel.setSegmentId(String.valueOf(loadCount))
             setModelAndBlocksInfo()
    -        CarbonTimeStatisticsFactory.getLoadStatisticsInstance.initPartitonInfo(model.getPartitionId)
    -        CarbonProperties.getInstance().addProperty("carbon.is.columnar.storage", "true")
    -        CarbonProperties.getInstance().addProperty("carbon.dimension.split.value.in.columnar", "1")
    -        CarbonProperties.getInstance().addProperty("carbon.is.fullyfilled.bits", "true")
    -        CarbonProperties.getInstance().addProperty("is.int.based.indexer", "true")
    -        CarbonProperties.getInstance().addProperty("aggregate.columnar.keyblock", "true")
    -        CarbonProperties.getInstance().addProperty("high.cardinality.value", "100000")
    -        CarbonProperties.getInstance().addProperty("is.compressed.keyblock", "false")
    -        CarbonProperties.getInstance().addProperty("carbon.leaf.node.size", "120000")
    -
    -        // this property is used to determine whether temp location for carbon is inside
    -        // container temp dir or is yarn application directory.
    -        val carbonUseLocalDir = CarbonProperties.getInstance()
    -          .getProperty("carbon.use.local.dir", "false")
    -
    -        if(carbonUseLocalDir.equalsIgnoreCase("true")) {
    -          val storeLocations = CarbonLoaderUtil.getConfiguredLocalDirs(SparkEnv.get.conf)
    -          if (null != storeLocations && storeLocations.nonEmpty) {
    -            storeLocation = storeLocations(Random.nextInt(storeLocations.length))
    -          }
    -          if (storeLocation == null) {
    -            storeLocation = System.getProperty("java.io.tmpdir")
    -          }
    -        }
    -        else {
    -          storeLocation = System.getProperty("java.io.tmpdir")
    -        }
    -        storeLocation = storeLocation + '/' + System.nanoTime() + '/' + theSplit.index
    -        dataloadStatus = CarbonCommonConstants.STORE_LOADSTATUS_SUCCESS
    -
    +        storeLocation = CarbonDataLoadRDD.initialize(model, theSplit.index)
    +        loadMetadataDetails.setLoadStatus(CarbonCommonConstants.STORE_LOADSTATUS_SUCCESS)
             if (model.isRetentionRequest) {
               recreateAggregationTableForRetention
             }
             else if (model.isAggLoadRequest) {
    --- End diff --
    
    Is this required? If it is not required, remove it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---