Examples of HttpTransceiver


Examples of org.apache.avro.ipc.HttpTransceiver

    dRes.addRPCPlugin(dPlugin);
    HttpServer server3 = new HttpServer(dRes, 21007);
    server3.start();
   
    // Root requestor
    HttpTransceiver trans = new HttpTransceiver(
        new URL("http://localhost:21005"));
   
    GenericRequestor r = new GenericRequestor(advancedProtocol, trans);
    r.addRPCPlugin(aPlugin);
   
View Full Code Here

Examples of org.apache.avro.ipc.HttpTransceiver

    HttpServer avroServer = new HttpServer(r, Integer.parseInt(args[0]));
    avroServer.start();

    StatsServer ss = new StatsServer(p, 8080);
   
    HttpTransceiver trans = new HttpTransceiver(
        new URL("http://localhost:" + Integer.parseInt(args[0])));
    GenericRequestor req = new GenericRequestor(protocol, trans);

    while(true) {
      Thread.sleep(1000);
View Full Code Here

Examples of org.apache.avro.ipc.HttpTransceiver

    dRes.addRPCPlugin(dPlugin);
    HttpServer server3 = new HttpServer(dRes, 21007);
    server3.start();
   
    // Root requestor
    HttpTransceiver trans = new HttpTransceiver(
        new URL("http://localhost:21005"));
   
    GenericRequestor r = new GenericRequestor(TestBasicTracing.advancedProtocol, trans);
    r.addRPCPlugin(aPlugin);
   
View Full Code Here

Examples of org.apache.avro.ipc.HttpTransceiver

  @Before
  public void testStartServer() throws Exception {
    server =
      new HttpServer(new SpecificResponder(Simple.class, new TestImpl()), 0);
    client =
      new HttpTransceiver(new URL("http://127.0.0.1:"+server.getPort()+"/"));
    proxy = (Simple)SpecificRequestor.getClient(Simple.class, client);
  }
View Full Code Here

Examples of org.apache.avro.ipc.HttpTransceiver

   */
  @Override
  public void open() throws IOException {

    URL url = new URL("http", host, port, "/");
    transport = new HttpTransceiver(url);
    try {
      this.avroClient = (FlumeEventAvroServer) SpecificRequestor.getClient(
          FlumeEventAvroServer.class, transport);
    } catch (Exception e) {
      throw new IOException("Failed to open Avro event sink at " + host + ":"
View Full Code Here

Examples of org.apache.avro.ipc.HttpTransceiver

   */
  AvroMasterRPC(String masterHost, int masterPort) throws IOException {
    this.masterHostname = masterHost;
    this.masterPort = masterPort;
    URL url = new URL("http", masterHostname, masterPort, "/");
    trans = new HttpTransceiver(url);
    this.masterClient = (AvroFlumeClientServer) SpecificRequestor.getClient(
        AvroFlumeClientServer.class, trans);
    LOG.info("Connected to master at " + masterHostname + ":" + masterPort);
  }
View Full Code Here

Examples of org.apache.avro.ipc.HttpTransceiver

  }

  @Test
  public void testGetAllReports() throws IOException {

    transport = new HttpTransceiver(url);
    try {
      this.avroClient = (AvroFlumeReportServer) SpecificRequestor.getClient(
          AvroFlumeReportServer.class, transport);
    } catch (Exception e) {
      throw new IOException("Failed to open AvroReportServer at " + PORT
View Full Code Here

Examples of org.apache.avro.ipc.HttpTransceiver

        .get(new Utf8("doubleAttr")) == 0.5);
  }

  @Test
  public void testGetReportByName() throws IOException {
    transport = new HttpTransceiver(url);
    try {
      this.avroClient = (AvroFlumeReportServer) SpecificRequestor.getClient(
          AvroFlumeReportServer.class, transport);
    } catch (Exception e) {
      throw new IOException("Failed to open AvroReportServer at " + PORT
View Full Code Here

Examples of org.apache.avro.ipc.HttpTransceiver

  public AdminRPCAvro(String masterHost, int masterPort) throws IOException {
    this.masterHostname = masterHost;
    this.masterPort = masterPort;
    URL url = new URL("http", masterHostname, this.masterPort, "/");
    trans = new HttpTransceiver(url);
    this.masterClient = (FlumeMasterAdminServerAvro) SpecificRequestor
        .getClient(FlumeMasterAdminServerAvro.class, trans);
    LOG.info("Connected to master at " + masterHostname + ":" + masterPort);
  }
View Full Code Here

Examples of org.apache.avro.ipc.HttpTransceiver

public class AvroHttpConsumerTest extends AvroConsumerTestSupport {

    @Override
    protected void initializeTranceiver() throws IOException {
        transceiver = new HttpTransceiver(new URL("http://localhost:" + avroPort));
        requestor = new SpecificRequestor(KeyValueProtocol.class, transceiver);

        transceiverMessageInRoute = new HttpTransceiver(new URL("http://localhost:" + avroPortMessageInRoute));
        requestorMessageInRoute = new SpecificRequestor(KeyValueProtocol.class, transceiverMessageInRoute);

        transceiverForWrongMessages = new HttpTransceiver(new URL("http://localhost:" + avroPortForWrongMessages));
        requestorForWrongMessages = new SpecificRequestor(KeyValueProtocol.class, transceiverForWrongMessages);

        reflectTransceiver = new HttpTransceiver(new URL("http://localhost:" + avroPortReflection));
        reflectRequestor = new ReflectRequestor(TestReflection.class, reflectTransceiver);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.