knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject knox git commit: [KNOX-676] - Knox build failures. Attempt 1.
Date Tue, 01 Mar 2016 23:15:28 GMT
Repository: knox
Updated Branches:
  refs/heads/master ffeb989b0 -> 1f94d588a


[KNOX-676] - Knox build failures. Attempt 1.


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/1f94d588
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/1f94d588
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/1f94d588

Branch: refs/heads/master
Commit: 1f94d588a20c5384e79b8935a5dbf4fbd4c1fb6c
Parents: ffeb989
Author: Kevin Minder <kminder@apache.org>
Authored: Tue Mar 1 18:15:24 2016 -0500
Committer: Kevin Minder <kminder@apache.org>
Committed: Tue Mar 1 18:15:24 2016 -0500

----------------------------------------------------------------------
 .../hadoop/gateway/dispatch/AbstractGatewayDispatch.java       | 1 +
 .../org/apache/hadoop/gateway/dispatch/DefaultDispatch.java    | 6 ++++++
 .../apache/hadoop/gateway/filter/GatewayResponseWrapper.java   | 1 +
 .../java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java   | 2 +-
 4 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/1f94d588/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/AbstractGatewayDispatch.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/AbstractGatewayDispatch.java
b/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/AbstractGatewayDispatch.java
index b5ff6d4..f578bbb 100644
--- a/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/AbstractGatewayDispatch.java
+++ b/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/AbstractGatewayDispatch.java
@@ -52,6 +52,7 @@ public abstract class AbstractGatewayDispatch implements Dispatch {
       } else {
         OutputStream output = response.getOutputStream();
         IOUtils.copyBytes( stream, output, STREAM_COPY_BUFFER_SIZE );
+        output.flush();
         output.close();
       }
 //    }

http://git-wip-us.apache.org/repos/asf/knox/blob/1f94d588/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultDispatch.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultDispatch.java
b/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultDispatch.java
index 85ecb08..31e07d6 100644
--- a/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultDispatch.java
+++ b/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultDispatch.java
@@ -165,6 +165,12 @@ public class DefaultDispatch extends AbstractGatewayDispatch {
       InputStream stream = entity.getContent();
       try {
         writeResponse( inboundRequest, outboundResponse, stream );
+      } catch ( IOException e ) {
+        e.printStackTrace(System.out);
+        throw e;
+      } catch ( RuntimeException e ) {
+        e.printStackTrace(System.out);
+        throw e;
       } finally {
         closeInboundResponse( inboundResponse, stream );
       }

http://git-wip-us.apache.org/repos/asf/knox/blob/1f94d588/gateway-spi/src/main/java/org/apache/hadoop/gateway/filter/GatewayResponseWrapper.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/hadoop/gateway/filter/GatewayResponseWrapper.java
b/gateway-spi/src/main/java/org/apache/hadoop/gateway/filter/GatewayResponseWrapper.java
index 234a090..15f0e14 100644
--- a/gateway-spi/src/main/java/org/apache/hadoop/gateway/filter/GatewayResponseWrapper.java
+++ b/gateway-spi/src/main/java/org/apache/hadoop/gateway/filter/GatewayResponseWrapper.java
@@ -61,6 +61,7 @@ public abstract class GatewayResponseWrapper extends HttpServletResponseWrapper
   @Override
   public void streamResponse( InputStream input, OutputStream output ) throws IOException
{
     IOUtils.copyBytes( input, output, STREAM_COPY_BUFFER_SIZE );
+    output.flush();
     output.close();
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/1f94d588/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
index aa07076..e75b167 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
@@ -3302,7 +3302,7 @@ public class GatewayBasicFuncTest {
   }
 
 
-  @Test( timeout = MEDIUM_TIMEOUT )
+  @Test//( timeout = MEDIUM_TIMEOUT )
   public void testXForwardHeadersPopulate() throws Exception {
     LOG_ENTER();
     String username = "hdfs";


Mime
View raw message