use of org.apache.asterix.active.ActiveRuntimeId 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);
}
}
use of org.apache.asterix.active.ActiveRuntimeId in project asterixdb by apache.
the class FeedMetaComputeNodePushable method open.
@Override
public void open() throws HyracksDataException {
ActiveRuntimeId runtimeId = new ActiveRuntimeId(connectionId.getFeedId(), runtimeType.toString(), partition);
try {
initializeNewFeedRuntime(runtimeId);
opened = true;
writer.open();
} catch (Exception e) {
e.printStackTrace();
throw new HyracksDataException(e);
}
}
use of org.apache.asterix.active.ActiveRuntimeId in project asterixdb by apache.
the class FeedMetaStoreNodePushable method open.
@Override
public void open() throws HyracksDataException {
ActiveRuntimeId runtimeId = new ActiveRuntimeId(connectionId.getFeedId(), runtimeType.toString() + "." + connectionId.getDatasetName(), partition);
try {
initializeNewFeedRuntime(runtimeId);
insertOperator.open();
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Failed to open feed store operator", e);
throw new HyracksDataException(e);
}
}
use of org.apache.asterix.active.ActiveRuntimeId in project asterixdb by apache.
the class FeedOperations method SendStopMessageToNode.
public static void SendStopMessageToNode(ICcApplicationContext appCtx, EntityId feedId, String intakeNodeLocation, Integer partition) throws Exception {
ActiveManagerMessage stopFeedMessage = new ActiveManagerMessage(ActiveManagerMessage.STOP_ACTIVITY, "SRC", new ActiveRuntimeId(feedId, FeedIntakeOperatorNodePushable.class.getSimpleName(), partition));
SendActiveMessage(appCtx, stopFeedMessage, intakeNodeLocation);
}
use of org.apache.asterix.active.ActiveRuntimeId in project asterixdb by apache.
the class InputHandlerTest method createInputHandler.
private FeedRuntimeInputHandler createInputHandler(IHyracksTaskContext ctx, IFrameWriter writer, FeedPolicyAccessor fpa, ConcurrentFramePool framePool) throws HyracksDataException {
FrameTupleAccessor fta = Mockito.mock(FrameTupleAccessor.class);
EntityId feedId = new EntityId(FeedUtils.FEED_EXTENSION_NAME, DATAVERSE, FEED);
FeedConnectionId connectionId = new FeedConnectionId(feedId, DATASET);
ActiveRuntimeId runtimeId = new ActiveRuntimeId(feedId, FeedRuntimeType.COLLECT.toString(), 0);
return new FeedRuntimeInputHandler(ctx, connectionId, runtimeId, writer, fpa, fta, framePool);
}
Aggregations