Package org.apache.avro.ipc.specific

Examples of org.apache.avro.ipc.specific.SpecificResponder


        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


        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

        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

        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

    // 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.class,
            new FlumeLogAdapter(config, hConfig)),
        new InetSocketAddress(this.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

    server.close();
  }

  private Server createServer(AvroSourceProtocol protocol)
      throws IllegalAccessException, InstantiationException {
    Server server = new NettyServer(new SpecificResponder(
        AvroSourceProtocol.class, protocol), new InetSocketAddress(
        hostname, port));

    return server;
  }
View Full Code Here

        LifecycleState.STOP_OR_ERROR, 5000));
    server.close();
  }

  private Server createServer() {
    Server server = new NettyServer(new SpecificResponder(
        AvroSourceProtocol.class, new MockAvroServer()), new InetSocketAddress(
        hostname, port));

    return server;
  }
View Full Code Here

  @Override
  public void start() {
    logger.info("Starting {}...", this);

    Responder responder = new SpecificResponder(AvroSourceProtocol.class, this);

    NioServerSocketChannelFactory socketChannelFactory = initSocketChannelFactory();

    ChannelPipelineFactory pipelineFactory = initChannelPipelineFactory();
View Full Code Here

  /**
   * Start a NettyServer, wait a moment for it to spin up, and return it.
   */
  public static Server startServer(AvroSourceProtocol handler, int port) {
    Responder responder = new SpecificResponder(AvroSourceProtocol.class,
        handler);
    Server server = new NettyServer(responder,
        new InetSocketAddress(localhost, port));
    server.start();
    logger.info("Server started on hostname: {}, port: {}",
View Full Code Here

     * @param configuration
     * @return Initialized and started server
     * @throws java.io.IOException
     */
    private Server initAndStartServer(AvroConfiguration configuration) throws Exception {
        SpecificResponder responder;
        Server server;

        if (configuration.isReflectionProtocol()) {
            responder = new AvroReflectResponder(configuration.getProtocol(), this);
        } else {
View Full Code Here

TOP

Related Classes of org.apache.avro.ipc.specific.SpecificResponder

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.