diff options
author | 2016-04-21 08:14:08 +0000 | |
---|---|---|
committer | 2016-04-21 11:02:31 +0000 | |
commit | 7e0249e4a73549684fcb8b1ebcf379d19c9d65d3 (patch) | |
tree | d82eae31779317cb39f3ef62399d5aa26f9cc693 /src/main/java/com/google/devtools/build/lib/runtime | |
parent | 760e70958a47218b4c8edde90da0c7a23fa0e725 (diff) |
Assorted changes wrt. gRPC client/server comms:
- Actually make it work again (commit 00cfb7df61b1f3d9fac8ee29d92b315cbfe6d28f broke it, maybe I shouldn't send out changes in a hurry next time)
- Rename --grpc_port to --command_port (it's a bit better name)
- Do not send a kill signal to the server that can't be connected if we only connect to it to verify its presence
--
MOS_MIGRATED_REVID=120418784
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java | 4 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java index 2004ffe64a..ace94597c9 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java @@ -877,7 +877,7 @@ public final class BlazeRuntime { CommandExecutor commandExecutor = new CommandExecutor(runtime, dispatcher); - if (startupOptions.grpcPort != -1) { + if (startupOptions.commandPort != -1) { try { // This is necessary so that Bazel kind of works during bootstrapping, at which time the // gRPC server is not compiled in so that we don't need gRPC for bootstrapping. @@ -885,7 +885,7 @@ public final class BlazeRuntime { "com.google.devtools.build.lib.server.GrpcServerImpl$Factory"); RPCServer.Factory factory = (RPCServer.Factory) factoryClass.newInstance(); return factory.create(commandExecutor, runtime.getClock(), - startupOptions.grpcPort, runtime.getServerDirectory()); + startupOptions.commandPort, runtime.getServerDirectory()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { throw new AbruptExitException("gRPC server not compiled in", ExitCode.BLAZE_INTERNAL_ERROR); } diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java index 35bc68e076..b1d1b65545 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java @@ -258,9 +258,10 @@ public class BlazeServerStartupOptions extends OptionsBase { + "specify --invocation_policy multiple times.") public String invocationPolicy; - @Option(name = "grpc_port", + @Option(name = "command_port", defaultValue = "-1", category = "undocumented", - help = "Port to start up the gRPC command server on. If 0, let the kernel choose.") - public int grpcPort; + help = "Port to start up the gRPC command server on. If 0, let the kernel choose. If -1, " + + "use a custom protocol on an AF_UNIX socket.") + public int commandPort; } |