Apache9 commented on a change in pull request #2958:
URL: https://github.com/apache/hbase/pull/2958#discussion_r586007635



##########
File path: 
hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift2/DemoClient.java
##########
@@ -90,8 +93,13 @@ public Void run() throws Exception {
   public void run() throws Exception {
     int timeout = 10000;
     boolean framed = false;
+    TTransport transport = null;
+    try {
+      transport = new TSocket(new TConfiguration(), host, port, timeout);
+    } catch (TTransportException e) {

Review comment:
       Why we need a try catch here? The method is declared as throwing 
Exception...

##########
File path: 
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/client/ThriftConnection.java
##########
@@ -160,14 +160,16 @@ public int getConnectTimeout() {
 
     @Override
     public Pair<THBaseService.Client, TTransport> getClient() throws 
IOException {
-      TSocket sock = new TSocket(connection.getHost(), connection.getPort());
-      sock.setSocketTimeout(connection.getOperationTimeout());
-      sock.setConnectTimeout(connection.getConnectTimeout());
-      TTransport tTransport = sock;
-      if (connection.isFramed()) {
-        tTransport = new TFramedTransport(tTransport);
-      }
+      TTransport tTransport = null;

Review comment:
       Why change the style here? No big difference?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to