org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoopGroup类的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(324)

本文整理了Java中org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoopGroup类的一些代码示例,展示了NioEventLoopGroup类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NioEventLoopGroup类的具体详情如下:
包路径:org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoopGroup
类名称:NioEventLoopGroup

NioEventLoopGroup介绍

暂无

代码示例

代码示例来源:origin: apache/flink

@Before
public void setUp() throws Exception {
  nioGroup = new NioEventLoopGroup();
}

代码示例来源:origin: apache/flink

@After
public void tearDown() throws Exception {
  if (nioGroup != null) {
    // note: no "quiet period" to not trigger Netty#4357
    nioGroup.shutdownGracefully(0, 10, TimeUnit.SECONDS);
  }
}

代码示例来源:origin: apache/flink

NioEventLoopGroup bossGroup   = new NioEventLoopGroup(1);
NioEventLoopGroup workerGroup = new NioEventLoopGroup();

代码示例来源:origin: apache/flink

@AfterClass
public static void tearDown() throws Exception {
  if (NIO_GROUP != null) {
    // note: no "quiet period" to not trigger Netty#4357
    NIO_GROUP.shutdownGracefully(0, 10, TimeUnit.SECONDS);
  }
}

代码示例来源:origin: apache/flink

NioEventLoopGroup bossGroup = new NioEventLoopGroup(1);
NioEventLoopGroup workerGroup = new NioEventLoopGroup();

代码示例来源:origin: apache/flink

.build();
final NioEventLoopGroup nioGroup = new NioEventLoopGroup(numEventLoopThreads, threadFactory);

代码示例来源:origin: apache/flink

/**
 * Creates a client instance for the server at the target host and port.
 *
 * @param host Host of the HTTP server
 * @param port Port of the HTTP server
 */
public HttpTestClient(String host, int port) {
  this.host = host;
  this.port = port;
  this.group = new NioEventLoopGroup();
  this.bootstrap = new Bootstrap();
  this.bootstrap.group(group)
      .channel(NioSocketChannel.class)
      .handler(new ChannelInitializer<SocketChannel>() {
        @Override
        protected void initChannel(SocketChannel ch) throws Exception {
          ChannelPipeline p = ch.pipeline();
          p.addLast(new HttpClientCodec());
          p.addLast(new HttpContentDecompressor());
          p.addLast(new ClientHandler(responses));
        }
      });
}

代码示例来源:origin: apache/flink

.build();
final EventLoopGroup nioGroup = new NioEventLoopGroup(numEventLoopThreads, threadFactory);
final ByteBufAllocator bufferPool = new NettyBufferPool(numEventLoopThreads);

代码示例来源:origin: com.alibaba.blink/flink-table

@Override
public void open(Configuration config) throws Exception{
  tableServiceId = config.getString(TableServiceOptions.TABLE_SERVICE_ID);
  logger.info("TableServiceClient open with tableServiceId = " + tableServiceId);
  if (getRegistry() != null) {
    getRegistry().open(config);
  }
  readBufferSize = config.getInteger(TableServiceOptions.TABLE_SERVICE_CLIENT_READ_BUFFER_SIZE);
  writeBufferSize = config.getInteger(TableServiceOptions.TABLE_SERVICE_CLIENT_WRITE_BUFFER_SIZE);
  eventLoopGroup = new NioEventLoopGroup();
}

代码示例来源:origin: com.alibaba.blink/flink-table

masterGroup = new NioEventLoopGroup();
slaveGroup = new NioEventLoopGroup();

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

private void initNioBootstrap() {
  // Add the server port number to the name in order to distinguish
  // multiple clients running on the same host.
  String name = NettyConfig.CLIENT_THREAD_GROUP_NAME + " (" + config.getServerPort() + ")";
  NioEventLoopGroup nioGroup = new NioEventLoopGroup(config.getClientNumThreads(), NettyServer.getNamedThreadFactory(name));
  bootstrap.group(nioGroup).channel(NioSocketChannel.class);
}

代码示例来源:origin: org.apache.flink/flink-runtime

private void initNioBootstrap() {
  // Add the server port number to the name in order to distinguish
  // multiple clients running on the same host.
  String name = NettyConfig.CLIENT_THREAD_GROUP_NAME + " (" + config.getServerPort() + ")";
  NioEventLoopGroup nioGroup = new NioEventLoopGroup(config.getClientNumThreads(), NettyServer.getNamedThreadFactory(name));
  bootstrap.group(nioGroup).channel(NioSocketChannel.class);
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

private void initNioBootstrap() {
  // Add the server port number to the name in order to distinguish
  // multiple servers running on the same host.
  String name = NettyConfig.SERVER_THREAD_GROUP_NAME + " (" + config.getServerPort() + ")";
  NioEventLoopGroup nioGroup = new NioEventLoopGroup(config.getServerNumThreads(), getNamedThreadFactory(name));
  bootstrap.group(nioGroup).channel(NioServerSocketChannel.class);
}

代码示例来源:origin: org.apache.flink/flink-runtime

private void initNioBootstrap() {
  // Add the server port number to the name in order to distinguish
  // multiple servers running on the same host.
  String name = NettyConfig.SERVER_THREAD_GROUP_NAME + " (" + config.getServerPort() + ")";
  NioEventLoopGroup nioGroup = new NioEventLoopGroup(config.getServerNumThreads(), getNamedThreadFactory(name));
  bootstrap.group(nioGroup).channel(NioServerSocketChannel.class);
}

代码示例来源:origin: com.alibaba.blink/flink-runtime

private void initNioBootstrap() {
  // Add the server port number to the name in order to distinguish
  // multiple servers running on the same host.
  String name = NettyConfig.SERVER_THREAD_GROUP_NAME + " (" + config.getServerPort() + ")";
  NioEventLoopGroup nioGroup = new NioEventLoopGroup(config.getServerNumThreads(), getNamedThreadFactory(name));
  bootstrap.group(nioGroup).channel(NioServerSocketChannel.class);
}

代码示例来源:origin: com.alibaba.blink/flink-runtime

private void initNioBootstrap() {
  // Add the server port number to the name in order to distinguish
  // multiple clients running on the same host.
  String name = NettyConfig.CLIENT_THREAD_GROUP_NAME + " (" + config.getServerPort() + ")";
  NioEventLoopGroup nioGroup = new NioEventLoopGroup(config.getClientNumThreads(), NettyServer.getNamedThreadFactory(name));
  bootstrap.group(nioGroup).channel(NioSocketChannel.class);
}

代码示例来源:origin: org.apache.flink/flink-runtime-web_2.11

NioEventLoopGroup bossGroup   = new NioEventLoopGroup(1);
NioEventLoopGroup workerGroup = new NioEventLoopGroup();

代码示例来源:origin: org.apache.flink/flink-runtime-web

NioEventLoopGroup bossGroup   = new NioEventLoopGroup(1);
NioEventLoopGroup workerGroup = new NioEventLoopGroup();

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

NioEventLoopGroup bossGroup = new NioEventLoopGroup(1, new ExecutorThreadFactory("flink-rest-server-netty-boss"));
NioEventLoopGroup workerGroup = new NioEventLoopGroup(0, new ExecutorThreadFactory("flink-rest-server-netty-worker"));

代码示例来源:origin: org.apache.flink/flink-runtime

NioEventLoopGroup bossGroup = new NioEventLoopGroup(1, new ExecutorThreadFactory("flink-rest-server-netty-boss"));
NioEventLoopGroup workerGroup = new NioEventLoopGroup(0, new ExecutorThreadFactory("flink-rest-server-netty-worker"));

相关文章

微信公众号

最新文章

更多

NioEventLoopGroup类方法