public class ManagerRpcServer extends Object implements AutoCloseable
GrpcServer
that utilizes the Hub Manager configuration.
It will generate and utilize a self-signed certificate to encrypt the traffic between itself
and clients. This requires all clients connecting to this server use an insecure client that
trusts self-signed certificates. Its slightly better than plaintext, but still insecure as it
can easily be MITMed.
In the future, we may allow configuring certificates properly.
The server starts serving after object creation. To stop the server call the close()
method.Constructor and Description |
---|
ManagerRpcServer(AlluxioConfiguration conf,
ManagerProcessContext ctx)
Creates and starts a new
GrpcServer . |
Modifier and Type | Method and Description |
---|---|
void |
awaitTermination()
Blocks until the server is terminated.
|
void |
close() |
static InetSocketAddress |
getBindAddress(AlluxioConfiguration conf) |
static InetSocketAddress |
getConnectAddress(AlluxioConfiguration conf) |
int |
getPort() |
boolean |
isServing() |
public ManagerRpcServer(AlluxioConfiguration conf, ManagerProcessContext ctx) throws IOException
GrpcServer
.conf
- alluxio configurationctx
- the context of the processIOException
- if the server fails to startpublic static InetSocketAddress getBindAddress(AlluxioConfiguration conf)
conf
- alluxio configurationpublic static InetSocketAddress getConnectAddress(AlluxioConfiguration conf)
conf
- alluxio configurationpublic int getPort()
public boolean isServing()
public void awaitTermination()
public void close()
close
in interface AutoCloseable
Copyright © 2023. All Rights Reserved.