Commit 300b5bf0 by 陶光胜

init

parent ea4d9f9a
...@@ -89,11 +89,6 @@ ...@@ -89,11 +89,6 @@
<artifactId>gic-wechat-business-api</artifactId> <artifactId>gic-wechat-business-api</artifactId>
<version>${gic-wechat-business-api}</version> <version>${gic-wechat-business-api}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>3.1.2</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
package com.gic.download.utils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.sql.Connection;
import java.sql.SQLException;
public class HiveConnUtils {
private static final Logger log = LogManager.getLogger(HiveConnUtils.class);
private static String driverName = "org.apache.hive.jdbc.HiveDriver";
private String hiveHost = "";
private String port = "";
private String user = "";
private String password = "";
private Connection connection;
public Connection getConnection(){
return connection;
}
public Connection getConnection(String hiveHost, String port){
try {
connection.isValid(1);
} catch (SQLException e) {
e.printStackTrace();
}
return connection;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment