[
https://issues.apache.org/jira/browse/HIVE-4617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13753422#comment-13753422
]
Phabricator commented on HIVE-4617:
-----------------------------------
cwsteinbach has commented on the revision "HIVE-4617 [jira]
ExecuteStatementAsync call to run a query in non-blocking mode".
INLINE COMMENTS
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:739 Please add
documentation for these new conf properties to hive-default.xml.template (and
specify the units of "10000").
service/if/TCLIService.thrift:41 Please add HIVE_CLI_SERVICE_PROTOCOL_V2
along with a short comment explaining what's new with this protocol version.
service/if/TCLIService.thrift:455 Bump this to HIVE_CLI_SERVICE_PROTOCOL_V2.
Also, the client should probably check to make sure it's talking to a >=V2
server before trying to execute an asynchronous call.
service/if/TCLIService.thrift:474 Ditto.
service/src/java/org/apache/hive/service/cli/CLIService.java:162 There's
currently a 1:1 correspondence between operation methods in CLIService and
SessionManager. I think it's worth maintaining that relationship, so I would
advocate adding SessionManager.executeStatementAsync() instead of overloading
SessionManager.executeStatement().
service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:78
This should be private.
service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:66 I
know that Java boolean variables default to false, but I think it would be a
good to set this explicitly anyway.
service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:133
Server code should never print to stdout. Also, this is squelching the error
instead of returning it to the client.
service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:138
Unnecessary use of "this".
service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java:181
Let's add an async parameter to OperationManager.newExecuteStatementOperation()
instead of calling instanceof and casting.
service/src/java/org/apache/hive/service/cli/session/SessionManager.java:57
It would be useful to log the size of the threadpool (INFO level).
service/src/java/org/apache/hive/service/cli/session/SessionManager.java:79
This log message should tell the user that
HIVE_SERVER2_ASYNC_EXEC_SHUTDOWN_TIMEOUT=xx has been exceeded and background
tasks are still running, and that it's going to exit anyway without doing a
graceful task cleanup.
service/src/test/org/apache/hive/service/cli/CLIServiceTest.java:135 Can you
add a statement that fails (e.g. because of a syntax error) and verify that
error information is correctly returned to the client?
service/src/test/org/apache/hive/service/cli/CLIServiceTest.java:151 I think
this test should verify that getOperationStatus returns OperationState.RUNNING
at least once.
service/src/test/org/apache/hive/service/cli/CLIServiceTest.java:118 It would
be nice to add automated tests that cover version discrepancies between client
and server, but that's probably too much work. Can you try testing this by hand
and at least get a handle on what the behavior is? Users are definitely going
to run into this, so it would be good to know what to expect before the first
question appears on the user mailing list.
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:738 Is 10 a good
default value? A lot of people are probably going to hit this limit and wonder
why their queries are blocking. I think this also implies that we should add
OperationState.PENDING or OperationState.WAITING instead of returning
OperationState.RUNNING.
REVISION DETAIL
https://reviews.facebook.net/D12507
To: JIRA, vaibhavgumashta
Cc: cwsteinbach
> ExecuteStatementAsync call to run a query in non-blocking mode
> --------------------------------------------------------------
>
> Key: HIVE-4617
> URL: https://issues.apache.org/jira/browse/HIVE-4617
> Project: Hive
> Issue Type: Improvement
> Components: HiveServer2
> Affects Versions: 0.11.0
> Reporter: Jaideep Dhok
> Assignee: Vaibhav Gumashta
> Attachments: HIVE-4617.D12417.1.patch, HIVE-4617.D12417.2.patch,
> HIVE-4617.D12417.3.patch, HIVE-4617.D12417.4.patch, HIVE-4617.D12417.5.patch,
> HIVE-4617.D12417.6.patch, HIVE-4617.D12507.1.patch,
> HIVE-4617.D12507Test.1.patch
>
>
> Provide a way to run a queries asynchronously. Current executeStatement call
> blocks until the query run is complete.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira