NihalJain commented on code in PR #5462:
URL: https://github.com/apache/hbase/pull/5462#discussion_r1366171905


##########
hbase-shell/src/main/ruby/hbase/admin.rb:
##########
@@ -196,6 +196,16 @@ def split(table_or_region_name, split_point = nil)
       end
     end
 
+    
#----------------------------------------------------------------------------------------------
+    # Requests a region truncate
+    def truncate_region(region_name)
+      begin
+        
org.apache.hadoop.hbase.util.FutureUtils.get(@admin.truncateRegionAsync(region_name.to_java_bytes))
+      rescue java.lang.IllegalArgumentException, 
org.apache.hadoop.hbase.UnknownRegionException
+        @admin.truncate_region(region_name.to_java_bytes)

Review Comment:
   Do you mean NoServerForRegionExceptio? In which case does this throw 
UnknownRegionException?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to