mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-2.1' into trunk
Conflicts: NEWS.txt src/java/org/apache/cassandra/transport/Server.java
This commit is contained in:
commit
a848b08ceb
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
|
||||
2.1.1
|
||||
* Upgrade netty version and enable epoll event loop (CASSANDRA-7761)
|
||||
* Don't duplicate sstables smaller than split size when using
|
||||
the sstablesplitter tool (CASSANDRA-7616)
|
||||
* Avoid re-parsing already prepared statements (CASSANDRA-7923)
|
||||
|
|
|
|||
9
NEWS.txt
9
NEWS.txt
|
|
@ -34,6 +34,15 @@ Upgrading
|
|||
can be customized by modifying batch_size_fail_threshold_in_kb.
|
||||
|
||||
|
||||
2.1.1
|
||||
=====
|
||||
|
||||
New features
|
||||
------------
|
||||
- Netty support for epoll on linux is now enabled. If for some
|
||||
reason you want to disable it pass, the following system property
|
||||
-Dcassandra.native.epoll.enabled=false
|
||||
|
||||
2.1
|
||||
===
|
||||
|
||||
|
|
|
|||
|
|
@ -362,13 +362,13 @@
|
|||
<dependency groupId="com.addthis.metrics" artifactId="reporter-config" version="2.1.0" />
|
||||
<dependency groupId="org.mindrot" artifactId="jbcrypt" version="0.3m" />
|
||||
<dependency groupId="io.airlift" artifactId="airline" version="0.6" />
|
||||
<dependency groupId="io.netty" artifactId="netty-all" version="4.0.20.Final" />
|
||||
<dependency groupId="io.netty" artifactId="netty-all" version="4.0.23.Final" />
|
||||
<dependency groupId="com.google.code.findbugs" artifactId="jsr305" version="2.0.2" />
|
||||
<dependency groupId="com.clearspring.analytics" artifactId="stream" version="2.5.2" />
|
||||
<dependency groupId="com.datastax.cassandra" artifactId="cassandra-driver-core" version="2.0.5" />
|
||||
<dependency groupId="org.javassist" artifactId="javassist" version="3.18.2-GA" />
|
||||
<dependency groupId="net.sf.supercsv" artifactId="super-csv" version="2.1.0" />
|
||||
<dependency groupId="net.ju-n.compile-command-annotations" artifactId="compile-command-annotations" version="1.2.0" />
|
||||
<dependency groupId="net.ju-n.compile-command-annotations" artifactId="compile-command-annotations" version="1.2.0" />
|
||||
</dependencyManagement>
|
||||
<developer id="alakshman" name="Avinash Lakshman"/>
|
||||
<developer id="aleksey" name="Aleksey Yeschenko"/>
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -27,6 +27,11 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLEngine;
|
||||
|
||||
import io.netty.buffer.ByteBufAllocator;
|
||||
import io.netty.buffer.PooledByteBufAllocator;
|
||||
import io.netty.channel.epoll.Epoll;
|
||||
import io.netty.channel.epoll.EpollEventLoopGroup;
|
||||
import io.netty.channel.epoll.EpollServerSocketChannel;
|
||||
import io.netty.util.Version;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -59,6 +64,7 @@ public class Server implements CassandraDaemon.Server
|
|||
}
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(Server.class);
|
||||
private static final boolean enableEpoll = Boolean.valueOf(System.getProperty("cassandra.native.epoll.enabled", "true"));
|
||||
|
||||
public static final int VERSION_3 = 3;
|
||||
public static final int CURRENT_VERSION = VERSION_3;
|
||||
|
|
@ -136,11 +142,23 @@ public class Server implements CassandraDaemon.Server
|
|||
|
||||
// Configure the server.
|
||||
eventExecutorGroup = new RequestThreadPoolExecutor();
|
||||
workerGroup = new NioEventLoopGroup();
|
||||
|
||||
|
||||
boolean hasEpoll = enableEpoll ? Epoll.isAvailable() : false;
|
||||
if (hasEpoll)
|
||||
{
|
||||
workerGroup = new EpollEventLoopGroup();
|
||||
logger.info("Netty using native Epoll event loop");
|
||||
}
|
||||
else
|
||||
{
|
||||
workerGroup = new NioEventLoopGroup();
|
||||
logger.info("Netty using Java NIO event loop");
|
||||
}
|
||||
|
||||
ServerBootstrap bootstrap = new ServerBootstrap()
|
||||
.group(workerGroup)
|
||||
.channel(NioServerSocketChannel.class)
|
||||
.channel(hasEpoll ? EpollServerSocketChannel.class : NioServerSocketChannel.class)
|
||||
.childOption(ChannelOption.TCP_NODELAY, true)
|
||||
.childOption(ChannelOption.SO_KEEPALIVE, DatabaseDescriptor.getRpcKeepAlive())
|
||||
.childOption(ChannelOption.ALLOCATOR, CBUtil.allocator)
|
||||
|
|
|
|||
Loading…
Reference in New Issue