public void processVertex(String name) { LOG.info("Vertex succeeded: " + name); synchronized(sourcesWaitingForEvents) { // Get a deterministic count of number of tasks for the vertex. MutableInt prevVal = numExpectedEventsPerSource.get(name); int prevValInt = prevVal.intValue(); Preconditions.checkState(prevValInt < 0, "Invalid value for numExpectedEvents for source: " + name + ", oldVal=" + prevValInt); prevVal.setValue((-1) * prevValInt * context.getVertexNumTasks(name)); checkForSourceCompletion(name); } }
public void addEvent(InputInitializerEvent event) { synchronized(sourcesWaitingForEvents) { if (sourcesWaitingForEvents.contains(event.getSourceVertexName())) { ++totalEventCount; numEventsSeenPerSource.get(event.getSourceVertexName()).increment(); if(!queue.offer(event)) { throw new IllegalStateException("Queue full"); } checkForSourceCompletion(event.getSourceVertexName()); } } }
public void addEvent(InputInitializerEvent event) { synchronized(sourcesWaitingForEvents) { if (sourcesWaitingForEvents.contains(event.getSourceVertexName())) { ++totalEventCount; numEventsSeenPerSource.get(event.getSourceVertexName()).increment(); if(!queue.offer(event)) { throw new IllegalStateException("Queue full"); } checkForSourceCompletion(event.getSourceVertexName()); } } }
public void processVertex(String name) { LOG.info("Vertex succeeded: " + name); synchronized(sourcesWaitingForEvents) { // Get a deterministic count of number of tasks for the vertex. MutableInt prevVal = numExpectedEventsPerSource.get(name); int prevValInt = prevVal.intValue(); Preconditions.checkState(prevValInt < 0, "Invalid value for numExpectedEvents for source: " + name + ", oldVal=" + prevValInt); prevVal.setValue((-1) * prevValInt * context.getVertexNumTasks(name)); checkForSourceCompletion(name); } }
public void addEvent(InputInitializerEvent event) { synchronized(sourcesWaitingForEvents) { if (sourcesWaitingForEvents.contains(event.getSourceVertexName())) { ++totalEventCount; numEventsSeenPerSource.get(event.getSourceVertexName()).increment(); queue.offer(event); checkForSourceCompletion(event.getSourceVertexName()); } } }
public void processVertex(String name) { LOG.info("Vertex succeeded: " + name); synchronized(sourcesWaitingForEvents) { // Get a deterministic count of number of tasks for the vertex. MutableInt prevVal = numExpectedEventsPerSource.get(name); int prevValInt = prevVal.intValue(); Preconditions.checkState(prevValInt < 0, "Invalid value for numExpectedEvents for source: " + name + ", oldVal=" + prevValInt); prevVal.setValue((-1) * prevValInt * context.getVertexNumTasks(name)); checkForSourceCompletion(name); } }