Hive
  1. Hive
  2. HIVE-4406

Missing "/" or "/<dbname>" in hs2 jdbc uri switches mode to embedded mode

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.12.0
    • Component/s: HiveServer2
    • Labels:
      None
    • Release Note:
      patch available for review

      Description

      When the jdbc uri does not have a / or "/default" after the hostname:port, and the principal is specified, it ends up launching HS2 in embedded mode.

      This is because the parsing of uri in such case does not end up extracting the hostname.

      eg . "jdbc:hive2://<host>:<port>;principal=<>." results HS2 embedded mode getting used.
      "jdbc:hive2://<host>:<port>/;principal=<>" or "jdbc:hive2://<host>:<port>/default;principal=<>" results in it connecting to the standalone hive server 2.

      1. hive-4406.patch
        2 kB
        Anandha L Ranganathan

        Issue Links

          Activity

          Ashutosh Chauhan made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Thejas M Nair made changes -
          Link This issue is related to HIVE-4802 [ HIVE-4802 ]
          Ashutosh Chauhan made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 0.12.0 [ 12324312 ]
          Resolution Fixed [ 1 ]
          Anandha L Ranganathan made changes -
          Attachment hive-4406.patch [ 12582589 ]
          Anandha L Ranganathan made changes -
          Attachment hive_4406.patch [ 12580919 ]
          Anandha L Ranganathan made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Release Note patch available for review
          Anandha L Ranganathan made changes -
          Attachment hive_4406.patch [ 12580919 ]
          Thejas M Nair made changes -
          Description When the jdbc uri does not have a / or "/default" after the hostname:port, it ends up launching HS2 in embedded mode.

          This is because the parsing of uri in such case does not end up extracting the hostname.

          eg . "jdbc:hive2://&lt;host&gt;:&lt;port>" results HS2 embedded mode getting used.
          "jdbc:hive2://&lt;host&gt;:&lt;port&gt;/" or "jdbc:hive2://&lt;host&gt;:&lt;port&gt;/default" results in it connecting to the standalone hive server 2.



          When the jdbc uri does not have a / or "/default" after the hostname:port, and the principal is specified, it ends up launching HS2 in embedded mode.

          This is because the parsing of uri in such case does not end up extracting the hostname.

          eg . "jdbc:hive2://&lt;host&gt;:&lt;port&gt;;principal=&lt;>." results HS2 embedded mode getting used.
          "jdbc:hive2://&lt;host&gt;:&lt;port&gt;/;principal=&lt;>" or "jdbc:hive2://&lt;host&gt;:&lt;port&gt;/default;principal=&lt;>" results in it connecting to the standalone hive server 2.



          Carl Steinbach made changes -
          Field Original Value New Value
          Assignee Anandha L Ranganathan [ analog.sony ]
          Thejas M Nair created issue -

            People

            • Assignee:
              Anandha L Ranganathan
              Reporter:
              Thejas M Nair
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development