public void prune() throws SerDeException, IOException, InterruptedException, HiveException { synchronized(sourcesWaitingForEvents) { if (sourcesWaitingForEvents.isEmpty()) { return; } Set<VertexState> states = Collections.singleton(VertexState.SUCCEEDED); for (String source : sourcesWaitingForEvents) { // we need to get state transition updates for the vertices that will send // events to us. once we have received all events and a vertex has succeeded, // we can move to do the pruning. context.registerForVertexStateUpdates(source, states); } } LOG.info("Waiting for events (" + sourceInfoCount + " sources) ..."); // synchronous event processing loop. Won't return until all events have // been processed. this.processEvents(); this.prunePartitions(); LOG.info("Ok to proceed."); }
public void prune() throws SerDeException, IOException, InterruptedException, HiveException { synchronized(sourcesWaitingForEvents) { if (sourcesWaitingForEvents.isEmpty()) { return; } Set<VertexState> states = Collections.singleton(VertexState.SUCCEEDED); for (String source : sourcesWaitingForEvents) { // we need to get state transition updates for the vertices that will send // events to us. once we have received all events and a vertex has succeeded, // we can move to do the pruning. context.registerForVertexStateUpdates(source, states); } } LOG.info("Waiting for events (" + sourceInfoCount + " sources) ..."); // synchronous event processing loop. Won't return until all events have // been processed. this.processEvents(); this.prunePartitions(); LOG.info("Ok to proceed."); }
public void prune() throws SerDeException, IOException, InterruptedException, HiveException { synchronized(sourcesWaitingForEvents) { if (sourcesWaitingForEvents.isEmpty()) { return; } Set<VertexState> states = Collections.singleton(VertexState.SUCCEEDED); for (String source : sourcesWaitingForEvents) { // we need to get state transition updates for the vertices that will send // events to us. once we have received all events and a vertex has succeeded, // we can move to do the pruning. context.registerForVertexStateUpdates(source, states); } } LOG.info("Waiting for events (" + sourceInfoCount + " sources) ..."); // synchronous event processing loop. Won't return until all events have // been processed. this.processEvents(); this.prunePartitions(); LOG.info("Ok to proceed."); }