本文整理了Java中org.apache.avro.ipc.HttpServer.join()
方法的一些代码示例,展示了HttpServer.join()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpServer.join()
方法的具体详情如下:
包路径:org.apache.avro.ipc.HttpServer
类名称:HttpServer
方法名:join
暂无
代码示例来源:origin: jingwei/krati
public static void main(String[] args) throws Exception {
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();
}
}
代码示例来源:origin: co.cask.hbase/hbase
protected static void doMain(final String[] args) throws Exception {
if (args.length < 1) {
printUsageAndExit();
}
int port = 9090;
final String portArgKey = "--port=";
for (String cmd: args) {
if (cmd.startsWith(portArgKey)) {
port = Integer.parseInt(cmd.substring(portArgKey.length()));
continue;
} else if (cmd.equals("--help") || cmd.equals("-h")) {
printUsageAndExit();
} else if (cmd.equals("start")) {
continue;
} else if (cmd.equals("stop")) {
printUsageAndExit("To shutdown the Avro server run " +
"bin/hbase-daemon.sh stop avro or send a kill signal to " +
"the Avro server pid");
}
// Print out usage if we get to 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();
}
代码示例来源:origin: jingwei/krati
public static void main(String[] args) throws Exception {
File homeDir = new File(System.getProperty("java.io.tmpdir"), MultiTenantStoreHttpServer.class.getSimpleName());
// Change initialCapacity accordingly for different data sets
int initialCapacity = 10000;
// Create store configuration template
StoreConfig configTemplate = new StoreConfig(homeDir, initialCapacity);
configTemplate.setSegmentCompactFactor(0.68);
configTemplate.setSegmentFactory(new MappedSegmentFactory());
configTemplate.setSegmentFileSizeMB(32);
configTemplate.setNumSyncBatches(2);
configTemplate.setBatchSize(100);
// 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();
}
}
代码示例来源:origin: jingwei/krati
HttpServer server = new HttpServer(new AvroStoreBusResponder<String>(storeBus), 8080);
server.start();
server.join();
代码示例来源:origin: jingwei/krati
System.out.println(client.getSchema().toString(true));
server.join();
代码示例来源:origin: jingwei/krati
server.join();
内容来源于网络,如有侵权,请联系作者删除!