Search in sources :

Example 6 with RootInputLeafOutput

use of org.apache.tez.dag.api.RootInputLeafOutput in project hive by apache.

the class GenericUDTFGetSplits method makeEventBytes.

private SignedMessage makeEventBytes(Vertex wx, String vertexName, Event event, LlapSigner signer) throws IOException {
    assert event instanceof InputDataInformationEvent;
    List<RootInputLeafOutput<InputDescriptor, InputInitializerDescriptor>> inputs = TaskSpecBuilder.getVertexInputs(wx);
    Preconditions.checkState(inputs.size() == 1);
    Signable signableNte = NotTezEventHelper.createSignableNotTezEvent((InputDataInformationEvent) event, vertexName, inputs.get(0).getName());
    if (signer != null) {
        return signer.serializeAndSign(signableNte);
    } else {
        SignedMessage sm = new SignedMessage();
        sm.message = signableNte.serialize();
        return sm;
    }
}
Also used : RootInputLeafOutput(org.apache.tez.dag.api.RootInputLeafOutput) SignedMessage(org.apache.hadoop.hive.llap.security.LlapSigner.SignedMessage) Signable(org.apache.hadoop.hive.llap.security.LlapSigner.Signable) InputDataInformationEvent(org.apache.tez.runtime.api.events.InputDataInformationEvent)

Aggregations

RootInputLeafOutput (org.apache.tez.dag.api.RootInputLeafOutput)6 InputDescriptor (org.apache.tez.dag.api.InputDescriptor)4 InputInitializerDescriptor (org.apache.tez.dag.api.InputInitializerDescriptor)4 AppContext (org.apache.tez.dag.app.AppContext)3 TezVertexID (org.apache.tez.dag.records.TezVertexID)3 Test (org.junit.Test)3 List (java.util.List)2 ApplicationId (org.apache.hadoop.yarn.api.records.ApplicationId)2 TezDAGID (org.apache.tez.dag.records.TezDAGID)2 TezTaskAttemptID (org.apache.tez.dag.records.TezTaskAttemptID)2 TezTaskID (org.apache.tez.dag.records.TezTaskID)2 InputInitializer (org.apache.tez.runtime.api.InputInitializer)2 InputInitializerContext (org.apache.tez.runtime.api.InputInitializerContext)2 InputInitializerEvent (org.apache.tez.runtime.api.events.InputInitializerEvent)2 EventMetaData (org.apache.tez.runtime.api.impl.EventMetaData)2 TezEvent (org.apache.tez.runtime.api.impl.TezEvent)2 Signable (org.apache.hadoop.hive.llap.security.LlapSigner.Signable)1 SignedMessage (org.apache.hadoop.hive.llap.security.LlapSigner.SignedMessage)1 UserGroupInformation (org.apache.hadoop.security.UserGroupInformation)1 EventHandler (org.apache.hadoop.yarn.event.EventHandler)1