From 27c1c0079ed88de1087888e2b660a6156a5a38f9 Mon Sep 17 00:00:00 2001 From: Aaron Myers Date: Fri, 13 Sep 2013 23:58:45 +0000 Subject: [PATCH] HADOOP-9945. HAServiceState should have a state for stopped services. Contributed by Karthik Kambatla. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1523150 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../main/java/org/apache/hadoop/ha/HAServiceProtocol.java | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index d02762335e7..abe898fbd6a 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -129,6 +129,9 @@ Release 2.1.1-beta - UNRELEASED HADOOP-9918. Add addIfService to CompositeService (Karthik Kambatla via Sandy Ryza) + HADOOP-9945. HAServiceState should have a state for stopped services. + (Karthik Kambatla via atm) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAServiceProtocol.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAServiceProtocol.java index 29581109328..f383d4ce3b4 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAServiceProtocol.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAServiceProtocol.java @@ -43,13 +43,15 @@ public interface HAServiceProtocol { public static final long versionID = 1L; /** - * An HA service may be in active or standby state. During - * startup, it is in an unknown INITIALIZING state. + * An HA service may be in active or standby state. During startup, it is in + * an unknown INITIALIZING state. During shutdown, it is in the STOPPING state + * and can no longer return to active/standby states. */ public enum HAServiceState { INITIALIZING("initializing"), ACTIVE("active"), - STANDBY("standby"); + STANDBY("standby"), + STOPPING("stopping"); private String name;