Review Board 1.7.22


HIVE-4629. HS2 should support an API to retrieve query logs

Review Request #14326 - Created Sept. 25, 2013 and updated

Shreepadma Venugopalan
trunk
HIVE-4629
Reviewers
hive
brocknoland
hive-git
Adds a new API to HS2, String getLog(OperationHandle opHandle) that returns the query log for a given operation handle. The log is maintained in memory as a circular buffer. The default size is 128 KB, but can be configured by the user. Logging is initialized if hive.server2.in.mem.logging is set to true.

Log object is created in executeStatement,getColumns,getTables,getSchemas,getCatalogs,getTypeInfo,getFunctions and destroyed in closeOperation, cancelOperation.
Add a new unit test to test log retrieval.
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
Revision e971644 New Change
[20] 760 lines
[+20] [+] public class HiveConf extends Configuration {
761
    HIVE_SERVER2_CUSTOM_AUTHENTICATION_CLASS("hive.server2.custom.authentication.class", null),
761
    HIVE_SERVER2_CUSTOM_AUTHENTICATION_CLASS("hive.server2.custom.authentication.class", null),
762
    HIVE_SERVER2_ENABLE_DOAS("hive.server2.enable.doAs", true),
762
    HIVE_SERVER2_ENABLE_DOAS("hive.server2.enable.doAs", true),
763
    HIVE_SERVER2_TABLE_TYPE_MAPPING("hive.server2.table.type.mapping", "CLASSIC"),
763
    HIVE_SERVER2_TABLE_TYPE_MAPPING("hive.server2.table.type.mapping", "CLASSIC"),
764
    HIVE_SERVER2_SESSION_HOOK("hive.server2.session.hook", ""),
764
    HIVE_SERVER2_SESSION_HOOK("hive.server2.session.hook", ""),
765

    
   
765

   

    
   
766
    HIVE_SERVER2_IN_MEM_LOGGING("hive.server2.in.mem.logging", true),

    
   
767
    HIVE_SERVER2_IN_MEM_LOG_SIZE("hive.server2.in.mem.log.size", 128 * 1024),
766
    HIVE_CONF_RESTRICTED_LIST("hive.conf.restricted.list", null),
768
    HIVE_CONF_RESTRICTED_LIST("hive.conf.restricted.list", null),
767

    
   
769

   
768
    // If this is set all move tasks at the end of a multi-insert query will only begin once all
770
    // If this is set all move tasks at the end of a multi-insert query will only begin once all
769
    // outputs are ready
771
    // outputs are ready
770
    HIVE_MULTI_INSERT_MOVE_TASKS_SHARE_DEPENDENCIES(
772
    HIVE_MULTI_INSERT_MOVE_TASKS_SHARE_DEPENDENCIES(
[+20] [20] 503 lines
conf/hive-default.xml.template
Revision 1ee756c New Change
 
jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
Revision 2912ece New Change
 
jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
Revision 09ab3c2 New Change
 
service/if/TCLIService.thrift
Revision 6e20375 New Change
 
service/src/java/org/apache/hive/service/cli/CLIService.java
Revision 1a7f338 New Change
 
service/src/java/org/apache/hive/service/cli/CLIServiceClient.java
Revision 14ef54f New Change
 
service/src/java/org/apache/hive/service/cli/EmbeddedCLIServiceClient.java
Revision 9dca874 New Change
 
service/src/java/org/apache/hive/service/cli/ICLIService.java
Revision f647ce6 New Change
 
service/src/java/org/apache/hive/service/cli/log/LinkedStringBuffer.java
New File
 
service/src/java/org/apache/hive/service/cli/log/LogDivertAppender.java
New File
 
service/src/java/org/apache/hive/service/cli/log/LogManager.java
New File
 
service/src/java/org/apache/hive/service/cli/log/OperationLog.java
New File
 
service/src/java/org/apache/hive/service/cli/operation/OperationManager.java
Revision 1f78a1d New Change
 
service/src/java/org/apache/hive/service/cli/session/HiveSession.java
Revision 00058cc New Change
 
service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
Revision 11c96b2 New Change
 
service/src/java/org/apache/hive/service/cli/session/SessionManager.java
Revision f392d62 New Change
 
service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java
Revision 2f2866f New Change
 
service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
Revision 9bb2a0f New Change
 
  1. common/src/java/org/apache/hadoop/hive/conf/HiveConf.java: Loading...
  2. conf/hive-default.xml.template: Loading...
  3. jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java: Loading...
  4. jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java: Loading...
  5. service/if/TCLIService.thrift: Loading...
  6. service/src/java/org/apache/hive/service/cli/CLIService.java: Loading...
  7. service/src/java/org/apache/hive/service/cli/CLIServiceClient.java: Loading...
  8. service/src/java/org/apache/hive/service/cli/EmbeddedCLIServiceClient.java: Loading...
  9. service/src/java/org/apache/hive/service/cli/ICLIService.java: Loading...
  10. service/src/java/org/apache/hive/service/cli/log/LinkedStringBuffer.java: Loading...
  11. service/src/java/org/apache/hive/service/cli/log/LogDivertAppender.java: Loading...
  12. service/src/java/org/apache/hive/service/cli/log/LogManager.java: Loading...
  13. service/src/java/org/apache/hive/service/cli/log/OperationLog.java: Loading...
  14. service/src/java/org/apache/hive/service/cli/operation/OperationManager.java: Loading...
  15. service/src/java/org/apache/hive/service/cli/session/HiveSession.java: Loading...
  16. service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java: Loading...
  17. service/src/java/org/apache/hive/service/cli/session/SessionManager.java: Loading...
  18. service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java: Loading...
  19. service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java: Loading...