Repository: incubator-carbondata
Updated Branches:
  refs/heads/master b81cf66a0 -> b2e48a398


removed no used carbon common constants

remove those same values but different 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/fa722bd8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/fa722bd8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/fa722bd8

Branch: refs/heads/master
Commit: fa722bd876fa5faa43ecf4b0404f9d0e581d56ae
Parents: b81cf66
Author: foryou2030 <foryou2...@126.com>
Authored: Tue Sep 13 17:12:13 2016 +0800
Committer: Vimal-Das <vimal...@apache.org>
Committed: Mon Sep 19 21:13:26 2016 +0530

----------------------------------------------------------------------
 .../core/constants/CarbonCommonConstants.java   | 65 --------------------
 .../hadoop/test/util/StoreCreator.java          |  3 +-
 .../carbondata/spark/load/CarbonLoaderUtil.java |  3 +-
 .../lcm/status/SegmentStatusManager.java        |  5 +-
 .../csvbased/BadRecordslogger.java              |  3 +-
 .../csvbased/CarbonCSVBasedSeqGenStep.java      |  2 +-
 6 files changed, 10 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/fa722bd8/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 1d60ee9..453c626 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
@@ -134,10 +134,6 @@ public final class CarbonCommonConstants {
    */
   public static final String CARBON_DDL_BASE_HDFS_URL = 
"carbon.ddl.base.hdfs.url";
   /**
-   * Slice Meta data file.
-   */
-  public static final String SLICE_METADATA_FILENAME = "sliceMetaData";
-  /**
    * Load Folder Name
    */
   public static final String LOAD_FOLDER = "Segment_";
@@ -150,10 +146,6 @@ public final class CarbonCommonConstants {
    */
   public static final String FS_DEFAULT_FS = "fs.defaultFS";
   /**
-   * RESTructure Folder
-   */
-  public static final String RESTRUCTRE_FOLDER = "RS_";
-  /**
    * BYTEBUFFER_SIZE
    */
 
@@ -167,26 +159,6 @@ public final class CarbonCommonConstants {
    */
   public static final String COUNT = "count";
   /**
-   * Count constant
-   */
-  public static final String COUNT_STAR = "countstar";
-  /**
-   * Max constant
-   */
-  public static final String MAX = "max";
-  /**
-   * Min constant
-   */
-  public static final String MIN = "min";
-  /**
-   * distinct count
-   */
-  public static final String DISTINCT_COUNT = "distinct-count";
-  /**
-   * CUSTOM
-   */
-  public static final String CUSTOM = "custom";
-  /**
    * SUM
    */
   public static final String SUM = "sum";
@@ -353,10 +325,6 @@ public final class CarbonCommonConstants {
    */
   public static final String HYPHEN_SPC_CHARACTER = "-#!:HYPHEN:!#-";
   /**
-   * CARBON_DECIMAL_POINTERS_DEFAULT
-   */
-  public static final byte CARBON_DECIMAL_POINTERS_DEFAULT = 5;
-  /**
    * SORT_TEMP_FILE_EXT
    */
   public static final String SORT_TEMP_FILE_EXT = ".sorttemp";
@@ -450,8 +418,6 @@ public final class CarbonCommonConstants {
    * LEVEL_METADATA_FILE
    */
   public static final String LEVEL_METADATA_FILE = "levelmetadata_";
-  public static final String ENABLE_BASE64_ENCODING = "enable.base64.encoding";
-  public static final String ENABLE_BASE64_ENCODING_DEFAULT = "false";
   /**
    * LOAD_STATUS SUCCESS
    */
@@ -469,14 +435,6 @@ public final class CarbonCommonConstants {
    */
   public static final String CARBON_METADATA_EXTENSION = ".metadata";
   /**
-   * LOAD_STATUS
-   */
-  public static final String CARBON_DEFAULT_STREAM_ENCODEFORMAT = "UTF-8";
-  /**
-   * AGGREGATE_TABLE_START_TAG
-   */
-  public static final String AGGREGATE_TABLE_START_TAG = "agg";
-  /**
    * COMMA
    */
   public static final String COMMA = ",";
@@ -501,10 +459,6 @@ public final class CarbonCommonConstants {
    */
   public static final String CARBON_TIMESTAMP = "dd-MM-yyyy HH:mm:ss";
   /**
-   * METADATA_LOCK
-   */
-  public static final String METADATA_LOCK = "meta.lock";
-  /**
    * NUMBER_OF_TRIES_FOR_LOAD_METADATA_LOCK
    */
   public static final int NUMBER_OF_TRIES_FOR_LOAD_METADATA_LOCK_DEFAULT = 3;
@@ -537,7 +491,6 @@ public final class CarbonCommonConstants {
   public static final String TIMESTAMP_TYPE = "TimestampType";
   public static final String BYTE_TYPE = "ByteType";
   public static final String SHORT_TYPE = "ShortType";
-  public static final String BINARY_TYPE = "BinaryType";
   public static final String DECIMAL_TYPE = "DecimalType";
   public static final String STRING = "String";
   public static final String COLUMNAR = "columnar";
@@ -554,7 +507,6 @@ public final class CarbonCommonConstants {
   /**
    * FACT_UPDATE_EXTENSION.
    */
-  public static final String FACT_UPDATE_EXTENSION = ".carbondata_update";
   public static final String FACT_DELETE_EXTENSION = "_delete";
   /**
    * MARKED_FOR_UPDATION
@@ -568,13 +520,6 @@ public final class CarbonCommonConstants {
    * LOADMETADATA_FILENAME
    */
   public static final String LOADMETADATA_FILENAME = "tablestatus";
-  public static final String SUM_DISTINCT = "sum-distinct";
-  /**
-   * INMEMORY_REOCRD_SIZE
-   */
-  public static final String INMEMORY_REOCRD_SIZE = 
"carbon.inmemory.record.size";
-  public static final int INMEMORY_REOCRD_SIZE_DEFAULT = 240000;
-
   /**
    * INMEMORY_REOCRD_SIZE
    */
@@ -795,11 +740,6 @@ public final class CarbonCommonConstants {
   public static final long CARBON_256MB = 256*1024*1024;
 
   /**
-   * Data type String.
-   */
-  public static final String DATATYPE_STRING = "STRING";
-
-  /**
    * SEGMENT_COMPACTED is property to indicate whether seg is compacted or not.
    */
   public static final String SEGMENT_COMPACTED = "Compacted";
@@ -833,11 +773,6 @@ public final class CarbonCommonConstants {
       "HDFSLOCK";
 
   /**
-   * Lock file in zoo keeper will be of this name.
-   */
-  public static final String ZOOKEEPER_LOCK = "zookeeperLock";
-
-  /**
    * Invalid filter member log string
    */
   public static final String FILTER_INVALID_MEMBER = " Invalid Record(s) are 
present "

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/fa722bd8/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/StoreCreator.java
----------------------------------------------------------------------
diff --git 
a/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/StoreCreator.java 
b/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/StoreCreator.java
index 5867160..f4595a5 100644
--- 
a/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/StoreCreator.java
+++ 
b/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/StoreCreator.java
@@ -70,6 +70,7 @@ import 
org.apache.carbondata.processing.graphgenerator.GraphGeneratorException;
 import org.apache.carbondata.processing.util.CarbonDataProcessorUtil;
 
 import java.io.*;
+import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
@@ -418,7 +419,7 @@ public class StoreCreator {
 
       dataOutputStream = 
writeOperation.openForWrite(FileWriteOperation.OVERWRITE);
       brWriter = new BufferedWriter(new OutputStreamWriter(dataOutputStream,
-          CarbonCommonConstants.CARBON_DEFAULT_STREAM_ENCODEFORMAT));
+              Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET)));
 
       String metadataInstance = 
gsonObjectToWrite.toJson(listOfLoadFolderDetails.toArray());
       brWriter.write(metadataInstance);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/fa722bd8/integration/spark/src/main/java/org/apache/carbondata/spark/load/CarbonLoaderUtil.java
----------------------------------------------------------------------
diff --git 
a/integration/spark/src/main/java/org/apache/carbondata/spark/load/CarbonLoaderUtil.java
 
b/integration/spark/src/main/java/org/apache/carbondata/spark/load/CarbonLoaderUtil.java
index 72078a6..2be1baf 100644
--- 
a/integration/spark/src/main/java/org/apache/carbondata/spark/load/CarbonLoaderUtil.java
+++ 
b/integration/spark/src/main/java/org/apache/carbondata/spark/load/CarbonLoaderUtil.java
@@ -25,6 +25,7 @@ import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -459,7 +460,7 @@ public final class CarbonLoaderUtil {
 
       dataOutputStream = 
writeOperation.openForWrite(FileWriteOperation.OVERWRITE);
       brWriter = new BufferedWriter(new OutputStreamWriter(dataOutputStream,
-          CarbonCommonConstants.CARBON_DEFAULT_STREAM_ENCODEFORMAT));
+              Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET)));
 
       String metadataInstance = 
gsonObjectToWrite.toJson(listOfLoadFolderDetails.toArray());
       brWriter.write(metadataInstance);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/fa722bd8/processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
----------------------------------------------------------------------
diff --git 
a/processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
 
b/processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
index 6db12b7..67010ba 100644
--- 
a/processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
+++ 
b/processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
@@ -26,6 +26,7 @@ import java.io.DataOutputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
+import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -203,7 +204,7 @@ public class SegmentStatusManager {
       }
       dataInputStream = fileOperation.openForRead();
       inStream = new InputStreamReader(dataInputStream,
-          CarbonCommonConstants.CARBON_DEFAULT_STREAM_ENCODEFORMAT);
+              Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET));
       buffReader = new BufferedReader(inStream);
       listOfLoadFolderDetailsArray =
           gsonObjectToRead.fromJson(buffReader, LoadMetadataDetails[].class);
@@ -422,7 +423,7 @@ public class SegmentStatusManager {
     try {
       dataOutputStream = fileWrite.openForWrite(FileWriteOperation.OVERWRITE);
       brWriter = new BufferedWriter(new OutputStreamWriter(dataOutputStream,
-          CarbonCommonConstants.CARBON_DEFAULT_STREAM_ENCODEFORMAT));
+              Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET)));
 
       String metadataInstance = 
gsonObjectToWrite.toJson(listOfLoadFolderDetailsArray);
       brWriter.write(metadataInstance);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/fa722bd8/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/BadRecordslogger.java
----------------------------------------------------------------------
diff --git 
a/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/BadRecordslogger.java
 
b/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/BadRecordslogger.java
index 61cfee2..1035041 100644
--- 
a/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/BadRecordslogger.java
+++ 
b/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/BadRecordslogger.java
@@ -25,6 +25,7 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.OutputStreamWriter;
+import java.nio.charset.Charset;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -141,7 +142,7 @@ public class BadRecordslogger {
         outStream = FileFactory.getDataOutputStream(filePath, fileType);
 
         bufferedWriter = new BufferedWriter(new OutputStreamWriter(outStream,
-            CarbonCommonConstants.CARBON_DEFAULT_STREAM_ENCODEFORMAT));
+                Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET)));
 
       }
       bufferedWriter.write(logStrings.toString());

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/fa722bd8/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenStep.java
----------------------------------------------------------------------
diff --git 
a/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenStep.java
 
b/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenStep.java
index 8e2a16b..f094906 100644
--- 
a/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenStep.java
+++ 
b/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenStep.java
@@ -498,7 +498,7 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
     complexTypes = new GenericDataType[meta.getComplexTypeColumns().length];
     for (int i = 0; i < meta.noDictionaryCols.length; i++) {
       for (int j = 0; j < metaColumnNames.length; j++) {
-        if (CarbonCommonConstants.DATATYPE_STRING
+        if (CarbonCommonConstants.STRING
             .equalsIgnoreCase(meta.dimColDataTypes.get(metaColumnNames[j]))) {
           isStringDataType[j] = true;
         }

Reply via email to