aboutsummaryrefslogtreecommitdiff
path: root/bigtop-tests/smoke-tests/odpi-runtime/src/test/java/org/odpi/specs/runtime/hive/JdbcConnector.java
diff options
context:
space:
mode:
Diffstat (limited to 'bigtop-tests/smoke-tests/odpi-runtime/src/test/java/org/odpi/specs/runtime/hive/JdbcConnector.java')
-rw-r--r--bigtop-tests/smoke-tests/odpi-runtime/src/test/java/org/odpi/specs/runtime/hive/JdbcConnector.java78
1 files changed, 39 insertions, 39 deletions
diff --git a/bigtop-tests/smoke-tests/odpi-runtime/src/test/java/org/odpi/specs/runtime/hive/JdbcConnector.java b/bigtop-tests/smoke-tests/odpi-runtime/src/test/java/org/odpi/specs/runtime/hive/JdbcConnector.java
index 3b3ac51a..35b9a3a6 100644
--- a/bigtop-tests/smoke-tests/odpi-runtime/src/test/java/org/odpi/specs/runtime/hive/JdbcConnector.java
+++ b/bigtop-tests/smoke-tests/odpi-runtime/src/test/java/org/odpi/specs/runtime/hive/JdbcConnector.java
@@ -28,52 +28,52 @@ import java.sql.SQLException;
import java.util.Properties;
public class JdbcConnector {
- private static final Log LOG = LogFactory.getLog(JdbcConnector.class.getName());
+ private static final Log LOG = LogFactory.getLog(JdbcConnector.class.getName());
- protected static final String URL = "bigtop.test.hive.jdbc.url";
- protected static final String USER = "bigtop.test.hive.jdbc.user";
- protected static final String PASSWD = "bigtop.test.hive.jdbc.password";
- protected static final String LOCATION = "bigtop.test.hive.location";
- protected static final String METASTORE_URL = "bigtop.test.hive.metastore.url";
- protected static final String TEST_THRIFT = "bigtop.test.hive.thrift.test";
- protected static final String TEST_HCATALOG = "bigtop.test.hive.hcatalog.test";
- protected static final String HIVE_CONF_DIR = "bigtop.test.hive.conf.dir";
- protected static final String HADOOP_CONF_DIR = "bigtop.test.hadoop.conf.dir";
+ protected static final String URL = "bigtop.test.hive.jdbc.url";
+ protected static final String USER = "bigtop.test.hive.jdbc.user";
+ protected static final String PASSWD = "bigtop.test.hive.jdbc.password";
+ protected static final String LOCATION = "bigtop.test.hive.location";
+ protected static final String METASTORE_URL = "bigtop.test.hive.metastore.url";
+ protected static final String TEST_THRIFT = "bigtop.test.hive.thrift.test";
+ protected static final String TEST_HCATALOG = "bigtop.test.hive.hcatalog.test";
+ protected static final String HIVE_CONF_DIR = "bigtop.test.hive.conf.dir";
+ protected static final String HADOOP_CONF_DIR = "bigtop.test.hadoop.conf.dir";
- protected static Connection conn;
+ protected static Connection conn;
- @BeforeClass
- public static void connectToJdbc() throws SQLException {
- // Assume they've put the URL for the JDBC driver in an environment variable.
- String jdbcUrl = getProperty(URL, "the JDBC URL");
- String jdbcUser = getProperty(USER, "the JDBC user name");
- String jdbcPasswd = getProperty(PASSWD, "the JDBC password");
+ @BeforeClass
+ public static void connectToJdbc() throws SQLException {
+ // Assume they've put the URL for the JDBC driver in an environment variable.
+ String jdbcUrl = getProperty(URL, "the JDBC URL");
+ String jdbcUser = getProperty(USER, "the JDBC user name");
+ String jdbcPasswd = getProperty(PASSWD, "the JDBC password");
- Properties props = new Properties();
- props.put("user", jdbcUser);
- if (!jdbcPasswd.equals("")) props.put("password", jdbcPasswd);
- conn = DriverManager.getConnection(jdbcUrl, props);
- }
+ Properties props = new Properties();
+ props.put("user", jdbcUser);
+ if (!jdbcPasswd.equals("")) props.put("password", jdbcPasswd);
+ conn = DriverManager.getConnection(jdbcUrl, props);
+ }
- @AfterClass
- public static void closeJdbc() throws SQLException {
- if (conn != null) conn.close();
- }
+ @AfterClass
+ public static void closeJdbc() throws SQLException {
+ if (conn != null) conn.close();
+ }
- protected static String getProperty(String property, String description) {
- String val = System.getProperty(property);
- if (val == null) {
- throw new RuntimeException("You must set the property " + property + " with " +
- description);
+ protected static String getProperty(String property, String description) {
+ String val = System.getProperty(property);
+ if (val == null) {
+ throw new RuntimeException("You must set the property " + property + " with " +
+ description);
+ }
+ LOG.debug(description + " is " + val);
+ return val;
}
- LOG.debug(description + " is " + val);
- return val;
- }
- protected static boolean testActive(String property, String description) {
- String val = System.getProperty(property, "true");
- LOG.debug(description + " is " + val);
- return Boolean.valueOf(val);
- }
+ protected static boolean testActive(String property, String description) {
+ String val = System.getProperty(property, "true");
+ LOG.debug(description + " is " + val);
+ return Boolean.valueOf(val);
+ }
}