accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1431056 - in /accumulo/trunk/core/src: main/java/org/apache/accumulo/core/util/TTimeoutTransport.java test/java/org/apache/accumulo/core/conf/PropertyTest.java
Date Wed, 09 Jan 2013 20:53:38 GMT
Author: billie
Date: Wed Jan  9 20:53:38 2013
New Revision: 1431056

URL: http://svn.apache.org/viewvc?rev=1431056&view=rev
Log:
ACCUMULO-804 applied fixes to changes that broke compilation against hadoop 2.0

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.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=1431056&r1=1431055&r2=1431056&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
Wed Jan  9 20:53:38 2013
@@ -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);
   }
 }

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java?rev=1431056&r1=1431055&r2=1431056&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java (original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java Wed
Jan  9 20:53:38 2013
@@ -93,7 +93,10 @@ public class PropertyTest {
         "www.server", "www.server:1111", "www.server.com", "www.server.com:111");
     typeCheckInvalidFormat(PropertyType.HOSTLIST, ":111", "local host");
     
-    typeCheckValidFormat(PropertyType.ABSOLUTEPATH, "d:\\foo12", "c:\\foo\\g", "c:\\foo\\c",
"/foo", "/foo/c", "c:\\", "/");
+    typeCheckValidFormat(PropertyType.ABSOLUTEPATH, "/foo", "/foo/c", "/");
+    // in hadoop 2.0 Path only normalizes Windows paths properly when run on a Windows system
+    // this makes the following checks fail
+    // typeCheckValidFormat(PropertyType.ABSOLUTEPATH, "d:\\foo12", "c:\\foo\\g", "c:\\foo\\c",
"c:\\");
     typeCheckInvalidFormat(PropertyType.ABSOLUTEPATH, "foo12", "foo/g", "foo\\c");
   }
 }



Mime
View raw message