use of org.apache.hbase.thirdparty.io.netty.channel.nio.NioEventLoopGroup in project hbase by apache.
the class TestSaslFanOutOneBlockAsyncDFSOutput method setUpBeforeClass.
@BeforeClass
public static void setUpBeforeClass() throws Exception {
EVENT_LOOP_GROUP = new NioEventLoopGroup();
CHANNEL_CLASS = NioSocketChannel.class;
UTIL.getConfiguration().setInt(DFS_CLIENT_SOCKET_TIMEOUT_KEY, READ_TIMEOUT_MS);
KDC = setupMiniKdc(KEYTAB_FILE);
USERNAME = UserGroupInformation.getLoginUser().getShortUserName();
PRINCIPAL = USERNAME + "/" + HOST;
HTTP_PRINCIPAL = "HTTP/" + HOST;
KDC.createPrincipal(KEYTAB_FILE, PRINCIPAL, HTTP_PRINCIPAL);
setUpKeyProvider(UTIL.getConfiguration());
HBaseKerberosUtils.setSecuredConfiguration(UTIL.getConfiguration(), PRINCIPAL + "@" + KDC.getRealm(), HTTP_PRINCIPAL + "@" + KDC.getRealm());
HBaseKerberosUtils.setSSLConfiguration(UTIL, TestSaslFanOutOneBlockAsyncDFSOutput.class);
MONITOR = StreamSlowMonitor.create(UTIL.getConfiguration(), "testMonitor");
}
use of org.apache.hbase.thirdparty.io.netty.channel.nio.NioEventLoopGroup in project hbase by apache.
the class TestFanOutOneBlockAsyncDFSOutputHang method setUp.
@BeforeClass
public static void setUp() throws Exception {
startMiniDFSCluster(2);
FS = CLUSTER.getFileSystem();
EVENT_LOOP_GROUP = new NioEventLoopGroup();
CHANNEL_CLASS = NioSocketChannel.class;
MONITOR = StreamSlowMonitor.create(UTIL.getConfiguration(), "testMonitor");
Path f = new Path("/testHang");
EventLoop eventLoop = EVENT_LOOP_GROUP.next();
OUT = FanOutOneBlockAsyncDFSOutputHelper.createOutput(FS, f, true, false, (short) 2, FS.getDefaultBlockSize(), eventLoop, CHANNEL_CLASS, MONITOR);
}
use of org.apache.hbase.thirdparty.io.netty.channel.nio.NioEventLoopGroup in project hbase by apache.
the class TestFanOutOneBlockAsyncDFSOutput method setUp.
@BeforeClass
public static void setUp() throws Exception {
UTIL.getConfiguration().setInt(DFS_CLIENT_SOCKET_TIMEOUT_KEY, READ_TIMEOUT_MS);
startMiniDFSCluster(3);
FS = CLUSTER.getFileSystem();
EVENT_LOOP_GROUP = new NioEventLoopGroup();
CHANNEL_CLASS = NioSocketChannel.class;
MONITOR = StreamSlowMonitor.create(UTIL.getConfiguration(), "testMonitor");
}
use of org.apache.hbase.thirdparty.io.netty.channel.nio.NioEventLoopGroup in project hbase by apache.
the class NettyRpcClientConfigHelper method getDefaultEventLoopConfig.
private static Pair<EventLoopGroup, Class<? extends Channel>> getDefaultEventLoopConfig(Configuration conf) {
Pair<EventLoopGroup, Class<? extends Channel>> eventLoop = DEFAULT_EVENT_LOOP;
if (eventLoop != null) {
return eventLoop;
}
synchronized (NettyRpcClientConfigHelper.class) {
eventLoop = DEFAULT_EVENT_LOOP;
if (eventLoop != null) {
return eventLoop;
}
int threadCount = conf.getInt(HBASE_NETTY_EVENTLOOP_RPCCLIENT_THREADCOUNT_KEY, 0);
eventLoop = new Pair<>(new NioEventLoopGroup(threadCount, new DefaultThreadFactory("RPCClient-NioEventLoopGroup", true, Thread.NORM_PRIORITY)), NioSocketChannel.class);
DEFAULT_EVENT_LOOP = eventLoop;
}
return eventLoop;
}
use of org.apache.hbase.thirdparty.io.netty.channel.nio.NioEventLoopGroup in project hbase by apache.
the class TestAsyncFSWAL method setUpBeforeClass.
@BeforeClass
public static void setUpBeforeClass() throws Exception {
GROUP = new NioEventLoopGroup(1, new ThreadFactoryBuilder().setNameFormat("TestAsyncFSWAL-pool-%d").setDaemon(true).setUncaughtExceptionHandler(Threads.LOGGING_EXCEPTION_HANDLER).build());
CHANNEL_CLASS = NioSocketChannel.class;
AbstractTestFSWAL.setUpBeforeClass();
}
Aggregations