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) + getInitialEventBytes().hashCode(); if (hasInitialEventSignature()) { hash = (37 * hash) + INITIAL_EVENT_SIGNATURE_FIELD_NUMBER; hash = (53 * hash) + getInitialEventSignature().hashCode();
.equals(other.getInitialEventBytes()); result = result && (hasInitialEventSignature() == other.hasInitialEventSignature()); if (hasInitialEventSignature()) { result = result && getInitialEventSignature() .equals(other.getInitialEventSignature());
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); }
setInitialEventBytes(other.getInitialEventBytes()); if (other.hasInitialEventSignature()) { setInitialEventSignature(other.getInitialEventSignature());