accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1398373 - /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java
Date Mon, 15 Oct 2012 16:32:25 GMT
Author: billie
Date: Mon Oct 15 16:32:24 2012
New Revision: 1398373

URL: http://svn.apache.org/viewvc?rev=1398373&view=rev
Log:
ACCUMULO-804 changed use of SocketInputStream for hadoop 2 compatibility

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java?rev=1398373&r1=1398372&r2=1398373&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java
Mon Oct 15 16:32:24 2012
@@ -25,8 +25,7 @@ import java.net.Socket;
 import java.net.SocketAddress;
 import java.nio.channels.spi.SelectorProvider;
 
-import org.apache.hadoop.net.SocketInputStream;
-import org.apache.hadoop.net.SocketOutputStream;
+import org.apache.hadoop.net.NetUtils;
 import org.apache.thrift.transport.TIOStreamTransport;
 import org.apache.thrift.transport.TTransport;
 
@@ -37,8 +36,8 @@ public class TTimeoutTransport {
     socket.setSoLinger(false, 0);
     socket.setTcpNoDelay(true);
     socket.connect(addr);
-    InputStream input = new BufferedInputStream(new SocketInputStream(socket, timeoutMillis),
1024 * 10);
-    OutputStream output = new BufferedOutputStream(new SocketOutputStream(socket, timeoutMillis),
1024 * 10);
+    InputStream input = new BufferedInputStream(NetUtils.getInputStream(socket, timeoutMillis),
1024 * 10);
+    OutputStream output = new BufferedOutputStream(NetUtils.getOutputStream(socket, timeoutMillis),
1024 * 10);
     return new TIOStreamTransport(input, output);
   }
 }



Mime
View raw message