Package org.apache.avro.ipc

Examples of org.apache.avro.ipc.HttpServer



  public static void main (String[] args) throws InterruptedException, IOException {
    Protocol protocol = Protocol.parse(new File("test-proto.avpr"));

    HttpServer server = new HttpServer(new Responder(protocol), 8080);
    server.start();
    server.join();
  }
View Full Code Here



  public static void main (String[] args) throws InterruptedException, IOException {
    Protocol protocol = Protocol.parse(new File("ht-proto.avpr"));

    HttpServer server = new HttpServer(new Responder(protocol), 8080);
    server.start();
    server.join();
  }
View Full Code Here

public class TestProtocolHttp extends TestProtocolSpecific {

  @Override
  public Server createServer(Responder testResponder) throws Exception {
    return new HttpServer(testResponder, 0);
  }
View Full Code Here

      printUsageAndExit();
    }
    Log LOG = LogFactory.getLog("AvroServer");
    LOG.info("starting HBase Avro server on port " + Integer.toString(port));
    SpecificResponder r = new SpecificResponder(HBase.class, new HBaseImpl());
    HttpServer server = new HttpServer(r, port);
    server.start();
    server.join();
  }
View Full Code Here

      printUsageAndExit();
    }
    Log LOG = LogFactory.getLog("AvroServer");
    LOG.info("starting HBase Avro server on port " + Integer.toString(port));
    SpecificResponder r = new SpecificResponder(HBase.class, new HBaseImpl());
    HttpServer server = new HttpServer(r, 9090);
    Thread.sleep(1000000);
  }
View Full Code Here

    }

    @Override
    protected void doStart() throws Exception {
        AvroConfiguration configuration = getEndpoint().getConfiguration();
        server = new HttpServer(new AvroResponder(this), configuration.getPort());
        server.start();
    }
View Full Code Here

    static int avroPort = setupFreePort("avroport");

    @Override
    protected void initializeServer() throws IOException {
        if (server == null) {
            server = new HttpServer(new SpecificResponder(KeyValueProtocol.PROTOCOL, keyValue), avroPort);
            server.start();
        }
    }
View Full Code Here

  @Override
  public void start() {
    // setup http server to receive OG events
    res = new SpecificResponder(FlumeOGEventAvroServer.class, this);
    try {
      http = new HttpServer(res, host, port);
    } catch (IOException eI) {
      LOG.warn("Failed to start server", eI);
      return;
    }
    http.start();
View Full Code Here

  @Before
  public void startServer() throws Exception {
    if (server != null) return;
    server =
      new HttpServer(new SpecificResponder(BulkData.class, new BulkDataImpl()),
                     0);
    server.start();
    client =
      new HttpTransceiver(new URL("http://127.0.0.1:"+server.getPort()+"/"));
    proxy = SpecificRequestor.getClient(BulkData.class, client);
View Full Code Here

    connector.setKeystore(System.getProperty("javax.net.ssl.keyStore"));
    connector.setPassword(System.getProperty("javax.net.ssl.password"));
    connector.setKeyPassword(System.getProperty("javax.net.ssl.keyStorePassword"));
    connector.setHost("localhost");
    connector.setNeedClientAuth(false);
    return new HttpServer(testResponder, connector);
  }
View Full Code Here

TOP

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

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.