carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [1/2] incubator-carbondata git commit: change case for default file format as V2 if property is not given
Date Sun, 08 Jan 2017 14:35:31 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 1790655fe -> 96ef7f4c4


change case for default file format as V2 if property is not given

remove style checks in CarbonDataWriterFactory


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

Branch: refs/heads/master
Commit: c3a462cc7db2f701c241b5ba7522d92dfce8ce09
Parents: 1790655
Author: sandy <phalodi@gmail.com>
Authored: Fri Jan 6 14:16:58 2017 +0530
Committer: ravipesala <ravi.pesala@gmail.com>
Committed: Sun Jan 8 20:04:30 2017 +0530

----------------------------------------------------------------------
 .../carbondata/core/carbon/ColumnarFormatVersion.java     |  5 +----
 .../datastore/chunk/reader/CarbonDataReaderFactory.java   | 10 +++-------
 .../core/util/DataFileFooterConverterFactory.java         |  4 +---
 .../processing/store/CarbonDataWriterFactory.java         |  4 +---
 4 files changed, 6 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/c3a462cc/core/src/main/java/org/apache/carbondata/core/carbon/ColumnarFormatVersion.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/carbon/ColumnarFormatVersion.java
b/core/src/main/java/org/apache/carbondata/core/carbon/ColumnarFormatVersion.java
index 8a1b8eb..7b67f94 100644
--- a/core/src/main/java/org/apache/carbondata/core/carbon/ColumnarFormatVersion.java
+++ b/core/src/main/java/org/apache/carbondata/core/carbon/ColumnarFormatVersion.java
@@ -45,11 +45,8 @@ public enum ColumnarFormatVersion {
       case 1:
         // after multiple reader support, user can write new file with version 1
         return V1;
-      case 2:
-        // after multiple reader support, user can write new file with version 2
-        return V2;
       default:
-        throw new IllegalArgumentException("invalid format version: " + version);
+        return V2;
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/c3a462cc/core/src/main/java/org/apache/carbondata/core/carbon/datastore/chunk/reader/CarbonDataReaderFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/carbon/datastore/chunk/reader/CarbonDataReaderFactory.java
b/core/src/main/java/org/apache/carbondata/core/carbon/datastore/chunk/reader/CarbonDataReaderFactory.java
index 9bf7e62..13fe3d2 100644
--- a/core/src/main/java/org/apache/carbondata/core/carbon/datastore/chunk/reader/CarbonDataReaderFactory.java
+++ b/core/src/main/java/org/apache/carbondata/core/carbon/datastore/chunk/reader/CarbonDataReaderFactory.java
@@ -64,14 +64,12 @@ public class CarbonDataReaderFactory {
   public DimensionColumnChunkReader getDimensionColumnChunkReader(ColumnarFormatVersion version,
       BlockletInfo blockletInfo, int[] eachColumnValueSize, String filePath) {
     switch (version) {
-      case V2:
-        return new CompressedDimensionChunkFileBasedReaderV2(blockletInfo, eachColumnValueSize,
-            filePath);
       case V1:
         return new CompressedDimensionChunkFileBasedReaderV1(blockletInfo, eachColumnValueSize,
             filePath);
       default:
-        throw new IllegalArgumentException("invalid format version: " + version);
+        return new CompressedDimensionChunkFileBasedReaderV2(blockletInfo, eachColumnValueSize,
+            filePath);
     }
   }
 
@@ -86,12 +84,10 @@ public class CarbonDataReaderFactory {
   public MeasureColumnChunkReader getMeasureColumnChunkReader(ColumnarFormatVersion version,
       BlockletInfo blockletInfo, String filePath) {
     switch (version) {
-      case V2:
-        return new CompressedMeasureChunkFileBasedReaderV2(blockletInfo, filePath);
       case V1:
         return new CompressedMeasureChunkFileBasedReaderV1(blockletInfo, filePath);
       default:
-        throw new IllegalArgumentException("invalid format version: " + version);
+        return new CompressedMeasureChunkFileBasedReaderV2(blockletInfo, filePath);
     }
 
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/c3a462cc/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverterFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverterFactory.java
b/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverterFactory.java
index 175a22b..dc79710 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverterFactory.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverterFactory.java
@@ -56,12 +56,10 @@ public class DataFileFooterConverterFactory {
   public AbstractDataFileFooterConverter getDataFileFooterConverter(
       final ColumnarFormatVersion version) {
     switch (version) {
-      case V2:
-        return new DataFileFooterConverter2();
       case V1:
         return new DataFileFooterConverter();
       default:
-        throw new IllegalArgumentException("invalid format version: " + version);
+        return new DataFileFooterConverter2();
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/c3a462cc/processing/src/main/java/org/apache/carbondata/processing/store/CarbonDataWriterFactory.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/store/CarbonDataWriterFactory.java
b/processing/src/main/java/org/apache/carbondata/processing/store/CarbonDataWriterFactory.java
index 047ac0d..94f7bea 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/store/CarbonDataWriterFactory.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/store/CarbonDataWriterFactory.java
@@ -62,12 +62,10 @@ public class CarbonDataWriterFactory {
   public CarbonFactDataWriter<?> getFactDataWriter(final ColumnarFormatVersion version,
       final CarbonDataWriterVo carbonDataWriterVo) {
     switch (version) {
-      case V2:
-        return new CarbonFactDataWriterImplV2(carbonDataWriterVo);
       case V1:
         return new CarbonFactDataWriterImplV1(carbonDataWriterVo);
       default:
-        throw new IllegalArgumentException("invalid format version: " + version);
+        return new CarbonFactDataWriterImplV2(carbonDataWriterVo);
     }
   }
 


Mime
View raw message