@Override public Integer getValue() { int totalBuffers = 0; for (SingleInputGate inputGate : task.getAllInputGates()) { totalBuffers += inputGate.getNumberOfQueuedBuffers(); } return totalBuffers; } }
@Override public Integer getValue() { int totalBuffers = 0; for (SingleInputGate inputGate : task.getAllInputGates()) { totalBuffers += inputGate.getNumberOfQueuedBuffers(); } return totalBuffers; } }
@Override public Integer getValue() { int totalBuffers = 0; for (SingleInputGate inputGate : task.getAllInputGates()) { totalBuffers += inputGate.getNumberOfQueuedBuffers(); } return totalBuffers; } }
@Override public Integer getValue() { int totalBuffers = 0; for (SingleInputGate inputGate : task.getAllInputGates()) { totalBuffers += inputGate.getNumberOfQueuedBuffers(); } return totalBuffers; } }
public void registerTask(Task task) throws IOException { final ResultPartition[] producedPartitions = task.getProducedPartitions(); synchronized (lock) { if (isShutdown) { throw new IllegalStateException("NetworkEnvironment is shut down"); } for (final ResultPartition partition : producedPartitions) { setupPartition(partition); } // Setup the buffer pool for each buffer reader final SingleInputGate[] inputGates = task.getAllInputGates(); for (SingleInputGate gate : inputGates) { setupInputGate(gate); } } }
public void registerTask(Task task) throws IOException { final ResultPartition[] producedPartitions = task.getProducedPartitions(); synchronized (lock) { if (isShutdown) { throw new IllegalStateException("NetworkEnvironment is shut down"); } for (final ResultPartition partition : producedPartitions) { setupPartition(partition); } // Setup the buffer pool for each buffer reader final SingleInputGate[] inputGates = task.getAllInputGates(); for (SingleInputGate gate : inputGates) { setupInputGate(gate); } } }
public void registerTask(Task task) throws IOException { final List<InternalResultPartition> resultPartitions = task.getInternalPartitions(); synchronized (lock) { if (isShutdown) { throw new IllegalStateException("NetworkEnvironment is shut down"); } for (final InternalResultPartition partition : resultPartitions) { setupPartition(partition); } // Setup the buffer pool for each buffer reader final SingleInputGate[] inputGates = task.getAllInputGates(); for (SingleInputGate gate : inputGates) { setupInputGate(gate); } } }
@Override public Float getValue() { float maxUsage = 0; for (SingleInputGate inputGate : task.getAllInputGates()) { BufferPool bufferPool = inputGate.getBufferPool(); int usedBuffers = bufferPool.bestEffortGetNumOfUsedBuffers(); int bufferPoolSize = bufferPool.getNumBuffers(); if (bufferPoolSize != 0) { float currentPoolUsage = ((float) usedBuffers) / bufferPoolSize; if (currentPoolUsage > maxUsage) { maxUsage = currentPoolUsage; } } } return maxUsage; } }
@Override public Float getValue() { int usedBuffers = 0; int bufferPoolSize = 0; for (SingleInputGate inputGate : task.getAllInputGates()) { usedBuffers += inputGate.getBufferPool().bestEffortGetNumOfUsedBuffers(); bufferPoolSize += inputGate.getBufferPool().getNumBuffers(); } if (bufferPoolSize != 0) { return ((float) usedBuffers) / bufferPoolSize; } else { return 0.0f; } } }
@Override public Float getValue() { int usedBuffers = 0; int bufferPoolSize = 0; for (SingleInputGate inputGate : task.getAllInputGates()) { usedBuffers += inputGate.getBufferPool().bestEffortGetNumOfUsedBuffers(); bufferPoolSize += inputGate.getBufferPool().getNumBuffers(); } if (bufferPoolSize != 0) { return ((float) usedBuffers) / bufferPoolSize; } else { return 0.0f; } } }
@Override public Float getValue() { int usedBuffers = 0; int bufferPoolSize = 0; for (SingleInputGate inputGate : task.getAllInputGates()) { usedBuffers += inputGate.getBufferPool().bestEffortGetNumOfUsedBuffers(); bufferPoolSize += inputGate.getBufferPool().getNumBuffers(); } if (bufferPoolSize != 0) { return ((float) usedBuffers) / bufferPoolSize; } else { return 0.0f; } } }
final SingleInputGate[] inputGates = task.getAllInputGates();
final SingleInputGate[] inputGates = task.getAllInputGates();
final SingleInputGate[] inputGates = task.getAllInputGates();
final SingleInputGate[] inputGates = task.getAllInputGates();
final SingleInputGate[] inputGates = task.getAllInputGates();