You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2019/11/08 09:55:13 UTC

[flink] branch release-1.9 updated (830f2d7 -> 5ae3033)

This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a change to branch release-1.9
in repository https://gitbox.apache.org/repos/asf/flink.git.


    from 830f2d7  [FLINK-13969][Checkpointing] Do not allow trigger new checkpoint after stopping the coordinator
     new b3def18  [FLINK-14646] Add non-null checks to KeyGroupRangeAssignment
     new 5ae3033  [hotfix] Fix checkstyle violations in KeyGroupRangeAssignment

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/flink/runtime/state/KeyGroupRangeAssignment.java   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)


[flink] 02/02: [hotfix] Fix checkstyle violations in KeyGroupRangeAssignment

Posted by tr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch release-1.9
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 5ae3033037692bbde27917fef72e0bd0a7282ba1
Author: Till Rohrmann <tr...@apache.org>
AuthorDate: Fri Nov 8 10:49:13 2019 +0100

    [hotfix] Fix checkstyle violations in KeyGroupRangeAssignment
---
 .../org/apache/flink/runtime/state/KeyGroupRangeAssignment.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java b/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java
index d467ca6..b5676ba 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java
@@ -30,7 +30,7 @@ public final class KeyGroupRangeAssignment {
 	 */
 	public static final int DEFAULT_LOWER_BOUND_MAX_PARALLELISM = 1 << 7;
 
-	/** The (inclusive) upper bound for max parallelism */
+	/** The (inclusive) upper bound for max parallelism. */
 	public static final int UPPER_BOUND_MAX_PARALLELISM = Transformation.UPPER_BOUND_MAX_PARALLELISM;
 
 	private KeyGroupRangeAssignment() {
@@ -77,7 +77,7 @@ public final class KeyGroupRangeAssignment {
 	 * Computes the range of key-groups that are assigned to a given operator under the given parallelism and maximum
 	 * parallelism.
 	 *
-	 * IMPORTANT: maxParallelism must be <= Short.MAX_VALUE to avoid rounding problems in this method. If we ever want
+	 * <p>IMPORTANT: maxParallelism must be <= Short.MAX_VALUE to avoid rounding problems in this method. If we ever want
 	 * to go beyond this boundary, this method must perform arithmetic on long values.
 	 *
 	 * @param maxParallelism Maximal parallelism that the job was initially created with.
@@ -105,7 +105,7 @@ public final class KeyGroupRangeAssignment {
 	 * Computes the index of the operator to which a key-group belongs under the given parallelism and maximum
 	 * parallelism.
 	 *
-	 * IMPORTANT: maxParallelism must be <= Short.MAX_VALUE to avoid rounding problems in this method. If we ever want
+	 * <p>IMPORTANT: maxParallelism must be <= Short.MAX_VALUE to avoid rounding problems in this method. If we ever want
 	 * to go beyond this boundary, this method must perform arithmetic on long values.
 	 *
 	 * @param maxParallelism Maximal parallelism that the job was initially created with.


[flink] 01/02: [FLINK-14646] Add non-null checks to KeyGroupRangeAssignment

Posted by tr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch release-1.9
in repository https://gitbox.apache.org/repos/asf/flink.git

commit b3def1879370a24900db31eeef6266fa1031851b
Author: Jiayi <bu...@163.com>
AuthorDate: Fri Nov 8 00:54:56 2019 +0800

    [FLINK-14646] Add non-null checks to KeyGroupRangeAssignment
    
    This closes #10120.
---
 .../java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java b/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java
index 430765b..d467ca6 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java
@@ -46,6 +46,7 @@ public final class KeyGroupRangeAssignment {
 	 * @return the index of the parallel operator to which the given key should be routed.
 	 */
 	public static int assignKeyToParallelOperator(Object key, int maxParallelism, int parallelism) {
+		Preconditions.checkNotNull(key, "Assigned key must not be null!");
 		return computeOperatorIndexForKeyGroup(maxParallelism, parallelism, assignToKeyGroup(key, maxParallelism));
 	}
 
@@ -57,6 +58,7 @@ public final class KeyGroupRangeAssignment {
 	 * @return the key-group to which the given key is assigned
 	 */
 	public static int assignToKeyGroup(Object key, int maxParallelism) {
+		Preconditions.checkNotNull(key, "Assigned key must not be null!");
 		return computeKeyGroupForKeyHash(key.hashCode(), maxParallelism);
 	}