You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by lm...@apache.org on 2013/12/06 16:59:53 UTC
[3/3] git commit: KNOX-224: Update samples to match Hive config
KNOX-224: Update samples to match Hive config
Signed-off-by: Kevin Minder <ke...@hortonworks.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-knox/commit/ff0a9812
Tree: http://git-wip-us.apache.org/repos/asf/incubator-knox/tree/ff0a9812
Diff: http://git-wip-us.apache.org/repos/asf/incubator-knox/diff/ff0a9812
Branch: refs/heads/v0.3.1
Commit: ff0a9812f8496fe7c3ab040e3b9651fdf3c757e2
Parents: 43f0023
Author: Kevin Minder <ke...@hortonworks.com>
Authored: Tue Dec 3 21:00:54 2013 -0500
Committer: Larry McCay <lm...@hortonworks.com>
Committed: Fri Dec 6 10:53:46 2013 -0500
----------------------------------------------------------------------
gateway-release/home/deployments/sandbox.xml | 2 +-
.../HiveJDBCSample.groovy | 5 ++-
.../groovy/jdbc/sandbox/HiveJDBCSample.groovy | 5 ++-
.../HiveJDBCSample.java | 5 ++-
.../hive/java/jdbc/sandbox/HiveJDBCSample.java | 5 ++-
gateway-release/home/samples/hive/sample.log | 33 --------------------
.../home/samples/sandbox-with-knox-inside.xml | 2 +-
7 files changed, 18 insertions(+), 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/ff0a9812/gateway-release/home/deployments/sandbox.xml
----------------------------------------------------------------------
diff --git a/gateway-release/home/deployments/sandbox.xml b/gateway-release/home/deployments/sandbox.xml
index cf76dc7..a9e5719 100644
--- a/gateway-release/home/deployments/sandbox.xml
+++ b/gateway-release/home/deployments/sandbox.xml
@@ -117,7 +117,7 @@
<service>
<role>HIVE</role>
- <url>http://localhost:10000</url>
+ <url>http://localhost:10001/cliservice</url>
</service>
</topology>
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/ff0a9812/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 01f2af7..d7e4cc6 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
@@ -22,7 +22,7 @@ password = user + "-password";
gatewayHost = "localhost";
gatewayPort = 8443;
contextPath = "gateway/sandbox-with-knox-inside/hive";
-connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.servermode=https;hive.server2.http.path=%s", gatewayHost, gatewayPort, contextPath );
+connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.transport.mode=https;hive.server2.thrift.http.path=%s", gatewayHost, gatewayPort, contextPath );
// Load Hive JDBC Driver
Class.forName( "org.apache.hive.jdbc.HiveDriver" );
@@ -35,6 +35,9 @@ statement = connection.createStatement();
// Disable Hive authorization - This can be ommited if Hive authorization is configured properly
statement.execute( "set hive.security.authorization.enabled=false" );
+// Drop sample table to ensure repeatability
+statement.execute( "DROP TABLE logs" );
+
// Create sample table
statement.execute( "CREATE TABLE logs(column1 string, column2 string, column3 string, column4 string, column5 string, column6 string, column7 string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ' '" );
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/ff0a9812/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 09e58a6..6867a14 100644
--- a/gateway-release/home/samples/hive/groovy/jdbc/sandbox/HiveJDBCSample.groovy
+++ b/gateway-release/home/samples/hive/groovy/jdbc/sandbox/HiveJDBCSample.groovy
@@ -22,7 +22,7 @@ password = user + "-password";
gatewayHost = "localhost";
gatewayPort = 8443;
contextPath = "gateway/sandbox/hive";
-connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.servermode=https;hive.server2.http.path=%s", gatewayHost, gatewayPort, contextPath );
+connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.transport.mode=https;hive.server2.thrift.http.path=%s", gatewayHost, gatewayPort, contextPath );
// Load Hive JDBC Driver
Class.forName( "org.apache.hive.jdbc.HiveDriver" );
@@ -35,6 +35,9 @@ statement = connection.createStatement();
// Disable Hive authorization - This can be ommited if Hive authorization is configured properly
statement.execute( "set hive.security.authorization.enabled=false" );
+// Drop sample table to ensure repeatability
+statement.execute( "DROP TABLE logs" );
+
// Create sample table
statement.execute( "CREATE TABLE logs(column1 string, column2 string, column3 string, column4 string, column5 string, column6 string, column7 string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ' '" );
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/ff0a9812/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 3562952..b012708 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
@@ -38,7 +38,7 @@ public class HiveJDBCSample {
String gatewayHost = "localhost";
int gatewayPort = 8443;
String contextPath = "gateway/sandbox-with-knox-inside/hive";
- String connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.servermode=https;hive.server2.http.path=%s", gatewayHost, gatewayPort, contextPath );
+ String connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.transport.mode=https;hive.server2.thrift.http.path=%s", gatewayHost, gatewayPort, contextPath );
// Load Hive JDBC Driver
Class.forName( "org.apache.hive.jdbc.HiveDriver" );
@@ -51,6 +51,9 @@ public class HiveJDBCSample {
// Disable Hive authorization - This can be ommited if Hive authorization is configured properly
statement.execute( "set hive.security.authorization.enabled=false" );
+ // Drop sample table to ensure repeatability
+ statement.execute( "DROP TABLE logs" );
+
// Create sample table
statement.execute( "CREATE TABLE logs(column1 string, column2 string, column3 string, column4 string, column5 string, column6 string, column7 string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ' '" );
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/ff0a9812/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 d1eaacf..4f4d4f0 100644
--- a/gateway-release/home/samples/hive/java/jdbc/sandbox/HiveJDBCSample.java
+++ b/gateway-release/home/samples/hive/java/jdbc/sandbox/HiveJDBCSample.java
@@ -38,7 +38,7 @@ public class HiveJDBCSample {
String gatewayHost = "localhost";
int gatewayPort = 8443;
String contextPath = "gateway/sandbox/hive";
- String connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.servermode=https;hive.server2.http.path=%s", gatewayHost, gatewayPort, contextPath );
+ String connectionString = String.format( "jdbc:hive2://%s:%d/?hive.server2.transport.mode=https;hive.server2.thrift.http.path=%s", gatewayHost, gatewayPort, contextPath );
// Load Hive JDBC Driver
Class.forName( "org.apache.hive.jdbc.HiveDriver" );
@@ -51,6 +51,9 @@ public class HiveJDBCSample {
// Disable Hive authorization - This can be ommited if Hive authorization is configured properly
statement.execute( "set hive.security.authorization.enabled=false" );
+ // Drop sample table to ensure repeatability
+ statement.execute( "DROP TABLE logs" );
+
// Create sample table
statement.execute( "CREATE TABLE logs(column1 string, column2 string, column3 string, column4 string, column5 string, column6 string, column7 string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ' '" );
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/ff0a9812/gateway-release/home/samples/hive/sample.log
----------------------------------------------------------------------
diff --git a/gateway-release/home/samples/hive/sample.log b/gateway-release/home/samples/hive/sample.log
index 6f8dfa6..e0ed229 100644
--- a/gateway-release/home/samples/hive/sample.log
+++ b/gateway-release/home/samples/hive/sample.log
@@ -415,9 +415,6 @@
2012-02-03 19:11:02 SampleClass2 [DEBUG] detail for id 1316808512
2012-02-03 19:11:02 SampleClass4 [TRACE] verbose detail for id 1490179386
2012-02-03 19:11:02 SampleClass8 [TRACE] verbose detail for id 656914189
-
-java.lang.Exception: 2012-02-03 19:11:02 SampleClass8 [WARN] problem finding id 153454612
- at com.osa.mocklogger.MockLogger$2.run(MockLogger.java:83)
2012-02-03 19:11:02 SampleClass3 [TRACE] verbose detail for id 808347545
2012-02-03 19:11:02 SampleClass3 [DEBUG] detail for id 1743263073
2012-02-03 19:11:02 SampleClass3 [TRACE] verbose detail for id 456059562
@@ -549,9 +546,6 @@ java.lang.Exception: 2012-02-03 19:11:02 SampleClass8 [WARN] problem finding id
2012-02-03 19:25:27 SampleClass6 [DEBUG] detail for id 767926526
2012-02-03 19:25:27 SampleClass6 [TRACE] verbose detail for id 757931386
2012-02-03 19:25:27 SampleClass2 [TRACE] verbose detail for id 1969652299
-
-java.lang.Exception: 2012-02-03 19:25:27 SampleClass5 [WARN] problem finding id 1561591085
- at com.osa.mocklogger.MockLogger$2.run(MockLogger.java:83)
2012-02-03 19:25:27 SampleClass4 [DEBUG] detail for id 1370714809
2012-02-03 19:25:27 SampleClass3 [TRACE] verbose detail for id 146764301
2012-02-03 19:25:27 SampleClass9 [TRACE] verbose detail for id 396224371
@@ -685,9 +679,6 @@ java.lang.Exception: 2012-02-03 19:25:27 SampleClass5 [WARN] problem finding id
2012-02-03 19:40:18 SampleClass6 [DEBUG] detail for id 462310877
2012-02-03 19:40:18 SampleClass4 [TRACE] verbose detail for id 22383702
2012-02-03 19:40:18 SampleClass4 [INFO] everything normal for id 1240952849
-
-java.lang.Exception: 2012-02-03 19:40:18 SampleClass4 [WARN] problem finding id 284365737
- at com.osa.mocklogger.MockLogger$2.run(MockLogger.java:83)
2012-02-03 19:40:18 SampleClass7 [TRACE] verbose detail for id 1143887438
2012-02-03 19:40:18 SampleClass5 [DEBUG] detail for id 885814855
2012-02-03 19:40:18 SampleClass7 [TRACE] verbose detail for id 1720029611
@@ -816,9 +807,6 @@ java.lang.Exception: 2012-02-03 19:40:18 SampleClass4 [WARN] problem finding id
2012-02-03 19:40:18 SampleClass8 [DEBUG] detail for id 902357136
2012-02-03 19:40:18 SampleClass2 [TRACE] verbose detail for id 1407415757
2012-02-03 19:40:18 SampleClass1 [TRACE] verbose detail for id 809518849
-
-java.lang.Exception: 2012-02-03 19:40:18 SampleClass1 [ERROR] incorrect format for id 671681594
- at com.osa.mocklogger.MockLogger$2.run(MockLogger.java:83)
2012-02-03 19:45:42 SampleClass3 [TRACE] verbose detail for id 1163649393
2012-02-03 19:45:42 SampleClass0 [DEBUG] detail for id 1916094275
2012-02-03 19:45:42 SampleClass7 [TRACE] verbose detail for id 1422292027
@@ -828,9 +816,6 @@ java.lang.Exception: 2012-02-03 19:40:18 SampleClass1 [ERROR] incorrect format f
2012-02-03 19:45:42 SampleClass3 [TRACE] verbose detail for id 2062200882
2012-02-03 19:45:42 SampleClass6 [DEBUG] detail for id 274122451
2012-02-03 19:45:42 SampleClass6 [TRACE] verbose detail for id 2099378088
-
-java.lang.Exception: 2012-02-03 19:45:42 SampleClass5 [WARN] problem finding id 331889446
- at com.osa.mocklogger.MockLogger$2.run(MockLogger.java:83)
2012-02-03 19:45:42 SampleClass0 [TRACE] verbose detail for id 829936736
2012-02-03 19:45:42 SampleClass5 [DEBUG] detail for id 1927676975
2012-02-03 19:45:42 SampleClass2 [TRACE] verbose detail for id 1426042291
@@ -965,9 +950,6 @@ java.lang.Exception: 2012-02-03 19:45:42 SampleClass5 [WARN] problem finding id
2012-02-03 19:58:39 SampleClass9 [TRACE] verbose detail for id 244973914
2012-02-03 19:58:39 SampleClass7 [DEBUG] detail for id 323346598
2012-02-03 19:58:39 SampleClass1 [TRACE] verbose detail for id 909949768
-
-java.lang.Exception: 2012-02-03 19:58:39 SampleClass6 [WARN] problem finding id 11195483
- at com.osa.mocklogger.MockLogger$2.run(MockLogger.java:83)
2012-02-03 19:58:39 SampleClass6 [TRACE] verbose detail for id 1751038346
2012-02-03 19:58:39 SampleClass7 [DEBUG] detail for id 325981226
2012-02-03 19:58:39 SampleClass4 [TRACE] verbose detail for id 1223624068
@@ -1092,9 +1074,6 @@ java.lang.Exception: 2012-02-03 19:58:39 SampleClass6 [WARN] problem finding id
2012-02-03 19:58:39 SampleClass4 [TRACE] verbose detail for id 467524089
2012-02-03 19:58:39 SampleClass5 [DEBUG] detail for id 247453597
2012-02-03 19:58:39 SampleClass1 [TRACE] verbose detail for id 1167014738
-
-java.lang.Exception: 2012-02-03 19:58:39 SampleClass4 [ERROR] incorrect format for id 1919705250
- at com.osa.mocklogger.MockLogger$2.run(MockLogger.java:83)
2012-02-03 20:04:31 SampleClass0 [TRACE] verbose detail for id 756700622
2012-02-03 20:04:31 SampleClass9 [DEBUG] detail for id 1128270038
2012-02-03 20:04:31 SampleClass3 [TRACE] verbose detail for id 340223419
@@ -1235,9 +1214,6 @@ java.lang.Exception: 2012-02-03 19:58:39 SampleClass4 [ERROR] incorrect format f
2012-02-03 20:11:35 SampleClass0 [TRACE] verbose detail for id 169628726
2012-02-03 20:11:35 SampleClass3 [TRACE] verbose detail for id 1482645041
2012-02-03 20:11:35 SampleClass5 [DEBUG] detail for id 1479657717
-
-java.lang.Exception: 2012-02-03 20:11:35 SampleClass5 [WARN] problem finding id 404455085
- at com.osa.mocklogger.MockLogger$2.run(MockLogger.java:83)
2012-02-03 20:11:35 SampleClass2 [TRACE] verbose detail for id 2011178381
2012-02-03 20:11:35 SampleClass3 [TRACE] verbose detail for id 31210465
2012-02-03 20:11:35 SampleClass4 [DEBUG] detail for id 151245400
@@ -1356,17 +1332,11 @@ java.lang.Exception: 2012-02-03 20:11:35 SampleClass5 [WARN] problem finding id
2012-02-03 20:11:35 SampleClass2 [TRACE] verbose detail for id 435836472
2012-02-03 20:11:35 SampleClass0 [DEBUG] detail for id 882011440
2012-02-03 20:11:35 SampleClass9 [TRACE] verbose detail for id 66797536
-
-java.lang.Exception: 2012-02-03 20:11:35 SampleClass2 [FATAL] unrecoverable system problem at id 609774657
- at com.osa.mocklogger.MockLogger$2.run(MockLogger.java:83)
2012-02-03 20:11:35 SampleClass8 [TRACE] verbose detail for id 459410856
2012-02-03 20:11:35 SampleClass6 [DEBUG] detail for id 1725042623
2012-02-03 20:11:35 SampleClass2 [TRACE] verbose detail for id 1542500603
2012-02-03 20:11:35 SampleClass2 [TRACE] verbose detail for id 286873790
2012-02-03 20:11:35 SampleClass1 [DEBUG] detail for id 558353201
-
-java.lang.Exception: 2012-02-03 20:11:35 SampleClass1 [ERROR] incorrect format for id 1088486137
- at com.osa.mocklogger.MockLogger$2.run(MockLogger.java:83)
2012-02-03 20:11:35 SampleClass4 [TRACE] verbose detail for id 1373703376
2012-02-03 20:11:35 SampleClass3 [INFO] everything normal for id 657773974
2012-02-03 20:11:56 SampleClass9 [TRACE] verbose detail for id 1286934830
@@ -1376,9 +1346,6 @@ java.lang.Exception: 2012-02-03 20:11:35 SampleClass1 [ERROR] incorrect format f
2012-02-03 20:11:56 SampleClass0 [DEBUG] detail for id 12693466
2012-02-03 20:11:56 SampleClass4 [TRACE] verbose detail for id 1877671288
2012-02-03 20:11:56 SampleClass5 [TRACE] verbose detail for id 1618799332
-
-java.lang.Exception: 2012-02-03 20:11:56 SampleClass5 [WARN] problem finding id 1358451042
- at com.osa.mocklogger.MockLogger$2.run(MockLogger.java:83)
2012-02-03 20:11:56 SampleClass5 [DEBUG] detail for id 1976092771
2012-02-03 20:11:56 SampleClass5 [TRACE] verbose detail for id 1317358561
2012-02-03 20:11:56 SampleClass5 [TRACE] verbose detail for id 1737534798
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/ff0a9812/gateway-release/home/samples/sandbox-with-knox-inside.xml
----------------------------------------------------------------------
diff --git a/gateway-release/home/samples/sandbox-with-knox-inside.xml b/gateway-release/home/samples/sandbox-with-knox-inside.xml
index 8af26bf..515b482 100644
--- a/gateway-release/home/samples/sandbox-with-knox-inside.xml
+++ b/gateway-release/home/samples/sandbox-with-knox-inside.xml
@@ -82,7 +82,7 @@
</service>
<service>
<role>HIVE</role>
- <url>http://sandbox:10000</url>
+ <url>http://sandbox:10001/cliservice</url>
</service>
</topology>