carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [15/20] incubator-carbondata git commit: [CARBONDATA-128] Modification done to read thrift files using Tcompact protocol (#907)
Date Sat, 06 Aug 2016 10:00:32 GMT
[CARBONDATA-128] Modification done to read thrift files using Tcompact protocol (#907)

replace Tbinary protocol with TCompact for performance 

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

Branch: refs/heads/master
Commit: 89847ea20308d6685c0d28dbbadd620bffb971b5
Parents: 1721d40
Author: manishgupta88 <tomanishgupta18@gmail.com>
Authored: Thu Aug 4 17:17:16 2016 +0530
Committer: Venkata Ramana G <g.ramana.v1@gmail.com>
Committed: Thu Aug 4 17:17:16 2016 +0530

----------------------------------------------------------------------
 .../main/java/org/carbondata/core/reader/ThriftReader.java    | 7 ++++---
 .../main/java/org/carbondata/core/writer/ThriftWriter.java    | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/89847ea2/core/src/main/java/org/carbondata/core/reader/ThriftReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/reader/ThriftReader.java b/core/src/main/java/org/carbondata/core/reader/ThriftReader.java
index e659919..92a6be1 100644
--- a/core/src/main/java/org/carbondata/core/reader/ThriftReader.java
+++ b/core/src/main/java/org/carbondata/core/reader/ThriftReader.java
@@ -27,7 +27,8 @@ import org.carbondata.core.util.CarbonUtil;
 
 import org.apache.thrift.TBase;
 import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TCompactProtocol;
+import org.apache.thrift.protocol.TProtocol;
 import org.apache.thrift.transport.TIOStreamTransport;
 
 /**
@@ -53,7 +54,7 @@ public class ThriftReader {
   /**
    * For reading the binary thrift objects.
    */
-  private TBinaryProtocol binaryIn;
+  private TProtocol binaryIn;
 
   /**
    * Constructor.
@@ -76,7 +77,7 @@ public class ThriftReader {
   public void open() throws IOException {
     FileFactory.FileType fileType = FileFactory.getFileType(fileName);
     dataInputStream = FileFactory.getDataInputStream(fileName, fileType, bufferSize);
-    binaryIn = new TBinaryProtocol(new TIOStreamTransport(dataInputStream));
+    binaryIn = new TCompactProtocol(new TIOStreamTransport(dataInputStream));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/89847ea2/core/src/main/java/org/carbondata/core/writer/ThriftWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/writer/ThriftWriter.java b/core/src/main/java/org/carbondata/core/writer/ThriftWriter.java
index c2822f4..2c5ee1d 100644
--- a/core/src/main/java/org/carbondata/core/writer/ThriftWriter.java
+++ b/core/src/main/java/org/carbondata/core/writer/ThriftWriter.java
@@ -28,7 +28,8 @@ import org.carbondata.core.util.CarbonUtil;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.thrift.TBase;
 import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TCompactProtocol;
+import org.apache.thrift.protocol.TProtocol;
 import org.apache.thrift.transport.TIOStreamTransport;
 
 /**
@@ -54,7 +55,7 @@ public class ThriftWriter {
   /**
    * For binary serialization of objects.
    */
-  private TBinaryProtocol binaryOut;
+  private TProtocol binaryOut;
 
   /**
    * flag to append to existing file
@@ -75,7 +76,7 @@ public class ThriftWriter {
   public void open() throws IOException {
     FileFactory.FileType fileType = FileFactory.getFileType(fileName);
     dataOutputStream = FileFactory.getDataOutputStream(fileName, fileType, bufferSize, append);
-    binaryOut = new TBinaryProtocol(new TIOStreamTransport(dataOutputStream));
+    binaryOut = new TCompactProtocol(new TIOStreamTransport(dataOutputStream));
   }
 
   /**


Mime
View raw message