sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sra...@apache.org
Subject [1/2] SENTRY-153: Add Hive e2e test with grant/revoke statements (Prasad Mujumdar via Sravya Tirukkovalur)
Date Tue, 03 Jun 2014 19:44:03 GMT
Repository: incubator-sentry
Updated Branches:
  refs/heads/master ac70d73c6 -> 600f0f15e


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/600f0f15/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/hiveserver/AbstractHiveServer.java
----------------------------------------------------------------------
diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/hiveserver/AbstractHiveServer.java
b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/hiveserver/AbstractHiveServer.java
index ed95d48..dda7dba 100644
--- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/hiveserver/AbstractHiveServer.java
+++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/hiveserver/AbstractHiveServer.java
@@ -16,17 +16,18 @@
  */
 package org.apache.sentry.tests.e2e.hive.hiveserver;
 
-import com.google.common.base.Strings;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.concurrent.TimeoutException;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.util.concurrent.TimeoutException;
+import com.google.common.base.Strings;
 
 public abstract class AbstractHiveServer implements HiveServer {
   private static final Logger LOGGER = LoggerFactory.getLogger(InternalHiveServer.class);
@@ -58,7 +59,7 @@ public abstract class AbstractHiveServer implements HiveServer {
 
   public Connection createConnection(String user, String password) throws Exception{
     String url = getURL();
-    DriverManager.setLoginTimeout(30);
+    DriverManager.setLoginTimeout(0);
     Connection connection =  DriverManager.getConnection(url, user, password);
     return connection;
   }

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/600f0f15/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/hiveserver/HiveServerFactory.java
----------------------------------------------------------------------
diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/hiveserver/HiveServerFactory.java
b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/hiveserver/HiveServerFactory.java
index 8437845..19ff6cf 100644
--- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/hiveserver/HiveServerFactory.java
+++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/hiveserver/HiveServerFactory.java
@@ -16,8 +16,14 @@
  */
 package org.apache.sentry.tests.e2e.hive.hiveserver;
 
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.io.Resources;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.ServerSocket;
+import java.net.URL;
+import java.util.Map;
+
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.hdfs.DistributedFileSystem;
 import org.apache.hadoop.hive.conf.HiveConf;
@@ -29,13 +35,8 @@ import org.junit.Assert;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.ServerSocket;
-import java.net.URL;
-import java.util.Map;
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.io.Resources;
 
 public class HiveServerFactory {
   private static final Logger LOGGER = LoggerFactory
@@ -128,6 +129,7 @@ public class HiveServerFactory {
     if(!properties.containsKey(HADOOPBIN)) {
       properties.put(HADOOPBIN, "./target/hadoop/bin/hadoop");
     }
+    properties.put(ConfVars.HIVESTATSAUTOGATHER.varname, "false");
     String hadoopBinPath = properties.get(HADOOPBIN);
     Assert.assertNotNull(hadoopBinPath, "Hadoop Bin");
     File hadoopBin = new File(hadoopBinPath);


Mime
View raw message