org.apache.hadoop.ipc.RPC.RpcInvoker Java Examples
The following examples show how to use
org.apache.hadoop.ipc.RPC.RpcInvoker.
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: Server.java From hadoop with Apache License 2.0 | 6 votes |
/** * Register a RPC kind and the class to deserialize the rpc request. * * Called by static initializers of rpcKind Engines * @param rpcKind * @param rpcRequestWrapperClass - this class is used to deserialze the * the rpc request. * @param rpcInvoker - use to process the calls on SS. */ public static void registerProtocolEngine(RPC.RpcKind rpcKind, Class<? extends Writable> rpcRequestWrapperClass, RpcInvoker rpcInvoker) { RpcKindMapValue old = rpcKindMap.put(rpcKind, new RpcKindMapValue(rpcRequestWrapperClass, rpcInvoker)); if (old != null) { rpcKindMap.put(rpcKind, old); throw new IllegalArgumentException("ReRegistration of rpcKind: " + rpcKind); } LOG.debug("rpcKind=" + rpcKind + ", rpcRequestWrapperClass=" + rpcRequestWrapperClass + ", rpcInvoker=" + rpcInvoker); }
Example #2
Source File: Server.java From big-c with Apache License 2.0 | 6 votes |
/** * Register a RPC kind and the class to deserialize the rpc request. * * Called by static initializers of rpcKind Engines * @param rpcKind * @param rpcRequestWrapperClass - this class is used to deserialze the * the rpc request. * @param rpcInvoker - use to process the calls on SS. */ public static void registerProtocolEngine(RPC.RpcKind rpcKind, Class<? extends Writable> rpcRequestWrapperClass, RpcInvoker rpcInvoker) { RpcKindMapValue old = rpcKindMap.put(rpcKind, new RpcKindMapValue(rpcRequestWrapperClass, rpcInvoker)); if (old != null) { rpcKindMap.put(rpcKind, old); throw new IllegalArgumentException("ReRegistration of rpcKind: " + rpcKind); } LOG.debug("rpcKind=" + rpcKind + ", rpcRequestWrapperClass=" + rpcRequestWrapperClass + ", rpcInvoker=" + rpcInvoker); }
Example #3
Source File: Server.java From hadoop with Apache License 2.0 | 4 votes |
RpcKindMapValue (Class<? extends Writable> rpcRequestWrapperClass, RpcInvoker rpcInvoker) { this.rpcInvoker = rpcInvoker; this.rpcRequestWrapperClass = rpcRequestWrapperClass; }
Example #4
Source File: Server.java From hadoop with Apache License 2.0 | 4 votes |
public static RpcInvoker getRpcInvoker(RPC.RpcKind rpcKind) { RpcKindMapValue val = rpcKindMap.get(rpcKind); return (val == null) ? null : val.rpcInvoker; }
Example #5
Source File: Server.java From big-c with Apache License 2.0 | 4 votes |
RpcKindMapValue (Class<? extends Writable> rpcRequestWrapperClass, RpcInvoker rpcInvoker) { this.rpcInvoker = rpcInvoker; this.rpcRequestWrapperClass = rpcRequestWrapperClass; }
Example #6
Source File: Server.java From big-c with Apache License 2.0 | 4 votes |
public static RpcInvoker getRpcInvoker(RPC.RpcKind rpcKind) { RpcKindMapValue val = rpcKindMap.get(rpcKind); return (val == null) ? null : val.rpcInvoker; }