Search in sources :

Example 1 with SyncFeedRuntimeInputHandler

use of org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler in project asterixdb by apache.

the class FeedCollectOperatorNodePushable method initialize.

@Override
public void initialize() throws HyracksDataException {
    try {
        ActiveRuntimeId runtimeId = new ActiveRuntimeId(connectionId.getFeedId(), FeedRuntimeType.COLLECT.toString(), partition);
        FrameTupleAccessor tAccessor = new FrameTupleAccessor(recordDesc);
        if (policyAccessor.flowControlEnabled()) {
            writer = new FeedRuntimeInputHandler(ctx, connectionId, runtimeId, writer, policyAccessor, tAccessor, activeManager.getFramePool());
        } else {
            writer = new SyncFeedRuntimeInputHandler(ctx, writer, tAccessor);
        }
    } catch (Exception e) {
        throw new HyracksDataException(e);
    }
}
Also used : SyncFeedRuntimeInputHandler(org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler) FeedRuntimeInputHandler(org.apache.asterix.external.feed.dataflow.FeedRuntimeInputHandler) ActiveRuntimeId(org.apache.asterix.active.ActiveRuntimeId) SyncFeedRuntimeInputHandler(org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler) HyracksDataException(org.apache.hyracks.api.exceptions.HyracksDataException) HyracksDataException(org.apache.hyracks.api.exceptions.HyracksDataException) FrameTupleAccessor(org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor)

Example 2 with SyncFeedRuntimeInputHandler

use of org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler in project asterixdb by apache.

the class FeedMetaComputeNodePushable method initializeNewFeedRuntime.

private void initializeNewFeedRuntime(ActiveRuntimeId runtimeId) throws Exception {
    fta = new FrameTupleAccessor(recordDescProvider.getInputRecordDescriptor(opDesc.getActivityId(), 0));
    FeedPolicyAccessor fpa = policyAccessor;
    coreOperator.setOutputFrameWriter(0, writer, recordDesc);
    if (fpa.flowControlEnabled()) {
        writer = new FeedRuntimeInputHandler(ctx, connectionId, runtimeId, coreOperator, fpa, fta, feedManager.getFramePool());
    } else {
        writer = new SyncFeedRuntimeInputHandler(ctx, coreOperator, fta);
    }
}
Also used : SyncFeedRuntimeInputHandler(org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler) FeedRuntimeInputHandler(org.apache.asterix.external.feed.dataflow.FeedRuntimeInputHandler) FeedPolicyAccessor(org.apache.asterix.external.feed.policy.FeedPolicyAccessor) SyncFeedRuntimeInputHandler(org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler) FrameTupleAccessor(org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor)

Example 3 with SyncFeedRuntimeInputHandler

use of org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler in project asterixdb by apache.

the class FeedMetaStoreNodePushable method initializeNewFeedRuntime.

private void initializeNewFeedRuntime(ActiveRuntimeId runtimeId) throws Exception {
    fta = new FrameTupleAccessor(recordDescProvider.getInputRecordDescriptor(opDesc.getActivityId(), 0));
    insertOperator.setOutputFrameWriter(0, writer, recordDesc);
    if (insertOperator instanceof LSMInsertDeleteOperatorNodePushable) {
        LSMInsertDeleteOperatorNodePushable indexOp = (LSMInsertDeleteOperatorNodePushable) insertOperator;
        if (!indexOp.isPrimary()) {
            writer = insertOperator;
            return;
        }
    }
    if (policyAccessor.flowControlEnabled()) {
        writer = new FeedRuntimeInputHandler(ctx, connectionId, runtimeId, insertOperator, policyAccessor, fta, feedManager.getFramePool());
    } else {
        writer = new SyncFeedRuntimeInputHandler(ctx, insertOperator, fta);
    }
}
Also used : LSMInsertDeleteOperatorNodePushable(org.apache.asterix.common.dataflow.LSMInsertDeleteOperatorNodePushable) SyncFeedRuntimeInputHandler(org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler) FeedRuntimeInputHandler(org.apache.asterix.external.feed.dataflow.FeedRuntimeInputHandler) SyncFeedRuntimeInputHandler(org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler) FrameTupleAccessor(org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor)

Aggregations

FeedRuntimeInputHandler (org.apache.asterix.external.feed.dataflow.FeedRuntimeInputHandler)3 SyncFeedRuntimeInputHandler (org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler)3 FrameTupleAccessor (org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor)3 ActiveRuntimeId (org.apache.asterix.active.ActiveRuntimeId)1 LSMInsertDeleteOperatorNodePushable (org.apache.asterix.common.dataflow.LSMInsertDeleteOperatorNodePushable)1 FeedPolicyAccessor (org.apache.asterix.external.feed.policy.FeedPolicyAccessor)1 HyracksDataException (org.apache.hyracks.api.exceptions.HyracksDataException)1