I'm experimenting with the SPOT-35_graphql_api branch (which is epic
work, looking forward for the merge!), and I found this small bug. As
it's an experimental branch, I'm not sure how/where I should report it
(jira? github?), sorry.
In:
spot-setup/create_flow_parquet.hql
line:
proto STRING,
should be:
proto TINYINT,
Otherwise, the OA backend will fail with the following traceback:
Traceback (most recent call last):
File "start_oa.py", line 82, in <module>
main()
File "start_oa.py", line 40, in main
start_oa(args)
File "start_oa.py", line 55, in start_oa
oa_process.start()
File "/home/spot/incubator-spot_graphql/spot-oa/oa/flow/flow_oa.py",
line 88, in start
self._create_flow_scores()
File "/home/spot/incubator-spot_graphql/spot-oa/oa/flow/flow_oa.py",
line 181, in _create_flow_scores
impala.execute_query(load_into_impala)
File "../api/resources/impala_engine.py", line 14, in execute_query
impala_cursor.execute(query)
File "/usr/local/lib/python2.7/dist-packages/impala/hiveserver2.py",
line 302, in execute
configuration=configuration)
File "/usr/local/lib/python2.7/dist-packages/impala/hiveserver2.py",
line 343, in execute_async
self._execute_async(op)
File "/usr/local/lib/python2.7/dist-packages/impala/hiveserver2.py",
line 362, in _execute_async
operation_fn()
File "/usr/local/lib/python2.7/dist-packages/impala/hiveserver2.py",
line 340, in op
async=True)
File "/usr/local/lib/python2.7/dist-packages/impala/hiveserver2.py",
line 1027, in execute
return self._operation('ExecuteStatement', req)
File "/usr/local/lib/python2.7/dist-packages/impala/hiveserver2.py",
line 957, in _operation
resp = self._rpc(kind, request)
File "/usr/local/lib/python2.7/dist-packages/impala/hiveserver2.py",
line 925, in _rpc
err_if_rpc_not_ok(response)
File "/usr/local/lib/python2.7/dist-packages/impala/hiveserver2.py",
line 704, in err_if_rpc_not_ok
raise HiveServer2Error(resp.status.errorMessage)
impala.error.HiveServer2Error: AnalysisException: Target table
'spot.flow_scores' is incompatible with source expressions.
Expression '17' (type: TINYINT) is not compatible with column
'proto' (type: STRING)
I've worked around the issue with a quick:
impala-shell -d spot -q "ALTER TABLE flow_scores CHANGE proto proto tinyint;"
Thanks,
Giacomo