carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [1/2] incubator-carbondata git commit: use carbon common constants instead of direct values
Date Sat, 08 Oct 2016 16:13:31 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 6be540b7b -> 958dfde64


use carbon common constants instead of direct values

fix checkstyle


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

Branch: refs/heads/master
Commit: 0312e9d49f64f0f4a22559b655b685f76c68e01e
Parents: 6be540b
Author: foryou2030 <foryou2030@126.com>
Authored: Mon Sep 26 16:25:38 2016 +0800
Committer: jackylk <jacky.likun@huawei.com>
Committed: Sat Oct 8 23:59:48 2016 +0800

----------------------------------------------------------------------
 .../apache/carbondata/core/util/ByteUtilTest.java |  5 +++--
 .../examples/GenerateDictionaryExample.scala      |  6 ++++--
 .../hadoop/util/ObjectSerializationUtil.java      |  8 ++++++--
 .../apache/carbondata/spark/CarbonOption.scala    |  4 +++-
 .../org/apache/spark/sql/CarbonSqlParser.scala    |  3 ++-
 .../spark/sql/hive/CarbonMetastoreCatalog.scala   |  8 +++++---
 .../testsuite/validation/FileFooterValidator.java |  3 ++-
 .../complexType/TestCreateTableWithDouble.scala   |  5 +++--
 .../CompactionSystemLockFeatureTest.scala         |  6 +++---
 .../DataCompactionCardinalityBoundryTest.scala    |  2 +-
 .../datacompaction/DataCompactionLockTest.scala   |  3 ++-
 .../DataCompactionNoDictionaryTest.scala          |  6 ++++--
 .../datacompaction/DataCompactionTest.scala       |  5 +++--
 .../MajorCompactionIgnoreInMinorTest.scala        | 18 ++++++++++++------
 .../MajorCompactionStopsAfterCompaction.scala     |  5 +++--
 .../dataretention/DataRetentionTestCase.scala     |  5 +++--
 .../spark/util/AllDictionaryTestCase.scala        |  7 +++++--
 .../AutoHighCardinalityIdentifyTestCase.scala     |  5 +++--
 .../util/ExternalColumnDictionaryTestCase.scala   | 11 +++++++----
 .../GlobalDictionaryUtilConcurrentTestCase.scala  |  3 ++-
 .../spark/util/GlobalDictionaryUtilTestCase.scala | 14 +++++++-------
 .../lcm/status/SegmentStatusManager.java          |  3 ++-
 .../processing/csvload/DataGraphExecuter.java     |  4 ++--
 .../processing/graphgenerator/GraphGenerator.java |  6 +++---
 .../carbon/datastore/BlockIndexStoreTest.java     | 10 +++++++---
 25 files changed, 97 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/core/src/test/java/org/apache/carbondata/core/util/ByteUtilTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/util/ByteUtilTest.java b/core/src/test/java/org/apache/carbondata/core/util/ByteUtilTest.java
index 1f048ed..4ddf96e 100644
--- a/core/src/test/java/org/apache/carbondata/core/util/ByteUtilTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/util/ByteUtilTest.java
@@ -19,6 +19,7 @@
 package org.apache.carbondata.core.util;
 
 import junit.framework.TestCase;
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.util.ByteUtil.UnsafeComparer;
 import org.junit.Before;
 import org.junit.Test;
@@ -139,7 +140,7 @@ public class ByteUtilTest extends TestCase {
     private void prepareBuffers() {
         ByteBuffer[] out1 = new ByteBuffer[1];
         ByteBuffer buffer = ByteBuffer.allocate(dimensionValue1.length());
-        buffer.put(dimensionValue1.getBytes(Charset.forName("UTF-8")));
+        buffer.put(dimensionValue1.getBytes(Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET)));
         buffer.rewind();
         out1[0] = buffer;
 
@@ -147,7 +148,7 @@ public class ByteUtilTest extends TestCase {
         ByteBuffer[] out2 = new ByteBuffer[1];
 
         ByteBuffer buffer2 = ByteBuffer.allocate(dimensionValue2.length());
-        buffer2.put(dimensionValue2.getBytes(Charset.forName("UTF-8")));
+        buffer2.put(dimensionValue2.getBytes(Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET)));
         buffer2.rewind();
         out2[0] = buffer2;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/examples/src/main/scala/org/apache/carbondata/examples/GenerateDictionaryExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/carbondata/examples/GenerateDictionaryExample.scala b/examples/src/main/scala/org/apache/carbondata/examples/GenerateDictionaryExample.scala
index 728746b..2d7aed0 100644
--- a/examples/src/main/scala/org/apache/carbondata/examples/GenerateDictionaryExample.scala
+++ b/examples/src/main/scala/org/apache/carbondata/examples/GenerateDictionaryExample.scala
@@ -23,6 +23,7 @@ import org.apache.carbondata.core.cache.dictionary.DictionaryColumnUniqueIdentif
 import org.apache.carbondata.core.carbon.{CarbonTableIdentifier, ColumnIdentifier}
 import org.apache.carbondata.core.carbon.metadata.schema.table.column.CarbonDimension
 import org.apache.carbondata.core.carbon.path.CarbonStorePath
+import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.examples.util.ExampleUtils
 import org.apache.carbondata.spark.load.CarbonLoaderUtil
 
@@ -37,7 +38,7 @@ object GenerateDictionaryExample {
     val cc = ExampleUtils.createCarbonContext("GenerateDictionaryExample")
     val factFilePath = ExampleUtils.currentPath + "/src/main/resources/factSample.csv"
     val carbonTablePath = CarbonStorePath.getCarbonTablePath(ExampleUtils.storeLocation,
-      new CarbonTableIdentifier("default", "dictSample", "1"))
+      new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "dictSample", "1"))
     val dictFolderPath = carbonTablePath.getMetadataDirectoryPath
 
     // execute sql statement
@@ -53,7 +54,8 @@ object GenerateDictionaryExample {
            """)
 
     // check generated dictionary
-    val tableIdentifier = new CarbonTableIdentifier("default", "dictSample", "1")
+    val tableIdentifier =
+      new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "dictSample", "1")
     printDictionary(cc, tableIdentifier, dictFolderPath)
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/hadoop/src/main/java/org/apache/carbondata/hadoop/util/ObjectSerializationUtil.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/util/ObjectSerializationUtil.java b/hadoop/src/main/java/org/apache/carbondata/hadoop/util/ObjectSerializationUtil.java
index ffd15f2..19d69b4 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/util/ObjectSerializationUtil.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/util/ObjectSerializationUtil.java
@@ -26,6 +26,8 @@ import java.io.ObjectOutputStream;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
 
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
+
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -70,7 +72,8 @@ public class ObjectSerializationUtil {
       }
     }
 
-    return new String(Base64.encodeBase64(baos.toByteArray()), "UTF-8");
+    return new String(Base64.encodeBase64(baos.toByteArray()),
+            CarbonCommonConstants.DEFAULT_CHARSET);
   }
 
   /**
@@ -85,7 +88,8 @@ public class ObjectSerializationUtil {
       return null;
     }
 
-    byte[] bytes = Base64.decodeBase64(objectString.getBytes("UTF-8"));
+    byte[] bytes =
+            Base64.decodeBase64(objectString.getBytes(CarbonCommonConstants.DEFAULT_CHARSET));
 
     ByteArrayInputStream bais = null;
     GZIPInputStream gis = null;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/main/scala/org/apache/carbondata/spark/CarbonOption.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/apache/carbondata/spark/CarbonOption.scala b/integration/spark/src/main/scala/org/apache/carbondata/spark/CarbonOption.scala
index d4aa3f4..b93841f 100644
--- a/integration/spark/src/main/scala/org/apache/carbondata/spark/CarbonOption.scala
+++ b/integration/spark/src/main/scala/org/apache/carbondata/spark/CarbonOption.scala
@@ -17,13 +17,15 @@
 
 package org.apache.carbondata.spark
 
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+
 /**
  * Contains all options for Spark data source
  */
 class CarbonOption(options: Map[String, String]) {
   def tableIdentifier: String = options.getOrElse("tableName", s"$dbName.$tableName")
 
-  def dbName: String = options.getOrElse("dbName", "default")
+  def dbName: String = options.getOrElse("dbName", CarbonCommonConstants.DATABASE_DEFAULT_NAME)
 
   def tableName: String = options.getOrElse("tableName", "default_table")
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala b/integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala
index 49c17f3..15075f6 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala
@@ -474,7 +474,8 @@ class CarbonSqlParser()
     CommonUtil.validateTableBlockSize(tableProperties)
 
     tableModel(ifNotExistPresent,
-      dbName.getOrElse("default"), dbName, tableName, tableProperties,
+      dbName.getOrElse(CarbonCommonConstants.DATABASE_DEFAULT_NAME),
+      dbName, tableName, tableProperties,
       reorderDimensions(dims.map(f => normalizeType(f)).map(f => addParent(f))),
       msrs.map(f => normalizeType(f)), "", null, "",
       None, Seq(), null, Option(noDictionaryDims), Option(noInvertedIdxCols), null, partitioner,

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonMetastoreCatalog.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonMetastoreCatalog.scala b/integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonMetastoreCatalog.scala
index c065044..8b05629 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonMetastoreCatalog.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonMetastoreCatalog.scala
@@ -108,7 +108,8 @@ class CarbonMetastoreCatalog(hiveContext: HiveContext, val storePath: String,
     .getLogService("org.apache.spark.sql.CarbonMetastoreCatalog")
 
   val tableModifiedTimeStore = new java.util.HashMap[String, Long]()
-  tableModifiedTimeStore.put("default", System.currentTimeMillis())
+  tableModifiedTimeStore
+    .put(CarbonCommonConstants.DATABASE_DEFAULT_NAME, System.currentTimeMillis())
 
   val metadata = loadMetadata(storePath)
 
@@ -471,7 +472,7 @@ class CarbonMetastoreCatalog(hiveContext: HiveContext, val storePath: String,
 
     touchSchemasTimestampFile(databaseName, tableName)
 
-    tableModifiedTimeStore.put("default",
+    tableModifiedTimeStore.put(CarbonCommonConstants.DATABASE_DEFAULT_NAME,
       FileFactory.getCarbonFile(timestampFile, timestampFileType).getLastModifiedTime)
 
   }
@@ -486,7 +487,8 @@ class CarbonMetastoreCatalog(hiveContext: HiveContext, val storePath: String,
     val (timestampFile, timestampFileType) = getTimestampFileAndType("", "")
     if (FileFactory.isFileExist(timestampFile, timestampFileType)) {
       if (!(FileFactory.getCarbonFile(timestampFile, timestampFileType).
-        getLastModifiedTime == tableModifiedTimeStore.get("default"))) {
+        getLastModifiedTime ==
+        tableModifiedTimeStore.get(CarbonCommonConstants.DATABASE_DEFAULT_NAME))) {
         refreshCache()
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/java/org/carbondata/integration/spark/testsuite/validation/FileFooterValidator.java
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/java/org/carbondata/integration/spark/testsuite/validation/FileFooterValidator.java b/integration/spark/src/test/java/org/carbondata/integration/spark/testsuite/validation/FileFooterValidator.java
index 72e52ca..76906c6 100644
--- a/integration/spark/src/test/java/org/carbondata/integration/spark/testsuite/validation/FileFooterValidator.java
+++ b/integration/spark/src/test/java/org/carbondata/integration/spark/testsuite/validation/FileFooterValidator.java
@@ -62,7 +62,8 @@ public class FileFooterValidator {
                 + "PARTITIONDATA(DELIMITER ',', QUOTECHAR '\"')");
     String storePath =
         CarbonProperties.getInstance().getProperty(CarbonCommonConstants.STORE_LOCATION);
-    CarbonTableIdentifier tableIdentifier = new CarbonTableIdentifier("default", "validatefooter", "1");
+    CarbonTableIdentifier tableIdentifier =
+            new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "validatefooter", "1");
     String segmentPath = CarbonStorePath.getCarbonTablePath(storePath, tableIdentifier)
         .getCarbonDataDirectoryPath("0", "0");
     CarbonFile carbonFile =

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestCreateTableWithDouble.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestCreateTableWithDouble.scala b/integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestCreateTableWithDouble.scala
index feb348a..cb10baf 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestCreateTableWithDouble.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestCreateTableWithDouble.scala
@@ -26,6 +26,7 @@ import org.apache.spark.sql.common.util.QueryTest
 import org.apache.spark.sql.Row
 import org.apache.carbondata.core.carbon.CarbonTableIdentifier
 import org.apache.carbondata.core.carbon.metadata.schema.table.column.CarbonDimension
+import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.scalatest.BeforeAndAfterAll
 
 /**
@@ -76,8 +77,8 @@ class TestCreateTableWithDouble extends QueryTest with BeforeAndAfterAll {
       case e : Throwable => fail(e)
     }
     // assert that field 'number' is a dimension
-    val tableIdentifier =
-      new CarbonTableIdentifier("default", "doubleComplex2".toLowerCase(), "uniqueid")
+    val tableIdentifier = new CarbonTableIdentifier(
+      CarbonCommonConstants.DATABASE_DEFAULT_NAME, "doubleComplex2".toLowerCase(), "uniqueid")
     val carbonTable = org.apache.carbondata.core.carbon.metadata.CarbonMetadata.getInstance()
       .getCarbonTable(tableIdentifier.getTableUniqueName)
     val dimExist = carbonTable.getDimensionByTableName("doubleComplex2".toLowerCase()).toArray.

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/CompactionSystemLockFeatureTest.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/CompactionSystemLockFeatureTest.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/CompactionSystemLockFeatureTest.scala
index a040550..7343a81 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/CompactionSystemLockFeatureTest.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/CompactionSystemLockFeatureTest.scala
@@ -86,7 +86,7 @@ class CompactionSystemLockFeatureTest extends QueryTest with BeforeAndAfterAll {
     val absoluteTableIdentifier = new
         AbsoluteTableIdentifier(
           CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-          new CarbonTableIdentifier("default", "table2", "rrr")
+          new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "table2", "rrr")
         )
     val carbonTablePath: CarbonTablePath = CarbonStorePath
       .getCarbonTablePath(absoluteTableIdentifier.getStorePath,
@@ -116,7 +116,7 @@ class CompactionSystemLockFeatureTest extends QueryTest with BeforeAndAfterAll {
     val segmentStatusManager: SegmentStatusManager = new SegmentStatusManager(new
         AbsoluteTableIdentifier(
           CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-          new CarbonTableIdentifier("default", "table1", "rrr")
+          new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "table1", "rrr")
         )
     )
     // merged segment should not be there
@@ -128,7 +128,7 @@ class CompactionSystemLockFeatureTest extends QueryTest with BeforeAndAfterAll {
     val segmentStatusManager2: SegmentStatusManager = new SegmentStatusManager(new
         AbsoluteTableIdentifier(
           CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-          new CarbonTableIdentifier("default", "table2", "rrr1")
+          new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "table2", "rrr1")
         )
     )
     // merged segment should not be there

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionCardinalityBoundryTest.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionCardinalityBoundryTest.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionCardinalityBoundryTest.scala
index 4ec00ac..d780efe 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionCardinalityBoundryTest.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionCardinalityBoundryTest.scala
@@ -89,7 +89,7 @@ class DataCompactionCardinalityBoundryTest extends QueryTest with BeforeAndAfter
       val segmentStatusManager: SegmentStatusManager = new SegmentStatusManager(new
           AbsoluteTableIdentifier(
             CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-            new CarbonTableIdentifier("default", "cardinalityTest", "1")
+            new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "cardinalityTest", "1")
           )
       )
       val segments = segmentStatusManager.getValidAndInvalidSegments.getValidSegments.asScala.toList

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionLockTest.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionLockTest.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionLockTest.scala
index 4a43767..eb889d6 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionLockTest.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionLockTest.scala
@@ -41,7 +41,8 @@ class DataCompactionLockTest extends QueryTest with BeforeAndAfterAll {
   val absoluteTableIdentifier: AbsoluteTableIdentifier = new
       AbsoluteTableIdentifier(
         CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-        new CarbonTableIdentifier("default", "compactionlocktesttable", "1")
+        new CarbonTableIdentifier(
+          CarbonCommonConstants.DATABASE_DEFAULT_NAME, "compactionlocktesttable", "1")
       )
   val carbonTablePath: CarbonTablePath = CarbonStorePath
     .getCarbonTablePath(absoluteTableIdentifier.getStorePath,

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionNoDictionaryTest.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionNoDictionaryTest.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionNoDictionaryTest.scala
index 17fc1e5..c7be22f 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionNoDictionaryTest.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionNoDictionaryTest.scala
@@ -92,7 +92,8 @@ class DataCompactionNoDictionaryTest extends QueryTest with BeforeAndAfterAll {
     var noOfRetries = 0
     while (status && noOfRetries < 10) {
 
-      val segments: List[String] = getSegments("default", "nodictionaryCompaction", "uni21")
+      val segments: List[String] = getSegments(
+        CarbonCommonConstants.DATABASE_DEFAULT_NAME, "nodictionaryCompaction", "uni21")
 
       if (!segments.contains("0.1")) {
         // wait for 2 seconds for compaction to complete.
@@ -133,7 +134,8 @@ class DataCompactionNoDictionaryTest extends QueryTest with BeforeAndAfterAll {
    sql("clean files for table nodictionaryCompaction")
 
     // merged segment should not be there
-    val segments = getSegments("default", "nodictionaryCompaction", "uni21")
+    val segments =
+      getSegments(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "nodictionaryCompaction", "uni21")
     assert(!segments.contains("0"))
     assert(!segments.contains("1"))
     assert(!segments.contains("2"))

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionTest.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionTest.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionTest.scala
index 39dba52..3eef8b7 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionTest.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionTest.scala
@@ -87,7 +87,7 @@ class DataCompactionTest extends QueryTest with BeforeAndAfterAll {
       val segmentStatusManager: SegmentStatusManager = new SegmentStatusManager(new
           AbsoluteTableIdentifier(
             CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-            new CarbonTableIdentifier("default", "normalcompaction", "1")
+            new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "normalcompaction", "1")
           )
       )
       val segments = segmentStatusManager.getValidAndInvalidSegments.getValidSegments.asScala.toList
@@ -134,7 +134,8 @@ class DataCompactionTest extends QueryTest with BeforeAndAfterAll {
     val segmentStatusManager: SegmentStatusManager = new SegmentStatusManager(new
         AbsoluteTableIdentifier(
           CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-          new CarbonTableIdentifier("default", "normalcompaction", "uniqueid")
+          new CarbonTableIdentifier(
+            CarbonCommonConstants.DATABASE_DEFAULT_NAME, "normalcompaction", "uniqueid")
         )
     )
     // merged segment should not be there

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionIgnoreInMinorTest.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionIgnoreInMinorTest.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionIgnoreInMinorTest.scala
index 9fe178f..7edb000 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionIgnoreInMinorTest.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionIgnoreInMinorTest.scala
@@ -100,7 +100,8 @@ class MajorCompactionIgnoreInMinorTest extends QueryTest with BeforeAndAfterAll
       val segmentStatusManager: SegmentStatusManager = new SegmentStatusManager(new
           AbsoluteTableIdentifier(
             CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-            new CarbonTableIdentifier("default", "ignoremajor", noOfRetries + "")
+            new CarbonTableIdentifier(
+              CarbonCommonConstants.DATABASE_DEFAULT_NAME, "ignoremajor", noOfRetries + "")
           )
       )
       val segments = segmentStatusManager.getValidAndInvalidSegments.getValidSegments.asScala.toList
@@ -131,7 +132,8 @@ class MajorCompactionIgnoreInMinorTest extends QueryTest with BeforeAndAfterAll
     val segmentStatusManager: SegmentStatusManager = new SegmentStatusManager(new
         AbsoluteTableIdentifier(
           CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-          new CarbonTableIdentifier("default", "ignoremajor", "rrr")
+          new CarbonTableIdentifier(
+            CarbonCommonConstants.DATABASE_DEFAULT_NAME, "ignoremajor", "rrr")
         )
     )
     // merged segment should not be there
@@ -157,13 +159,15 @@ class MajorCompactionIgnoreInMinorTest extends QueryTest with BeforeAndAfterAll
     val segmentStatusManager: SegmentStatusManager = new SegmentStatusManager(new
         AbsoluteTableIdentifier(
           CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-          new CarbonTableIdentifier("default", "ignoremajor", "rrr")
+          new CarbonTableIdentifier(
+            CarbonCommonConstants.DATABASE_DEFAULT_NAME, "ignoremajor", "rrr")
         )
     )
     val carbontablePath = CarbonStorePath
       .getCarbonTablePath(CarbonProperties.getInstance
         .getProperty(CarbonCommonConstants.STORE_LOCATION),
-        new CarbonTableIdentifier("default", "ignoremajor", "rrr")
+        new CarbonTableIdentifier(
+          CarbonCommonConstants.DATABASE_DEFAULT_NAME, "ignoremajor", "rrr")
       )
       .getMetadataDirectoryPath
     var segs = segmentStatusManager.readLoadMetadata(carbontablePath)
@@ -184,13 +188,15 @@ class MajorCompactionIgnoreInMinorTest extends QueryTest with BeforeAndAfterAll
     val segmentStatusManager: SegmentStatusManager = new SegmentStatusManager(new
         AbsoluteTableIdentifier(
           CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-          new CarbonTableIdentifier("default", "ignoremajor", "rrr")
+          new CarbonTableIdentifier(
+            CarbonCommonConstants.DATABASE_DEFAULT_NAME, "ignoremajor", "rrr")
         )
     )
     val carbontablePath = CarbonStorePath
       .getCarbonTablePath(CarbonProperties.getInstance
         .getProperty(CarbonCommonConstants.STORE_LOCATION),
-        new CarbonTableIdentifier("default", "ignoremajor", "rrr")
+        new CarbonTableIdentifier(
+          CarbonCommonConstants.DATABASE_DEFAULT_NAME, "ignoremajor", "rrr")
       )
       .getMetadataDirectoryPath
     var segs = segmentStatusManager.readLoadMetadata(carbontablePath)

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
index 3e51002..3745e11 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
@@ -90,7 +90,8 @@ class MajorCompactionStopsAfterCompaction extends QueryTest with BeforeAndAfterA
       val segmentStatusManager: SegmentStatusManager = new SegmentStatusManager(new
           AbsoluteTableIdentifier(
             CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-            new CarbonTableIdentifier("default", "stopmajor", noOfRetries + "")
+            new CarbonTableIdentifier(
+              CarbonCommonConstants.DATABASE_DEFAULT_NAME, "stopmajor", noOfRetries + "")
           )
       )
       val segments = segmentStatusManager.getValidAndInvalidSegments.getValidSegments.asScala.toList
@@ -121,7 +122,7 @@ class MajorCompactionStopsAfterCompaction extends QueryTest with BeforeAndAfterA
     val segmentStatusManager: SegmentStatusManager = new SegmentStatusManager(new
         AbsoluteTableIdentifier(
           CarbonProperties.getInstance.getProperty(CarbonCommonConstants.STORE_LOCATION),
-          new CarbonTableIdentifier("default", "stopmajor", "rrr")
+          new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "stopmajor", "rrr")
         )
     )
     // merged segment should not be there

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataretention/DataRetentionTestCase.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataretention/DataRetentionTestCase.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataretention/DataRetentionTestCase.scala
index 2e7c757..8011da8 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataretention/DataRetentionTestCase.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataretention/DataRetentionTestCase.scala
@@ -50,10 +50,11 @@ class DataRetentionTestCase extends QueryTest with BeforeAndAfterAll {
   val storeLocation = new File(this.getClass.getResource("/").getPath + "/../test").getCanonicalPath
   val absoluteTableIdentifierForLock: AbsoluteTableIdentifier = new
       AbsoluteTableIdentifier(storeLocation,
-        new CarbonTableIdentifier("default", "retentionlock", "200"))
+        new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "retentionlock", "200"))
   val absoluteTableIdentifierForRetention: AbsoluteTableIdentifier = new
       AbsoluteTableIdentifier(storeLocation,
-        new CarbonTableIdentifier("default", "DataRetentionTable".toLowerCase(), "300"))
+        new CarbonTableIdentifier(
+          CarbonCommonConstants.DATABASE_DEFAULT_NAME, "DataRetentionTable".toLowerCase(), "300"))
   val segmentStatusManager: SegmentStatusManager = new SegmentStatusManager(absoluteTableIdentifierForRetention)
   val carbonTablePath = CarbonStorePath
     .getCarbonTablePath(absoluteTableIdentifierForRetention.getStorePath,

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/util/AllDictionaryTestCase.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/AllDictionaryTestCase.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/AllDictionaryTestCase.scala
index 9cceb03..2b19829 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/AllDictionaryTestCase.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/AllDictionaryTestCase.scala
@@ -24,6 +24,7 @@ import org.apache.spark.sql.common.util.CarbonHiveContext.sql
 import org.apache.spark.sql.common.util.{CarbonHiveContext, QueryTest}
 import org.apache.spark.sql.{CarbonEnv, CarbonRelation}
 import org.apache.carbondata.core.carbon.CarbonDataLoadSchema
+import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.spark.load.CarbonLoadModel
 import org.scalatest.BeforeAndAfterAll
 
@@ -105,8 +106,10 @@ class AllDictionaryTestCase extends QueryTest with BeforeAndAfterAll {
 
   def buildRelation() = {
     val catalog = CarbonEnv.getInstance(CarbonHiveContext).carbonCatalog
-    sampleRelation = catalog.lookupRelation1(Option("default"), "sample")(CarbonHiveContext).asInstanceOf[CarbonRelation]
-    complexRelation = catalog.lookupRelation1(Option("default"), "complextypes")(CarbonHiveContext).asInstanceOf[CarbonRelation]
+    sampleRelation = catalog.lookupRelation1(Option(CarbonCommonConstants.DATABASE_DEFAULT_NAME),
+      "sample")(CarbonHiveContext).asInstanceOf[CarbonRelation]
+    complexRelation = catalog.lookupRelation1(Option(CarbonCommonConstants.DATABASE_DEFAULT_NAME),
+      "complextypes")(CarbonHiveContext).asInstanceOf[CarbonRelation]
   }
 
   test("Support generate global dictionary from all dictionary files") {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/util/AutoHighCardinalityIdentifyTestCase.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/AutoHighCardinalityIdentifyTestCase.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/AutoHighCardinalityIdentifyTestCase.scala
index c93534e..e7a549c 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/AutoHighCardinalityIdentifyTestCase.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/AutoHighCardinalityIdentifyTestCase.scala
@@ -25,11 +25,11 @@ import org.apache.spark.sql.common.util.CarbonHiveContext.sql
 import org.apache.spark.sql.common.util.{CarbonHiveContext, QueryTest}
 import org.apache.spark.sql.{CarbonEnv, CarbonRelation}
 import org.scalatest.BeforeAndAfterAll
-
 import org.apache.carbondata.core.carbon.metadata.encoder.Encoding
 import org.apache.carbondata.core.carbon.metadata.schema.table.CarbonTable
 import org.apache.carbondata.core.carbon.path.CarbonStorePath
 import org.apache.carbondata.core.carbon.{CarbonDataLoadSchema, CarbonTableIdentifier}
+import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.core.util.CarbonUtil
 import org.apache.carbondata.spark.load.CarbonLoadModel
 
@@ -111,7 +111,8 @@ class AutoHighCardinalityIdentifyTestCase extends QueryTest with BeforeAndAfterA
   }
   def relation(tableName: String): CarbonRelation = {
     CarbonEnv.getInstance(CarbonHiveContext).carbonCatalog
-        .lookupRelation1(Option("default"), tableName)(CarbonHiveContext)
+        .lookupRelation1(Option(CarbonCommonConstants.DATABASE_DEFAULT_NAME),
+          tableName)(CarbonHiveContext)
         .asInstanceOf[CarbonRelation]
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/util/ExternalColumnDictionaryTestCase.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/ExternalColumnDictionaryTestCase.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/ExternalColumnDictionaryTestCase.scala
index 44ca85e..dcf257a 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/ExternalColumnDictionaryTestCase.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/ExternalColumnDictionaryTestCase.scala
@@ -21,6 +21,7 @@ package org.apache.carbondata.spark.util
 import java.io.File
 
 import org.apache.carbondata.core.carbon.CarbonDataLoadSchema
+import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.processing.etl.DataLoadingException
 import org.apache.carbondata.spark.exception.MalformedCarbonCommandException
 import org.apache.carbondata.spark.load.CarbonLoadModel
@@ -28,7 +29,6 @@ import org.apache.spark.sql.{CarbonEnv, CarbonRelation}
 import org.apache.spark.sql.common.util.CarbonHiveContext
 import org.apache.spark.sql.common.util.CarbonHiveContext.sql
 import org.apache.spark.sql.common.util.QueryTest
-
 import org.scalatest.BeforeAndAfterAll
 
   /**
@@ -113,11 +113,14 @@ class ExternalColumnDictionaryTestCase extends QueryTest with BeforeAndAfterAll
 
   def buildRelation() = {
     val catalog = CarbonEnv.getInstance(CarbonHiveContext).carbonCatalog
-    extComplexRelation = catalog.lookupRelation1(Option("default"), "extComplextypes")(CarbonHiveContext)
+    extComplexRelation = catalog.lookupRelation1(Option(CarbonCommonConstants.DATABASE_DEFAULT_NAME),
+      "extComplextypes")(CarbonHiveContext)
       .asInstanceOf[CarbonRelation]
-    verticalDelimiteRelation = catalog.lookupRelation1(Option("default"), "verticalDelimitedTable")(CarbonHiveContext)
+    verticalDelimiteRelation = catalog.lookupRelation1(Option(CarbonCommonConstants.DATABASE_DEFAULT_NAME),
+      "verticalDelimitedTable")(CarbonHiveContext)
       .asInstanceOf[CarbonRelation]
-    loadSqlRelation = catalog.lookupRelation1(Option("default"), "loadSqlTest")(CarbonHiveContext)
+    loadSqlRelation = catalog.lookupRelation1(Option(CarbonCommonConstants.DATABASE_DEFAULT_NAME),
+      "loadSqlTest")(CarbonHiveContext)
       .asInstanceOf[CarbonRelation]
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilConcurrentTestCase.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilConcurrentTestCase.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilConcurrentTestCase.scala
index 4108abe..cd88547 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilConcurrentTestCase.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilConcurrentTestCase.scala
@@ -95,7 +95,8 @@ class GlobalDictionaryUtilConcurrentTestCase extends QueryTest with BeforeAndAft
 
   def buildRelation() = {
     val catalog = CarbonEnv.getInstance(CarbonHiveContext).carbonCatalog
-    sampleRelation = catalog.lookupRelation1(Option("default"), "employee")(CarbonHiveContext)
+    sampleRelation = catalog.lookupRelation1(Option(CarbonCommonConstants.DATABASE_DEFAULT_NAME),
+      "employee")(CarbonHiveContext)
       .asInstanceOf[CarbonRelation]
   }
   def writedummydata(filePath: String, recCount: Int) = {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilTestCase.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilTestCase.scala b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilTestCase.scala
index 32beeee..e841bc8 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilTestCase.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilTestCase.scala
@@ -24,10 +24,9 @@ import org.apache.spark.sql.{CarbonEnv, CarbonRelation}
 import org.apache.spark.sql.common.util.CarbonHiveContext
 import org.apache.spark.sql.common.util.CarbonHiveContext.sql
 import org.apache.spark.sql.common.util.QueryTest
-
-import org.apache.carbondata.core.carbon.{CarbonDataLoadSchema}
+import org.apache.carbondata.core.carbon.CarbonDataLoadSchema
+import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.spark.load.CarbonLoadModel
-
 import org.scalatest.BeforeAndAfterAll
 
 /**
@@ -139,16 +138,17 @@ class GlobalDictionaryUtilTestCase extends QueryTest with BeforeAndAfterAll {
 
   def buildRelation() = {
     val catalog = CarbonEnv.getInstance(CarbonHiveContext).carbonCatalog
-    sampleRelation = catalog.lookupRelation1(Option("default"), "sample")(CarbonHiveContext)
+    sampleRelation = catalog.lookupRelation1(Option(CarbonCommonConstants.DATABASE_DEFAULT_NAME),
+      "sample")(CarbonHiveContext)
       .asInstanceOf[CarbonRelation]
     dimSampleRelation = catalog
-      .lookupRelation1(Option("default"), "dimSample")(CarbonHiveContext)
+      .lookupRelation1(Option(CarbonCommonConstants.DATABASE_DEFAULT_NAME), "dimSample")(CarbonHiveContext)
       .asInstanceOf[CarbonRelation]
     complexRelation = catalog
-      .lookupRelation1(Option("default"), "complextypes")(CarbonHiveContext)
+      .lookupRelation1(Option(CarbonCommonConstants.DATABASE_DEFAULT_NAME), "complextypes")(CarbonHiveContext)
       .asInstanceOf[CarbonRelation]
     incrementalLoadTableRelation = catalog
-      .lookupRelation1(Option("default"), "incrementalLoadTable")(CarbonHiveContext)
+      .lookupRelation1(Option(CarbonCommonConstants.DATABASE_DEFAULT_NAME), "incrementalLoadTable")(CarbonHiveContext)
       .asInstanceOf[CarbonRelation]
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/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 67010ba..f174233 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
@@ -118,7 +118,8 @@ public class SegmentStatusManager {
         dataInputStream = fileOperation.openForRead();
 
         BufferedReader buffReader =
-            new BufferedReader(new InputStreamReader(dataInputStream, "UTF-8"));
+            new BufferedReader(
+                    new InputStreamReader(dataInputStream, CarbonCommonConstants.DEFAULT_CHARSET));
 
         loadFolderDetailsArray = gsonObjectToRead.fromJson(buffReader, LoadMetadataDetails[].class);
         //just directly iterate Array

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/processing/src/main/java/org/apache/carbondata/processing/csvload/DataGraphExecuter.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/csvload/DataGraphExecuter.java b/processing/src/main/java/org/apache/carbondata/processing/csvload/DataGraphExecuter.java
index 7ec4f1b..cc5c3a2 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/csvload/DataGraphExecuter.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/csvload/DataGraphExecuter.java
@@ -250,7 +250,7 @@ public class DataGraphExecuter {
           stepMetaInterface.setFilenameField("filename");
           stepMetaInterface.setFileName(new String[] { "${csvInputFilePath}" });
           stepMetaInterface.setDefault();
-          stepMetaInterface.setEncoding("UTF-8");
+          stepMetaInterface.setEncoding(CarbonCommonConstants.DEFAULT_CHARSET);
           stepMetaInterface.setEnclosure("\"");
           stepMetaInterface.setHeader(true);
           stepMetaInterface.setSeparator(",");
@@ -272,7 +272,7 @@ public class DataGraphExecuter {
           stepMetaInterface.setFileName(files);
           stepMetaInterface.setFilenameField("filename");
           stepMetaInterface.setDefault();
-          stepMetaInterface.setEncoding("UTF-8");
+          stepMetaInterface.setEncoding(CarbonCommonConstants.DEFAULT_CHARSET);
           stepMetaInterface.setEnclosure("\"");
           stepMetaInterface.setHeader(true);
           stepMetaInterface.setSeparator(",");

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/processing/src/main/java/org/apache/carbondata/processing/graphgenerator/GraphGenerator.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/graphgenerator/GraphGenerator.java b/processing/src/main/java/org/apache/carbondata/processing/graphgenerator/GraphGenerator.java
index f939f48..1612ca1 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/graphgenerator/GraphGenerator.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/graphgenerator/GraphGenerator.java
@@ -256,7 +256,7 @@ public class GraphGenerator {
     try {
       String xml = transMeta.getXML();
       dos = new DataOutputStream(new FileOutputStream(new File(graphFile)));
-      dos.write(xml.getBytes("UTF-8"));
+      dos.write(xml.getBytes(CarbonCommonConstants.DEFAULT_CHARSET));
     } catch (KettleException kettelException) {
       throw new GraphGeneratorException("Error while getting the graph XML", kettelException);
     }
@@ -416,7 +416,7 @@ public class GraphGenerator {
     fileInputMeta.setFilenameField("filename");
     fileInputMeta.setFileName(new String[] { "${csvInputFilePath}" });
     fileInputMeta.setDefault();
-    fileInputMeta.setEncoding("UTF-8");
+    fileInputMeta.setEncoding(CarbonCommonConstants.DEFAULT_CHARSET);
     fileInputMeta.setEnclosure("\"");
     fileInputMeta.setHeader(true);
     fileInputMeta.setSeparator(",");
@@ -442,7 +442,7 @@ public class GraphGenerator {
     // Init the Filename...
     csvInputMeta.setFilename("${csvInputFilePath}");
     csvInputMeta.setDefault();
-    csvInputMeta.setEncoding("UTF-8");
+    csvInputMeta.setEncoding(CarbonCommonConstants.DEFAULT_CHARSET);
     csvInputMeta.setEnclosure("\"");
     csvInputMeta.setHeaderPresent(true);
     csvInputMeta.setMaxColumns(maxColumns);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0312e9d4/processing/src/test/java/org/apache/carbondata/carbon/datastore/BlockIndexStoreTest.java
----------------------------------------------------------------------
diff --git a/processing/src/test/java/org/apache/carbondata/carbon/datastore/BlockIndexStoreTest.java b/processing/src/test/java/org/apache/carbondata/carbon/datastore/BlockIndexStoreTest.java
index b13a67d..62b442f 100644
--- a/processing/src/test/java/org/apache/carbondata/carbon/datastore/BlockIndexStoreTest.java
+++ b/processing/src/test/java/org/apache/carbondata/carbon/datastore/BlockIndexStoreTest.java
@@ -34,6 +34,7 @@ import org.apache.carbondata.core.carbon.datastore.BlockIndexStore;
 import org.apache.carbondata.core.carbon.datastore.block.AbstractIndex;
 import org.apache.carbondata.core.carbon.datastore.block.TableBlockInfo;
 import org.apache.carbondata.core.carbon.datastore.exception.IndexBuilderException;
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.test.util.StoreCreator;
 
 import junit.framework.TestCase;
@@ -56,7 +57,8 @@ public class BlockIndexStoreTest extends TestCase {
     TableBlockInfo info =
         new TableBlockInfo(file.getAbsolutePath(), 0, "0", new String[] { "loclhost" },
             file.length());
-    CarbonTableIdentifier carbonTableIdentifier = new CarbonTableIdentifier("default", "t3", "1");
+    CarbonTableIdentifier carbonTableIdentifier =
+            new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "t3", "1");
     AbsoluteTableIdentifier absoluteTableIdentifier =
         new AbsoluteTableIdentifier("/src/test/resources", carbonTableIdentifier);
     try {
@@ -91,7 +93,8 @@ public class BlockIndexStoreTest extends TestCase {
         new TableBlockInfo(file.getAbsolutePath(), 0, "1", new String[] { "loclhost" },
             file.length());
 
-    CarbonTableIdentifier carbonTableIdentifier = new CarbonTableIdentifier("default", "t3", "1");
+    CarbonTableIdentifier carbonTableIdentifier =
+            new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "t3", "1");
     AbsoluteTableIdentifier absoluteTableIdentifier =
         new AbsoluteTableIdentifier("/src/test/resources", carbonTableIdentifier);
     ExecutorService executor = Executors.newFixedThreadPool(3);
@@ -156,7 +159,8 @@ public class BlockIndexStoreTest extends TestCase {
         new TableBlockInfo(file.getAbsolutePath(), 0, "3", new String[] { "loclhost" },
             file.length());
 
-    CarbonTableIdentifier carbonTableIdentifier = new CarbonTableIdentifier("default", "t3", "1");
+    CarbonTableIdentifier carbonTableIdentifier =
+            new CarbonTableIdentifier(CarbonCommonConstants.DATABASE_DEFAULT_NAME, "t3", "1");
     AbsoluteTableIdentifier absoluteTableIdentifier =
         new AbsoluteTableIdentifier("/src/test/resources", carbonTableIdentifier);
     ExecutorService executor = Executors.newFixedThreadPool(3);


Mime
View raw message