| 163 | |
| 164 | |
| 165 | def exec_hbase_query_from_file(file_name, step_name): |
| 166 | if not os.path.exists(file_name): return |
| 167 | LOG.info('Begin step "%s".' % step_name) |
| 168 | start_time = time.time() |
| 169 | hbase_cmd = "hbase shell %s" % file_name |
| 170 | LOG.info('Executing HBase Command: %s' % hbase_cmd) |
| 171 | exec_cmd(hbase_cmd, error_msg='Error executing hbase create commands') |
| 172 | total_time = time.time() - start_time |
| 173 | LOG.info('End step "%s". Total time: %.2fs\n' % (step_name, total_time)) |
| 174 | |
| 175 | |
| 176 | # KERBEROS TODO: fails when kerberized and impalad principal isn't "impala" |