use of alluxio.grpc.ServiceType 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.ServiceType 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.ServiceType in project alluxio by Alluxio.
the class PollingMasterInquireClient method pingMetaService.
private void pingMetaService(InetSocketAddress address) throws AlluxioStatusException {
// disable authentication in the channel since version service does not require authentication
GrpcChannel channel = GrpcChannelBuilder.newBuilder(GrpcServerAddress.create(address), mConfiguration).setSubject(mUserState.getSubject()).setClientType("MasterInquireClient").disableAuthentication().build();
ServiceVersionClientServiceGrpc.ServiceVersionClientServiceBlockingStub versionClient = ServiceVersionClientServiceGrpc.newBlockingStub(channel).withDeadlineAfter(mConfiguration.getMs(PropertyKey.USER_MASTER_POLLING_TIMEOUT), TimeUnit.MILLISECONDS);
List<InetSocketAddress> addresses = ConfigurationUtils.getJobMasterRpcAddresses(mConfiguration);
ServiceType serviceType = addresses.contains(address) ? ServiceType.JOB_MASTER_CLIENT_SERVICE : ServiceType.META_MASTER_CLIENT_SERVICE;
try {
versionClient.getServiceVersion(GetServiceVersionPRequest.newBuilder().setServiceType(serviceType).build());
} catch (StatusRuntimeException e) {
throw AlluxioStatusException.fromThrowable(e);
} finally {
channel.shutdown();
}
}
use of alluxio.grpc.ServiceType 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