Skip to content

Commit e8965d7

Browse files
committed
Drill
1 parent ee867d8 commit e8965d7

File tree

3 files changed

+35
-10
lines changed

3 files changed

+35
-10
lines changed

drill/drill.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
execute on cluster
2+
```sh
3+
java -classpath drill-test-1.0.jar drill.DrillCollaboration
4+
```
5+
6+
```
7+
class not found: Failure in connecting to Drill: org.apache.drill.exec.rpc.NonTransientRpcException: javax.security.sasl.SaslException: Unknown mechanism: MAPRSASL
8+
# -Ddrill.customAuthFactories=org.apache.drill.exec.rpc.security.maprsasl.MapRSaslFactory
9+
```

drill/pom.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,22 @@
1212
<dependency>
1313
<groupId>org.apache.drill.exec</groupId>
1414
<artifactId>drill-jdbc-all</artifactId>
15-
<version>1.14.0</version>
15+
<version>1.16.0</version>
1616
</dependency>
1717
</dependencies>
1818

19+
<build>
20+
<plugins>
21+
<plugin>
22+
<groupId>org.apache.maven.plugins</groupId>
23+
<artifactId>maven-compiler-plugin</artifactId>
24+
<version>3.1</version>
25+
<configuration>
26+
<source>1.6</source>
27+
<target>1.6</target>
28+
</configuration>
29+
</plugin>
30+
</plugins>
31+
</build>
32+
1933
</project>

drill/src/DrillCollaboration.java renamed to drill/src/main/java/drill/DrillCollaboration.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package drill;
2+
13
import java.sql.*;
24
import java.lang.ClassNotFoundException;
35

@@ -7,14 +9,14 @@ public class DrillCollaboration {
79
// private static final String JDBC_DRIVER = "oadd.org.apache.calcite.avatica.remote.Driver";
810
private static final String JDBC_DRIVER = "org.apache.drill.jdbc.Driver";
911

10-
private static final String CONNECTION_URL = "jdbc:drill:drillbit=ubsdpdesp000103.vantagedp.org:31010;auth=MAPRSASL";
11-
// private static final String QUERY = "select sessionId, isReprocessable from dfs.`/mapr/dp.prod.zurich/vantage/data/store/v6/BM67/2020/*/*/part*.parquet`";
12+
// private static final String CONNECTION_URL = "jdbc:drill:drillbit=127.0.0.1:41010;auth=MAPRSASL";
13+
private static final String CONNECTION_URL = "jdbc:drill:drillbit=127.0.0.1:41010;auth=MAPRSASL";
1214
private static final String QUERY = "select * from sys.version";
1315

1416
private static Connection getConnection() throws ClassNotFoundException, SQLException {
15-
System.out.println("get class by name: "+JDBC_DRIVER);
17+
System.out.println(">>> get class by name: "+JDBC_DRIVER);
1618
Class.forName(JDBC_DRIVER);
17-
System.out.println("obtaining connection");
19+
System.out.println(">>> obtaining connection");
1820
return DriverManager.getConnection(CONNECTION_URL);
1921
}
2022

@@ -23,17 +25,17 @@ public static void main(String[] args) throws SQLException {
2325
try {
2426
connection = getConnection();
2527
} catch (ClassNotFoundException e) {
26-
System.err.println("class not found: "+e.getMessage());
28+
System.err.println("!!! class not found: "+e.getMessage());
2729
System.exit(1);
2830
} catch (SQLException e) {
29-
System.err.println("class not found: "+e.getMessage());
31+
System.err.println("!!! class not found: "+e.getMessage());
3032
System.exit(2);
3133
}
32-
System.out.println("connection established");
34+
System.out.println(">>> connection established");
3335
Statement statement = connection.createStatement();
34-
System.out.println("statement created");
36+
System.out.println(">>> statement created");
3537
ResultSet resultSet = statement.executeQuery(QUERY);
36-
System.out.println("attempt to retrieve results");
38+
System.out.println(">>> attempt to retrieve results");
3739
while (resultSet.next()) {
3840
System.out.println(resultSet.getString(1));
3941
}

0 commit comments

Comments
 (0)