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

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

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

Server.isRpcInvocation介绍

[英]Return true if the invocation was through an RPC.
[中]如果调用是通过RPC进行的,则返回true。

代码示例

代码示例来源: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-hdfs

/**
 * Client invoked methods are invoked over RPC and will be in 
 * RPC call context even if the client exits.
 */
boolean isExternalInvocation() {
 return Server.isRpcInvocation();
}

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

CheckpointSignature rollEditLog() throws IOException {
 String operationName = "rollEditLog";
 CheckpointSignature result = null;
 checkSuperuserPrivilege(operationName);
 checkOperation(OperationCategory.JOURNAL);
 writeLock();
 try {
  checkOperation(OperationCategory.JOURNAL);
  checkNameNodeSafeMode("Log not rolled");
  if (Server.isRpcInvocation()) {
   LOG.info("Roll Edit Log from " + Server.getRemoteAddress());
  }
  result = getFSImage().rollEditLog(getEffectiveLayoutVersion());
 } finally {
  writeUnlock(operationName);
 }
 logAuditEvent(true, operationName, null);
 return result;
}

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

/**
 * Client invoked methods are invoked over RPC and will be in 
 * RPC call context even if the client exits.
 */
boolean isExternalInvocation() {
 return Server.isRpcInvocation() || NamenodeWebHdfsMethods.isWebHdfsInvocation();
}

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

/**
 * Client invoked methods are invoked over RPC and will be in 
 * RPC call context even if the client exits.
 */
boolean isExternalInvocation() {
 return Server.isRpcInvocation() || NamenodeWebHdfsMethods.isWebHdfsInvocation();
}

代码示例来源: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 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 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

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: ch.cern.hadoop/hadoop-hdfs

CheckpointSignature rollEditLog() throws IOException {
 checkSuperuserPrivilege();
 checkOperation(OperationCategory.JOURNAL);
 writeLock();
 try {
  checkOperation(OperationCategory.JOURNAL);
  checkNameNodeSafeMode("Log not rolled");
  if (Server.isRpcInvocation()) {
   LOG.info("Roll Edit Log from " + Server.getRemoteAddress());
  }
  return getFSImage().rollEditLog();
 } finally {
  writeUnlock("rollEditLog");
 }
}

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

CheckpointSignature rollEditLog() throws IOException {
 checkSuperuserPrivilege();
 checkOperation(OperationCategory.JOURNAL);
 writeLock();
 try {
  checkOperation(OperationCategory.JOURNAL);
  checkNameNodeSafeMode("Log not rolled");
  if (Server.isRpcInvocation()) {
   LOG.info("Roll Edit Log from " + Server.getRemoteAddress());
  }
  return getFSImage().rollEditLog();
 } finally {
  writeUnlock("rollEditLog");
 }
}

相关文章

微信公众号

最新文章

更多