You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2019/05/24 07:30:24 UTC

[incubator-iotdb] branch open_thrift_compaction created (now 380a82a)

This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a change to branch open_thrift_compaction
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


      at 380a82a  change thrift protocol to TCompactProtocol

This branch includes the following new commits:

     new 380a82a  change thrift protocol to TCompactProtocol

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-iotdb] 01/01: change thrift protocol to TCompactProtocol

Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch open_thrift_compaction
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit 380a82a3dd95b255e218be516dc56f0a56f7c190
Author: qiaojialin <64...@qq.com>
AuthorDate: Fri May 24 15:30:08 2019 +0800

    change thrift protocol to TCompactProtocol
---
 iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java | 6 +++---
 jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java    | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java b/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java
index 1326e23..458fc27 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java
@@ -30,8 +30,8 @@ import org.apache.iotdb.db.conf.IoTDBDescriptor;
 import org.apache.iotdb.db.exception.StartupException;
 import org.apache.iotdb.service.rpc.thrift.TSIService;
 import org.apache.iotdb.service.rpc.thrift.TSIService.Processor;
-import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.protocol.TBinaryProtocol.Factory;
+import org.apache.thrift.protocol.TCompactProtocol;
+import org.apache.thrift.protocol.TCompactProtocol.Factory;
 import org.apache.thrift.server.TServer;
 import org.apache.thrift.server.TThreadPoolServer;
 import org.apache.thrift.transport.TServerSocket;
@@ -189,7 +189,7 @@ public class JDBCService implements JDBCServiceMBean, IService {
 
     public JDBCServiceThread(CountDownLatch threadStartLatch, CountDownLatch threadStopLatch)
         throws IOException, ClassNotFoundException, IllegalAccessException, InstantiationException {
-      protocolFactory = new TBinaryProtocol.Factory();
+      protocolFactory = new TCompactProtocol.Factory();
       IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
       impl = (TSServiceImpl) Class.forName(config.getRpcImplClassName()).newInstance();
       processor = new TSIService.Processor<>(impl);
diff --git a/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java
index 815725a..9e7668e 100644
--- a/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java
+++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java
@@ -56,7 +56,7 @@ import org.apache.iotdb.service.rpc.thrift.TSSetTimeZoneReq;
 import org.apache.iotdb.service.rpc.thrift.TSSetTimeZoneResp;
 import org.apache.iotdb.service.rpc.thrift.TS_SessionHandle;
 import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TCompactProtocol;
 import org.apache.thrift.transport.TSocket;
 import org.apache.thrift.transport.TTransportException;
 import org.slf4j.Logger;
@@ -89,7 +89,7 @@ public class IoTDBConnection implements Connection {
     supportedProtocols.add(TSProtocolVersion.TSFILE_SERVICE_PROTOCOL_V1);
 
     openTransport();
-    client = new TSIService.Client(new TBinaryProtocol(transport));
+    client = new TSIService.Client(new TCompactProtocol(transport));
     // open client session
     openSession();
     // Wrap the client with a thread-safe proxy to serialize the RPC calls
@@ -460,7 +460,7 @@ public class IoTDBConnection implements Connection {
         if (transport != null) {
           transport.close();
           openTransport();
-          client = new TSIService.Client(new TBinaryProtocol(transport));
+          client = new TSIService.Client(new TCompactProtocol(transport));
           openSession();
           client = newSynchronizedClient(client);
           flag = true;