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

    https://github.com/apache/metron/pull/901#discussion_r163607202
  
    --- 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 --
    
    Still seems like not having to cut and paste that bit of shell script 
inside a python variable is worth generalizing to a `create_hbase_table` 
function.


---

Reply via email to