public WriteCommandLineParser(String... args) { super(WriteServerConfig.writeBuilder(), false, args); }
public WriteCommandLineParser(String... args) { super(WriteServerConfig.writeBuilder(), false, args); }
@Override protected void before() throws Throwable { WriteServerConfig config = WriteServerConfig.writeBuilder() .withAppName(name) .withVipAddress(name) .withDataCenterType(DataCenterType.Basic) .withRegistrationPort(0) .withDiscoveryPort(0) .withReplicationPort(0) .withCodec(Codec.Avro) .withShutDownPort(0) .withWebAdminPort(0) .withReplicationRetryMillis(1000) .build(); server = new EmbeddedWriteServer(config, Observable.<ChangeNotification<InetSocketAddress>>never(), false, false); server.start(); }
@Override protected void before() throws Throwable { WriteServerConfig config = WriteServerConfig.writeBuilder() .withAppName(name) .withVipAddress(name) .withReadClusterVipAddress(readClusterName) .withDataCenterType(DataCenterType.Basic) .withHttpPort(0) .withRegistrationPort(0) .withDiscoveryPort(0) .withReplicationPort(0) .withCodec(codec) .withShutDownPort(0) .withWebAdminPort(0) .withReplicationRetryMillis(1000) .build(); Observable<ChangeNotification<Server>> noPeers = Observable.never(); server = new EmbeddedWriteServer(config, noPeers, noPeers, false, false); server.start(); }
@Override public int scaleUpByOne() { WriteServerAddress writeServerAddress = new WriteServerAddress("localhost", nextAvailablePort, nextAvailablePort + 1, nextAvailablePort + 2); WriteServerConfig config = WriteServerConfig.writeBuilder() .withAppName(WRITE_SERVER_NAME) .withVipAddress(WRITE_SERVER_NAME) .withDataCenterType(DataCenterType.Basic) .withRegistrationPort(writeServerAddress.getRegistrationPort()) .withDiscoveryPort(writeServerAddress.getDiscoveryPort()) .withReplicationPort(writeServerAddress.getReplicationPort()) .withCodec(Codec.Avro) .withShutDownPort(nextAvailablePort + 3) .withWebAdminPort(nextAvailablePort + 4) .withReplicationRetryMillis(1000) .build(); EmbeddedWriteServer newServer = newServer(config); newServer.start(); nextAvailablePort += 10; return scaleUpByOne(newServer, writeServerAddress); }
int adminPort = ephemeralPorts ? 0 : nextAvailablePort + 4; WriteServerConfig config = WriteServerConfig.writeBuilder() .withAppName(WRITE_SERVER_NAME) .withVipAddress(WRITE_SERVER_NAME)