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();
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); }
setInitialEventBytes(other.getInitialEventBytes());
/** * <code>optional bytes initial_event_bytes = 10;</code> * * <pre> * Serialized (and signed) NotTezEvent; used only for external clients for now. * </pre> */ public Builder clearInitialEventBytes() { bitField0_ = (bitField0_ & ~0x00000200); initialEventBytes_ = getDefaultInstance().getInitialEventBytes(); onChanged(); return this; }