org.apache.hadoop.ipc.Server.getClientId()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(164)

本文整理了Java中org.apache.hadoop.ipc.Server.getClientId()方法的一些代码示例,展示了Server.getClientId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.getClientId()方法的具体详情如下:
包路径:org.apache.hadoop.ipc.Server
类名称:Server
方法名:getClientId

Server.getClientId介绍

[英]Returns the clientId from the current RPC request
[中]从当前RPC请求返回clientId

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-common

private static CacheEntryWithPayload newEntry(Object payload,
  long expirationTime) {
 return new CacheEntryWithPayload(Server.getClientId(), Server.getCallId(),
   payload, System.nanoTime() + expirationTime);
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

private static boolean skipRetryCache() {
 // Do not track non RPC invocation or RPC requests with
 // invalid callId or clientId in retry cache
 return !Server.isRpcInvocation() || Server.getCallId() < 0
   || Arrays.equals(Server.getClientId(), RpcConstants.DUMMY_CLIENT_ID);
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

private static CacheEntry newEntry(long expirationTime) {
 return new CacheEntry(Server.getClientId(), Server.getCallId(),
   System.nanoTime() + expirationTime);
}

代码示例来源:origin: org.apache.hadoop/hadoop-hdfs

/** Record the RPC IDs if necessary */
private void logRpcIds(FSEditLogOp op, boolean toLogRpcIds) {
 if (toLogRpcIds) {
  op.setRpcClientId(Server.getClientId());
  op.setRpcCallId(Server.getCallId());
 }
}

代码示例来源:origin: io.hops/hadoop-common

private static CacheEntryWithPayload newEntry(byte[] payload,
  long expirationTime) {
 return new CacheEntryWithPayload(Server.getClientId(), Server.getCallId(),
   payload, System.nanoTime() + expirationTime);
}

代码示例来源:origin: io.hops/hadoop-common

protected static boolean skipRetryCache() {
 // Do not track non RPC invocation or RPC requests with
 // invalid callId or clientId in retry cache
 return !Server.isRpcInvocation() || Server.getCallId() < 0
   || Arrays.equals(Server.getClientId(), RpcConstants.DUMMY_CLIENT_ID);
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

private static boolean skipRetryCache() {
 // Do not track non RPC invocation or RPC requests with
 // invalid callId or clientId in retry cache
 return !Server.isRpcInvocation() || Server.getCallId() < 0
   || Arrays.equals(Server.getClientId(), RpcConstants.DUMMY_CLIENT_ID);
}

代码示例来源:origin: io.hops/hadoop-common

private static CacheEntryWithPayload newEntry(Object payload,
  long expirationTime) {
 return new CacheEntryWithPayload(Server.getClientId(), Server.getCallId(),
   payload, System.nanoTime() + expirationTime);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

private static CacheEntryWithPayload newEntry(Object payload,
  long expirationTime) {
 return new CacheEntryWithPayload(Server.getClientId(), Server.getCallId(),
   payload, System.nanoTime() + expirationTime);
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

private static boolean skipRetryCache() {
 // Do not track non RPC invocation or RPC requests with
 // invalid callId or clientId in retry cache
 return !Server.isRpcInvocation() || Server.getCallId() < 0
   || Arrays.equals(Server.getClientId(), RpcConstants.DUMMY_CLIENT_ID);
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

private static CacheEntryWithPayload newEntry(Object payload,
  long expirationTime) {
 return new CacheEntryWithPayload(Server.getClientId(), Server.getCallId(),
   payload, System.nanoTime() + expirationTime);
}

代码示例来源:origin: io.hops/hadoop-common

private static CacheEntry newEntry(long expirationTime) {
 return new CacheEntry(Server.getClientId(), Server.getCallId(),
   System.nanoTime() + expirationTime);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

private static boolean skipRetryCache() {
 // Do not track non RPC invocation or RPC requests with
 // invalid callId or clientId in retry cache
 return !Server.isRpcInvocation() || Server.getCallId() < 0
   || Arrays.equals(Server.getClientId(), RpcConstants.DUMMY_CLIENT_ID);
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

private static CacheEntryWithPayload newEntry(Object payload,
  long expirationTime) {
 return new CacheEntryWithPayload(Server.getClientId(), Server.getCallId(),
   payload, System.nanoTime() + expirationTime);
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

private static CacheEntry newEntry(long expirationTime) {
 return new CacheEntry(Server.getClientId(), Server.getCallId(),
   System.nanoTime() + expirationTime);
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

private static CacheEntry newEntry(long expirationTime) {
 return new CacheEntry(Server.getClientId(), Server.getCallId(),
   System.nanoTime() + expirationTime);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs

/** Record the RPC IDs if necessary */
private void logRpcIds(FSEditLogOp op, boolean toLogRpcIds) {
 if (toLogRpcIds) {
  op.setRpcClientId(Server.getClientId());
  op.setRpcCallId(Server.getCallId());
 }
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/** Record the RPC IDs if necessary */
private void logRpcIds(FSEditLogOp op, boolean toLogRpcIds) {
 if (toLogRpcIds) {
  op.setRpcClientId(Server.getClientId());
  op.setRpcCallId(Server.getCallId());
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

@Override
public EmptyResponseProto ping(RpcController unused,
  EmptyRequestProto request) throws ServiceException {
 // Ensure clientId is received
 byte[] clientId = Server.getClientId();
 Assert.assertNotNull(Server.getClientId());
 Assert.assertEquals(16, clientId.length);
 return EmptyResponseProto.newBuilder().build();
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

@Override
public EmptyResponseProto ping(RpcController unused,
  EmptyRequestProto request) throws ServiceException {
 // Ensure clientId is received
 byte[] clientId = Server.getClientId();
 Assert.assertNotNull(Server.getClientId());
 Assert.assertEquals(16, clientId.length);
 return EmptyResponseProto.newBuilder().build();
}

相关文章