RPCCallerContextProto.Builder contextBuilder = RPCCallerContextProto .newBuilder().setContext(callerContext.getContext()); if (callerContext.getSignature() != null) { contextBuilder.setSignature( ByteString.copyFrom(callerContext.getSignature()));
sb.append(callerContext.getContext()); if (callerContext.getSignature() != null && callerContext.getSignature().length > 0 && callerContext.getSignature().length <= callerSignatureMaxLen) { sb.append(":"); sb.append(new String(callerContext.getSignature(), CallerContext.SIGNATURE_ENCODING));
private static void appendCallerContext(StringBuilder sb, CallerContext callerContext) { String context = null; byte[] signature = null; if (callerContext != null) { context = callerContext.getContext(); signature = callerContext.getSignature(); } if (context != null) { add(Keys.CALLERCONTEXT, context, sb); } if (signature != null) { try { String sigStr = new String(signature, "UTF-8"); add(Keys.CALLERSIGNATURE, sigStr, sb); } catch (UnsupportedEncodingException e) { // ignore this signature } } }
@Override public void setCallerContext(CallerContext callerContext) { if (callerContext != null) { maybeInitBuilder(); RpcHeaderProtos.RPCCallerContextProto.Builder b = RpcHeaderProtos.RPCCallerContextProto .newBuilder(); if (callerContext.getContext() != null) { b.setContext(callerContext.getContext()); } if (callerContext.getSignature() != null) { b.setSignature(ByteString.copyFrom(callerContext.getSignature())); } builder.setCallerContext(b); } }
expLog.append("\tCALLERCONTEXT=context"); if (callerContext.getSignature() != null) { expLog.append("\tCALLERSIGNATURE=signature");
app.getCallerContext().getContext()); if (app.getCallerContext().getSignature() != null) { entityInfo.put(ApplicationMetricsConstants.YARN_APP_CALLER_SIGNATURE, app.getCallerContext().getSignature());
expLog.append("\tCALLERCONTEXT=context"); if (callerContext.getSignature() != null) { expLog.append("\tCALLERSIGNATURE=signature");
app.getCallerContext().getContext()); if (app.getCallerContext().getSignature() != null) { entityInfo.put(ApplicationMetricsConstants.YARN_APP_CALLER_SIGNATURE, app.getCallerContext().getSignature());
RPCCallerContextProto.Builder contextBuilder = RPCCallerContextProto .newBuilder().setContext(callerContext.getContext()); if (callerContext.getSignature() != null) { contextBuilder.setSignature( ByteString.copyFrom(callerContext.getSignature()));