diff options
author | 2016-04-14 08:29:05 +0000 | |
---|---|---|
committer | 2016-04-14 11:11:15 +0000 | |
commit | 8b3b918ebd55911a3102f5ea6da60906fa63c866 (patch) | |
tree | 5441d1a77d4f89a3450523979b49f8aa63fe4596 /src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java | |
parent | 386f242788a3d0189e6882466105c57ec1149d20 (diff) |
Add the --grpc_port startup option and start a Java server if it's passed in.
Note that the presence of server/grpc_port does not guarantee that the server actually listens to it and we can't guarantee it, either, because it can always be kill -9'd.
I haven't decided yet how the transition between AF_UNIX and gRPC will work. For now, I'm happy that we can start up a Java server.
The way to get the kernel-chosen port is truly awful, but it is apparently impossible to do so in a different way:
https://github.com/grpc/grpc-java/issues/72
--
MOS_MIGRATED_REVID=119828354
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java | 6 |
1 files changed, 6 insertions, 0 deletions
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 c4fc2c3fff..35bc68e076 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 @@ -257,4 +257,10 @@ public class BlazeServerStartupOptions extends OptionsBase { + "invocation_policy.InvocationPolicy proto. Unlike other options, it is an error to " + "specify --invocation_policy multiple times.") public String invocationPolicy; + + @Option(name = "grpc_port", + defaultValue = "-1", + category = "undocumented", + help = "Port to start up the gRPC command server on. If 0, let the kernel choose.") + public int grpcPort; } |