Package org.apache.avro.ipc

Examples of org.apache.avro.ipc.HttpServer.join()


  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

    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();
  }

  // TODO(hammer): Look at Cassandra's daemonization and integration with JSVC
  // TODO(hammer): Don't eat it after a single exception
  // TODO(hammer): Figure out why we do doMain()
View Full Code Here

       
        // Start Avro store joiner bus server
        AvroStoreBus<String> storeBus = new AvroStoreBusImpl<String>("JoinedSources", eventRetention, joiner);
        HttpServer server = new HttpServer(new AvroStoreBusResponder<String>(storeBus), 8080);
        server.start();
        server.join();
    }
}
View Full Code Here

        // Start a client to print joiner schema
        URL url = new URL("http://localhost:8080");
        AvroStoreBusClientHttp<Integer> client = new AvroStoreBusClientHttp<Integer>(url, "JoinedSources", joiner.getKeySerializer());
        System.out.println(client.getSchema().toString(true));
       
        server.join();
    }
}
View Full Code Here

        File storeDir = new File(System.getProperty("java.io.tmpdir"), SingleAvroStoreHttpServer.class.getSimpleName());
        StoreResponder storeResponder = new BasicDataStoreResponder(createDataStore(storeDir, 10000));
        storeResponder.setProperty(StoreKeys.KRATI_STORE_VALUE_SCHEMA, createSchema().toString());
        HttpServer server = new HttpServer(storeResponder, 8080);
        server.start();
        server.join();
    }
}
View Full Code Here

        // Create store responder and server
        DataStoreFactory storeFactory = new IndexedDataStoreFactory();
        MultiTenantStoreResponder storeResponder = new MultiTenantStoreResponder(homeDir, configTemplate, new BasicDataStoreResponderFactory(storeFactory));
        HttpServer server = new HttpServer(storeResponder, 8080);
        server.start();
        server.join();
    }
}
View Full Code Here

        executor.scheduleWithFixedDelay(addressWriter, 0, 10, TimeUnit.MILLISECONDS);
       
        // Start Avro store joiner server
        HttpServer server = new HttpServer(new AvroStoreResponder<String>(joiner), 8080);
        server.start();
        server.join();
    }
}
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.