use of org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.VertexOrBinary in project hive by apache.
the class ContainerRunnerImpl method extractVertexSpec.
private SignableVertexSpec extractVertexSpec(SubmitWorkRequestProto request, LlapTokenInfo tokenInfo) throws InvalidProtocolBufferException, IOException {
VertexOrBinary vob = request.getWorkSpec();
SignableVertexSpec vertex = vob.hasVertex() ? vob.getVertex() : null;
ByteString vertexBinary = vob.hasVertexBinary() ? vob.getVertexBinary() : null;
if (vertexBinary != null) {
if (vertex != null) {
throw new IOException("Vertex and vertexBinary in VertexOrBinary cannot be set at the same time");
}
vertex = SignableVertexSpec.parseFrom(vob.getVertexBinary());
}
if (tokenInfo.isSigningRequired) {
checkSignature(vertex, vertexBinary, request, tokenInfo.userName);
}
return vertex;
}
use of org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.VertexOrBinary in project hive by apache.
the class LlapTaskUmbilicalExternalClient method submitWork.
/**
* Submit the work for actual execution.
*/
public void submitWork(SubmitWorkRequestProto request, String llapHost, int llapPort) {
// Register the pending events to be sent for this spec.
VertexOrBinary vob = request.getWorkSpec();
assert vob.hasVertexBinary() != vob.hasVertex();
SignableVertexSpec vertex = null;
try {
vertex = vob.hasVertex() ? vob.getVertex() : SignableVertexSpec.parseFrom(vob.getVertexBinary());
} catch (InvalidProtocolBufferException e) {
throw new RuntimeException(e);
}
QueryIdentifierProto queryIdentifierProto = vertex.getQueryIdentifier();
TezTaskAttemptID attemptId = Converters.createTaskAttemptId(queryIdentifierProto, vertex.getVertexIndex(), request.getFragmentNumber(), request.getAttemptNumber());
final String fragmentId = attemptId.toString();
this.requestInfo = new RequestInfo(request, queryIdentifierProto, fragmentId, llapHost, llapPort);
this.tezEvents = Lists.<TezEvent>newArrayList();
registerClient();
// Send out the actual SubmitWorkRequest
final LlapTaskUmbilicalExternalClient client = this;
communicator.start();
submitWork();
}
Aggregations