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.