Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-enterprise-base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-enterprise-base
Commits
ea4d9f9a
Commit
ea4d9f9a
authored
May 28, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
69c97004
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
pom.xml
gic-enterprise-download/pom.xml
+5
-0
HiveConnUtils.java
...d/src/main/java/com/gic/download/utils/HiveConnUtils.java
+31
-0
No files found.
gic-enterprise-download/pom.xml
View file @
ea4d9f9a
...
...
@@ -89,6 +89,11 @@
<artifactId>
gic-wechat-business-api
</artifactId>
<version>
${gic-wechat-business-api}
</version>
</dependency>
<dependency>
<groupId>
org.apache.hive
</groupId>
<artifactId>
hive-jdbc
</artifactId>
<version>
3.1.2
</version>
</dependency>
</dependencies>
<build>
...
...
gic-enterprise-download/src/main/java/com/gic/download/utils/HiveConnUtils.java
0 → 100644
View file @
ea4d9f9a
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
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment