Skip to content

Commit 99709ac

Browse files
committed
Bump GraalVM Native Build Tools to 0.10.4
1 parent bb6b381 commit 99709ac

File tree

3 files changed

+64
-64
lines changed

3 files changed

+64
-64
lines changed

README.md

+1-59
Original file line numberDiff line numberDiff line change
@@ -34,65 +34,7 @@ The latest version is at https://central.sonatype.com/artifact/io.github.linghen
3434

3535
## Quick Start
3636

37-
Start a HiveServer2 instance through Docker Engine.
38-
39-
```bash
40-
docker run -d -p 10000:10000 -p 10002:10002 --env SERVICE_NAME=hiveserver2 apache/hive:4.0.1
41-
```
42-
43-
Use third-party builds of this project in any Maven project.
44-
45-
```xml
46-
<dependencies>
47-
<dependency>
48-
<groupId>io.github.linghengqian</groupId>
49-
<artifactId>hive-server2-jdbc-driver-thin</artifactId>
50-
<version>1.6.0</version>
51-
</dependency>
52-
<dependency>
53-
<groupId>com.zaxxer</groupId>
54-
<artifactId>HikariCP</artifactId>
55-
<version>4.0.3</version>
56-
</dependency>
57-
<dependency>
58-
<groupId>org.junit.jupiter</groupId>
59-
<artifactId>junit-jupiter</artifactId>
60-
<version>5.11.2</version>
61-
<scope>test</scope>
62-
</dependency>
63-
</dependencies>
64-
```
65-
66-
Simply enjoy the happiness that comes without dependency conflicts.
67-
68-
```java
69-
import com.zaxxer.hikari.HikariConfig;
70-
import com.zaxxer.hikari.HikariDataSource;
71-
import org.junit.jupiter.api.Test;
72-
import java.sql.Connection;
73-
import java.sql.SQLException;
74-
import java.sql.Statement;
75-
@SuppressWarnings("SqlNoDataSourceInspection")
76-
public class ExampleTest {
77-
@Test
78-
void test() throws SQLException {
79-
HikariConfig config = new HikariConfig();
80-
config.setJdbcUrl("jdbc:hive2://127.0.0.1:10000/");
81-
config.setDriverClassName("org.apache.hive.jdbc.HiveDriver");
82-
try (HikariDataSource dataSource = new HikariDataSource(config);
83-
Connection connection = dataSource.getConnection();
84-
Statement statement = connection.createStatement()) {
85-
statement.execute("CREATE DATABASE demo_ds_0");
86-
statement.executeQuery("show tables");
87-
statement.execute("create table hive_example(a string, b int) partitioned by(c int)");
88-
statement.execute("alter table hive_example add partition(c=1)");
89-
statement.execute("insert into hive_example partition(c=1) values('a', 1), ('a', 2),('b',3)");
90-
statement.executeQuery("select count(distinct a) from hive_example");
91-
statement.executeQuery("select sum(b) from hive_example");
92-
}
93-
}
94-
}
95-
```
37+
Refer to [QuickStart](./doc/QuickStart.md).
9638

9739
## Compatibility
9840

doc/QuickStart.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
## Quick Start
2+
3+
Start a HiveServer2 instance through Docker Engine.
4+
5+
```bash
6+
docker run -d -p 10000:10000 -p 10002:10002 --env SERVICE_NAME=hiveserver2 apache/hive:4.0.1
7+
```
8+
9+
Use third-party builds of this project in any Maven project.
10+
11+
```xml
12+
<dependencies>
13+
<dependency>
14+
<groupId>io.github.linghengqian</groupId>
15+
<artifactId>hive-server2-jdbc-driver-thin</artifactId>
16+
<version>1.6.0</version>
17+
</dependency>
18+
<dependency>
19+
<groupId>com.zaxxer</groupId>
20+
<artifactId>HikariCP</artifactId>
21+
<version>4.0.3</version>
22+
</dependency>
23+
<dependency>
24+
<groupId>org.junit.jupiter</groupId>
25+
<artifactId>junit-jupiter</artifactId>
26+
<version>5.11.2</version>
27+
<scope>test</scope>
28+
</dependency>
29+
</dependencies>
30+
```
31+
32+
Simply enjoy the happiness that comes without dependency conflicts.
33+
34+
```java
35+
import com.zaxxer.hikari.HikariConfig;
36+
import com.zaxxer.hikari.HikariDataSource;
37+
import org.junit.jupiter.api.Test;
38+
import java.sql.Connection;
39+
import java.sql.SQLException;
40+
import java.sql.Statement;
41+
@SuppressWarnings("SqlNoDataSourceInspection")
42+
public class ExampleTest {
43+
@Test
44+
void test() throws SQLException {
45+
HikariConfig config = new HikariConfig();
46+
config.setJdbcUrl("jdbc:hive2://127.0.0.1:10000/");
47+
config.setDriverClassName("org.apache.hive.jdbc.HiveDriver");
48+
try (HikariDataSource dataSource = new HikariDataSource(config);
49+
Connection connection = dataSource.getConnection();
50+
Statement statement = connection.createStatement()) {
51+
statement.execute("CREATE DATABASE demo_ds_0");
52+
statement.executeQuery("show tables");
53+
statement.execute("create table hive_example(a string, b int) partitioned by(c int)");
54+
statement.execute("alter table hive_example add partition(c=1)");
55+
statement.execute("insert into hive_example partition(c=1) values('a', 1), ('a', 2),('b',3)");
56+
statement.executeQuery("select count(distinct a) from hive_example");
57+
statement.executeQuery("select sum(b) from hive_example");
58+
}
59+
}
60+
}
61+
```

pom.xml

+2-5
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<maven-javadoc-plugin.version>3.10.1</maven-javadoc-plugin.version>
8585
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
8686
<central-publishing-maven-plugin.version>0.5.0</central-publishing-maven-plugin.version>
87-
<native-maven-plugin.version>0.10.3</native-maven-plugin.version>
87+
<native-maven-plugin.version>0.10.4</native-maven-plugin.version>
8888
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
8989
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
9090
<maven-surefire-plugin.version>3.5.0</maven-surefire-plugin.version>
@@ -163,7 +163,7 @@
163163
</dependency>
164164
<dependency>
165165
<groupId>org.slf4j</groupId>
166-
<artifactId>slf4j-simple</artifactId>
166+
<artifactId>slf4j-nop</artifactId>
167167
<version>${slf4j.version}</version>
168168
<scope>test</scope>
169169
<optional>true</optional>
@@ -266,9 +266,6 @@
266266
<extensions>true</extensions>
267267
<configuration>
268268
<quickBuild>true</quickBuild>
269-
<metadataRepository>
270-
<version>0.3.14</version>
271-
</metadataRepository>
272269
</configuration>
273270
<executions>
274271
<execution>

0 commit comments

Comments
 (0)