This is an automated email from the ASF dual-hosted git repository. iwasakims pushed a commit to branch branch-2 in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-2 by this push: new 9482da7 HADOOP-16544. update io.netty in branch-2. 9482da7 is described below commit 9482da7053a5a6acc825a9f62a278cfe5bf2ea1d Author: Masatake Iwasaki <iwasak...@apache.org> AuthorDate: Sun Sep 22 08:41:51 2019 +0900 HADOOP-16544. update io.netty in branch-2. Signed-off-by: Masatake Iwasaki <iwasak...@apache.org> --- .../tools/TestDelegationTokenRemoteFetcher.java | 6 ++-- .../org/apache/hadoop/mapred/ShuffleHandler.java | 32 ++++++++++++---------- hadoop-project/pom.xml | 4 +-- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java index c75c722..744f07a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java @@ -243,7 +243,7 @@ public class TestDelegationTokenRemoteFetcher { ChannelBuffer cbuffer = ChannelBuffers.buffer(fileLength); cbuffer.writeBytes(out.getData()); HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK); - response.setHeader(HttpHeaders.Names.CONTENT_LENGTH, + response.headers().set(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(fileLength)); response.setContent(cbuffer); channel.write(response).addListener(ChannelFutureListener.CLOSE); @@ -260,7 +260,7 @@ public class TestDelegationTokenRemoteFetcher { ChannelBuffer cbuffer = ChannelBuffers.buffer(bytes.length); cbuffer.writeBytes(bytes); HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK); - response.setHeader(HttpHeaders.Names.CONTENT_LENGTH, + response.headers().set(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(bytes.length)); response.setContent(cbuffer); channel.write(response).addListener(ChannelFutureListener.CLOSE); @@ -316,7 +316,7 @@ public class TestDelegationTokenRemoteFetcher { // Mimic SPNEGO authentication HttpResponse response = new DefaultHttpResponse(HTTP_1_1, HttpResponseStatus.OK); - response.addHeader("Set-Cookie", "hadoop-auth=1234"); + response.headers().set("Set-Cookie", "hadoop-auth=1234"); e.getChannel().write(response).addListener(ChannelFutureListener.CLOSE); } else if (request.getMethod() != GET) { e.getChannel().close(); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java index 51cfa54..f2431f2 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java @@ -940,9 +940,12 @@ public class ShuffleHandler extends AuxiliaryService { } // Check whether the shuffle version is compatible if (!ShuffleHeader.DEFAULT_HTTP_HEADER_NAME.equals( - request.getHeader(ShuffleHeader.HTTP_HEADER_NAME)) + request.headers() != null ? + request.headers().get(ShuffleHeader.HTTP_HEADER_NAME) : null) || !ShuffleHeader.DEFAULT_HTTP_HEADER_VERSION.equals( - request.getHeader(ShuffleHeader.HTTP_HEADER_VERSION))) { + request.headers() != null ? + request.headers() + .get(ShuffleHeader.HTTP_HEADER_VERSION) : null)) { sendError(ctx, "Incompatible shuffle request version", BAD_REQUEST); } final Map<String,List<String>> q = @@ -1183,12 +1186,12 @@ public class ShuffleHandler extends AuxiliaryService { if (LOG.isDebugEnabled()) { LOG.debug("Setting connection close header..."); } - response.setHeader(HttpHeaders.CONNECTION, CONNECTION_CLOSE); + response.headers().set(HttpHeaders.CONNECTION, CONNECTION_CLOSE); } else { - response.setHeader(HttpHeaders.CONTENT_LENGTH, + response.headers().set(HttpHeaders.CONTENT_LENGTH, String.valueOf(contentLength)); - response.setHeader(HttpHeaders.CONNECTION, HttpHeaders.KEEP_ALIVE); - response.setHeader(HttpHeaders.KEEP_ALIVE, "timeout=" + response.headers().set(HttpHeaders.CONNECTION, HttpHeaders.KEEP_ALIVE); + response.headers().set(HttpHeaders.KEEP_ALIVE, "timeout=" + connectionKeepAliveTimeOut); LOG.info("Content Length in shuffle : " + contentLength); } @@ -1216,7 +1219,7 @@ public class ShuffleHandler extends AuxiliaryService { String enc_str = SecureShuffleUtils.buildMsgFrom(requestUri); // hash from the fetcher String urlHashStr = - request.getHeader(SecureShuffleUtils.HTTP_HEADER_URL_HASH); + request.headers().get(SecureShuffleUtils.HTTP_HEADER_URL_HASH); if (urlHashStr == null) { LOG.info("Missing header hash for " + appid); throw new IOException("fetcher cannot be authenticated"); @@ -1232,11 +1235,12 @@ public class ShuffleHandler extends AuxiliaryService { String reply = SecureShuffleUtils.generateHash(urlHashStr.getBytes(Charsets.UTF_8), tokenSecret); - response.setHeader(SecureShuffleUtils.HTTP_HEADER_REPLY_URL_HASH, reply); + response.headers().set(SecureShuffleUtils.HTTP_HEADER_REPLY_URL_HASH, + reply); // Put shuffle version into http header - response.setHeader(ShuffleHeader.HTTP_HEADER_NAME, + response.headers().set(ShuffleHeader.HTTP_HEADER_NAME, ShuffleHeader.DEFAULT_HTTP_HEADER_NAME); - response.setHeader(ShuffleHeader.HTTP_HEADER_VERSION, + response.headers().set(ShuffleHeader.HTTP_HEADER_VERSION, ShuffleHeader.DEFAULT_HTTP_HEADER_VERSION); if (LOG.isDebugEnabled()) { int len = reply.length(); @@ -1307,14 +1311,14 @@ public class ShuffleHandler extends AuxiliaryService { protected void sendError(ChannelHandlerContext ctx, String msg, HttpResponseStatus status, Map<String, String> headers) { HttpResponse response = new DefaultHttpResponse(HTTP_1_1, status); - response.setHeader(CONTENT_TYPE, "text/plain; charset=UTF-8"); + response.headers().set(CONTENT_TYPE, "text/plain; charset=UTF-8"); // Put shuffle version into http header - response.setHeader(ShuffleHeader.HTTP_HEADER_NAME, + response.headers().set(ShuffleHeader.HTTP_HEADER_NAME, ShuffleHeader.DEFAULT_HTTP_HEADER_NAME); - response.setHeader(ShuffleHeader.HTTP_HEADER_VERSION, + response.headers().set(ShuffleHeader.HTTP_HEADER_VERSION, ShuffleHeader.DEFAULT_HTTP_HEADER_VERSION); for (Map.Entry<String, String> header : headers.entrySet()) { - response.setHeader(header.getKey(), header.getValue()); + response.headers().set(header.getKey(), header.getValue()); } response.setContent( ChannelBuffers.copiedBuffer(msg, CharsetUtil.UTF_8)); diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index 8948476..0e72495 100644 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -84,7 +84,7 @@ <protobuf.version>2.5.0</protobuf.version> <protoc.path>${env.HADOOP_PROTOC_PATH}</protoc.path> - <zookeeper.version>3.4.6</zookeeper.version> + <zookeeper.version>3.4.9</zookeeper.version> <curator.version>2.7.1</curator.version> <findbugs.version>3.0.0</findbugs.version> @@ -705,7 +705,7 @@ <dependency> <groupId>io.netty</groupId> <artifactId>netty</artifactId> - <version>3.6.2.Final</version> + <version>3.10.6.Final</version> </dependency> <dependency> --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org