You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2019/02/16 08:44:27 UTC
[flink] branch master updated: [FLINK-11154][network] Bump Netty to
4.1.32
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 876f991 [FLINK-11154][network] Bump Netty to 4.1.32
876f991 is described below
commit 876f9919de987c78724f707f57b220654ca600a4
Author: Nico Kruber <ni...@data-artisans.com>
AuthorDate: Wed Jan 9 11:54:08 2019 +0100
[FLINK-11154][network] Bump Netty to 4.1.32
Notable changes since 4.1.24:
- big improvements (performance, feature set) for using openSSL based
SSL engine (useful for FLINK-9816)
- allow multiple shaded versions of the same netty artifact (as long
as the shaded prefix is different)
- Ensure ByteToMessageDecoder.Cumulator implementations always release
- Don't re-arm timerfd each epoll_wait
- Use a non-volatile read for ensureAccessible() whenever possible to
reduce overhead and allow better inlining.
- Do not fail on runtime when an older version of Log4J2 is on the
classpath
- Fix leak and corruption bugs in CompositeByteBuf
- Add support for TLSv1.3
- Harden ref-counting concurrency semantics
- bug fixes
- Java 9-12 related fixes
- no license changes
- no changes in Netty's NOTICE file
---
.../io/network/buffer/AbstractByteBufTest.java | 30 ++++++++++++++++------
pom.xml | 2 +-
2 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/AbstractByteBufTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/AbstractByteBufTest.java
index 8bb8ecd..4cca279 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/AbstractByteBufTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/AbstractByteBufTest.java
@@ -1,6 +1,6 @@
/*
* Copyright 2012 The Netty Project
- * Copy from netty 4.1.24.Final
+ * Copy from netty 4.1.32.Final
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
@@ -36,6 +36,7 @@ import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import java.nio.CharBuffer;
import java.nio.ReadOnlyBufferException;
import java.nio.channels.Channels;
import java.nio.channels.FileChannel;
@@ -77,7 +78,7 @@ import static org.junit.Assume.assumeTrue;
/**
* An abstract test class for channel buffers.
*
- * Copy from netty 4.1.24.Final.
+ * Copy from netty 4.1.32.Final.
*/
public abstract class AbstractByteBufTest extends TestLogger {
@@ -3656,11 +3657,23 @@ public abstract class AbstractByteBufTest extends TestLogger {
testSetGetCharSequence(CharsetUtil.UTF_16);
}
+ private static final CharBuffer EXTENDED_ASCII_CHARS, ASCII_CHARS;
+
+ static {
+ char[] chars = new char[256];
+ for (char c = 0; c < chars.length; c++) {
+ chars[c] = c;
+ }
+ EXTENDED_ASCII_CHARS = CharBuffer.wrap(chars);
+ ASCII_CHARS = CharBuffer.wrap(chars, 0, 128);
+ }
+
private void testSetGetCharSequence(Charset charset) {
- ByteBuf buf = newBuffer(16);
- String sequence = "AB";
+ ByteBuf buf = newBuffer(1024);
+ CharBuffer sequence = CharsetUtil.US_ASCII.equals(charset)
+ ? ASCII_CHARS : EXTENDED_ASCII_CHARS;
int bytes = buf.setCharSequence(1, sequence, charset);
- assertEquals(sequence, buf.getCharSequence(1, bytes, charset));
+ assertEquals(sequence, CharBuffer.wrap(buf.getCharSequence(1, bytes, charset)));
buf.release();
}
@@ -3685,12 +3698,13 @@ public abstract class AbstractByteBufTest extends TestLogger {
}
private void testWriteReadCharSequence(Charset charset) {
- ByteBuf buf = newBuffer(16);
- String sequence = "AB";
+ ByteBuf buf = newBuffer(1024);
+ CharBuffer sequence = CharsetUtil.US_ASCII.equals(charset)
+ ? ASCII_CHARS : EXTENDED_ASCII_CHARS;
buf.writerIndex(1);
int bytes = buf.writeCharSequence(sequence, charset);
buf.readerIndex(1);
- assertEquals(sequence, buf.readCharSequence(bytes, charset));
+ assertEquals(sequence, CharBuffer.wrap(buf.readCharSequence(bytes, charset)));
buf.release();
}
diff --git a/pom.xml b/pom.xml
index 110d4e4..126bb69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -271,7 +271,7 @@ under the License.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-netty</artifactId>
- <version>4.1.24.Final-5.0</version>
+ <version>4.1.32.Final-${flink.shaded.version}</version>
</dependency>
<!-- This manages the 'javax.annotation' annotations (JSR305) -->