[
https://issues.apache.org/jira/browse/FLINK-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14222998#comment-14222998
]
ASF GitHub Bot commented on FLINK-1276:
---------------------------------------
Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/227#discussion_r20790380
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/HashPartition.java
---
@@ -297,9 +299,7 @@ public int spillPartition(List<MemorySegment> target,
IOManager ioAccess, FileIO
}
// return the memory from the overflow segments
- for (int i = 0; i < this.numOverflowSegments; i++) {
- target.add(this.overflowSegments[i]);
- }
+ target.addAll(Arrays.asList(this.overflowSegments).subList(0,
this.numOverflowSegments));
--- End diff --
The statement is again more efficient than the one below (which is somewhat
better readable).
I think it is good in this case, as the spillPartition() method is not part
of a an inner loop. Inside inner loops, I try to be very careful with such
operations, to keep object allocations and indirections to a minimum.
> Misspelled class name SlotAvalablbilityListener.java
> ----------------------------------------------------
>
> Key: FLINK-1276
> URL: https://issues.apache.org/jira/browse/FLINK-1276
> Project: Flink
> Issue Type: Bug
> Components: Local Runtime
> Affects Versions: 0.8-incubating
> Reporter: Suneel Marthi
> Assignee: Suneel Marthi
> Priority: Trivial
> Fix For: 0.8-incubating
>
>
> 1. Misspelled Class name - 'SlotAvailablblityListener'.
> 2. All methods in MathUtils.java are declared as static final.
> 3. Many other minor fixes
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)