Package org.apache.avro.ipc

Examples of org.apache.avro.ipc.NettyServer


        private final NettyServer nettyServer;


        public EventCollector(int port) {
            Responder responder = new SpecificResponder(AvroSourceProtocol.class, this);
            nettyServer = new NettyServer(responder, new InetSocketAddress(HOSTNAME, port));
            nettyServer.start();
        }
View Full Code Here


    flumeAdapter.startAndWait();

    // this is all standard avro ipc. The key is to pass in Flume's avro
    // source protocol as the interface, and the FlumeAdapter as its
    // implementation.
    this.server = new NettyServer(
      new SpecificResponder(AvroSourceProtocol.Callback.class, flumeAdapter),
      new InetSocketAddress(port),
      // in order to control the number of netty worker threads, we
      // must create and pass in the server channel factory explicitly
      new NioServerSocketChannelFactory(
View Full Code Here

        private final NettyServer nettyServer;


        public EventCollector(final int port) {
            final Responder responder = new SpecificResponder(AvroSourceProtocol.class, this);
            nettyServer = new NettyServer(responder, new InetSocketAddress(HOSTNAME, port));
            nettyServer.start();
        }
View Full Code Here

        private final NettyServer nettyServer;


        public EventCollector(final int port) {
            final Responder responder = new SpecificResponder(AvroSourceProtocol.class, this);
            nettyServer = new NettyServer(responder, new InetSocketAddress(HOSTNAME, port));
            nettyServer.start();
        }
View Full Code Here

        private final NettyServer nettyServer;


        public EventCollector(final int port) {
            final Responder responder = new SpecificResponder(AvroSourceProtocol.class, this);
            nettyServer = new NettyServer(responder, new InetSocketAddress(HOSTNAME, port));
            nettyServer.start();
        }
View Full Code Here

        private final NettyServer nettyServer;


        public EventCollector(final int port) {
            final Responder responder = new SpecificResponder(AvroSourceProtocol.class, this);
            nettyServer = new NettyServer(responder, new InetSocketAddress(HOSTNAME, port));
            nettyServer.start();
        }
View Full Code Here

  @Override
  public void init(TaskAttemptID attemptId, BSPPeer<?, ?, ?, ?, M> peer,
      Configuration conf, InetSocketAddress addr) {
    super.init(attemptId, peer, conf, addr);
    super.initCompression(conf);
    server = new NettyServer(new SpecificResponder(Sender.class, this), addr);
  }
View Full Code Here


        if (AVRO_HTTP_TRANSPORT.equalsIgnoreCase(configuration.getTransport())) {
            server = new HttpServer(responder, configuration.getPort());
        } else if (AVRO_NETTY_TRANSPORT.equalsIgnoreCase(configuration.getTransport())) {
            server = new NettyServer(responder, new InetSocketAddress(configuration.getHost(), configuration.getPort()));
        } else {
            throw new IllegalArgumentException("Unknown transport " + configuration.getTransport());
        }

        server.start();
View Full Code Here

    if (log.isInfoEnabled()) {
      log.info("Starting Simple Ordering Netty Server on '{}'", endpointAddress);
    }
   
    SpecificResponder responder = new SpecificResponder(OrderProcessingService.class, new SimpleOrderService());
    service = new NettyServer(responder, endpointAddress);
    service.start();
  }
View Full Code Here

TOP

Related Classes of org.apache.avro.ipc.NettyServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.