MCPcopy Create free account
hub / github.com/apache/impala / exec_hive_query_from_file_beeline

Function exec_hive_query_from_file_beeline

bin/load-data.py:145–162  ·  view source on GitHub ↗
(file_name)

Source from the content-addressed store, hash-verified

143 return success
144
145def exec_hive_query_from_file_beeline(file_name):
146 if not os.path.exists(file_name):
147 LOG.info("Error: File {0} not found".format(file_name))
148 return False
149
150 LOG.info("Beginning execution of hive SQL: {0}".format(file_name))
151
152 output_file = file_name + ".log"
153 hive_cmd = "{0} {1} -f {2}".format(HIVE_CMD, HIVE_ARGS, file_name)
154 is_success = exec_cmd(hive_cmd, exit_on_error=False, out_file=output_file)
155
156 if is_success:
157 LOG.info("Finished execution of hive SQL: {0}".format(file_name))
158 else:
159 LOG.info("Error executing hive SQL: {0} See: {1}".format(file_name, \
160 output_file))
161
162 return is_success
163
164
165def exec_hbase_query_from_file(file_name, step_name):

Callers

nothing calls this directly

Calls 3

exec_cmdFunction · 0.70
existsMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected