Package org.apache.avro.ipc

Examples of org.apache.avro.ipc.NettyServer



        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


public class AvroNettyProducerTest extends AvroProducerTestSupport {

    @Override
    protected void initializeServer() {
        if (server == null) {
            server = new NettyServer(new SpecificResponder(KeyValueProtocol.PROTOCOL, keyValue), new InetSocketAddress("localhost", avroPort));
            server.start();
        }

        if (serverReflection == null) {
            serverReflection = new NettyServer(new ReflectResponder(TestReflection.class, testReflection), new InetSocketAddress("localhost", avroPortReflection));
            serverReflection.start();
        }
    }
View Full Code Here

  public void start() {
    logger.info("Avro source starting:{}", this);

    Responder responder = new SpecificResponder(AvroSourceProtocol.class, this);
    if(maxThreads <= 0) {
      server = new NettyServer(responder,
              new InetSocketAddress(bindAddress, port));
    } else {
      server = new NettyServer(responder, new InetSocketAddress(bindAddress, port),
              new NioServerSocketChannelFactory(Executors.newFixedThreadPool(maxThreads),
                      Executors.newFixedThreadPool(maxThreads)));
    }

    server.start();
View Full Code Here

  public Integer call() {
    Thread.currentThread().setName("ApplicationMasterService Thread");
    LOG.info("Starting MasterService [NettyServer] on " + masterAddr);

    masterServer = new NettyServer(new SpecificResponder(
        IterativeReduceService.class, this), masterAddr);

    try {
      workersCompleted.await();
View Full Code Here

                    60, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), threadFactory, new WaitPolicy());
            executionHandler = new ExecutionHandler(executorService);
        }

        //server = new HttpServer(responder, port);
        server = new NettyServer(responder, new InetSocketAddress(port), new NioServerSocketChannelFactory
                (Executors.newCachedThreadPool(), Executors.newCachedThreadPool()), executionHandler);
        server.start();
    }
View Full Code Here

        this.inlineBlobLimit = inlineBlobLimit;
        this.hbaseBlobLimit = hbaseBlobLimit;
    }

    public void setupRemoteAccess() throws Exception {
        lilyServer = new NettyServer(
                new LilySpecificResponder(AvroLily.class, new AvroLilyImpl(repositoryManager, typeManager)
                        ), new InetSocketAddress(0));
        lilyServer.start();

        final AvroConverter avroConverter = new AvroConverter();
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

    }

    @Override
    protected void initializeServer() {
        if (server == null) {
            server = new NettyServer(new SpecificResponder(KeyValueProtocol.PROTOCOL, keyValue), new InetSocketAddress("localhost", avroPort));
            server.start();
        }
    }
View Full Code Here

* Protocol test with Netty server and transceiver
*/
public class TestProtocolNetty extends TestProtocolSpecific {
  @Override
  public Server createServer(Responder testResponder) throws Exception {
    return new NettyServer(responder, new InetSocketAddress(0));
  }
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

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.