carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [1/3] incubator-carbondata git commit: add WhitespaceAround and ParenPad
Date Thu, 26 Jan 2017 13:30:57 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 97405adf4 -> 6bdd37ecb


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/CsvInput.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/CsvInput.java
b/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/CsvInput.java
index 38db733..6b65da0 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/CsvInput.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/CsvInput.java
@@ -182,7 +182,7 @@ public class CsvInput extends BaseStep implements StepInterface {
       LOGGER.info("*****************Completed all csv reading***********");
       CarbonTimeStatisticsFactory.getLoadStatisticsInstance().recordCsvInputStepTime(
               meta.getPartitionID(), System.currentTimeMillis());
-    } else if(rddIteratorKey.startsWith(CarbonCommonConstants.RDDUTIL_UPDATE_KEY)) {
+    } else if (rddIteratorKey.startsWith(CarbonCommonConstants.RDDUTIL_UPDATE_KEY)) {
       scanRddIteratorForUpdate();
     }
     else {
@@ -241,7 +241,7 @@ public class CsvInput extends BaseStep implements StepInterface {
       exec = Executors.newFixedThreadPool(numberOfNodes);
       List<Future<Void>> results = new ArrayList<Future<Void>>(numberOfNodes);
       RddScanCallable[] calls = new RddScanCallable[numberOfNodes];
-      for (int i = 0; i < numberOfNodes; i++ ) {
+      for (int i = 0; i < numberOfNodes; i++) {
         calls[i] = new RddScanCallable();
         results.add(exec.submit(calls[i]));
       }
@@ -261,7 +261,7 @@ public class CsvInput extends BaseStep implements StepInterface {
   private void scanRddIteratorForUpdate() throws RuntimeException {
     Iterator<String[]> iterator = RddInpututilsForUpdate.getAndRemove(rddIteratorKey);
     if (iterator != null) {
-      try{
+      try {
         while (iterator.hasNext()) {
           putRow(data.outputRowMeta, iterator.next());
         }
@@ -354,7 +354,7 @@ public class CsvInput extends BaseStep implements StepInterface {
     csvParserVo.setQuoteCharacter(meta.getQuoteCharacter());
     csvParserVo.setCommentCharacter(meta.getCommentCharacter());
     String maxColumns = meta.getMaxColumns();
-    if(null != maxColumns) {
+    if (null != maxColumns) {
       csvParserVo.setMaxColumns(Integer.parseInt(maxColumns));
     }
     return csvParserVo;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/CsvInputMeta.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/CsvInputMeta.java
b/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/CsvInputMeta.java
index cf8678e..d0ba585 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/CsvInputMeta.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/CsvInputMeta.java
@@ -124,7 +124,7 @@ public class CsvInputMeta extends BaseStepMeta
     bufferSize = "50000";
     blocksID = "";
     partitionID = "";
-    escapeCharacter ="\\";
+    escapeCharacter = "\\";
     quoteCharacter = "\"";
     commentCharacter = "#";
     rddIteratorKey = "";
@@ -641,7 +641,7 @@ public class CsvInputMeta extends BaseStepMeta
     return escapeCharacter;
   }
 
-  public void setEscapeCharacter(String escapeCharacter){
+  public void setEscapeCharacter(String escapeCharacter) {
     this.escapeCharacter = escapeCharacter;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/UnivocityCsvParser.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/UnivocityCsvParser.java
b/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/UnivocityCsvParser.java
index b953798..f33442b 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/UnivocityCsvParser.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/csvreaderstep/UnivocityCsvParser.java
@@ -103,8 +103,8 @@ public class UnivocityCsvParser {
     parserSettings.setIgnoreLeadingWhitespaces(false);
     parserSettings.setIgnoreTrailingWhitespaces(false);
     parserSettings.setSkipEmptyLines(false);
-    parserSettings.getFormat().setQuote(null == csvParserVo.getQuoteCharacter() ?
-        '\"':csvParserVo.getQuoteCharacter().charAt(0));
+    parserSettings.getFormat().setQuote(
+        null == csvParserVo.getQuoteCharacter() ? '\"' : csvParserVo.getQuoteCharacter().charAt(0));
     parserSettings.getFormat().setQuoteEscape(null == csvParserVo.getEscapeCharacter() ?
         '\\' :
         csvParserVo.getEscapeCharacter().charAt(0));

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/mdkeygen/MDKeyGenStep.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/mdkeygen/MDKeyGenStep.java
b/processing/src/main/java/org/apache/carbondata/processing/mdkeygen/MDKeyGenStep.java
index 4619e99..f916c04 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/mdkeygen/MDKeyGenStep.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/mdkeygen/MDKeyGenStep.java
@@ -264,7 +264,8 @@ public class MDKeyGenStep extends BaseStep {
     this.tableName = meta.getTableName();
     storeLocation = CarbonDataProcessorUtil
         .getLocalDataFolderLocation(meta.getDatabaseName(), meta.getTableName(),
-            String.valueOf(meta.getTaskNo()), meta.getPartitionID(), meta.getSegmentId()+"",
false);
+            String.valueOf(meta.getTaskNo()), meta.getPartitionID(), meta.getSegmentId()
+ "",
+            false);
     isNoDictionaryDimension =
         RemoveDictionaryUtil.convertStringToBooleanArr(meta.getNoDictionaryDimsMapping());
     isUseInvertedIndex =

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadExecutor.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadExecutor.java
b/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadExecutor.java
index d18c727..bd7b8f5 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadExecutor.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadExecutor.java
@@ -66,7 +66,7 @@ public class DataLoadExecutor {
       LOGGER.error("Data Load is partially success for table " + loadModel.getTableName());
       throw new BadRecordFoundException("Bad records found during load");
     } else {
-      LOGGER.info("Data loading is successful for table "+loadModel.getTableName());
+      LOGGER.info("Data loading is successful for table " + loadModel.getTableName());
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadProcessBuilder.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadProcessBuilder.java
b/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadProcessBuilder.java
index 30e0fb4..b89e283 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadProcessBuilder.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadProcessBuilder.java
@@ -131,7 +131,7 @@ public final class DataLoadProcessBuilder {
         loadModel.getBadRecordsAction().split(",")[1]);
     configuration.setDataLoadProperty(DataLoadProcessorConstants.FACT_FILE_PATH,
         loadModel.getFactFilePath());
-    if(CarbonMetadata.getInstance().getCarbonTable(carbonTable.getTableUniqueName()) == null)
{
+    if (CarbonMetadata.getInstance().getCarbonTable(carbonTable.getTableUniqueName()) ==
null) {
       CarbonMetadata.getInstance().addCarbonTable(carbonTable);
     }
     List<CarbonDimension> dimensions =

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/ComplexFieldConverterImpl.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/ComplexFieldConverterImpl.java
b/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/ComplexFieldConverterImpl.java
index d01c1b6..40673de 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/ComplexFieldConverterImpl.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/ComplexFieldConverterImpl.java
@@ -48,7 +48,7 @@ public class ComplexFieldConverterImpl extends AbstractDictionaryFieldConverterI
       dataOutputStream.close();
       row.update(byteArray.toByteArray(), index);
     } catch (Exception e) {
-      throw new CarbonDataLoadingException(object+"", e);
+      throw new CarbonDataLoadingException(object + "", e);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/DictionaryFieldConverterImpl.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/DictionaryFieldConverterImpl.java
b/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/DictionaryFieldConverterImpl.java
index 1a2f8b9..5c037b5 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/DictionaryFieldConverterImpl.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/DictionaryFieldConverterImpl.java
@@ -93,7 +93,7 @@ public class DictionaryFieldConverterImpl extends AbstractDictionaryFieldConvert
       throws CarbonDataLoadingException {
     try {
       String parsedValue = DataTypeUtil.parseValue(row.getString(index), carbonDimension);
-      if(null == parsedValue || parsedValue.equals(nullFormat)) {
+      if (null == parsedValue || parsedValue.equals(nullFormat)) {
         row.update(CarbonCommonConstants.MEMBER_DEFAULT_VAL_SURROGATE_KEY, index);
       } else {
         row.update(dictionaryGenerator.getOrGenerateKey(parsedValue), index);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/MeasureFieldConverterImpl.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/MeasureFieldConverterImpl.java
b/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/MeasureFieldConverterImpl.java
index 21096a5..dccbe7e 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/MeasureFieldConverterImpl.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/MeasureFieldConverterImpl.java
@@ -62,7 +62,7 @@ public class MeasureFieldConverterImpl implements FieldConverter {
           "The value " + " \"" + value + "\"" + " with column name " + measure.getColName()
               + " and column data type " + dataType + " is not a valid " + dataType + " type.");
       row.update(null, index);
-    } else if(value.equals(nullformat)) {
+    } else if (value.equals(nullformat)) {
       row.update(null, index);
     } else {
       try {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/RowConverterImpl.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/RowConverterImpl.java
b/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/RowConverterImpl.java
index 2439a23..52cf4c9 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/RowConverterImpl.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/RowConverterImpl.java
@@ -131,7 +131,7 @@ public class RowConverterImpl implements RowConverter {
       if (logHolder.isBadRecordNotAdded()) {
         badRecordLogger.addBadRecordsToBuilder(copy.getData(), logHolder.getReason());
         logHolder.clear();
-        if(badRecordLogger.isBadRecordConvertNullDisable()) {
+        if (badRecordLogger.isBadRecordConvertNullDisable()) {
           return null;
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/newflow/dictionary/InMemBiDictionary.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/dictionary/InMemBiDictionary.java
b/processing/src/main/java/org/apache/carbondata/processing/newflow/dictionary/InMemBiDictionary.java
index eeebeb3..7b6d5f1 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/dictionary/InMemBiDictionary.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/dictionary/InMemBiDictionary.java
@@ -68,8 +68,8 @@ public class InMemBiDictionary<K, V> extends GeneratingBiDictionary<K,
V> {
   @Override
   protected void put(K key, V value) {
     // dictionary is immutable, it is append only
-    assert(!biMap.containsKey(key));
-    assert(!biMap.containsValue(value));
+    assert (!biMap.containsKey(key));
+    assert (!biMap.containsValue(value));
     biMap.put(key, value);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/newflow/partition/impl/HashPartitionerImpl.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/partition/impl/HashPartitionerImpl.java
b/processing/src/main/java/org/apache/carbondata/processing/newflow/partition/impl/HashPartitionerImpl.java
index 9c06c2a..42f48f0 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/partition/impl/HashPartitionerImpl.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/partition/impl/HashPartitionerImpl.java
@@ -36,7 +36,7 @@ public class HashPartitionerImpl implements Partitioner<Object[]>
{
     this.numberOfBuckets = numberOfBuckets;
     hashes = new Hash[indexes.size()];
     for (int i = 0; i < indexes.size(); i++) {
-      switch(columnSchemas.get(i).getDataType()) {
+      switch (columnSchemas.get(i).getDataType()) {
         case SHORT:
         case INT:
         case LONG:

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/impl/ParallelReadMergeSorterWithBucketingImpl.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/impl/ParallelReadMergeSorterWithBucketingImpl.java
b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/impl/ParallelReadMergeSorterWithBucketingImpl.java
index 21d681a..3b43b46 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/impl/ParallelReadMergeSorterWithBucketingImpl.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/impl/ParallelReadMergeSorterWithBucketingImpl.java
@@ -78,7 +78,7 @@ public class ParallelReadMergeSorterWithBucketingImpl implements Sorter
{
     intermediateFileMerger = new SortIntermediateFileMerger(sortParameters);
     int buffer = Integer.parseInt(CarbonProperties.getInstance()
         .getProperty(CarbonCommonConstants.SORT_SIZE, CarbonCommonConstants.SORT_SIZE_DEFAULT_VAL));
-    sortBufferSize = buffer/bucketingInfo.getNumberOfBuckets();
+    sortBufferSize = buffer / bucketingInfo.getNumberOfBuckets();
     if (sortBufferSize < 100) {
       sortBufferSize = 100;
     }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeMemoryManager.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeMemoryManager.java
b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeMemoryManager.java
index 9bb1519..c7528ab 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeMemoryManager.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeMemoryManager.java
@@ -45,7 +45,7 @@ public class UnsafeMemoryManager {
     if (offHeap) {
       allocator = MemoryAllocator.UNSAFE;
     } else {
-      long maxMemory = Runtime.getRuntime().maxMemory()*60/100;
+      long maxMemory = Runtime.getRuntime().maxMemory() * 60 / 100;
       if (takenSize > maxMemory) {
         takenSize = maxMemory;
       }
@@ -67,9 +67,9 @@ public class UnsafeMemoryManager {
   private UnsafeMemoryManager(long totalMemory, MemoryAllocator allocator) {
     this.totalMemory = totalMemory;
     this.allocator = allocator;
-    minimumMemory = (long) (totalMemory * ((double)10/100));
-    LOGGER.audit("Memory manager is created with size "  + totalMemory
-        +" with "+allocator +" and minimum reserve memory "+minimumMemory);
+    minimumMemory = (long) (totalMemory * ((double) 10 / 100));
+    LOGGER.audit("Memory manager is created with size " + totalMemory + " with " + allocator
+        + " and minimum reserve memory " + minimumMemory);
   }
   public synchronized MemoryBlock allocateMemory(long memoryRequested) {
     if (memoryUsed + memoryRequested <= totalMemory) {
@@ -86,8 +86,8 @@ public class UnsafeMemoryManager {
     allocator.free(memoryBlock);
     memoryUsed -= memoryBlock.size();
     memoryUsed = memoryUsed < 0 ? 0 : memoryUsed;
-    LOGGER.audit("Memory released, memory used "+ memoryUsed
-        + " memory left "+(getAvailableMemory()));
+    LOGGER.audit(
+        "Memory released, memory used " + memoryUsed + " memory left " + (getAvailableMemory()));
   }
 
   public synchronized long getAvailableMemory() {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/merger/UnsafeIntermediateFileMerger.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/merger/UnsafeIntermediateFileMerger.java
b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/merger/UnsafeIntermediateFileMerger.java
index 50f4e58..c6b5e9a 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/merger/UnsafeIntermediateFileMerger.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/merger/UnsafeIntermediateFileMerger.java
@@ -99,7 +99,7 @@ public class UnsafeIntermediateFileMerger implements Callable<Void>
{
     noDictionarycolumnMapping = mergerParameters.getNoDictionaryDimnesionColumn();
     this.nullSetWords = new long[((mergerParameters.getMeasureColCount() - 1) >> 6)
+ 1];
     // Take size of 2 MB for each row. I think it is high enough to use
-    rowData = ByteBuffer.allocate(2*1024*1024);
+    rowData = ByteBuffer.allocate(2 * 1024 * 1024);
   }
 
   @Override public Void call() throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/schema/metadata/ColumnSchemaDetailsWrapper.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/schema/metadata/ColumnSchemaDetailsWrapper.java
b/processing/src/main/java/org/apache/carbondata/processing/schema/metadata/ColumnSchemaDetailsWrapper.java
index 54d3065..554dd06 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/schema/metadata/ColumnSchemaDetailsWrapper.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/schema/metadata/ColumnSchemaDetailsWrapper.java
@@ -71,7 +71,7 @@ public class ColumnSchemaDetailsWrapper {
   public ColumnSchemaDetailsWrapper(String input) {
     columnSchemaDetailsMap = new HashMap<>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
     String[] split = input.split(CarbonCommonConstants.HASH_SPC_CHARACTER);
-    for (int i=0 ; i< split.length ;i++) {
+    for (int i = 0; i < split.length; i++) {
       String key = split[i++];
       ColumnSchemaDetails details = new ColumnSchemaDetails(split[i]);
       columnSchemaDetailsMap.put(key, details);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/IntermediateFileMerger.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/IntermediateFileMerger.java
b/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/IntermediateFileMerger.java
index cdbcc84..f063426 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/IntermediateFileMerger.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/IntermediateFileMerger.java
@@ -132,8 +132,8 @@ public class IntermediateFileMerger implements Callable<Void> {
           }
         }
       }
-      double intermediateMergeCostTime = (System.currentTimeMillis() -
-          intermediateMergeStartTime)/1000.0;
+      double intermediateMergeCostTime =
+          (System.currentTimeMillis() - intermediateMergeStartTime) / 1000.0;
       LOGGER.info("============================== Intermediate Merge of " + fileConterConst
+
           " Sort Temp Files Cost Time: " + intermediateMergeCostTime + "(s)");
     } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerColumnar.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerColumnar.java
b/processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerColumnar.java
index a7eb9d2..7c48cec 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerColumnar.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerColumnar.java
@@ -711,8 +711,8 @@ public class CarbonFactDataHandlerColumnar implements CarbonFactHandler
{
         long[] bigDvalue = new long[2];
         if (bigdVals.length == 2) {
           bigDvalue[0] = Long.parseLong(bigdVals[0]);
-          BigDecimal bd = new BigDecimal(CarbonCommonConstants.POINT+bigdVals[1]);
-          bigDvalue[1] = (long)(bd.doubleValue()*Math.pow(10, value.scale()));
+          BigDecimal bd = new BigDecimal(CarbonCommonConstants.POINT + bigdVals[1]);
+          bigDvalue[1] = (long) (bd.doubleValue() * Math.pow(10, value.scale()));
         } else {
           bigDvalue[0] = Long.parseLong(bigdVals[0]);
         }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedDimSurrogateKeyGen.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedDimSurrogateKeyGen.java
b/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedDimSurrogateKeyGen.java
index ffc7769..86b63df 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedDimSurrogateKeyGen.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedDimSurrogateKeyGen.java
@@ -334,7 +334,7 @@ public abstract class CarbonCSVBasedDimSurrogateKeyGen {
       }
     }
     max = new int[noOfPrimitiveDims];
-    for(int i = 0; i < isDirectDictionary.size(); i++) {
+    for (int i = 0; i < isDirectDictionary.size(); i++) {
       if (isDirectDictionary.get(i)) {
         max[i] = Integer.MAX_VALUE;
       }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenMeta.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenMeta.java
b/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenMeta.java
index ebc3a5b..92784ba 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenMeta.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenMeta.java
@@ -523,7 +523,7 @@ public class CarbonCSVBasedSeqGenMeta extends BaseStepMeta implements
StepMetaIn
     segmentId = "";
     taskNo = "";
     columnSchemaDetails = "";
-    columnsDataTypeString="";
+    columnsDataTypeString = "";
     tableOption = "";
     dateFormat = "";
   }
@@ -670,7 +670,7 @@ public class CarbonCSVBasedSeqGenMeta extends BaseStepMeta implements
StepMetaIn
     tableOptionWrapper.populateTableOptions(tableOption);
 
     updateDimensions(carbondim, carbonmsr, noDictionaryDims);
-    dimColDataTypes=RemoveDictionaryUtil.extractDimColsDataTypeValues(columnsDataTypeString);
+    dimColDataTypes = RemoveDictionaryUtil.extractDimColsDataTypeValues(columnsDataTypeString);
     if (null != complexTypeString) {
       complexTypes = getComplexTypesMap(complexTypeString);
     } else {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/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 6fc23ae..6e0a4a4 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
@@ -555,7 +555,7 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
     isComplexTypeColumn = new boolean[metaColumnNames.length];
     noDictionaryAndComplexIndexMapping = new int[metaColumnNames.length];
     isStringDataType = new boolean[metaColumnNames.length];
-    dataTypes= new String[metaColumnNames.length];
+    dataTypes = new String[metaColumnNames.length];
     complexTypes = new GenericDataType[meta.getComplexTypeColumns().length];
     for (int i = 0; i < meta.noDictionaryCols.length; i++) {
       for (int j = 0; j < metaColumnNames.length; j++) {
@@ -563,7 +563,7 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
             .equalsIgnoreCase(meta.dimColDataTypes.get(metaColumnNames[j]))) {
           isStringDataType[j] = true;
         }
-        dataTypes[j]=meta.dimColDataTypes.get(metaColumnNames[j].toLowerCase());
+        dataTypes[j] = meta.dimColDataTypes.get(metaColumnNames[j].toLowerCase());
         if (meta.noDictionaryCols[i].equalsIgnoreCase(
             meta.getTableName() + CarbonCommonConstants.UNDERSCORE + metaColumnNames[j]))
{
           isNoDictionaryColumn[j] = true;
@@ -769,7 +769,7 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
   private void updateStoreLocation() {
     loadFolderLoc = CarbonDataProcessorUtil
         .getLocalDataFolderLocation(meta.getDatabaseName(), meta.getTableName(), meta.getTaskNo(),
-            meta.getPartitionID(), meta.getSegmentId()+"", false);
+            meta.getPartitionID(), meta.getSegmentId() + "", false);
   }
 
   private String getBadLogStoreLocation(String storeLocation) {
@@ -978,7 +978,7 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
           (String) r[j];
       // check whether the column value is the value to be  serialized as null.
       boolean isSerialized = false;
-      if(tuple.equalsIgnoreCase(serializationNullFormat)) {
+      if (tuple.equalsIgnoreCase(serializationNullFormat)) {
         tuple = CarbonCommonConstants.MEMBER_DEFAULT_VAL;
         isSerialized = true;
       }
@@ -1025,7 +1025,7 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
             || msr.length() == 0)) {
           addEntryToBadRecords(r, j, columnName,
               msrDataType[meta.msrMapping[msrCount]].name());
-          if(badRecordsLogger.isBadRecordConvertNullDisable()) {
+          if (badRecordsLogger.isBadRecordConvertNullDisable()) {
             return null;
           }
         } else {
@@ -1132,9 +1132,8 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
 
         }
 
-      }
-      //If it refers to single hierarchy
-      else if(isComplexTypeColumn[j]) {
+      } else if (isComplexTypeColumn[j]) {
+        //If it refers to single hierarchy
         try {
           GenericDataType complexType =
               complexTypes[noDictionaryAndComplexIndexMapping[j] - meta.noDictionaryCols.length];
@@ -1211,7 +1210,7 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
               if (!isSerialized && surrogateKeyForHrrchy[0] == 1) {
                 addEntryToBadRecords(r, j, columnName,
                     details.getColumnType().name());
-                if(badRecordsLogger.isBadRecordConvertNullDisable()) {
+                if (badRecordsLogger.isBadRecordConvertNullDisable()) {
                   return null;
                 }
               }
@@ -1220,7 +1219,7 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
             } else {
               String parsedValue = DataTypeUtil.parseValue(tuple, data.getSurrogateKeyGen()
                   .getDimensionOrdinalToDimensionMapping()[memberMapping[i]]);
-              if(null == parsedValue) {
+              if (null == parsedValue) {
                 surrogateKeyForHrrchy[0] = CarbonCommonConstants.MEMBER_DEFAULT_VAL_SURROGATE_KEY;
               } else {
                 surrogateKeyForHrrchy[0] =
@@ -1230,9 +1229,9 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
           }
           if (surrogateKeyForHrrchy[0] == CarbonCommonConstants.INVALID_SURROGATE_KEY) {
 
-            if (!isSerialized ) {
+            if (!isSerialized) {
               addEntryToBadRecords(r, j, columnName);
-              if(badRecordsLogger.isBadRecordConvertNullDisable()) {
+              if (badRecordsLogger.isBadRecordConvertNullDisable()) {
                 return null;
               }
             }
@@ -1262,9 +1261,8 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
     return newArray;
   }
 
-  private void addEntryToBadRecords(Object[] r, int j, String columnName,
-      String dataType) {
-    dataType= DataTypeUtil.getColumnDataTypeDisplayName(dataType);
+  private void addEntryToBadRecords(Object[] r, int j, String columnName, String dataType)
{
+    dataType = DataTypeUtil.getColumnDataTypeDisplayName(dataType);
     badRecordsLogger.addBadRecordsToBuilder(r,
         "The value " + " \"" + r[j] + "\"" + " with column name " + columnName
             + " and column data type " + dataType + " is not a valid " + dataType + " type.");
@@ -1731,9 +1729,9 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
       String name = hieEntry.getKey();
       //
       if (name.equalsIgnoreCase(timeHierNameVal)) {
-        for (int i = 0; i < a.length; i++) {//CHECKSTYLE:OFF
+        for (int i = 0; i < a.length; i++) { //CHECKSTYLE:OFF
           lens[i] = dimLens[a[i]];
-        }//CHECKSTYLE:ON
+        } //CHECKSTYLE:ON
       } else {
         String[] columns = meta.hierColumnMap.get(name);
 
@@ -1761,9 +1759,9 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
               newIndex = j;
               break;
             }
-          }//CHECKSTYLE:OFF
+          } //CHECKSTYLE:OFF
           lens[i] = dimLens[newIndex];
-        }//CHECKSTYLE:ON
+        } //CHECKSTYLE:ON
       }
       //
       KeyGenerator generator = KeyGeneratorFactory.getKeyGenerator(lens);
@@ -1917,7 +1915,7 @@ public class CarbonCSVBasedSeqGenStep extends BaseStep {
     for (int i = 0; i < measures.length; i++) {
       CarbonMeasure carbonMeasure = carbonTable.getMeasureByName(meta.getTableName(), measures[i]);
       msrDataType[i] = carbonMeasure.getDataType();
-      if(DataType.DECIMAL == carbonMeasure.getDataType()) {
+      if (DataType.DECIMAL == carbonMeasure.getDataType()) {
         meta.carbonMeasures[i] = carbonMeasure;
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/FileStoreSurrogateKeyGenForCSV.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/FileStoreSurrogateKeyGenForCSV.java
b/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/FileStoreSurrogateKeyGenForCSV.java
index 39b63f8..eb0f52b 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/FileStoreSurrogateKeyGenForCSV.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/FileStoreSurrogateKeyGenForCSV.java
@@ -268,7 +268,7 @@ public class FileStoreSurrogateKeyGenForCSV extends CarbonCSVBasedDimSurrogateKe
       updateMaxKeyInfo(dictionaryKeys.get(i), reverseDictionary.getDictionaryChunks().getSize());
     }
     CarbonTimeStatisticsFactory.getLoadStatisticsInstance().recordLruCacheLoadTime(
-        (System.currentTimeMillis() - lruCacheStartTime)/1000.0);
+        (System.currentTimeMillis() - lruCacheStartTime) / 1000.0);
   }
 
   @Override protected int getSurrogateFromStore(String value, int index, Object[] properties)

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
b/processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
index 812bbaa..a56e211 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
@@ -164,7 +164,7 @@ public final class CarbonDataProcessorUtil {
           LOGGER.error("Unable to delete File : " + badFiles.getName());
         }
       }
-    }// CHECKSTYLE:ON
+    } // CHECKSTYLE:ON
   }
 
   public static void checkResult(List<CheckResultInterface> remarks, StepMeta stepMeta,
@@ -223,7 +223,7 @@ public final class CarbonDataProcessorUtil {
     if (file.exists()) {
       try {
         CarbonUtil.deleteFoldersAndFiles(file);
-      } catch (IOException | InterruptedException e ) {
+      } catch (IOException | InterruptedException e) {
         LOGGER.error(e);
       }
     }
@@ -288,7 +288,7 @@ public final class CarbonDataProcessorUtil {
     for (DataField field : fields) {
       if (field.getColumn().isUseInvertedIndex() && field.getColumn().isDimesion())
{
         isUseInvertedIndexList.add(true);
-      } else if(field.getColumn().isDimesion()){
+      } else if (field.getColumn().isDimesion()) {
         isUseInvertedIndexList.add(false);
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/256dbed2/processing/src/main/java/org/apache/carbondata/processing/util/CarbonSchemaParser.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/util/CarbonSchemaParser.java
b/processing/src/main/java/org/apache/carbondata/processing/util/CarbonSchemaParser.java
index 60ddea5..bba40e9 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/util/CarbonSchemaParser.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/util/CarbonSchemaParser.java
@@ -453,7 +453,7 @@ public final class CarbonSchemaParser {
     for (int i = 0; i < dimensions.size(); i++) {
       CarbonDimension dimension = dimensions.get(i);
       //assuming complex dimensions will always be atlast
-      if(null != dimension.getListOfChildDimensions() &&
+      if (null != dimension.getListOfChildDimensions() &&
           dimension.getListOfChildDimensions().size() > 0) {
         break;
       }



Mime
View raw message