carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhan...@apache.org
Subject [carbondata] branch master updated: [checkstyle] optimize java code checkstyle for AvoidStarImport rule
Date Sun, 01 Dec 2019 07:50:22 GMT
This is an automated email from the ASF dual-hosted git repository.

zhangzc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/carbondata.git


The following commit(s) were added to refs/heads/master by this push:
     new 7245ad1  [checkstyle] optimize java code checkstyle for AvoidStarImport rule
7245ad1 is described below

commit 7245ad1bb06986b4b4f4b92ae8d68c43d8a30324
Author: lamber-ken <lamberken@163.com>
AuthorDate: Sun Dec 1 00:07:23 2019 +0800

    [checkstyle] optimize java code checkstyle for AvoidStarImport rule
    
    optimize java code checkstyle for AvoidStarImport rule
    
    This closes #3492
---
 .../common/annotations/InterfaceStability.java     |   8 +-
 .../carbondata/core/datamap/DataMapProvider.java   |   7 +-
 .../carbondata/core/datastore/page/ColumnPage.java | 126 +++++++++++----------
 .../blockletindex/BlockletDataMapFactory.java      |   8 +-
 .../carbondata/core/metadata/SegmentFileStore.java |  18 ++-
 .../core/metadata/schema/table/TableSchema.java    |  10 +-
 .../scan/collector/ResultCollectorFactory.java     |  11 +-
 .../apache/carbondata/core/util/CarbonUtil.java    |  24 +++-
 .../apache/carbondata/core/util/SessionParams.java |  13 ++-
 dev/javastyle-config.xml                           |   4 +-
 .../hadoop/util/CarbonVectorizedRecordReader.java  |   5 +-
 .../presto/CarbondataConnectorFactory.java         |   5 +-
 .../carbondata/presto/CarbondataSplitManager.java  |   9 +-
 .../org/apache/carbondata/tool/DataSummary.java    |   9 +-
 .../org/apache/carbondata/tool/FileCollector.java  |   9 +-
 15 files changed, 184 insertions(+), 82 deletions(-)

diff --git a/common/src/main/java/org/apache/carbondata/common/annotations/InterfaceStability.java
b/common/src/main/java/org/apache/carbondata/common/annotations/InterfaceStability.java
index 5435028..638e670 100644
--- a/common/src/main/java/org/apache/carbondata/common/annotations/InterfaceStability.java
+++ b/common/src/main/java/org/apache/carbondata/common/annotations/InterfaceStability.java
@@ -21,8 +21,6 @@ import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 
-import org.apache.carbondata.common.annotations.InterfaceAudience.*;
-
 /**
  * This annotation is ported and modified from Apache Hadoop project.
  *
@@ -34,9 +32,9 @@ import org.apache.carbondata.common.annotations.InterfaceAudience.*;
  * 2. {@link Evolving} means compatibility can break at minor release (m.x)
  * 3. {@link Unstable} means compatibility can break at any release
  *
- * <ul><li>All classes that are annotated with {@link User} or
- * {@link Developer} must have InterfaceStability annotation. </li>
- * <li>Classes that are {@link Internal} are to be considered unstable unless
+ * <ul><li>All classes that are annotated with {@link InterfaceAudience.User}
or
+ * {@link InterfaceAudience.Developer} must have InterfaceStability annotation. </li>
+ * <li>Classes that are {@link InterfaceAudience.Internal} are to be considered unstable
unless
  * a different InterfaceStability annotation states otherwise.</li>
  * <li>Incompatible changes must not be made to classes marked as stable.</li>
  * </ul>
diff --git a/core/src/main/java/org/apache/carbondata/core/datamap/DataMapProvider.java b/core/src/main/java/org/apache/carbondata/core/datamap/DataMapProvider.java
index 2a053ee..e58b61b 100644
--- a/core/src/main/java/org/apache/carbondata/core/datamap/DataMapProvider.java
+++ b/core/src/main/java/org/apache/carbondata/core/datamap/DataMapProvider.java
@@ -18,7 +18,12 @@
 package org.apache.carbondata.core.datamap;
 
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
 
 import org.apache.carbondata.common.annotations.InterfaceAudience;
 import org.apache.carbondata.common.exceptions.sql.MalformedDataMapCommandException;
diff --git a/core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java
b/core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java
index 4024bde..338f0b2 100644
--- a/core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java
+++ b/core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java
@@ -37,7 +37,13 @@ import org.apache.carbondata.core.metadata.datatype.DataType;
 import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.util.CarbonProperties;
 
-import static org.apache.carbondata.core.metadata.datatype.DataTypes.*;
+import static org.apache.carbondata.core.metadata.datatype.DataTypes.BYTE;
+import static org.apache.carbondata.core.metadata.datatype.DataTypes.BYTE_ARRAY;
+import static org.apache.carbondata.core.metadata.datatype.DataTypes.DOUBLE;
+import static org.apache.carbondata.core.metadata.datatype.DataTypes.FLOAT;
+import static org.apache.carbondata.core.metadata.datatype.DataTypes.INT;
+import static org.apache.carbondata.core.metadata.datatype.DataTypes.LONG;
+import static org.apache.carbondata.core.metadata.datatype.DataTypes.SHORT;
 
 public abstract class ColumnPage {
 
@@ -159,14 +165,14 @@ public abstract class ColumnPage {
     if (isUnsafeEnabled(columnPageEncoderMeta)) {
       actualPage = new UnsafeVarLengthColumnPage(columnPageEncoderMeta, pageSize);
       encodedPage = new UnsafeFixLengthColumnPage(
-          new ColumnPageEncoderMeta(columnPageEncoderMeta.getColumnSpec(), DataTypes.BYTE_ARRAY,
+          new ColumnPageEncoderMeta(columnPageEncoderMeta.getColumnSpec(), BYTE_ARRAY,
               columnPageEncoderMeta.getCompressorName()),
           pageSize,
           CarbonCommonConstants.LOCAL_DICT_ENCODED_BYTEARRAY_SIZE);
     } else {
       actualPage = new SafeVarLengthColumnPage(columnPageEncoderMeta, pageSize);
       encodedPage = new SafeFixLengthColumnPage(
-          new ColumnPageEncoderMeta(columnPageEncoderMeta.getColumnSpec(), DataTypes.BYTE_ARRAY,
+          new ColumnPageEncoderMeta(columnPageEncoderMeta.getColumnSpec(), BYTE_ARRAY,
               columnPageEncoderMeta.getCompressorName()),
           pageSize);
     }
@@ -187,23 +193,23 @@ public abstract class ColumnPage {
       if (dataType == DataTypes.BOOLEAN) {
         instance = new UnsafeFixLengthColumnPage(
             new ColumnPageEncoderMeta(columnSpec, BYTE, compressorName), pageSize);
-      } else if (dataType == DataTypes.BYTE ||
-          dataType == DataTypes.SHORT ||
+      } else if (dataType == BYTE ||
+          dataType == SHORT ||
           dataType == DataTypes.SHORT_INT ||
-          dataType == DataTypes.INT ||
-          dataType == DataTypes.LONG ||
+          dataType == INT ||
+          dataType == LONG ||
           dataType == DataTypes.FLOAT ||
           dataType == DataTypes.DOUBLE) {
         instance = new UnsafeFixLengthColumnPage(
             new ColumnPageEncoderMeta(columnSpec, dataType, compressorName), pageSize);
       } else if (dataType == DataTypes.TIMESTAMP) {
         instance = new UnsafeFixLengthColumnPage(
-            new ColumnPageEncoderMeta(columnSpec, DataTypes.LONG, compressorName), pageSize);
+            new ColumnPageEncoderMeta(columnSpec, LONG, compressorName), pageSize);
       } else if (DataTypes.isDecimal(dataType)) {
         instance = new UnsafeDecimalColumnPage(
             new ColumnPageEncoderMeta(columnSpec, dataType, compressorName), pageSize);
       } else if (dataType == DataTypes.STRING
-          || dataType == DataTypes.BYTE_ARRAY
+          || dataType == BYTE_ARRAY
           || dataType == DataTypes.VARCHAR
           || dataType == DataTypes.BINARY) {
         instance = new UnsafeVarLengthColumnPage(
@@ -212,15 +218,15 @@ public abstract class ColumnPage {
         throw new RuntimeException("Unsupported data dataType: " + dataType);
       }
     } else {
-      if (dataType == DataTypes.BOOLEAN || dataType == DataTypes.BYTE) {
+      if (dataType == DataTypes.BOOLEAN || dataType == BYTE) {
         instance = newBytePage(columnPageEncoderMeta, new byte[pageSize]);
-      } else if (dataType == DataTypes.SHORT) {
+      } else if (dataType == SHORT) {
         instance = newShortPage(columnPageEncoderMeta, new short[pageSize]);
       } else if (dataType == DataTypes.SHORT_INT) {
         instance = newShortIntPage(columnPageEncoderMeta, new byte[pageSize * 3]);
-      } else if (dataType == DataTypes.INT) {
+      } else if (dataType == INT) {
         instance = newIntPage(columnPageEncoderMeta, new int[pageSize]);
-      } else if (dataType == DataTypes.LONG || dataType == DataTypes.TIMESTAMP) {
+      } else if (dataType == LONG || dataType == DataTypes.TIMESTAMP) {
         instance = newLongPage(
             new ColumnPageEncoderMeta(columnPageEncoderMeta.getColumnSpec(), LONG,
                 columnPageEncoderMeta.getCompressorName()), new long[pageSize]);
@@ -231,7 +237,7 @@ public abstract class ColumnPage {
       } else if (DataTypes.isDecimal(dataType)) {
         instance = newDecimalPage(columnPageEncoderMeta, new byte[pageSize][]);
       } else if (dataType == DataTypes.STRING
-          || dataType == DataTypes.BYTE_ARRAY
+          || dataType == BYTE_ARRAY
           || dataType == DataTypes.VARCHAR
           || dataType == DataTypes.BINARY) {
         instance = new SafeVarLengthColumnPage(columnPageEncoderMeta, pageSize);
@@ -399,19 +405,19 @@ public abstract class ColumnPage {
       return;
     }
     DataType dataType = columnPageEncoderMeta.getStoreDataType();
-    if (dataType == DataTypes.BOOLEAN || dataType == DataTypes.BYTE) {
+    if (dataType == DataTypes.BOOLEAN || dataType == BYTE) {
       if (columnPageEncoderMeta.getColumnSpec().getSchemaDataType() == DataTypes.BOOLEAN)
{
         value = BooleanConvert.boolean2Byte((Boolean) value);
       }
       putByte(rowId, (byte) value);
       statsCollector.update((byte) value);
-    } else if (dataType == DataTypes.SHORT) {
+    } else if (dataType == SHORT) {
       putShort(rowId, (short) value);
       statsCollector.update((short) value);
-    } else if (dataType == DataTypes.INT) {
+    } else if (dataType == INT) {
       putInt(rowId, (int) value);
       statsCollector.update((int) value);
-    } else if (dataType == DataTypes.LONG) {
+    } else if (dataType == LONG) {
       putLong(rowId, (long) value);
       statsCollector.update((long) value);
     } else if (dataType == DataTypes.DOUBLE) {
@@ -421,7 +427,7 @@ public abstract class ColumnPage {
       putDecimal(rowId, (BigDecimal) value);
       statsCollector.update((BigDecimal) value);
     } else if (dataType == DataTypes.STRING
-        || dataType == DataTypes.BYTE_ARRAY
+        || dataType == BYTE_ARRAY
         || dataType == DataTypes.VARCHAR) {
       putBytes(rowId, (byte[]) value);
       statsCollector.update((byte[]) value);
@@ -446,24 +452,24 @@ public abstract class ColumnPage {
       return getNull(rowId);
     }
     DataType dataType = columnPageEncoderMeta.getStoreDataType();
-    if (dataType == DataTypes.BOOLEAN || dataType == DataTypes.BYTE) {
+    if (dataType == DataTypes.BOOLEAN || dataType == BYTE) {
       byte value = getByte(rowId);
       if (columnPageEncoderMeta.getColumnSpec().getSchemaDataType() == DataTypes.BOOLEAN)
{
         return BooleanConvert.byte2Boolean(value);
       }
       return value;
-    } else if (dataType == DataTypes.SHORT) {
+    } else if (dataType == SHORT) {
       return getShort(rowId);
-    } else if (dataType == DataTypes.INT) {
+    } else if (dataType == INT) {
       return getInt(rowId);
-    } else if (dataType == DataTypes.LONG) {
+    } else if (dataType == LONG) {
       return getLong(rowId);
     } else if (dataType == DataTypes.DOUBLE) {
       return getDouble(rowId);
     } else if (DataTypes.isDecimal(dataType)) {
       return getDecimal(rowId);
     } else if (dataType == DataTypes.STRING
-        || dataType == DataTypes.BYTE_ARRAY
+        || dataType == BYTE_ARRAY
         || dataType == DataTypes.VARCHAR) {
       return getBytes(rowId);
     } else {
@@ -535,13 +541,13 @@ public abstract class ColumnPage {
     DataType dataType = columnPageEncoderMeta.getStoreDataType();
     if (dataType == DataTypes.BOOLEAN) {
       putBoolean(rowId, false);
-    } else if (dataType == DataTypes.BYTE) {
+    } else if (dataType == BYTE) {
       putByte(rowId, (byte) 0);
-    } else if (dataType == DataTypes.SHORT) {
+    } else if (dataType == SHORT) {
       putShort(rowId, (short) 0);
-    } else if (dataType == DataTypes.INT) {
+    } else if (dataType == INT) {
       putInt(rowId, 0);
-    } else if (dataType == DataTypes.LONG) {
+    } else if (dataType == LONG) {
       putLong(rowId, 0L);
     } else if (dataType == DataTypes.DOUBLE) {
       putDouble(rowId, 0.0);
@@ -562,16 +568,16 @@ public abstract class ColumnPage {
     DataType dataType = columnPageEncoderMeta.getStoreDataType();
     if (dataType == DataTypes.BOOLEAN) {
       result = getBoolean(rowId);
-    } else if (dataType == DataTypes.BYTE) {
+    } else if (dataType == BYTE) {
       result = getByte(rowId);
       if (columnPageEncoderMeta.getColumnSpec().getSchemaDataType() == DataTypes.BOOLEAN)
{
         result = BooleanConvert.byte2Boolean((byte)result);
       }
-    } else if (dataType == DataTypes.SHORT) {
+    } else if (dataType == SHORT) {
       result = getShort(rowId);
-    } else if (dataType == DataTypes.INT) {
+    } else if (dataType == INT) {
       result = getInt(rowId);
-    } else if (dataType == DataTypes.LONG) {
+    } else if (dataType == LONG) {
       result = getLong(rowId);
     } else if (dataType == DataTypes.DOUBLE) {
       result = getDouble(rowId);
@@ -722,15 +728,15 @@ public abstract class ColumnPage {
     DataType dataType = columnPageEncoderMeta.getStoreDataType();
     if (dataType == DataTypes.BOOLEAN) {
       return getBooleanPage().length;
-    } else if (dataType == DataTypes.BYTE) {
+    } else if (dataType == BYTE) {
       return getBytePage().length;
-    } else if (dataType == DataTypes.SHORT) {
+    } else if (dataType == SHORT) {
       return getShortPage().length * SHORT.getSizeInBytes();
     } else if (dataType == DataTypes.SHORT_INT) {
       return getShortIntPage().length;
-    } else if (dataType == DataTypes.INT) {
+    } else if (dataType == INT) {
       return getIntPage().length * INT.getSizeInBytes();
-    } else if (dataType == DataTypes.LONG) {
+    } else if (dataType == LONG) {
       return getLongPage().length * LONG.getSizeInBytes();
     } else if (dataType == DataTypes.FLOAT) {
       return getFloatPage().length * FLOAT.getSizeInBytes();
@@ -738,16 +744,16 @@ public abstract class ColumnPage {
       return getDoublePage().length * DOUBLE.getSizeInBytes();
     } else if (DataTypes.isDecimal(dataType)) {
       return getDecimalPage().length;
-    } else if (dataType == DataTypes.BYTE_ARRAY
+    } else if (dataType == BYTE_ARRAY
         && columnPageEncoderMeta.getColumnSpec().getColumnType() == ColumnType.COMPLEX_PRIMITIVE)
{
       return getComplexChildrenLVFlattenedBytePage().length;
-    } else if (dataType == DataTypes.BYTE_ARRAY
+    } else if (dataType == BYTE_ARRAY
         && (columnPageEncoderMeta.getColumnSpec().getColumnType() == ColumnType.COMPLEX_STRUCT
         || columnPageEncoderMeta.getColumnSpec().getColumnType() == ColumnType.COMPLEX_ARRAY
         || columnPageEncoderMeta.getColumnSpec().getColumnType() == ColumnType.PLAIN_LONG_VALUE
         || columnPageEncoderMeta.getColumnSpec().getColumnType() == ColumnType.PLAIN_VALUE))
{
       return getComplexParentFlattenedBytePage().length;
-    } else if (dataType == DataTypes.BYTE_ARRAY) {
+    } else if (dataType == BYTE_ARRAY) {
       return getLVFlattenedBytePage().length;
     } else {
       throw new UnsupportedOperationException("unsupported compress column page: " + dataType);
@@ -761,15 +767,15 @@ public abstract class ColumnPage {
     DataType dataType = columnPageEncoderMeta.getStoreDataType();
     if (dataType == DataTypes.BOOLEAN) {
       return compressor.compressByte(getBooleanPage());
-    } else if (dataType == DataTypes.BYTE) {
+    } else if (dataType == BYTE) {
       return compressor.compressByte(getBytePage());
-    } else if (dataType == DataTypes.SHORT) {
+    } else if (dataType == SHORT) {
       return compressor.compressShort(getShortPage());
     } else if (dataType == DataTypes.SHORT_INT) {
       return compressor.compressByte(getShortIntPage());
-    } else if (dataType == DataTypes.INT) {
+    } else if (dataType == INT) {
       return compressor.compressInt(getIntPage());
-    } else if (dataType == DataTypes.LONG) {
+    } else if (dataType == LONG) {
       return compressor.compressLong(getLongPage());
     } else if (dataType == DataTypes.FLOAT) {
       return compressor.compressFloat(getFloatPage());
@@ -777,10 +783,10 @@ public abstract class ColumnPage {
       return compressor.compressDouble(getDoublePage());
     } else if (DataTypes.isDecimal(dataType)) {
       return compressor.compressByte(getDecimalPage());
-    } else if (dataType == DataTypes.BYTE_ARRAY
+    } else if (dataType == BYTE_ARRAY
         && columnPageEncoderMeta.getColumnSpec().getColumnType() == ColumnType.COMPLEX_PRIMITIVE)
{
       return compressor.compressByte(getComplexChildrenLVFlattenedBytePage());
-    } else if (dataType == DataTypes.BYTE_ARRAY
+    } else if (dataType == BYTE_ARRAY
         && (columnPageEncoderMeta.getColumnSpec().getColumnType() == ColumnType.COMPLEX_STRUCT
         || columnPageEncoderMeta.getColumnSpec().getColumnType() == ColumnType.COMPLEX_ARRAY
         || columnPageEncoderMeta.getColumnSpec().getColumnType() == ColumnType.PLAIN_LONG_VALUE
@@ -788,7 +794,7 @@ public abstract class ColumnPage {
       return compressor.compressByte(getComplexParentFlattenedBytePage());
     } else if (dataType == DataTypes.BINARY) {
       return getLVFlattenedBytePage();
-    } else if (dataType == DataTypes.BYTE_ARRAY) {
+    } else if (dataType == BYTE_ARRAY) {
       return compressor.compressByte(getLVFlattenedBytePage());
     } else {
       throw new UnsupportedOperationException("unsupported compress column page: " + dataType);
@@ -805,19 +811,19 @@ public abstract class ColumnPage {
     Compressor compressor = CompressorFactory.getInstance().getCompressor(meta.getCompressorName());
     TableSpec.ColumnSpec columnSpec = meta.getColumnSpec();
     DataType storeDataType = meta.getStoreDataType();
-    if (storeDataType == DataTypes.BOOLEAN || storeDataType == DataTypes.BYTE) {
+    if (storeDataType == DataTypes.BOOLEAN || storeDataType == BYTE) {
       byte[] byteData = compressor.unCompressByte(compressedData, offset, length);
       return newBytePage(meta, byteData);
-    } else if (storeDataType == DataTypes.SHORT) {
+    } else if (storeDataType == SHORT) {
       short[] shortData = compressor.unCompressShort(compressedData, offset, length);
       return newShortPage(meta, shortData);
     } else if (storeDataType == DataTypes.SHORT_INT) {
       byte[] shortIntData = compressor.unCompressByte(compressedData, offset, length);
       return newShortIntPage(meta, shortIntData);
-    } else if (storeDataType == DataTypes.INT) {
+    } else if (storeDataType == INT) {
       int[] intData = compressor.unCompressInt(compressedData, offset, length);
       return newIntPage(meta, intData);
-    } else if (storeDataType == DataTypes.LONG) {
+    } else if (storeDataType == LONG) {
       long[] longData = compressor.unCompressLong(compressedData, offset, length);
       return newLongPage(meta, longData);
     } else if (storeDataType == DataTypes.FLOAT) {
@@ -826,32 +832,32 @@ public abstract class ColumnPage {
     } else if (storeDataType == DataTypes.DOUBLE) {
       double[] doubleData = compressor.unCompressDouble(compressedData, offset, length);
       return newDoublePage(meta, doubleData);
-    } else if (!isLVEncoded && storeDataType == DataTypes.BYTE_ARRAY && (
+    } else if (!isLVEncoded && storeDataType == BYTE_ARRAY && (
         columnSpec.getColumnType() == ColumnType.COMPLEX_PRIMITIVE
             || columnSpec.getColumnType() == ColumnType.PLAIN_VALUE)) {
       byte[] lvVarBytes = compressor.unCompressByte(compressedData, offset, length);
       return newComplexLVBytesPage(columnSpec, lvVarBytes,
           CarbonCommonConstants.SHORT_SIZE_IN_BYTE, meta.getCompressorName());
-    } else if (isLVEncoded && storeDataType == DataTypes.BYTE_ARRAY &&
+    } else if (isLVEncoded && storeDataType == BYTE_ARRAY &&
         columnSpec.getColumnType() == ColumnType.COMPLEX_PRIMITIVE) {
       byte[] lvVarBytes = compressor.unCompressByte(compressedData, offset, length);
       return newFixedByteArrayPage(columnSpec, lvVarBytes, 3, meta.getCompressorName());
-    } else if (storeDataType == DataTypes.BYTE_ARRAY
+    } else if (storeDataType == BYTE_ARRAY
         && columnSpec.getColumnType() == ColumnType.COMPLEX_STRUCT) {
       byte[] lvVarBytes = compressor.unCompressByte(compressedData, offset, length);
       return newFixedByteArrayPage(columnSpec, lvVarBytes,
           CarbonCommonConstants.SHORT_SIZE_IN_BYTE, meta.getCompressorName());
-    } else if (storeDataType == DataTypes.BYTE_ARRAY
+    } else if (storeDataType == BYTE_ARRAY
         && columnSpec.getColumnType() == ColumnType.COMPLEX_ARRAY) {
       byte[] lvVarBytes = compressor.unCompressByte(compressedData, offset, length);
       return newFixedByteArrayPage(columnSpec, lvVarBytes,
           CarbonCommonConstants.LONG_SIZE_IN_BYTE, meta.getCompressorName());
-    } else if (storeDataType == DataTypes.BYTE_ARRAY
+    } else if (storeDataType == BYTE_ARRAY
         && columnSpec.getColumnType() == ColumnType.PLAIN_LONG_VALUE) {
       byte[] lvVarBytes = compressor.unCompressByte(compressedData, offset, length);
       return newLVBytesPage(columnSpec, lvVarBytes,
           CarbonCommonConstants.INT_SIZE_IN_BYTE, meta.getCompressorName());
-    } else if (storeDataType == DataTypes.BYTE_ARRAY) {
+    } else if (storeDataType == BYTE_ARRAY) {
       byte[] lvVarBytes = compressor.unCompressByte(compressedData, offset, length);
       return newLVBytesPage(columnSpec, lvVarBytes,
           CarbonCommonConstants.INT_SIZE_IN_BYTE, meta.getCompressorName());
@@ -869,12 +875,12 @@ public abstract class ColumnPage {
     Compressor compressor = CompressorFactory.getInstance().getCompressor(meta.getCompressorName());
     ColumnPage decimalPage;
     DataType storeDataType = meta.getStoreDataType();
-    if (storeDataType == DataTypes.BYTE) {
+    if (storeDataType == BYTE) {
       byte[] byteData = compressor.unCompressByte(compressedData, offset, length);
       decimalPage = createDecimalPage(meta, byteData.length);
       decimalPage.setBytePage(byteData);
       return decimalPage;
-    } else if (storeDataType == DataTypes.SHORT) {
+    } else if (storeDataType == SHORT) {
       short[] shortData = compressor.unCompressShort(compressedData, offset, length);
       decimalPage = createDecimalPage(meta, shortData.length);
       decimalPage.setShortPage(shortData);
@@ -884,12 +890,12 @@ public abstract class ColumnPage {
       decimalPage = createDecimalPage(meta, shortIntData.length / 3);
       decimalPage.setShortIntPage(shortIntData);
       return decimalPage;
-    }  else if (storeDataType == DataTypes.INT) {
+    }  else if (storeDataType == INT) {
       int[] intData = compressor.unCompressInt(compressedData, offset, length);
       decimalPage = createDecimalPage(meta, intData.length);
       decimalPage.setIntPage(intData);
       return decimalPage;
-    } else if (storeDataType == DataTypes.LONG) {
+    } else if (storeDataType == LONG) {
       long[] longData = compressor.unCompressLong(compressedData, offset, length);
       decimalPage = createDecimalPage(meta, longData.length);
       decimalPage.setLongPage(longData);
diff --git a/core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
b/core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
index 85f7aeb..8e8a80b 100644
--- a/core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
+++ b/core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
@@ -18,7 +18,13 @@
 package org.apache.carbondata.core.indexstore.blockletindex;
 
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.carbondata.core.cache.Cache;
diff --git a/core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java
b/core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java
index 0fe92e1..caf1328 100644
--- a/core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java
+++ b/core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java
@@ -17,9 +17,23 @@
 
 package org.apache.carbondata.core.metadata;
 
-import java.io.*;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.Serializable;
 import java.nio.charset.Charset;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
diff --git a/core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchema.java
b/core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchema.java
index 77db3f6..33b6016 100644
--- a/core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchema.java
+++ b/core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchema.java
@@ -17,7 +17,15 @@
 
 package org.apache.carbondata.core.metadata.schema.table;
 
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.DataOutput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/collector/ResultCollectorFactory.java
b/core/src/main/java/org/apache/carbondata/core/scan/collector/ResultCollectorFactory.java
index 48a6ee6..56985fe 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/collector/ResultCollectorFactory.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/collector/ResultCollectorFactory.java
@@ -18,7 +18,16 @@
 package org.apache.carbondata.core.scan.collector;
 
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.scan.collector.impl.*;
+import org.apache.carbondata.core.scan.collector.impl.AbstractScannedResultCollector;
+import org.apache.carbondata.core.scan.collector.impl.DictionaryBasedResultCollector;
+import org.apache.carbondata.core.scan.collector.impl.DictionaryBasedVectorResultCollector;
+import org.apache.carbondata.core.scan.collector.impl.RawBasedResultCollector;
+import org.apache.carbondata.core.scan.collector.impl.RestructureBasedDictionaryResultCollector;
+import org.apache.carbondata.core.scan.collector.impl.RestructureBasedRawResultCollector;
+import org.apache.carbondata.core.scan.collector.impl.RestructureBasedVectorResultCollector;
+import org.apache.carbondata.core.scan.collector.impl.RowIdBasedResultCollector;
+import org.apache.carbondata.core.scan.collector.impl.RowIdRawBasedResultCollector;
+import org.apache.carbondata.core.scan.collector.impl.RowIdRestructureBasedRawResultCollector;
 import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
 
 import org.apache.log4j.Logger;
diff --git a/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java b/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
index a90bd32..0b83a838 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
@@ -17,12 +17,32 @@
 
 package org.apache.carbondata.core.util;
 
-import java.io.*;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.Closeable;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.ObjectInputStream;
+import java.io.UnsupportedEncodingException;
 import java.math.BigDecimal;
 import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
 import java.security.PrivilegedExceptionAction;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
 
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.cache.dictionary.Dictionary;
diff --git a/core/src/main/java/org/apache/carbondata/core/util/SessionParams.java b/core/src/main/java/org/apache/carbondata/core/util/SessionParams.java
index 0e68be5..481bdb1 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/SessionParams.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/SessionParams.java
@@ -30,7 +30,18 @@ import org.apache.carbondata.core.constants.CarbonCommonConstantsInternal;
 import org.apache.carbondata.core.constants.CarbonLoadOptionConstants;
 import org.apache.carbondata.core.exception.InvalidConfigurationException;
 
-import static org.apache.carbondata.core.constants.CarbonCommonConstants.*;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.CARBON_CUSTOM_BLOCK_DISTRIBUTION;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.CARBON_ENABLE_INDEX_SERVER;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.CARBON_MAJOR_COMPACTION_SIZE;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.CARBON_PUSH_ROW_FILTERS_FOR_VECTOR;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.COMPACTION_SEGMENT_LEVEL_THRESHOLD;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.ENABLE_AUTO_LOAD_MERGE;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.ENABLE_OFFHEAP_SORT;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.ENABLE_UNSAFE_IN_QUERY_EXECUTION;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.ENABLE_UNSAFE_SORT;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.ENABLE_VECTOR_READER;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.NUM_CORES_COMPACTING;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.NUM_CORES_LOADING;
 import static org.apache.carbondata.core.constants.CarbonLoadOptionConstants.CARBON_OPTIONS_BAD_RECORDS_ACTION;
 import static org.apache.carbondata.core.constants.CarbonLoadOptionConstants.CARBON_OPTIONS_BAD_RECORDS_LOGGER_ENABLE;
 import static org.apache.carbondata.core.constants.CarbonLoadOptionConstants.CARBON_OPTIONS_BAD_RECORD_PATH;
diff --git a/dev/javastyle-config.xml b/dev/javastyle-config.xml
index bab54af..824cbc8 100644
--- a/dev/javastyle-config.xml
+++ b/dev/javastyle-config.xml
@@ -176,9 +176,7 @@
         </module>
 
         <!-- Checks for star import. -->
-        <module name="AvoidStarImport">
-            <property name="severity" value="info"/>
-        </module>
+        <module name="AvoidStarImport"/>
 
         <!-- Checks for placement of the left curly brace ('{'). -->
         <module name="LeftCurly"/>
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java
b/hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java
index b29d1b0..d03a252 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java
@@ -19,7 +19,10 @@ package org.apache.carbondata.hadoop.util;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.constants.CarbonV3DataFormatConstants;
diff --git a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataConnectorFactory.java
b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataConnectorFactory.java
index e264189..1284237 100755
--- a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataConnectorFactory.java
+++ b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataConnectorFactory.java
@@ -18,7 +18,10 @@
 package org.apache.carbondata.presto;
 
 import java.lang.management.ManagementFactory;
-import java.lang.reflect.*;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
diff --git a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataSplitManager.java
b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataSplitManager.java
index 50dcdc8..0147b75 100755
--- a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataSplitManager.java
+++ b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataSplitManager.java
@@ -17,7 +17,14 @@
 
 package org.apache.carbondata.presto;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.OptionalInt;
+import java.util.Properties;
 import java.util.concurrent.ExecutorService;
 import java.util.function.Function;
 
diff --git a/tools/cli/src/main/java/org/apache/carbondata/tool/DataSummary.java b/tools/cli/src/main/java/org/apache/carbondata/tool/DataSummary.java
index b3f6878..db957b7 100644
--- a/tools/cli/src/main/java/org/apache/carbondata/tool/DataSummary.java
+++ b/tools/cli/src/main/java/org/apache/carbondata/tool/DataSummary.java
@@ -20,7 +20,14 @@ package org.apache.carbondata.tool;
 import java.io.File;
 import java.io.IOException;
 import java.nio.charset.Charset;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
 
 import org.apache.carbondata.common.Strings;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
diff --git a/tools/cli/src/main/java/org/apache/carbondata/tool/FileCollector.java b/tools/cli/src/main/java/org/apache/carbondata/tool/FileCollector.java
index ab25d80..69a070e 100644
--- a/tools/cli/src/main/java/org/apache/carbondata/tool/FileCollector.java
+++ b/tools/cli/src/main/java/org/apache/carbondata/tool/FileCollector.java
@@ -18,7 +18,14 @@
 package org.apache.carbondata.tool;
 
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import org.apache.carbondata.common.Strings;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;


Mime
View raw message