[14/28] hbase git commit: HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign; ADDENDUM Fix failing TestMetaWithReplicas#testShutdownHandling; it was reading meta TableState

2018-02-04 Thread zhangduo
HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign; 
ADDENDUM Fix failing TestMetaWithReplicas#testShutdownHandling; it was reading 
meta TableState


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

Branch: refs/heads/HBASE-19064
Commit: b0e998f2a50a50a8d84daa35baff1d4ac99d1c6a
Parents: 2e1ec3d
Author: Michael Stack 
Authored: Sat Feb 3 21:49:42 2018 -0800
Committer: Michael Stack 
Committed: Sat Feb 3 21:51:50 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java  | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b0e998f2/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
index f80bbc0..5dc0565 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
@@ -1109,6 +1109,9 @@ public class MetaTableAccessor {
   @Nullable
   public static TableState getTableState(Connection conn, TableName tableName)
   throws IOException {
+if (tableName.equals(TableName.META_TABLE_NAME)) {
+  return new TableState(tableName, TableState.State.ENABLED);
+}
 Table metaHTable = getMetaHTable(conn);
 Get get = new Get(tableName.getName()).addColumn(getTableFamily(), 
getTableStateColumn());
 long time = EnvironmentEdgeManager.currentTime();



[05/28] hbase git commit: HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign

2018-02-04 Thread zhangduo
HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign


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

Branch: refs/heads/HBASE-19064
Commit: 41974efa85a73f1967fc57c8e7df7b1344d56714
Parents: 811afad
Author: Michael Stack 
Authored: Fri Feb 2 18:29:33 2018 -0800
Committer: Michael Stack 
Committed: Fri Feb 2 18:29:33 2018 -0800

--
 .../hadoop/hbase/master/TableStateManager.java | 17 +
 1 file changed, 13 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/41974efa/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
index 8f65f05..b82f47c 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
@@ -25,6 +25,7 @@ import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException;
 import org.apache.hbase.thirdparty.com.google.common.collect.Sets;
 import edu.umd.cs.findbugs.annotations.NonNull;
 import edu.umd.cs.findbugs.annotations.Nullable;
@@ -66,7 +67,7 @@ public class TableStateManager {
   public void setTableState(TableName tableName, TableState.State newState) 
throws IOException {
 lock.writeLock().lock();
 try {
-  udpateMetaState(tableName, newState);
+  updateMetaState(tableName, newState);
 } finally {
   lock.writeLock().unlock();
 }
@@ -93,7 +94,7 @@ public class TableStateManager {
 throw new TableNotFoundException(tableName);
   }
   if (currentState.inStates(states)) {
-udpateMetaState(tableName, newState);
+updateMetaState(tableName, newState);
 return null;
   } else {
 return currentState.getState();
@@ -121,7 +122,7 @@ public class TableStateManager {
   throw new TableNotFoundException(tableName);
 }
 if (!currentState.inStates(states)) {
-  udpateMetaState(tableName, newState);
+  updateMetaState(tableName, newState);
   return true;
 } else {
   return false;
@@ -178,8 +179,16 @@ public class TableStateManager {
 return currentState.getState();
   }
 
-  protected void udpateMetaState(TableName tableName, TableState.State 
newState)
+  protected void updateMetaState(TableName tableName, TableState.State 
newState)
   throws IOException {
+if (tableName.equals(TableName.META_TABLE_NAME)) {
+  if (TableState.State.DISABLING.equals(newState) ||
+  TableState.State.DISABLED.equals(newState)) {
+throw new IllegalArgumentIOException("Cannot disable the meta table; " 
+ newState);
+  }
+  // Otherwise, just return; no need to set ENABLED on meta -- it is 
always ENABLED.
+  return;
+}
 MetaTableAccessor.updateTableState(master.getConnection(), tableName, 
newState);
   }
 



[08/46] hbase git commit: HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign; ADDENDUM Fix failing TestMetaWithReplicas#testShutdownHandling; it was reading meta TableState""

2018-02-04 Thread zhangduo
HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign; 
ADDENDUM Fix failing TestMetaWithReplicas#testShutdownHandling; it was reading 
meta TableState""
Retry applying this addendum. Previous commit added it w/ wrong log
message so had to revert and then reapply here.


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

Branch: refs/heads/HBASE-19397-branch-2
Commit: 0ca7a2e91629c5829144dff92cb1aaf9ebd6de4d
Parents: cd61060
Author: Michael Stack 
Authored: Sat Feb 3 21:49:42 2018 -0800
Committer: Michael Stack 
Committed: Sat Feb 3 21:49:42 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java  | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0ca7a2e9/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
index f80bbc0..5dc0565 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
@@ -1109,6 +1109,9 @@ public class MetaTableAccessor {
   @Nullable
   public static TableState getTableState(Connection conn, TableName tableName)
   throws IOException {
+if (tableName.equals(TableName.META_TABLE_NAME)) {
+  return new TableState(tableName, TableState.State.ENABLED);
+}
 Table metaHTable = getMetaHTable(conn);
 Get get = new Get(tableName.getName()).addColumn(getTableFamily(), 
getTableStateColumn());
 long time = EnvironmentEdgeManager.currentTime();



hbase git commit: HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign; ADDENDUM Fix failing TestMetaWithReplicas#testShutdownHandling; it was reading meta TableState

2018-02-03 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/master 2e1ec3d3d -> b0e998f2a


HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign; 
ADDENDUM Fix failing TestMetaWithReplicas#testShutdownHandling; it was reading 
meta TableState


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

Branch: refs/heads/master
Commit: b0e998f2a50a50a8d84daa35baff1d4ac99d1c6a
Parents: 2e1ec3d
Author: Michael Stack 
Authored: Sat Feb 3 21:49:42 2018 -0800
Committer: Michael Stack 
Committed: Sat Feb 3 21:51:50 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java  | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b0e998f2/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
index f80bbc0..5dc0565 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
@@ -1109,6 +1109,9 @@ public class MetaTableAccessor {
   @Nullable
   public static TableState getTableState(Connection conn, TableName tableName)
   throws IOException {
+if (tableName.equals(TableName.META_TABLE_NAME)) {
+  return new TableState(tableName, TableState.State.ENABLED);
+}
 Table metaHTable = getMetaHTable(conn);
 Get get = new Get(tableName.getName()).addColumn(getTableFamily(), 
getTableStateColumn());
 long time = EnvironmentEdgeManager.currentTime();



[2/2] hbase git commit: HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign; ADDENDUM Fix failing TestMetaWithReplicas#testShutdownHandling; it was reading meta TableState"" Re

2018-02-03 Thread stack
HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign; 
ADDENDUM Fix failing TestMetaWithReplicas#testShutdownHandling; it was reading 
meta TableState""
Retry applying this addendum. Previous commit added it w/ wrong log
message so had to revert and then reapply here.


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

Branch: refs/heads/branch-2
Commit: 0ca7a2e91629c5829144dff92cb1aaf9ebd6de4d
Parents: cd61060
Author: Michael Stack 
Authored: Sat Feb 3 21:49:42 2018 -0800
Committer: Michael Stack 
Committed: Sat Feb 3 21:49:42 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java  | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0ca7a2e9/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
index f80bbc0..5dc0565 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
@@ -1109,6 +1109,9 @@ public class MetaTableAccessor {
   @Nullable
   public static TableState getTableState(Connection conn, TableName tableName)
   throws IOException {
+if (tableName.equals(TableName.META_TABLE_NAME)) {
+  return new TableState(tableName, TableState.State.ENABLED);
+}
 Table metaHTable = getMetaHTable(conn);
 Get get = new Get(tableName.getName()).addColumn(getTableFamily(), 
getTableStateColumn());
 long time = EnvironmentEdgeManager.currentTime();



[10/50] [abbrv] hbase git commit: HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign

2018-02-03 Thread zhangduo
HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign


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

Branch: refs/heads/HBASE-19397-branch-2
Commit: 897afb7d1870d0e14fedbdc6289a272607069605
Parents: fdbc843
Author: Michael Stack 
Authored: Fri Feb 2 18:29:33 2018 -0800
Committer: Michael Stack 
Committed: Fri Feb 2 18:30:24 2018 -0800

--
 .../hadoop/hbase/master/TableStateManager.java | 17 +
 1 file changed, 13 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/897afb7d/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
index 8f65f05..b82f47c 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
@@ -25,6 +25,7 @@ import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException;
 import org.apache.hbase.thirdparty.com.google.common.collect.Sets;
 import edu.umd.cs.findbugs.annotations.NonNull;
 import edu.umd.cs.findbugs.annotations.Nullable;
@@ -66,7 +67,7 @@ public class TableStateManager {
   public void setTableState(TableName tableName, TableState.State newState) 
throws IOException {
 lock.writeLock().lock();
 try {
-  udpateMetaState(tableName, newState);
+  updateMetaState(tableName, newState);
 } finally {
   lock.writeLock().unlock();
 }
@@ -93,7 +94,7 @@ public class TableStateManager {
 throw new TableNotFoundException(tableName);
   }
   if (currentState.inStates(states)) {
-udpateMetaState(tableName, newState);
+updateMetaState(tableName, newState);
 return null;
   } else {
 return currentState.getState();
@@ -121,7 +122,7 @@ public class TableStateManager {
   throw new TableNotFoundException(tableName);
 }
 if (!currentState.inStates(states)) {
-  udpateMetaState(tableName, newState);
+  updateMetaState(tableName, newState);
   return true;
 } else {
   return false;
@@ -178,8 +179,16 @@ public class TableStateManager {
 return currentState.getState();
   }
 
-  protected void udpateMetaState(TableName tableName, TableState.State 
newState)
+  protected void updateMetaState(TableName tableName, TableState.State 
newState)
   throws IOException {
+if (tableName.equals(TableName.META_TABLE_NAME)) {
+  if (TableState.State.DISABLING.equals(newState) ||
+  TableState.State.DISABLED.equals(newState)) {
+throw new IllegalArgumentIOException("Cannot disable the meta table; " 
+ newState);
+  }
+  // Otherwise, just return; no need to set ENABLED on meta -- it is 
always ENABLED.
+  return;
+}
 MetaTableAccessor.updateTableState(master.getConnection(), tableName, 
newState);
   }
 



hbase git commit: HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign

2018-02-02 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/branch-2 fdbc84351 -> 897afb7d1


HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign


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

Branch: refs/heads/branch-2
Commit: 897afb7d1870d0e14fedbdc6289a272607069605
Parents: fdbc843
Author: Michael Stack 
Authored: Fri Feb 2 18:29:33 2018 -0800
Committer: Michael Stack 
Committed: Fri Feb 2 18:30:24 2018 -0800

--
 .../hadoop/hbase/master/TableStateManager.java | 17 +
 1 file changed, 13 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/897afb7d/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
index 8f65f05..b82f47c 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
@@ -25,6 +25,7 @@ import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException;
 import org.apache.hbase.thirdparty.com.google.common.collect.Sets;
 import edu.umd.cs.findbugs.annotations.NonNull;
 import edu.umd.cs.findbugs.annotations.Nullable;
@@ -66,7 +67,7 @@ public class TableStateManager {
   public void setTableState(TableName tableName, TableState.State newState) 
throws IOException {
 lock.writeLock().lock();
 try {
-  udpateMetaState(tableName, newState);
+  updateMetaState(tableName, newState);
 } finally {
   lock.writeLock().unlock();
 }
@@ -93,7 +94,7 @@ public class TableStateManager {
 throw new TableNotFoundException(tableName);
   }
   if (currentState.inStates(states)) {
-udpateMetaState(tableName, newState);
+updateMetaState(tableName, newState);
 return null;
   } else {
 return currentState.getState();
@@ -121,7 +122,7 @@ public class TableStateManager {
   throw new TableNotFoundException(tableName);
 }
 if (!currentState.inStates(states)) {
-  udpateMetaState(tableName, newState);
+  updateMetaState(tableName, newState);
   return true;
 } else {
   return false;
@@ -178,8 +179,16 @@ public class TableStateManager {
 return currentState.getState();
   }
 
-  protected void udpateMetaState(TableName tableName, TableState.State 
newState)
+  protected void updateMetaState(TableName tableName, TableState.State 
newState)
   throws IOException {
+if (tableName.equals(TableName.META_TABLE_NAME)) {
+  if (TableState.State.DISABLING.equals(newState) ||
+  TableState.State.DISABLED.equals(newState)) {
+throw new IllegalArgumentIOException("Cannot disable the meta table; " 
+ newState);
+  }
+  // Otherwise, just return; no need to set ENABLED on meta -- it is 
always ENABLED.
+  return;
+}
 MetaTableAccessor.updateTableState(master.getConnection(), tableName, 
newState);
   }
 



hbase git commit: HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign

2018-02-02 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/master 811afad10 -> 41974efa8


HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign


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

Branch: refs/heads/master
Commit: 41974efa85a73f1967fc57c8e7df7b1344d56714
Parents: 811afad
Author: Michael Stack 
Authored: Fri Feb 2 18:29:33 2018 -0800
Committer: Michael Stack 
Committed: Fri Feb 2 18:29:33 2018 -0800

--
 .../hadoop/hbase/master/TableStateManager.java | 17 +
 1 file changed, 13 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/41974efa/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
index 8f65f05..b82f47c 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
@@ -25,6 +25,7 @@ import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException;
 import org.apache.hbase.thirdparty.com.google.common.collect.Sets;
 import edu.umd.cs.findbugs.annotations.NonNull;
 import edu.umd.cs.findbugs.annotations.Nullable;
@@ -66,7 +67,7 @@ public class TableStateManager {
   public void setTableState(TableName tableName, TableState.State newState) 
throws IOException {
 lock.writeLock().lock();
 try {
-  udpateMetaState(tableName, newState);
+  updateMetaState(tableName, newState);
 } finally {
   lock.writeLock().unlock();
 }
@@ -93,7 +94,7 @@ public class TableStateManager {
 throw new TableNotFoundException(tableName);
   }
   if (currentState.inStates(states)) {
-udpateMetaState(tableName, newState);
+updateMetaState(tableName, newState);
 return null;
   } else {
 return currentState.getState();
@@ -121,7 +122,7 @@ public class TableStateManager {
   throw new TableNotFoundException(tableName);
 }
 if (!currentState.inStates(states)) {
-  udpateMetaState(tableName, newState);
+  updateMetaState(tableName, newState);
   return true;
 } else {
   return false;
@@ -178,8 +179,16 @@ public class TableStateManager {
 return currentState.getState();
   }
 
-  protected void udpateMetaState(TableName tableName, TableState.State 
newState)
+  protected void updateMetaState(TableName tableName, TableState.State 
newState)
   throws IOException {
+if (tableName.equals(TableName.META_TABLE_NAME)) {
+  if (TableState.State.DISABLING.equals(newState) ||
+  TableState.State.DISABLED.equals(newState)) {
+throw new IllegalArgumentIOException("Cannot disable the meta table; " 
+ newState);
+  }
+  // Otherwise, just return; no need to set ENABLED on meta -- it is 
always ENABLED.
+  return;
+}
 MetaTableAccessor.updateTableState(master.getConnection(), tableName, 
newState);
   }