Skip to content

Commit

Permalink
Remove unused imports from RichMapPartitionFunction. Wrap way too lon…
Browse files Browse the repository at this point in the history
…g statements in NetworkBufferPool.
  • Loading branch information
hsaputra committed Mar 12, 2015
1 parent 92e809d commit 378b487
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

package org.apache.flink.api.common.functions;

import org.apache.flink.api.common.functions.AbstractRichFunction;
import org.apache.flink.api.common.functions.MapPartitionFunction;
import org.apache.flink.api.common.functions.RichFunction;
import org.apache.flink.util.Collector;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ public NetworkBufferPool(int numberOfSegmentsToAllocate, int segmentSize) {
int allocatedMb = ((availableMemorySegments.size()) * segmentSize) >> 20;
int missingMb = requiredMb - allocatedMb;

throw new OutOfMemoryError("Could not allocate enough memory segments for GlobalBufferPool (required (Mb): " + requiredMb + ", allocated (Mb): " + allocatedMb + ", missing (Mb): " + missingMb + ").");
throw new OutOfMemoryError("Could not allocate enough memory segments for GlobalBufferPool (required (Mb): " +
requiredMb + ", allocated (Mb): " + allocatedMb + ", missing (Mb): " + missingMb + ").");
}

int allocatedMb = ((availableMemorySegments.size()) * segmentSize) >> 20;

LOG.info("Allocated {} MB for network buffer pool (number of memory segments: {}, bytes per segment: {}).", allocatedMb, availableMemorySegments.size(), segmentSize);
LOG.info("Allocated {} MB for network buffer pool (number of memory segments: {}, bytes per segment: {}).",
allocatedMb, availableMemorySegments.size(), segmentSize);
}

public MemorySegment requestMemorySegment() {
Expand Down

0 comments on commit 378b487

Please sign in to comment.