KNOX-344. Updated Knox Hive samples to be consistent with Hive 0.13.
(cherry picked from commit aeaca87dd15da1cab1d2b5a38018a1e6cad936f1)
diff --git a/gateway-release/home/samples/hive/groovy/jdbc/sandbox-with-knox-inside/HiveJDBCSample.groovy b/gateway-release/home/samples/hive/groovy/jdbc/sandbox-with-knox-inside/HiveJDBCSample.groovy
index d7e4cc6..bf3984f 100644
--- a/gateway-release/home/samples/hive/groovy/jdbc/sandbox-with-knox-inside/HiveJDBCSample.groovy
+++ b/gateway-release/home/samples/hive/groovy/jdbc/sandbox-with-knox-inside/HiveJDBCSample.groovy
@@ -21,8 +21,10 @@
 password = user + "-password";
 gatewayHost = "localhost";
 gatewayPort = 8443;
+trustStore = "/usr/lib/knox/data/security/keystores/gateway.jks";
+trustStorePassword = "knoxsecret";
 contextPath = "gateway/sandbox-with-knox-inside/hive";
-connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.transport.mode=https;hive.server2.thrift.http.path=%s", gatewayHost, gatewayPort, contextPath );
+connectionString = String.format( "jdbc:hive2://%s:%d/;ssl=true;sslTrustStore=%s;trustStorePassword=%s?hive.server2.transport.mode=http;hive.server2.thrift.http.path=/%s", gatewayHost, gatewayPort, trustStore, trustStorePassword, contextPath );
 
 // Load Hive JDBC Driver
 Class.forName( "org.apache.hive.jdbc.HiveDriver" );
diff --git a/gateway-release/home/samples/hive/groovy/jdbc/sandbox/HiveJDBCSample.groovy b/gateway-release/home/samples/hive/groovy/jdbc/sandbox/HiveJDBCSample.groovy
index 6867a14..239fcf8 100644
--- a/gateway-release/home/samples/hive/groovy/jdbc/sandbox/HiveJDBCSample.groovy
+++ b/gateway-release/home/samples/hive/groovy/jdbc/sandbox/HiveJDBCSample.groovy
@@ -21,8 +21,10 @@
 password = user + "-password";
 gatewayHost = "localhost";
 gatewayPort = 8443;
+trustStore = "/usr/lib/knox/data/security/keystores/gateway.jks";
+trustStorePassword = "knoxsecret";
 contextPath = "gateway/sandbox/hive";
-connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.transport.mode=https;hive.server2.thrift.http.path=%s", gatewayHost, gatewayPort, contextPath );
+connectionString = String.format( "jdbc:hive2://%s:%d/;ssl=true;sslTrustStore=%s;trustStorePassword=%s?hive.server2.transport.mode=http;hive.server2.thrift.http.path=/%s", gatewayHost, gatewayPort, trustStore, trustStorePassword, contextPath );
 
 // Load Hive JDBC Driver
 Class.forName( "org.apache.hive.jdbc.HiveDriver" );
diff --git a/gateway-release/home/samples/hive/java/jdbc/sandbox-with-knox-inside/HiveJDBCSample.java b/gateway-release/home/samples/hive/java/jdbc/sandbox-with-knox-inside/HiveJDBCSample.java
index b012708..4b1f889 100644
--- a/gateway-release/home/samples/hive/java/jdbc/sandbox-with-knox-inside/HiveJDBCSample.java
+++ b/gateway-release/home/samples/hive/java/jdbc/sandbox-with-knox-inside/HiveJDBCSample.java
@@ -37,8 +37,10 @@
       String password = user + "-password";
       String gatewayHost = "localhost";
       int gatewayPort = 8443;
+      String trustStore = "/usr/lib/knox/data/security/keystores/gateway.jks";
+      String trustStorePassword = "knoxsecret";
       String contextPath = "gateway/sandbox-with-knox-inside/hive";
-      String connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.transport.mode=https;hive.server2.thrift.http.path=%s", gatewayHost, gatewayPort, contextPath );
+      String connectionString = String.format( "jdbc:hive2://%s:%d/;ssl=true;sslTrustStore=%s;trustStorePassword=%s?hive.server2.transport.mode=http;hive.server2.thrift.http.path=/%s", gatewayHost, gatewayPort, trustStore, trustStorePassword, contextPath );
 
       // Load Hive JDBC Driver
       Class.forName( "org.apache.hive.jdbc.HiveDriver" );
diff --git a/gateway-release/home/samples/hive/java/jdbc/sandbox/HiveJDBCSample.java b/gateway-release/home/samples/hive/java/jdbc/sandbox/HiveJDBCSample.java
index 4f4d4f0..00ec5ca 100644
--- a/gateway-release/home/samples/hive/java/jdbc/sandbox/HiveJDBCSample.java
+++ b/gateway-release/home/samples/hive/java/jdbc/sandbox/HiveJDBCSample.java
@@ -37,8 +37,10 @@
       String password = user + "-password";
       String gatewayHost = "localhost";
       int gatewayPort = 8443;
+      String trustStore = "/usr/lib/knox/data/security/keystores/gateway.jks";
+      String trustStorePassword = "knoxsecret";
       String contextPath = "gateway/sandbox/hive";
-      String connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.transport.mode=https;hive.server2.thrift.http.path=%s", gatewayHost, gatewayPort, contextPath );
+      String connectionString = String.format( "jdbc:hive2://%s:%d/;ssl=true;sslTrustStore=%s;trustStorePassword=%s?hive.server2.transport.mode=http;hive.server2.thrift.http.path=/%s", gatewayHost, gatewayPort, trustStore, trustStorePassword, contextPath );
 
       // Load Hive JDBC Driver
       Class.forName( "org.apache.hive.jdbc.HiveDriver" );