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

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

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

Server.getCallId介绍

[英]Returns the currently active RPC call's sequential ID number. A negative call ID indicates an invalid value, such as if there is no currently active RPC call.
[中]返回当前活动RPC调用的顺序ID号。负的调用ID表示无效值,例如当前没有活动的RPC调用。

代码示例

代码示例来源: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: io.hops/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: 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: ch.cern.hadoop/hadoop-common

@Override
 public void run() {
  callIds.add(Server.getCallId());
 }
};

代码示例来源: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: com.github.jiayuhan-it/hadoop-common

@Override
 public void run() {
  callIds.add(Server.getCallId());
 }
};

代码示例来源: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-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: 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-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: ch.cern.hadoop/hadoop-common

@Override
 public void run() {
  Assert.assertEquals(info.id, Server.getCallId());
  Assert.assertEquals(info.retry, Server.getCallRetryCount());
 }
};

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

@Override
 public void run() {
  Assert.assertEquals(info.id, Server.getCallId());
  Assert.assertEquals(info.retry, Server.getCallRetryCount());
 }
};

相关文章