Skip to content

Commit

Permalink
[FLINK-1801] [FLINK-1465] Network environment can start prior to Task…
Browse files Browse the repository at this point in the history
…Manager in "disassociated" mode.

NetworkEnvironment allocates heavy network buffer pool on startup and supports
multiple associations / disassociations with the TaskManager actor.

Fix negative memory report by replacing overflowing ints with longs.
  • Loading branch information
StephanEwen committed Mar 30, 2015
1 parent c89c657 commit ee273db
Show file tree
Hide file tree
Showing 9 changed files with 576 additions and 186 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
*/
public interface ConnectionManager {

void start(ResultPartitionProvider partitionProvider, TaskEventDispatcher taskEventDispatcher, NetworkBufferPool networkbufferPool) throws IOException;
void start(ResultPartitionProvider partitionProvider,
TaskEventDispatcher taskEventDispatcher,
NetworkBufferPool networkbufferPool) throws IOException;

/**
* Creates a {@link PartitionRequestClient} instance for the given {@link ConnectionID}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@
import org.apache.flink.runtime.io.network.netty.PartitionRequestClient;
import org.apache.flink.runtime.io.network.partition.ResultPartitionProvider;

import java.io.IOException;

/**
* A connection manager implementation to bypass setup overhead for task managers running in local
* execution mode.
*/
public class LocalConnectionManager implements ConnectionManager {

@Override
public void start(ResultPartitionProvider partitionProvider, TaskEventDispatcher taskEventDispatcher, NetworkBufferPool networkbufferPool) throws IOException {
public void start(ResultPartitionProvider partitionProvider,
TaskEventDispatcher taskEventDispatcher,
NetworkBufferPool networkbufferPool) {
}

@Override
public PartitionRequestClient createPartitionRequestClient(ConnectionID connectionId) throws IOException {
public PartitionRequestClient createPartitionRequestClient(ConnectionID connectionId) {
return null;
}

Expand All @@ -48,6 +48,5 @@ public int getNumberOfActiveConnections() {
}

@Override
public void shutdown() throws IOException {
}
public void shutdown() {}
}
Loading

0 comments on commit ee273db

Please sign in to comment.