You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/06/04 06:49:37 UTC

[GitHub] [hbase] gkanade commented on a change in pull request #1841: HBASE-24208 Remove RS entry from zk draining servers node after RS been stopped

gkanade commented on a change in pull request #1841:
URL: https://github.com/apache/hbase/pull/1841#discussion_r435028048



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
##########
@@ -586,6 +588,15 @@ synchronized long expireServer(final ServerName serverName, boolean force) {
     }
     moveFromOnlineToDeadServers(serverName);
 
+    // If server is in draining mode, remove corresponding znode
+    String drainingZnode = ZNodePaths.joinZNode(zkw.getZNodePaths().drainingZNode,
+      serverName.getServerName());
+    try {
+      ZKUtil.deleteNodeFailSilent(zkw, drainingZnode);
+    } catch (KeeperException e) {
+      LOG.warn("Error deleting the znode for draining server " + drainingZnode);

Review comment:
       fixed, thx

##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestDecommissionStopAdminApi.java
##########
@@ -0,0 +1,71 @@
+/**
+ * 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.hadoop.hbase.client;
+
+import static org.apache.hadoop.hbase.util.Threads.sleep;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.List;
+import org.apache.hadoop.hbase.ClusterMetrics;
+import org.apache.hadoop.hbase.HBaseClassTestRule;
+import org.apache.hadoop.hbase.HBaseTestingUtility;
+import org.apache.hadoop.hbase.ServerName;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.testclassification.ClientTests;
+import org.apache.hadoop.hbase.testclassification.LargeTests;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Category({ LargeTests.class, ClientTests.class })

Review comment:
       done thx

##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
##########
@@ -573,6 +574,7 @@ public synchronized long expireServer(final ServerName serverName) {
   }
 
   synchronized long expireServer(final ServerName serverName, boolean force) {
+    ZKWatcher zkw = master.getZooKeeper();

Review comment:
       done thx




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org