Skip to content

Commit

Permalink
Run table service as a bookkeeper lifecycle component in bookie server
Browse files Browse the repository at this point in the history
  • Loading branch information
XuQianJin-Stars committed Jul 22, 2023
1 parent 6f17630 commit 564e315
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ private LifecycleComponent startServer() throws Exception {
server.start();
log.info("Started storage server at (bookie port = {}, grpc port = {})",
bookiePort, grpcPort);
this.rpcEndpoints.add(StorageServer.createLocalEndpoint(serverConf.getAdvertisedAddress(), grpcPort, false));
this.rpcEndpoints.add(
StorageServer.createLocalEndpoint(serverConf.getAdvertisedAddress(), grpcPort, false));
return server;
} catch (Throwable e) {
log.error("Failed to start storage server", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ private static void loadConfFile(CompositeConfiguration conf, String confFile)
log.info("Loaded configuration file {}", confFile);
}

public static Endpoint createLocalEndpoint(String advertisedAddress, int port, boolean useHostname) throws UnknownHostException {
public static Endpoint createLocalEndpoint(String advertisedAddress, int port, boolean useHostname)
throws UnknownHostException {
String hostname;
log.warn("Determining hostname for stream storage");
if (useHostname) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

package org.apache.bookkeeper.stream.server;

import static com.google.common.base.Preconditions.checkArgument;

import org.apache.bookkeeper.common.component.LifecycleComponent;
import org.apache.bookkeeper.common.net.ServiceURI;
import org.apache.bookkeeper.server.component.ServerLifecycleComponent;
Expand All @@ -27,8 +29,6 @@
import org.apache.bookkeeper.stream.storage.impl.cluster.ZkClusterInitializer;
import org.apache.commons.lang3.StringUtils;

import static com.google.common.base.Preconditions.checkArgument;

/**
* This is a {@link ServerLifecycleComponent} to allow run stream storage component as part of bookie server.
*/
Expand Down

0 comments on commit 564e315

Please sign in to comment.