How can I know the query progress?
Closed this issue · 2 comments
xushuo commented
How can I know the query progress?
How long does it take to query about?
I want to monitor the state of the query, including time, progress.
such as :
A = The number of the current task finished.
B = The number of the total task finished.
pencent C = A/B;
xushuo commented
I didn't find similar properties in cursor .
cursor = yield connection.connect();
imjuni commented
Sorry for late answer.
If you use hive >= 1.x, you can use getLog function. Log have time, progress information. Also use getOperationState. That indicate query state using enumeration
// in jshs2/idl/Thrift_0.9.3_Hive_2.1.0/TCLIService_types.js
ttypes.TOperationState = {
'INITIALIZED_STATE' : 0,
'RUNNING_STATE' : 1,
'FINISHED_STATE' : 2,
'CANCELED_STATE' : 3,
'CLOSED_STATE' : 4,
'ERROR_STATE' : 5,
'UKNOWN_STATE' : 6,
'PENDING_STATE' : 7,
'TIMEDOUT_STATE' : 8
};
FYI