carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [12/14] incubator-carbondata git commit: change variable name
Date Mon, 08 May 2017 09:48:24 GMT
change variable name


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

Branch: refs/heads/12-dev
Commit: 76a5d8954ab6eea45b2cae19a6b96bf9d218f542
Parents: a44d20d
Author: lionelcao <whucaolu@gmail.com>
Authored: Mon May 8 16:46:57 2017 +0800
Committer: lionelcao <whucaolu@gmail.com>
Committed: Mon May 8 16:46:57 2017 +0800

----------------------------------------------------------------------
 .../core/constants/CarbonCommonConstants.java           |  2 +-
 .../carbondata/core/metadata/schema/PartitionInfo.java  | 12 ++++++------
 .../carbondata/examples/CarbonPartitionExample.scala    |  2 +-
 format/src/main/thrift/schema.thrift                    |  2 +-
 .../org/apache/carbondata/spark/util/CommonUtil.scala   |  4 ++--
 .../apache/spark/sql/catalyst/CarbonDDLSqlParser.scala  |  8 ++++----
 6 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/76a5d895/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
b/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
index 0023387..7c59a59 100644
--- a/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
+++ b/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
@@ -807,7 +807,7 @@ public final class CarbonCommonConstants {
   public static final String DICTIONARY_INCLUDE = "dictionary_include";
   public static final String SORT_COLUMNS = "sort_columns";
   public static final String PARTITION_TYPE = "partition_type";
-  public static final String NUMBER_OF_PARTITIONS = "number_of_partitions";
+  public static final String NUM_PARTITIONS = "num_partitions";
   public static final String RANGE_INFO = "range_info";
   public static final String LIST_INFO = "list_info";
   public static final String COLUMN_PROPERTIES = "columnproperties";

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/76a5d895/core/src/main/java/org/apache/carbondata/core/metadata/schema/PartitionInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/metadata/schema/PartitionInfo.java
b/core/src/main/java/org/apache/carbondata/core/metadata/schema/PartitionInfo.java
index 7c8edc3..1add0a9 100644
--- a/core/src/main/java/org/apache/carbondata/core/metadata/schema/PartitionInfo.java
+++ b/core/src/main/java/org/apache/carbondata/core/metadata/schema/PartitionInfo.java
@@ -43,9 +43,9 @@ public class PartitionInfo implements Serializable {
   private List<List<String>> listInfo;
 
   /**
-   * hash partition numbers
+   * number of partitions
    */
-  private int numberOfPartitions;
+  private int numPartitions;
 
   public PartitionInfo(List<ColumnSchema> columnSchemaList, PartitionType partitionType)
{
     this.columnSchemaList = columnSchemaList;
@@ -60,12 +60,12 @@ public class PartitionInfo implements Serializable {
     return partitionType;
   }
 
-  public void setNumberOfPartitions(int numberOfPartitions) {
-    this.numberOfPartitions = numberOfPartitions;
+  public void setNumPartitions(int numPartitions) {
+    this.numPartitions = numPartitions;
   }
 
-  public int getNumberOfPartitions() {
-    return numberOfPartitions;
+  public int getNumPartitions() {
+    return numPartitions;
   }
 
   public void setRangeInfo(List<String> rangeInfo) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/76a5d895/examples/spark2/src/main/scala/org/apache/carbondata/examples/CarbonPartitionExample.scala
----------------------------------------------------------------------
diff --git a/examples/spark2/src/main/scala/org/apache/carbondata/examples/CarbonPartitionExample.scala
b/examples/spark2/src/main/scala/org/apache/carbondata/examples/CarbonPartitionExample.scala
index 93ade9c..5f07b4b 100644
--- a/examples/spark2/src/main/scala/org/apache/carbondata/examples/CarbonPartitionExample.scala
+++ b/examples/spark2/src/main/scala/org/apache/carbondata/examples/CarbonPartitionExample.scala
@@ -95,7 +95,7 @@ object CarbonPartitionExample {
                 | )
                 | PARTITIONED BY (vin String)
                 | STORED BY 'carbondata'
-                | TBLPROPERTIES('PARTITION_TYPE'='HASH','NUMBER_OF_PARTITIONS'='5')
+                | TBLPROPERTIES('PARTITION_TYPE'='HASH','NUM_PARTITIONS'='5')
                 """.stripMargin)
 
     // list partition

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/76a5d895/format/src/main/thrift/schema.thrift
----------------------------------------------------------------------
diff --git a/format/src/main/thrift/schema.thrift b/format/src/main/thrift/schema.thrift
index 779c6e7..3385245 100644
--- a/format/src/main/thrift/schema.thrift
+++ b/format/src/main/thrift/schema.thrift
@@ -132,7 +132,7 @@ struct SchemaEvolution{
 struct PartitionInfo{
     1: required list<ColumnSchema> partition_columns;
     2: required PartitionType partition_type;
-    3: optional i32 number_of_partitions;  // number of partitions defined in hash partition
table
+    3: optional i32 num_partitions;  // number of partitions defined in hash partition table
     4: optional list<list<string>> list_info; // value list of list partition
table
     5: optional list<string> range_info;  // range value list of range partition table
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/76a5d895/integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
index 9e3e42a..5314a15 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
@@ -159,7 +159,7 @@ object CommonUtil {
       partitionerFields: Seq[PartitionerField]): Boolean = {
     var isValid: Boolean = true
     val partitionType = tableProperties.get(CarbonCommonConstants.PARTITION_TYPE)
-    val numberOfPartitions = tableProperties.get(CarbonCommonConstants.NUMBER_OF_PARTITIONS)
+    val numPartitions = tableProperties.get(CarbonCommonConstants.NUM_PARTITIONS)
     val rangeInfo = tableProperties.get(CarbonCommonConstants.RANGE_INFO)
     val listInfo = tableProperties.get(CarbonCommonConstants.LIST_INFO)
 
@@ -167,7 +167,7 @@ object CommonUtil {
       isValid = false
     } else {
       partitionType.get.toUpperCase() match {
-        case "HASH" => if (!numberOfPartitions.isDefined) isValid = false
+        case "HASH" => if (!numPartitions.isDefined) isValid = false
         case "LIST" => if (!listInfo.isDefined) isValid = false
         case "RANGE" => if (!rangeInfo.isDefined) isValid = false
         case "RANGE_INTERVAL" => isValid = false

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/76a5d895/integration/spark-common/src/main/scala/org/apache/spark/sql/catalyst/CarbonDDLSqlParser.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/spark/sql/catalyst/CarbonDDLSqlParser.scala
b/integration/spark-common/src/main/scala/org/apache/spark/sql/catalyst/CarbonDDLSqlParser.scala
index 968f60b..674c1ce 100644
--- a/integration/spark-common/src/main/scala/org/apache/spark/sql/catalyst/CarbonDDLSqlParser.scala
+++ b/integration/spark-common/src/main/scala/org/apache/spark/sql/catalyst/CarbonDDLSqlParser.scala
@@ -362,15 +362,15 @@ abstract class CarbonDDLSqlParser extends AbstractCarbonSparkSQLParser
{
       None
     } else {
       var partitionType: String = ""
-      var numberOfPartitions = 0
+      var numPartitions = 0
       var rangeInfo = List[String]()
       var listInfo = ListBuffer[List[String]]()
       var templist = ListBuffer[String]()
       if (tableProperties.get(CarbonCommonConstants.PARTITION_TYPE).isDefined) {
         partitionType = tableProperties.get(CarbonCommonConstants.PARTITION_TYPE).get
       }
-      if (tableProperties.get(CarbonCommonConstants.NUMBER_OF_PARTITIONS).isDefined) {
-        numberOfPartitions = tableProperties.get(CarbonCommonConstants.NUMBER_OF_PARTITIONS).get
+      if (tableProperties.get(CarbonCommonConstants.NUM_PARTITIONS).isDefined) {
+        numPartitions = tableProperties.get(CarbonCommonConstants.NUM_PARTITIONS).get
           .toInt
       }
       if (tableProperties.get(CarbonCommonConstants.RANGE_INFO).isDefined) {
@@ -408,7 +408,7 @@ abstract class CarbonDDLSqlParser extends AbstractCarbonSparkSQLParser
{
       var partitionInfo : PartitionInfo = null
       partitionType.toUpperCase() match {
         case "HASH" => partitionInfo = new PartitionInfo(cols.asJava, PartitionType.HASH)
-          partitionInfo.setNumberOfPartitions(numberOfPartitions)
+          partitionInfo.setNumPartitions(numPartitions)
         case "RANGE" => partitionInfo = new PartitionInfo(cols.asJava, PartitionType.RANGE)
           partitionInfo.setRangeInfo(rangeInfo.asJava)
         case "LIST" => partitionInfo = new PartitionInfo(cols.asJava, PartitionType.LIST)


Mime
View raw message