Package org.apache.avro.ipc

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


        executor.scheduleWithFixedDelay(addressWriter, 0, 10, TimeUnit.MILLISECONDS);
       
        // 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


        executor.scheduleWithFixedDelay(addressWriter, 0, 10, TimeUnit.MILLISECONDS);
       
        // Start Avro store joiner bus server
        AvroStoreBus<Integer> storeBus = new AvroStoreBusImpl<Integer>("JoinedSources", eventRetention, joiner);
        HttpServer server = new HttpServer(new AvroStoreBusResponder<Integer>(storeBus), 8080);
        server.start();
       
        // 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));
View Full Code Here

    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();
    }
}
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(personWriter, 0, 10, TimeUnit.MILLISECONDS);
        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.