Murtadha Hubail has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/2649
Change subject: [NO ISSUE][OTH] Make Http Channel Initializer Extensible
......................................................................
[NO ISSUE][OTH] Make Http Channel Initializer Extensible
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Make Http channel initializer extensible.
- Move to latest netty stable release.
Change-Id: I64f737f2da709df75baec1e8a500fd4abdde5a52
---
M asterixdb/src/main/appended-resources/supplemental-models.xml
M
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java
M hyracks-fullstack/pom.xml
3 files changed, 11 insertions(+), 5 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/49/2649/1
diff --git a/asterixdb/src/main/appended-resources/supplemental-models.xml
b/asterixdb/src/main/appended-resources/supplemental-models.xml
index fa00886..56176ec 100644
--- a/asterixdb/src/main/appended-resources/supplemental-models.xml
+++ b/asterixdb/src/main/appended-resources/supplemental-models.xml
@@ -160,8 +160,8 @@
<artifactId>netty-all</artifactId>
<properties>
<!-- netty is ALv2, and does not contain any embedded LICENSE or
NOTICE file -->
-
<license.ignoreMissingEmbeddedLicense>4.1.6.Final</license.ignoreMissingEmbeddedLicense>
-
<license.ignoreMissingEmbeddedNotice>4.1.6.Final</license.ignoreMissingEmbeddedNotice>
+
<license.ignoreMissingEmbeddedLicense>4.1.25.Final</license.ignoreMissingEmbeddedLicense>
+
<license.ignoreMissingEmbeddedNotice>4.1.25.Final</license.ignoreMissingEmbeddedNotice>
</properties>
</project>
</supplement>
diff --git
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java
index 41e0088..bbe64ae 100644
---
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java
+++
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java
@@ -39,10 +39,12 @@
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.PooledByteBufAllocator;
import io.netty.channel.Channel;
+import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.FixedRecvByteBufAllocator;
import io.netty.channel.WriteBufferWaterMark;
+import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.logging.LogLevel;
@@ -242,7 +244,7 @@
.childOption(ChannelOption.AUTO_READ, Boolean.FALSE)
.childOption(ChannelOption.ALLOCATOR,
PooledByteBufAllocator.DEFAULT)
.childOption(ChannelOption.WRITE_BUFFER_WATER_MARK,
WRITE_BUFFER_WATER_MARK)
- .handler(new LoggingHandler(LogLevel.DEBUG)).childHandler(new
HttpServerInitializer(this));
+ .handler(new
LoggingHandler(LogLevel.DEBUG)).childHandler(getChannelInitializer());
Channel newChannel = b.bind(port).sync().channel();
newChannel.closeFuture().addListener(f -> {
// This listener is invoked from within a netty IO thread. Hence,
we can never block it
@@ -381,6 +383,10 @@
return new HttpServerHandler<>(this, chunkSize);
}
+ protected ChannelInitializer<SocketChannel> getChannelInitializer() {
+ return new HttpServerInitializer(this);
+ }
+
public ThreadPoolExecutor getExecutor(HttpRequestHandler handler) {
return executor;
}
diff --git a/hyracks-fullstack/pom.xml b/hyracks-fullstack/pom.xml
index d553c3a..95e1779 100644
--- a/hyracks-fullstack/pom.xml
+++ b/hyracks-fullstack/pom.xml
@@ -78,7 +78,7 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
- <version>4.1.6.Final</version>
+ <version>4.1.25.Final</version>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -277,7 +277,7 @@
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<argLine>-enableassertions -Xmx2048m -Dfile.encoding=UTF-8 -Xdebug
- -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
${coverageArgLine}
+ -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
${coverageArgLine}
</argLine>
<systemPropertyVariables>
<log4j.configurationFile>${testLog4jConfigFile}</log4j.configurationFile>
--
To view, visit https://asterix-gerrit.ics.uci.edu/2649
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I64f737f2da709df75baec1e8a500fd4abdde5a52
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <[email protected]>