saintstack commented on a change in pull request #11: HBASE-21322 Add a 
scheduleServerCrashProcedure() API to HbckService
URL: 
https://github.com/apache/hbase-operator-tools/pull/11#discussion_r304214317
 
 

 ##########
 File path: hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
 ##########
 @@ -254,6 +258,24 @@ int setRegionState(String region, RegionState.State 
newState)
     }
   }
 
+  List<Long> scheduleSCP(String[] args) throws IOException {
+    List<HBaseProtos.ServerName> serverNames = new ArrayList<>();
+    for (String serverName: args) {
+      serverNames.add(parseServerName(serverName));
+    }
+    try (ClusterConnection c = 
(ClusterConnection)ConnectionFactory.createConnection(getConf())) {
+      try (Hbck hbck = c.getHbck()) {
+        return hbck.scheduleServerCrashProcedure(serverNames);
 
 Review comment:
   Thought about that and figured it could get messy having a complicated 
matrix of what version support what methods. An old idea is that we'd ask the 
server what 'features' it supports and then we'd fail if wanted-api was 
missing. This would be a bit tough in this case since we can't change the 
server-side after the fact. Also sometimes we want to schedule procedures w/o 
checking server version/features -- i.e. during master startup, a check for 
version comes back with a PleaseHoldException.
   
   That said, let me make a start. Can do it here w/ this feature.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to