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

[flink] branch master updated: [FLINK-13906][core] Implement hashCode() method in class `GlobalJobParameters`

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

hequn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 7470e44  [FLINK-13906][core] Implement hashCode() method in class `GlobalJobParameters`
7470e44 is described below

commit 7470e44354b97a0320c35eccb80342affa654714
Author: Wei Zhong <we...@gmail.com>
AuthorDate: Mon Sep 2 14:54:41 2019 +0800

    [FLINK-13906][core] Implement hashCode() method in class `GlobalJobParameters`
    
    This closes #9593
---
 .../main/java/org/apache/flink/api/common/ExecutionConfig.java   | 5 +++++
 .../java/org/apache/flink/api/common/ExecutionConfigTest.java    | 9 +++++++++
 2 files changed, 14 insertions(+)

diff --git a/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java b/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java
index 7719610..a02a180 100644
--- a/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java
+++ b/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java
@@ -1075,6 +1075,11 @@ public class ExecutionConfig implements Serializable, Archiveable<ArchivedExecut
 
 			return true;
 		}
+
+		@Override
+		public int hashCode() {
+			return Objects.hash();
+		}
 	}
 
 	/**
diff --git a/flink-core/src/test/java/org/apache/flink/api/common/ExecutionConfigTest.java b/flink-core/src/test/java/org/apache/flink/api/common/ExecutionConfigTest.java
index b415743..5ea2f09 100644
--- a/flink-core/src/test/java/org/apache/flink/api/common/ExecutionConfigTest.java
+++ b/flink-core/src/test/java/org/apache/flink/api/common/ExecutionConfigTest.java
@@ -159,4 +159,13 @@ public class ExecutionConfigTest extends TestLogger {
 
 		assertNotNull(config.getGlobalJobParameters());
 	}
+
+	@Test
+	public void testGlobalParametersHashCode() {
+		ExecutionConfig config = new ExecutionConfig();
+		ExecutionConfig anotherConfig = new ExecutionConfig();
+
+		assertEquals(config.getGlobalJobParameters().hashCode(),
+			anotherConfig.getGlobalJobParameters().hashCode());
+	}
 }