carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [1/4] incubator-carbondata git commit: modify compress interface
Date Tue, 06 Dec 2016 04:04:12 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 7277355a9 -> b7f3be7e0


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/25b4ba2c/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/CompressedTempSortFileReader.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/CompressedTempSortFileReader.java
b/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/CompressedTempSortFileReader.java
index 729e060..46e7df0 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/CompressedTempSortFileReader.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/CompressedTempSortFileReader.java
@@ -21,7 +21,7 @@ package org.apache.carbondata.processing.sortandgroupby.sortdata;
 
 import java.io.File;
 
-import org.apache.carbondata.core.datastorage.store.compression.SnappyCompression.SnappyByteCompression;
+import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
 
 public class CompressedTempSortFileReader extends AbstractTempSortFileReader {
 
@@ -45,8 +45,8 @@ public class CompressedTempSortFileReader extends AbstractTempSortFileReader
{
   @Override public Object[][] getRow() {
     int recordLength = fileHolder.readInt(filePath);
     int byteArrayLength = fileHolder.readInt(filePath);
-    byte[] byteArrayFromFile = SnappyByteCompression.INSTANCE
-        .unCompress(fileHolder.readByteArray(filePath, byteArrayLength));
+    byte[] byteArrayFromFile = CompressorFactory.getInstance()
+        .unCompressByte(fileHolder.readByteArray(filePath, byteArrayLength));
     return prepareRecordFromByteBuffer(recordLength, byteArrayFromFile);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/25b4ba2c/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/CompressedTempSortFileWriter.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/CompressedTempSortFileWriter.java
b/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/CompressedTempSortFileWriter.java
index 466ab08..0e621c1 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/CompressedTempSortFileWriter.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/CompressedTempSortFileWriter.java
@@ -24,7 +24,7 @@ import java.io.DataOutputStream;
 import java.io.IOException;
 
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.compression.SnappyCompression.SnappyByteCompression;
+import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
 import org.apache.carbondata.core.util.CarbonUtil;
 import org.apache.carbondata.processing.sortandgroupby.exception.CarbonSortKeyAndGroupByException;
 
@@ -65,7 +65,7 @@ public class CompressedTempSortFileWriter extends AbstractTempSortFileWriter
{
               noDictionaryCount, complexDimensionCount);
 
       stream.writeInt(records.length);
-      byte[] byteArray = SnappyByteCompression.INSTANCE.compress(blockDataArray.toByteArray());
+      byte[] byteArray = CompressorFactory.getInstance().compressByte(blockDataArray.toByteArray());
       stream.writeInt(byteArray.length);
       stream.write(byteArray);
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/25b4ba2c/processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
b/processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
index 279bb63..a94bea5 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
@@ -53,7 +53,7 @@ import org.apache.carbondata.core.carbon.path.CarbonStorePath;
 import org.apache.carbondata.core.carbon.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.store.columnar.IndexStorage;
-import org.apache.carbondata.core.datastorage.store.compression.SnappyCompression.SnappyByteCompression;
+import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
 import org.apache.carbondata.core.datastorage.store.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
 import org.apache.carbondata.core.keygenerator.mdkey.NumberCompressor;
@@ -607,7 +607,7 @@ public abstract class AbstractFactDataWriter<T> implements CarbonFactDataWriter<
           }
         }
       }
-      keyBlockData[i] = SnappyByteCompression.INSTANCE.compress(keyBlockData[i]);
+      keyBlockData[i] = CompressorFactory.getInstance().compressByte(keyBlockData[i]);
     }
     return keyBlockData;
   }


Mime
View raw message