From c5caa25b8f2953e2b7a9d2c9dcbdbf1fed95c10b Mon Sep 17 00:00:00 2001 From: Harsh J Date: Fri, 31 Jul 2015 08:58:22 +0530 Subject: [PATCH] HDFS-8821. Explain message "Operation category X is not supported in state standby". Contributed by Gautam Gopalakrishnan. --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../apache/hadoop/hdfs/server/namenode/ha/StandbyState.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 7f04125824..69e4dd6abc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -357,6 +357,9 @@ Release 2.8.0 - UNRELEASED IMPROVEMENTS + HDFS-8821. Explain message "Operation category X is not supported + in state standby" (Gautam Gopalakrishnan via harsh) + HDFS-3918. EditLogTailer shouldn't log WARN when other node is in standby mode (todd via harsh) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/StandbyState.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/StandbyState.java index 60e83713b8..d782bdf3a3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/StandbyState.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/StandbyState.java @@ -82,8 +82,9 @@ public void checkOperation(HAContext context, OperationCategory op) (op == OperationCategory.READ && context.allowStaleReads())) { return; } + String faq = ". Visit https://s.apache.org/sbnn-error"; String msg = "Operation category " + op + " is not supported in state " - + context.getState(); + + context.getState() + faq; throw new StandbyException(msg); }