Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/metron/pull/901#discussion_r162677398
  
    --- Diff: 
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/enrichment_commands.py
 ---
    @@ -190,7 +190,7 @@ def create_hbase_tables(self):
                       self.__params.hbase_principal_name,
                       execute_user=self.__params.hbase_user)
     
    -        cmd = "echo \"create '{0}','{1}'\" | hbase shell -n"
    +        cmd = "if [[ $(echo \"exists '{0}'\" | hbase shell | grep 'not 
exist') ]]; then echo \"create '{0}','{1}'\" | hbase shell -n; fi"
    --- End diff --
    
    I thought of that, the issue would be that that function would have the 
same parameters as this Execute command.  It wouldn't really make it better.
    
    We could create a shared get_create_hbase_table_fmt() function that returns 
the command.


---

Reply via email to