Java Code Examples for org.apache.ratis.rpc.SupportedRpcType#GRPC
The following examples show how to use
org.apache.ratis.rpc.SupportedRpcType#GRPC .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RatisHelper.java From hadoop-ozone with Apache License 2.0 | 5 votes |
@SuppressWarnings("checkstyle:ParameterNumber") private static RaftClient newRaftClient(RpcType rpcType, RaftPeerId leader, RaftGroup group, RetryPolicy retryPolicy, GrpcTlsConfig tlsConfig, ConfigurationSource ozoneConfiguration) { if (LOG.isTraceEnabled()) { LOG.trace("newRaftClient: {}, leader={}, group={}", rpcType, leader, group); } final RaftProperties properties = new RaftProperties(); RaftConfigKeys.Rpc.setType(properties, rpcType); // Set the ratis client headers which are matching with regex. createRaftClientProperties(ozoneConfiguration, properties); RaftClient.Builder builder = RaftClient.newBuilder() .setRaftGroup(group) .setLeaderId(leader) .setProperties(properties) .setRetryPolicy(retryPolicy); // TODO: GRPC TLS only for now, netty/hadoop RPC TLS support later. if (tlsConfig != null && rpcType == SupportedRpcType.GRPC) { builder.setParameters(GrpcFactory.newRaftParameters(tlsConfig)); } return builder.build(); }
Example 2
Source File: GrpcFactory.java From incubator-ratis with Apache License 2.0 | 4 votes |
@Override public SupportedRpcType getRpcType() { return SupportedRpcType.GRPC; }
Example 3
Source File: GrpcService.java From incubator-ratis with Apache License 2.0 | 4 votes |
@Override public SupportedRpcType getRpcType() { return SupportedRpcType.GRPC; }
Example 4
Source File: GrpcFactory.java From ratis with Apache License 2.0 | 4 votes |
@Override public SupportedRpcType getRpcType() { return SupportedRpcType.GRPC; }
Example 5
Source File: GrpcService.java From ratis with Apache License 2.0 | 4 votes |
@Override public SupportedRpcType getRpcType() { return SupportedRpcType.GRPC; }