----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/62373/#review186067 -----------------------------------------------------------
ql/src/java/org/apache/hadoop/hive/ql/Driver.java Line 718 (original) <https://reviews.apache.org/r/62373/#comment262475> KILL_QUERY shoudl also not need any txn to be started. Why remove it from here ? ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java Line 3041 (original), 3041 (patched) <https://reviews.apache.org/r/62373/#comment262476> Why the change in log message ? the use of "{}" is preferred as it doesn't involve string concatenation if that log level isn't enabled. ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java Line 2582 (original), 2583 (patched) <https://reviews.apache.org/r/62373/#comment262477> Is there a problem if we call the authorization method even if hs2Hostname is null ? It seems safer secuirty practise to make the authorization call even if the hs2Hostname is null for some reason. service/src/java/org/apache/hive/service/cli/CLIService.java Lines 614 (patched) <https://reviews.apache.org/r/62373/#comment262478> any reason for this change ? QueryState seems to provide a good abstraction for queryId service/src/java/org/apache/hive/service/cli/operation/OperationManager.java Line 63 (original) <https://reviews.apache.org/r/62373/#comment262479> why revert this approach of tracking the mapping using the hashmap ? That looks like more optimized route and cleaner as well. - Thejas Nair On Sept. 23, 2017, 7:53 a.m., Teddy Choi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/62373/ > ----------------------------------------------------------- > > (Updated Sept. 23, 2017, 7:53 a.m.) > > > Review request for hive. > > > Bugs: HIVE-17483 > https://issues.apache.org/jira/browse/HIVE-17483 > > > Repository: hive-git > > > Description > ------- > > For administrators, it is important to be able to kill queries if required. > Currently, there is no clean way to do it. > It would help to have a "kill query <query id>" command that can be run using > odbc/jdbc against a HiveServer2 instance, to kill a query with that queryid > running in that instance. > Authorization will have to be done to ensure that the user that is invoking > the API is allowed to perform this action. > In case of SQL std authorization, this would require admin role. > > > Diffs > ----- > > > itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniHS2.java > 4a9af80fdc > > itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlap.java > 28fa7a5783 > > itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestServiceDiscoveryWithMiniHS2.java > e8051e40f2 > jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java 1311d2d88c > jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java c6bd41feb7 > jdbc/src/java/org/apache/hive/jdbc/Utils.java bfae8b9e41 > jdbc/src/java/org/apache/hive/jdbc/ZooKeeperHiveClientHelper.java > 8d6003ad06 > metastore/src/gen/thrift/gen-py/__init__.py e69de29bb2 > ql/src/java/org/apache/hadoop/hive/ql/Driver.java 6616cba7d1 > ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ad5b3a3098 > ql/src/java/org/apache/hadoop/hive/ql/hooks/Entity.java 131c1e1bb5 > ql/src/java/org/apache/hadoop/hive/ql/hooks/WriteEntity.java da8c1e2305 > ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java > 251decac9b > ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g b5792ac485 > ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 429e0d995a > ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g 003e09fd13 > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java > 553dd64b5f > ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java 2b9e897a54 > ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java e1f1f53c3c > ql/src/java/org/apache/hadoop/hive/ql/plan/KillQueryDesc.java PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationUtils.java > 04e5565506 > > ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveOperationType.java > 3af97ea02f > > ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HivePrivilegeObject.java > 41983f1b4c > > ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/Operation2Privilege.java > da99972e0c > ql/src/java/org/apache/hadoop/hive/ql/session/KillQuery.java PRE-CREATION > ql/src/java/org/apache/hadoop/hive/ql/session/NullKillQuery.java > PRE-CREATION > ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java 97c8124293 > > ql/src/test/org/apache/hadoop/hive/ql/parse/TestSQL11ReservedKeyWordsNegative.java > 1a89eb1263 > ql/src/test/queries/clientnegative/authorization_kill_query.q PRE-CREATION > ql/src/test/queries/clientpositive/kill_query.q PRE-CREATION > ql/src/test/results/clientnegative/authorization_kill_query.q.out > PRE-CREATION > ql/src/test/results/clientpositive/llap/kill_query.q.out PRE-CREATION > service-rpc/if/TCLIService.thrift 976ca9b6b3 > service-rpc/src/gen/thrift/gen-cpp/TCLIService.h 5fd423da6e > service-rpc/src/gen/thrift/gen-cpp/TCLIService.cpp 3597d44f2d > service-rpc/src/gen/thrift/gen-cpp/TCLIService_server.skeleton.cpp > 5d7caf9783 > service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h cb62db00ea > service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp ec3f066516 > > service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java > 6dba0512b4 > > service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetQueryIdReq.java > PRE-CREATION > > service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetQueryIdResp.java > PRE-CREATION > service-rpc/src/gen/thrift/gen-php/TCLIService.php d283145b69 > service-rpc/src/gen/thrift/gen-php/Types.php f34a0cf30a > service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService-remote 62b87a35cc > service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService.py 35f2ae47c7 > service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py acc8c3a1b6 > service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service.rb a50fe259f7 > service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb 6695aee298 > service/src/java/org/apache/hive/service/cli/CLIService.java 689b948a87 > service/src/java/org/apache/hive/service/cli/EmbeddedCLIServiceClient.java > 43fbb00e32 > service/src/java/org/apache/hive/service/cli/ICLIService.java 9f2039c971 > > service/src/java/org/apache/hive/service/cli/operation/OperationManager.java > 46f524d17d > service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java > 906565c1ce > service/src/java/org/apache/hive/service/cli/session/SessionManager.java > 50826890da > > service/src/java/org/apache/hive/service/cli/thrift/RetryingThriftCLIServiceClient.java > 0e76c91520 > service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java > 9880fc6082 > > service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java > 617bc40952 > service/src/java/org/apache/hive/service/server/HiveServer2.java e5f449122b > service/src/java/org/apache/hive/service/server/KillQueryImpl.java > PRE-CREATION > > service/src/test/org/apache/hive/service/cli/session/TestSessionManagerMetrics.java > efc2e1a9d6 > > > Diff: https://reviews.apache.org/r/62373/diff/5/ > > > Testing > ------- > > > Thanks, > > Teddy Choi > >