knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject git commit: KNOX-344. Updated Knox Hive samples to be consistent with Hive 0.13. (cherry picked from commit aeaca87dd15da1cab1d2b5a38018a1e6cad936f1)
Date Mon, 14 Apr 2014 19:28:07 GMT
Repository: knox
Updated Branches:
  refs/heads/v0.4.0 d7ca88125 -> f11f3fedd


KNOX-344. Updated Knox Hive samples to be consistent with Hive 0.13.
(cherry picked from commit aeaca87dd15da1cab1d2b5a38018a1e6cad936f1)


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/f11f3fed
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/f11f3fed
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/f11f3fed

Branch: refs/heads/v0.4.0
Commit: f11f3feddec80a05f3f0538d83d729d719f96f5c
Parents: d7ca881
Author: mkononenko <mkononenko@hortonworks.com>
Authored: Mon Apr 14 03:16:42 2014 -0700
Committer: Kevin Minder <kevin.minder@hortonworks.com>
Committed: Mon Apr 14 15:28:04 2014 -0400

----------------------------------------------------------------------
 .../groovy/jdbc/sandbox-with-knox-inside/HiveJDBCSample.groovy   | 4 +++-
 .../home/samples/hive/groovy/jdbc/sandbox/HiveJDBCSample.groovy  | 4 +++-
 .../hive/java/jdbc/sandbox-with-knox-inside/HiveJDBCSample.java  | 4 +++-
 .../home/samples/hive/java/jdbc/sandbox/HiveJDBCSample.java      | 4 +++-
 4 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/f11f3fed/gateway-release/home/samples/hive/groovy/jdbc/sandbox-with-knox-inside/HiveJDBCSample.groovy
----------------------------------------------------------------------
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 @@ user = "guest";
 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" );

http://git-wip-us.apache.org/repos/asf/knox/blob/f11f3fed/gateway-release/home/samples/hive/groovy/jdbc/sandbox/HiveJDBCSample.groovy
----------------------------------------------------------------------
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 @@ user = "guest";
 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" );

http://git-wip-us.apache.org/repos/asf/knox/blob/f11f3fed/gateway-release/home/samples/hive/java/jdbc/sandbox-with-knox-inside/HiveJDBCSample.java
----------------------------------------------------------------------
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 @@ public class HiveJDBCSample {
       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" );

http://git-wip-us.apache.org/repos/asf/knox/blob/f11f3fed/gateway-release/home/samples/hive/java/jdbc/sandbox/HiveJDBCSample.java
----------------------------------------------------------------------
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 @@ public class HiveJDBCSample {
       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" );


Mime
View raw message