knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mkonone...@apache.org
Subject git commit: KNOX-344. Updated Knox Hive samples to be consistent with Hive 0.13.
Date Mon, 14 Apr 2014 10:20:45 GMT
Repository: knox
Updated Branches:
  refs/heads/master f8b408f20 -> aeaca87dd


KNOX-344. Updated Knox Hive samples to be consistent with Hive 0.13.


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

Branch: refs/heads/master
Commit: aeaca87dd15da1cab1d2b5a38018a1e6cad936f1
Parents: f8b408f
Author: mkononenko <mkononenko@hortonworks.com>
Authored: Mon Apr 14 03:16:42 2014 -0700
Committer: mkononenko <mkononenko@hortonworks.com>
Committed: Mon Apr 14 03:16:42 2014 -0700

----------------------------------------------------------------------
 .../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/aeaca87d/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/aeaca87d/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/aeaca87d/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/aeaca87d/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