sunhelly commented on a change in pull request #715: HBASE-22940 Fix snapshot 
NoNode error
URL: https://github.com/apache/hbase/pull/715#discussion_r334312440
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/EnabledTableSnapshotHandler.java
 ##########
 @@ -70,18 +68,10 @@ public EnabledTableSnapshotHandler prepare() throws 
Exception {
    */
   @Override
   protected void snapshotRegions(List<Pair<RegionInfo, ServerName>> regions) 
throws IOException {
-    Set<String> regionServers = new HashSet<>(regions.size());
-    for (Pair<RegionInfo, ServerName> region : regions) {
-      if (region != null && region.getFirst() != null && region.getSecond() != 
null) {
-        RegionInfo hri = region.getFirst();
-        if (hri.isOffline() && (hri.isSplit() || hri.isSplitParent())) 
continue;
-        regionServers.add(region.getSecond().toString());
-      }
-    }
-
     // start the snapshot on the RS
     Procedure proc = coordinator.startProcedure(this.monitor, 
this.snapshot.getName(),
-      this.snapshot.toByteArray(), Lists.newArrayList(regionServers));
+      this.snapshot.toByteArray(), 
master.getServerManager().getOnlineServersList()
+            .stream().map(ServerName::toString).collect(Collectors.toList()));
 
 Review comment:
   > the isSnaphsotDone would be called for members only, right?
   
   I don't think so. It's just get the Procedure status.
   You can see more details in the issue report.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to