@AfterClass public static void tearDownAfterClass() throws Exception { AbstractTestProtobufLog.tearDownAfterClass(); EVENT_LOOP_GROUP.shutdownGracefully().syncUninterruptibly(); }
@AfterClass public static void tearDownAfterClass() throws Exception { if (WALS != null) { WALS.close(); } EVENT_LOOP_GROUP.shutdownGracefully().syncUninterruptibly(); UTIL.shutdownMiniDFSCluster(); }
for (int i = 0, n = futureList.size(); i < n; i++) { try { datanodeList.add(futureList.get(i).syncUninterruptibly().getNow()); } catch (Exception e) {
/** * Returns the {@link ThreadProperties} of the {@link Thread} that powers the {@link SingleThreadEventExecutor}. * If the {@link SingleThreadEventExecutor} is not started yet, this operation will start it and block until the * it is fully started. */ public final ThreadProperties threadProperties() { ThreadProperties threadProperties = this.threadProperties; if (threadProperties == null) { Thread thread = this.thread; if (thread == null) { assert !inEventLoop(); submit(NOOP_TASK).syncUninterruptibly(); thread = this.thread; assert thread != null; } threadProperties = new DefaultThreadProperties(thread); if (!PROPERTIES_UPDATER.compareAndSet(this, null, threadProperties)) { threadProperties = this.threadProperties; } } return threadProperties; }
@Override public int pendingTasks() { // As we use a MpscQueue we need to ensure pendingTasks() is only executed from within the EventLoop as // otherwise we may see unexpected behavior (as size() is only allowed to be called by a single consumer). // See https://github.com/netty/netty/issues/5297 if (inEventLoop()) { return super.pendingTasks(); } else { return submit(pendingTasksCallable).syncUninterruptibly().getNow(); } } /**
@Override public int pendingTasks() { // As we use a MpscQueue we need to ensure pendingTasks() is only executed from within the EventLoop as // otherwise we may see unexpected behavior (as size() is only allowed to be called by a single consumer). // See https://github.com/netty/netty/issues/5297 if (inEventLoop()) { return super.pendingTasks(); } else { return submit(pendingTasksCallable).syncUninterruptibly().getNow(); } }
@Override public int pendingTasks() { // As we use a MpscQueue we need to ensure pendingTasks() is only executed from within the EventLoop as // otherwise we may see unexpected behavior (as size() is only allowed to be called by a single consumer). // See https://github.com/netty/netty/issues/5297 return inEventLoop() ? super.pendingTasks() : submit(pendingTasksCallable).syncUninterruptibly().getNow(); }
@AfterClass public static void tearDownAfterClass() throws Exception { AbstractTestProtobufLog.tearDownAfterClass(); EVENT_LOOP_GROUP.shutdownGracefully().syncUninterruptibly(); }