carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [1/2] incubator-carbondata git commit: concurrent add fails
Date Fri, 21 Apr 2017 14:53:26 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 48ffb245d -> c208951a1


concurrent add fails


Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/0948f218
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/0948f218
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/0948f218

Branch: refs/heads/master
Commit: 0948f2183d43fc2bc8f587897094ade263a953bf
Parents: 48ffb24
Author: dhatchayani <dhats.s@gmail.com>
Authored: Fri Apr 21 19:03:32 2017 +0530
Committer: kunal642 <kunal.kapoor@knoldus.in>
Committed: Fri Apr 21 19:03:32 2017 +0530

----------------------------------------------------------------------
 .../apache/carbondata/spark/rdd/AlterTableAddColumnRDD.scala    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0948f218/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/AlterTableAddColumnRDD.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/AlterTableAddColumnRDD.scala
b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/AlterTableAddColumnRDD.scala
index ab1fd9c..d81ed30 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/AlterTableAddColumnRDD.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/AlterTableAddColumnRDD.scala
@@ -25,6 +25,7 @@ import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.core.metadata.CarbonTableIdentifier
 import org.apache.carbondata.core.metadata.encoder.Encoding
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema
+import org.apache.carbondata.core.util.CarbonProperties
 import org.apache.carbondata.core.util.path.CarbonStorePath
 import org.apache.carbondata.spark.util.GlobalDictionaryUtil
 
@@ -51,6 +52,9 @@ class AlterTableAddColumnRDD[K, V](sc: SparkContext,
     carbonTableIdentifier: CarbonTableIdentifier,
     carbonStorePath: String) extends RDD[(Int, String)](sc, Nil) {
 
+  val lockType: String = CarbonProperties.getInstance.getProperty(CarbonCommonConstants.LOCK_TYPE,
+    CarbonCommonConstants.CARBON_LOCK_TYPE_HDFS)
+
   override def getPartitions: Array[Partition] = {
     newColumns.zipWithIndex.map { column =>
       new AddColumnPartition(id, column._2, column._1)
@@ -74,6 +78,7 @@ class AlterTableAddColumnRDD[K, V](sc: SparkContext,
             rawData = new String(columnSchema.getDefaultValue,
               CarbonCommonConstants.DEFAULT_CHARSET_CLASS)
           }
+          CarbonProperties.getInstance.addProperty(CarbonCommonConstants.LOCK_TYPE, lockType)
           GlobalDictionaryUtil
             .loadDefaultDictionaryValueForNewColumn(carbonTablePath,
               columnSchema,


Mime
View raw message