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


##########
bin/replication/copy_tables_desc.rb:
##########
@@ -39,6 +39,17 @@ def usage
   exit!
 end
 
+def create_namespace_if_not_exists(dst, namespace)
+  begin
+    dst.getNamespaceDescriptor(namespace)
+    puts format('Namespace "%s" already exists.', namespace)
+  rescue org.apache.hadoop.hbase.NamespaceNotFoundException
+    descriptor = 
org.apache.hadoop.hbase.NamespaceDescriptor.create(namespace).build()
+    dst.createNamespace(descriptor)

Review Comment:
   Sure but there could be some more information like configuration keys set at 
namespace level right? If goal is to replicate schema, IMO namespace descriptor 
should also be copied as is, same way as we are doing for table descriptor. 
What do you think?



-- 
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: issues-unsubscr...@hbase.apache.org

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

Reply via email to