private TezEvent extractInitialEvent(SubmitWorkRequestProto request, LlapTokenInfo tokenInfo) throws InvalidProtocolBufferException { if (!request.hasInitialEventBytes()) return null; ByteString initialEventByteString = request.getInitialEventBytes(); byte[] initialEventBytes = initialEventByteString.toByteArray(); NotTezEvent initialEvent = NotTezEvent.parseFrom(initialEventBytes); if (tokenInfo.isSigningRequired) { if (!request.hasInitialEventSignature()) { logSecurityErrorRarely(tokenInfo.userName); throw new SecurityException("Unsigned initial event is not allowed"); } byte[] signatureBytes = request.getInitialEventSignature().toByteArray(); try { signer.checkSignature(initialEventBytes, signatureBytes, initialEvent.getKeyId()); } catch (SecurityException ex) { logSecurityErrorRarely(tokenInfo.userName); throw ex; } } return NotTezEventHelper.toTezEvent(initialEvent); }
hash = (53 * hash) + getFragmentRuntimeInfo().hashCode(); if (hasInitialEventBytes()) { hash = (37 * hash) + INITIAL_EVENT_BYTES_FIELD_NUMBER; hash = (53 * hash) + getInitialEventBytes().hashCode();
.equals(other.getFragmentRuntimeInfo()); result = result && (hasInitialEventBytes() == other.hasInitialEventBytes()); if (hasInitialEventBytes()) { result = result && getInitialEventBytes() .equals(other.getInitialEventBytes());
private TezEvent extractInitialEvent(SubmitWorkRequestProto request, LlapTokenInfo tokenInfo) throws InvalidProtocolBufferException { if (!request.hasInitialEventBytes()) return null; ByteString initialEventByteString = request.getInitialEventBytes(); byte[] initialEventBytes = initialEventByteString.toByteArray(); NotTezEvent initialEvent = NotTezEvent.parseFrom(initialEventBytes); if (tokenInfo.isSigningRequired) { if (!request.hasInitialEventSignature()) { logSecurityErrorRarely(tokenInfo.userName); throw new SecurityException("Unsigned initial event is not allowed"); } byte[] signatureBytes = request.getInitialEventSignature().toByteArray(); try { signer.checkSignature(initialEventBytes, signatureBytes, initialEvent.getKeyId()); } catch (SecurityException ex) { logSecurityErrorRarely(tokenInfo.userName); throw ex; } } return NotTezEventHelper.toTezEvent(initialEvent); }
mergeFragmentRuntimeInfo(other.getFragmentRuntimeInfo()); if (other.hasInitialEventBytes()) { setInitialEventBytes(other.getInitialEventBytes());