Hive
  1. Hive
  2. HIVE-3797

Add option for hive server to initialize and add resources registered to it to clients

    Details

    • Type: Improvement Improvement
    • Status: Patch Available
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Server Infrastructure
    • Labels:
      None

      Description

      CliDriver has -i option for initializing the session. HiveServer also should have one and make resources usable for clients if needed.

      hive --service hiveserver -i init.q -u

      -i for init script
      -u for publishing resources(file,jar,etc.) to clients

      1. HIVE-3797.D7353.1.patch
        8 kB
        Phabricator
      2. HIVE-3797.D7353.2.patch
        9 kB
        Phabricator
      3. HIVE-3797.D7353.3.patch
        9 kB
        Phabricator
      4. HIVE-3797.D7353.4.patch
        9 kB
        Phabricator

        Activity

        Hide
        Phabricator added a comment -

        navis updated the revision "HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients".
        Reviewers: JIRA

        Fix typo

        REVISION DETAIL
        https://reviews.facebook.net/D7353

        AFFECTED FILES
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java

        To: JIRA, navis
        Cc: zhenxiao

        Show
        Phabricator added a comment - navis updated the revision " HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients". Reviewers: JIRA Fix typo REVISION DETAIL https://reviews.facebook.net/D7353 AFFECTED FILES service/src/java/org/apache/hadoop/hive/service/HiveServer.java To: JIRA, navis Cc: zhenxiao
        Hide
        Phabricator added a comment -

        zhenxiao has commented on the revision "HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients".

        Non-committer +1.

        REVISION DETAIL
        https://reviews.facebook.net/D7353

        To: JIRA, navis
        Cc: zhenxiao

        Show
        Phabricator added a comment - zhenxiao has commented on the revision " HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients". Non-committer +1. REVISION DETAIL https://reviews.facebook.net/D7353 To: JIRA, navis Cc: zhenxiao
        Hide
        Zhenxiao Luo added a comment -

        The patch looks good to me.
        Non-committer +1.

        Show
        Zhenxiao Luo added a comment - The patch looks good to me. Non-committer +1.
        Hide
        Phabricator added a comment -

        navis updated the revision "HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients".
        Reviewers: JIRA

        missed some comments

        REVISION DETAIL
        https://reviews.facebook.net/D7353

        AFFECTED FILES
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java

        To: JIRA, navis
        Cc: zhenxiao

        Show
        Phabricator added a comment - navis updated the revision " HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients". Reviewers: JIRA missed some comments REVISION DETAIL https://reviews.facebook.net/D7353 AFFECTED FILES service/src/java/org/apache/hadoop/hive/service/HiveServer.java To: JIRA, navis Cc: zhenxiao
        Hide
        Phabricator added a comment -

        navis has commented on the revision "HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients".

        INLINE COMMENTS
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:147 It's only called once for initialization. I don't know it's worthy.
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:607 it's false for default (member variable). set to false.
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:626 ok.
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:822 changed to IllegalArgumentException.
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:826 ok with any exception. it's just for exiting with failure message.
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:765 ok.
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:785 ok.

        REVISION DETAIL
        https://reviews.facebook.net/D7353

        To: JIRA, navis
        Cc: zhenxiao

        Show
        Phabricator added a comment - navis has commented on the revision " HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients". INLINE COMMENTS service/src/java/org/apache/hadoop/hive/service/HiveServer.java:147 It's only called once for initialization. I don't know it's worthy. service/src/java/org/apache/hadoop/hive/service/HiveServer.java:607 it's false for default (member variable). set to false. service/src/java/org/apache/hadoop/hive/service/HiveServer.java:626 ok. service/src/java/org/apache/hadoop/hive/service/HiveServer.java:822 changed to IllegalArgumentException. service/src/java/org/apache/hadoop/hive/service/HiveServer.java:826 ok with any exception. it's just for exiting with failure message. service/src/java/org/apache/hadoop/hive/service/HiveServer.java:765 ok. service/src/java/org/apache/hadoop/hive/service/HiveServer.java:785 ok. REVISION DETAIL https://reviews.facebook.net/D7353 To: JIRA, navis Cc: zhenxiao
        Hide
        Phabricator added a comment -

        navis updated the revision "HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients".
        Reviewers: JIRA

        Addressed comments

        REVISION DETAIL
        https://reviews.facebook.net/D7353

        AFFECTED FILES
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java

        To: JIRA, navis
        Cc: zhenxiao

        Show
        Phabricator added a comment - navis updated the revision " HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients". Reviewers: JIRA Addressed comments REVISION DETAIL https://reviews.facebook.net/D7353 AFFECTED FILES service/src/java/org/apache/hadoop/hive/service/HiveServer.java To: JIRA, navis Cc: zhenxiao
        Hide
        Phabricator added a comment -

        zhenxiao has commented on the revision "HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients".

        How about create a sample initialization script, and have an example testcase running it?
        Also, is it possible to create a testcase to show that HiveServer's resource could be usable for clients(this testcase maybe not easy to do)?

        INLINE COMMENTS
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:765 Some comments here? eg. Load Hive Server SQL initialization scripts

        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:785 Some comments for this function?
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:800 Some general comments about init script line processing?
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:822 Is it IllegalStateException, or IllegalArgumentException?
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:826 same as above. What type of exception should we throw?
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:607 useServerResources initialized to be false.
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:695 useServerResources is not initialized. It should be initialized to be false.
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:626 Could it be better if "Hive Server Initialization Script File"?
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java:147 Is it better to have a different function name to create temporary hive server handler?
        using a private Constructor seems a little misleading. How about just call it createTemporaryHandler()?

        REVISION DETAIL
        https://reviews.facebook.net/D7353

        To: JIRA, navis
        Cc: zhenxiao

        Show
        Phabricator added a comment - zhenxiao has commented on the revision " HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients". How about create a sample initialization script, and have an example testcase running it? Also, is it possible to create a testcase to show that HiveServer's resource could be usable for clients(this testcase maybe not easy to do)? INLINE COMMENTS service/src/java/org/apache/hadoop/hive/service/HiveServer.java:765 Some comments here? eg. Load Hive Server SQL initialization scripts service/src/java/org/apache/hadoop/hive/service/HiveServer.java:785 Some comments for this function? service/src/java/org/apache/hadoop/hive/service/HiveServer.java:800 Some general comments about init script line processing? service/src/java/org/apache/hadoop/hive/service/HiveServer.java:822 Is it IllegalStateException, or IllegalArgumentException? service/src/java/org/apache/hadoop/hive/service/HiveServer.java:826 same as above. What type of exception should we throw? service/src/java/org/apache/hadoop/hive/service/HiveServer.java:607 useServerResources initialized to be false. service/src/java/org/apache/hadoop/hive/service/HiveServer.java:695 useServerResources is not initialized. It should be initialized to be false. service/src/java/org/apache/hadoop/hive/service/HiveServer.java:626 Could it be better if "Hive Server Initialization Script File"? service/src/java/org/apache/hadoop/hive/service/HiveServer.java:147 Is it better to have a different function name to create temporary hive server handler? using a private Constructor seems a little misleading. How about just call it createTemporaryHandler()? REVISION DETAIL https://reviews.facebook.net/D7353 To: JIRA, navis Cc: zhenxiao
        Hide
        Zhenxiao Luo added a comment -

        Comments at Phabricator

        Show
        Zhenxiao Luo added a comment - Comments at Phabricator
        Hide
        Phabricator added a comment -

        navis requested code review of "HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients".
        Reviewers: JIRA

        DPAL-1944 Add option for hive server to initialize and add resources registered to it to clients

        CliDriver has -i option for initializing the session. HiveServer also should have one and make resources usable for clients if needed.

        hive --service hiveserver -i init.q -u

        -i for init script
        -u for publishing resources(file,jar,etc.) to clients

        TEST PLAN
        EMPTY

        REVISION DETAIL
        https://reviews.facebook.net/D7353

        AFFECTED FILES
        service/src/java/org/apache/hadoop/hive/service/HiveServer.java

        MANAGE HERALD DIFFERENTIAL RULES
        https://reviews.facebook.net/herald/view/differential/

        WHY DID I GET THIS EMAIL?
        https://reviews.facebook.net/herald/transcript/17583/

        To: JIRA, navis

        Show
        Phabricator added a comment - navis requested code review of " HIVE-3797 [jira] Add option for hive server to initialize and add resources registered to it to clients". Reviewers: JIRA DPAL-1944 Add option for hive server to initialize and add resources registered to it to clients CliDriver has -i option for initializing the session. HiveServer also should have one and make resources usable for clients if needed. hive --service hiveserver -i init.q -u -i for init script -u for publishing resources(file,jar,etc.) to clients TEST PLAN EMPTY REVISION DETAIL https://reviews.facebook.net/D7353 AFFECTED FILES service/src/java/org/apache/hadoop/hive/service/HiveServer.java MANAGE HERALD DIFFERENTIAL RULES https://reviews.facebook.net/herald/view/differential/ WHY DID I GET THIS EMAIL? https://reviews.facebook.net/herald/transcript/17583/ To: JIRA, navis

          People

          • Assignee:
            Navis
            Reporter:
            Navis
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development