/** * <code>optional .SignableVertexSpec vertex = 1;</code> */ public Builder setVertex( org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.SignableVertexSpec.Builder builderForValue) { if (vertexBuilder_ == null) { vertex_ = builderForValue.build(); onChanged(); } else { vertexBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /**
bitField0_ |= 0x00000001; user_ = other.user_; onChanged(); setSignatureKeyId(other.getSignatureKeyId()); mergeQueryIdentifier(other.getQueryIdentifier()); onChanged(); onChanged(); onChanged(); setVertexIndex(other.getVertexIndex()); onChanged(); mergeProcessorDescriptor(other.getProcessorDescriptor()); bitField0_ = (bitField0_ & ~0x00000200); } else { ensureInputSpecsIsMutable(); inputSpecs_.addAll(other.inputSpecs_); onChanged(); inputSpecsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
.constructSignableVertexSpec(taskSpec, queryIdentifierProto, "", "", "hiveQueryId").build();
builder.setQueryIdentifier(queryIdentifierProto); builder.setHiveQueryId("hiveQueryId"); builder.setVertexIndex(tezVertexId.getId()); builder.setDagName("dagName"); builder.setVertexName("vertexName"); builder.setProcessorDescriptor( EntityDescriptorProto.newBuilder().setClassName("fakeProcessorName").setUserPayload( UserPayloadProto.newBuilder().setUserPayload(ByteString.copyFrom(procBb)))); builder.addInputSpecs(IOSpecProto.newBuilder().setConnectedVertexName("sourceVertexName1") .setPhysicalEdgeCount(33).setIoDescriptor( EntityDescriptorProto.newBuilder().setClassName("input1ClassName").setUserPayload( UserPayloadProto.newBuilder().setUserPayload(ByteString.copyFrom(input1Bb))))); builder.addInputSpecs(IOSpecProto.newBuilder().setConnectedVertexName("sourceVertexName2") .setPhysicalEdgeCount(44).setIoDescriptor( EntityDescriptorProto.newBuilder().setClassName("input1ClassName").setUserPayload( UserPayloadProto.newBuilder().setUserPayload(ByteString.copyFrom(input1Bb))))); builder.addOutputSpecs(IOSpecProto.newBuilder().setConnectedVertexName("destVertexName1") .setPhysicalEdgeCount(55).setIoDescriptor( EntityDescriptorProto.newBuilder().setClassName("outputClassName").setUserPayload( UserPayloadProto.newBuilder().setUserPayload(ByteString.copyFrom(output1Bb))))); builder.addOutputSpecs(IOSpecProto.newBuilder().setConnectedVertexName("destVertexName2") .setPhysicalEdgeCount(66).setIoDescriptor( EntityDescriptorProto.newBuilder().setClassName("outputClassName").setUserPayload( UserPayloadProto.newBuilder().setUserPayload(ByteString.copyFrom(output1Bb))))); SignableVertexSpec vertexProto = builder.build();
VertexOrBinary.newBuilder().setVertex( SignableVertexSpec.newBuilder() .setDagName(dagName) .setHiveQueryId(dagName) .setUser("MockUser") .setTokenIdentifier("MockToken_1") .setQueryIdentifier( QueryIdentifierProto.newBuilder() .setApplicationIdString(appId.toString()) .setDagIndex(dagId.getId()) .build()) .setVertexIndex(vId.getId()) .setVertexName("MockVertex") .setProcessorDescriptor( LlapDaemonProtocolProtos.EntityDescriptorProto.newBuilder() .setClassName("MockProcessor").build()) .build()).build()) .setAmHost("localhost") .setAmPort(12345)
LlapDaemonProtocolProtos.SignableVertexSpec .newBuilder() .setQueryIdentifier( LlapDaemonProtocolProtos.QueryIdentifierProto.newBuilder() .setApplicationIdString(appId) .setDagIndex(dagId) .build()) .setVertexIndex(vId) .setDagName(dagName) .setHiveQueryId(dagName) .setVertexName("MockVertex") .setUser("MockUser") .setTokenIdentifier("MockToken_1") .setProcessorDescriptor( LlapDaemonProtocolProtos.EntityDescriptorProto.newBuilder() .setClassName("MockProcessor").build()) .build()).build()) .setAmHost("localhost") .setAmPort(12345)
builder.setQueryIdentifier(queryIdentifierProto); builder.setHiveQueryId(hiveQueryIdString); builder.setVertexIndex(tId.getTaskID().getVertexID().getId()); builder.setDagName(taskSpec.getDAGName()); builder.setVertexName(taskSpec.getVertexName()); builder.setVertexParallelism(taskSpec.getVertexParallelism()); builder.setTokenIdentifier(tokenIdentifier); builder.setUser(user); builder.setProcessorDescriptor( convertToProto(taskSpec.getProcessorDescriptor())); builder.addInputSpecs(convertInputSpecToProto(inputSpec)); builder.addOutputSpecs(convertOutputSpecToProto(outputSpec)); builder.addGroupedInputSpecs(convertGroupInputSpecToProto(groupInputSpec));
@Override public void setSignInfo(int masterKeyId) { svsb.setSignatureKeyId(masterKeyId); }
private static byte[] serializeVertexSpec(SignableVertexSpec.Builder svsb) throws IOException { ByteArrayOutputStream os = new ByteArrayOutputStream(); svsb.build().writeTo(os); return os.toByteArray(); }
@Override public void setSignInfo(int masterKeyId) { svsb.setSignatureKeyId(masterKeyId); }
private static byte[] serializeVertexSpec(SignableVertexSpec.Builder svsb) throws IOException { ByteArrayOutputStream os = new ByteArrayOutputStream(); svsb.build().writeTo(os); return os.toByteArray(); }