if (callerContext != null && callerContext.isContextValid()) { RPCCallerContextProto.Builder contextBuilder = RPCCallerContextProto .newBuilder().setContext(callerContext.getContext()); if (callerContext.getSignature() != null) { contextBuilder.setSignature(
callerContext.isContextValid()) { sb.append("\t").append("callerContext="); if (callerContext.getContext().length() > callerContextMaxLen) { sb.append(callerContext.getContext().substring(0, callerContextMaxLen)); } else { sb.append(callerContext.getContext());
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); } }
if (callerContext.getContext() != null) { expLog.append("\tCALLERCONTEXT=context");
app.getAppNodeLabelExpression()); if (app.getCallerContext() != null) { if (app.getCallerContext().getContext() != null) { entityInfo.put(ApplicationMetricsConstants.YARN_APP_CALLER_CONTEXT, app.getCallerContext().getContext());
if (callerContext.getContext() != null) { expLog.append("\tCALLERCONTEXT=context");
app.getAppNodeLabelExpression()); if (app.getCallerContext() != null) { if (app.getCallerContext().getContext() != null) { entityInfo.put(ApplicationMetricsConstants.YARN_APP_CALLER_CONTEXT, app.getCallerContext().getContext());
if (callerContext != null && callerContext.isContextValid()) { RPCCallerContextProto.Builder contextBuilder = RPCCallerContextProto .newBuilder().setContext(callerContext.getContext()); if (callerContext.getSignature() != null) { contextBuilder.setSignature(
attemptState.getAppAttemptTokens() .getSecretKey(RMStateStore.AM_CLIENT_TOKEN_MASTER_KEY_NAME)); assertEquals("context", appState.getCallerContext().getContext());