From 56fa5458e622367c1475ff84e319571cd0221538 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Thu, 6 Mar 2014 10:08:32 +0000 Subject: [PATCH] Nicer failure message when node should not connect to another in nodes API There are cases where nodes should not connect to another node. For example, client nodes do not connect to other client nodes. When executing a nodes level API, we should have a nicer failure indicating that, and not log it by default, as its not a real failure --- .../nodes/TransportNodesOperationAction.java | 4 ++- .../NodeShouldNotConnectException.java | 31 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 src/main/java/org/elasticsearch/transport/NodeShouldNotConnectException.java diff --git a/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesOperationAction.java b/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesOperationAction.java index d532c5e5b9b..3565d90c788 100644 --- a/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesOperationAction.java @@ -163,6 +163,8 @@ public abstract class TransportNodesOperationAction() { @@ -202,7 +204,7 @@ public abstract class TransportNodesOperationAction