flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject [1/6] flink git commit: [FLINK-4834] [cluster management] Add LeaderIdMismatchException at a common way to report RPC calls rejected due to outdated leader status.
Date Tue, 01 Nov 2016 08:42:05 GMT
Repository: flink
Updated Branches:
  refs/heads/flip-6 4c4d8eb14 -> 4129de281


[FLINK-4834] [cluster management] Add LeaderIdMismatchException at a common way to report
RPC calls rejected due to outdated leader status.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/52072263
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/52072263
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/52072263

Branch: refs/heads/flip-6
Commit: 5207226315897a85062669f6eb60fed29476a006
Parents: 360268c
Author: Stephan Ewen <sewen@apache.org>
Authored: Mon Oct 17 20:20:26 2016 +0200
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Tue Nov 1 09:41:32 2016 +0100

----------------------------------------------------------------------
 .../LeaderIdMismatchException.java              | 47 ++++++++++++++++++++
 1 file changed, 47 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/52072263/flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/LeaderIdMismatchException.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/LeaderIdMismatchException.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/LeaderIdMismatchException.java
new file mode 100644
index 0000000..5caf1b2
--- /dev/null
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/LeaderIdMismatchException.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.highavailability;
+
+import java.util.UUID;
+
+/**
+ * An exception thrown when the leader session id attached to a message does not match
+ * the leader session id that the receiver expects.
+ */
+public class LeaderIdMismatchException extends Exception {
+
+	private static final long serialVersionUID = 1L;
+
+	private final UUID expected;
+	private final UUID actual;
+
+	public LeaderIdMismatchException(UUID expected, UUID actual) {
+		super("Leader session ID mismatch: expected=" + expected + ", actual=" + actual);
+		this.expected = expected;
+		this.actual = actual;
+	}
+
+	public UUID getExpected() {
+		return expected;
+	}
+
+	public UUID getActual() {
+		return actual;
+	}
+}


Mime
View raw message