use of alluxio.grpc.GrpcService in project alluxio by Alluxio.
the class DefaultBlockMaster method getServices.
@Override
public Map<ServiceType, GrpcService> getServices() {
Map<ServiceType, GrpcService> services = new HashMap<>();
services.put(ServiceType.BLOCK_MASTER_CLIENT_SERVICE, new GrpcService(new BlockMasterClientServiceHandler(this)));
services.put(ServiceType.BLOCK_MASTER_WORKER_SERVICE, new GrpcService(new BlockMasterWorkerServiceHandler(this)));
return services;
}
use of alluxio.grpc.GrpcService in project alluxio by Alluxio.
the class DefaultMetaMaster method getServices.
@Override
public Map<ServiceType, GrpcService> getServices() {
Map<ServiceType, GrpcService> services = new HashMap<>();
services.put(ServiceType.META_MASTER_CONFIG_SERVICE, new GrpcService(new MetaMasterConfigurationServiceHandler(this)).disableAuthentication());
services.put(ServiceType.META_MASTER_CLIENT_SERVICE, new GrpcService(new MetaMasterClientServiceHandler(this)));
services.put(ServiceType.META_MASTER_MASTER_SERVICE, new GrpcService(new MetaMasterMasterServiceHandler(this)));
// Add backup role services.
services.putAll(mBackupRole.getRoleServices());
services.putAll(mJournalSystem.getJournalServices());
return services;
}
use of alluxio.grpc.GrpcService in project alluxio by Alluxio.
the class DefaultTableMaster method getServices.
@Override
public Map<ServiceType, GrpcService> getServices() {
Map<ServiceType, GrpcService> services = new HashMap<>();
services.put(ServiceType.TABLE_MASTER_CLIENT_SERVICE, new GrpcService(new TableMasterClientServiceHandler(this)));
return services;
}
use of alluxio.grpc.GrpcService in project alluxio by Alluxio.
the class AlluxioJobWorkerProcess method startServingRPCServer.
private void startServingRPCServer() {
try {
if (mBindSocket != null) {
// Socket opened for auto bind.
// Close it.
mBindSocket.close();
}
LOG.info("Starting gRPC server on address {}", mRpcConnectAddress);
GrpcServerBuilder serverBuilder = GrpcServerBuilder.forAddress(GrpcServerAddress.create(mRpcConnectAddress.getHostName(), mRpcBindAddress), ServerConfiguration.global(), ServerUserState.global());
for (Map.Entry<alluxio.grpc.ServiceType, GrpcService> serviceEntry : mJobWorker.getServices().entrySet()) {
LOG.info("Registered service:{}", serviceEntry.getKey().name());
serverBuilder.addService(serviceEntry.getValue());
}
mGrpcServer = serverBuilder.build().start();
LOG.info("Started gRPC server on address {}", mRpcConnectAddress);
// Wait until the server is shut down.
mGrpcServer.awaitTermination();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
use of alluxio.grpc.GrpcService in project alluxio by Alluxio.
the class JobMaster method getServices.
@Override
public Map<ServiceType, GrpcService> getServices() {
Map<ServiceType, GrpcService> services = Maps.newHashMap();
services.put(ServiceType.JOB_MASTER_CLIENT_SERVICE, new GrpcService(new JobMasterClientServiceHandler(this)));
services.put(ServiceType.JOB_MASTER_WORKER_SERVICE, new GrpcService(new JobMasterWorkerServiceHandler(this)));
return services;
}
Aggregations