/** * @return Address of remote client if a request is ongoing, else null */ public static Optional<InetAddress> getRemoteAddress() { return getCurrentCall().map(RpcCall::getRemoteAddress); }
/** * @return the versionInfo extracted from the current RpcCallContext */ public static HBaseProtos.VersionInfo getCurrentClientVersionInfo() { return RpcServer.getCurrentCall().map(RpcCallContext::getClientVersionInfo).orElse(null); }
/** * Returns the user credentials associated with the current RPC request or not present if no * credentials were provided. * @return A User */ public static Optional<User> getRequestUser() { Optional<RpcCall> ctx = getCurrentCall(); return ctx.isPresent() ? ctx.get().getRequestUser() : Optional.empty(); }
Optional<RpcCall> call = RpcServer.getCurrentCall(); if (call.isPresent()) { long deadline = call.get().getDeadline();
rows = closeScanner ? 0 : 1; RpcCallContext context = RpcServer.getCurrentCall().orElse(null);
throw new IllegalArgumentException("Scanner context cannot be null"); Optional<RpcCall> rpcCall = RpcServer.getCurrentCall();
Boolean processed = null; RegionScannersCloseCallBack closeCallBack = null; RpcCallContext context = RpcServer.getCurrentCall().orElse(null); this.rpcMultiRequestCount.increment(); this.requestCount.increment();
RpcCallContext context = RpcServer.getCurrentCall().orElse(null); quota = getRpcQuotaManager().checkQuota(region, OperationQuota.OperationType.GET);
CellScanner cellScanner = controller != null ? controller.cellScanner() : null; OperationQuota quota = null; RpcCallContext context = RpcServer.getCurrentCall().orElse(null); ActivePolicyEnforcement spaceQuotaEnforcement = null; MutationType type = null;
/** * @return True if current call supports cellblocks */ private boolean isClientCellBlockSupport() { RpcCallContext context = RpcServer.getCurrentCall(); return context != null && context.isClientCellBlockSupported(); }
/** * Returns the user credentials associated with the current RPC request or * <code>null</code> if no credentials were provided. * @return A User */ public static User getRequestUser() { RpcCallContext ctx = getCurrentCall(); return ctx == null? null: ctx.getRequestUser(); }
/** * @return Address of remote client if a request is ongoing, else null */ public static InetAddress getRemoteAddress() { RpcCallContext ctx = getCurrentCall(); return ctx == null? null: ctx.getRemoteAddress(); }
public static boolean currentClientHasMinimumVersion(int major, int minor) { RpcCallContext call = RpcServer.getCurrentCall(); HBaseProtos.VersionInfo versionInfo = call != null ? call.getClientVersionInfo() : null; return hasMinimumVersion(versionInfo, major, minor); }
boolean closeScanner = false; boolean isSmallScan = false; RpcCallContext context = RpcServer.getCurrentCall(); Object lastBlock = null;
RpcCallContext context = RpcServer.getCurrentCall(); IOException sizeIOE = null; Object lastBlock = null;
throw new IllegalArgumentException("Scanner context cannot be null"); RpcCallContext rpcCall = RpcServer.getCurrentCall();