You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2bb12b2
Browse filesBrowse the repository at this point in the historyBrowse files
[chore](arrow-flight-sql) Add Arrow Flight Sql demo for Java (#45306)
### What problem does this PR solve?
# How to use:
1. mvn clean install -U
2. mvn package
3. java
--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
-cp java-0.1.jar doris.arrowflight.demo.Main "sql" "fe_ip"
"fe_arrow_flight_port" "fe_query_port"
# What can this demo do:
This is a java demo for doris arrow flight sql, you can use this to test
various connection
methods for sending queries to the doris arrow flight server, help you
understand how to use arrow flight sql
and test performance. You should install maven prior to run this demo.
# Performance test
Section 6.2 of #25514 is the
performance test results of the Doris Arrow Flight SQL using java.
# Output
```
WARNING: Unknown module: org.apache.arrow.memory.core specified to --add-opens
*************************************
| FlightAdbcDriver |
*************************************
FlightAdbcDriver > loadArrowBatch
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
> Schema<l_shipdate: Date(DAY) not null>
> 1994-08-17,
> batchCount: 25, rowCount: 100000
> cost: 1704 ms.
FlightAdbcDriver > loadArrowBatchToString
> Schema<l_shipdate: Date(DAY) not null>
> 1992-01-02,
> batchCount: 25, rowCount: 100000
> cost: 1692 ms.
*************************************
| FlightJdbcDriver |
*************************************
FlightJdbcDriver > loadArrowBatch
> Schema<l_shipdate: Date(DAY) not null>
> 1997-01-30,
> batchCount: 98, rowCount: 100000
> cost: 1840 ms.
FlightJdbcDriver > loadArrowBatchToString
> Schema<l_shipdate: Date(DAY) not null>
> 1992-01-02,
> batchCount: 98, rowCount: 100000
> cost: 1712 ms.
*************************************
| JdbcDriverManager |
*************************************
JdbcDriverManager > jdbc:mysql > loadJdbcResult
> rowCount: 100000, columnCount: 1
> cost: 11431 ms.
JdbcDriverManager > jdbc:mysql > loadJdbcResultToString
> 1992-01-02,
> rowCount: 100000, columnCount: 1 resultSize: 100000
> cost: 5164 ms.
JdbcDriverManager > jdbc:arrow-flight-sql > loadJdbcResultToString
> rowCount: 100000, columnCount: 1
> cost: 1736 ms.
JdbcDriverManager > jdbc:arrow-flight-sql > loadJdbcResultToString
> 1997-01-29,
> rowCount: 100000, columnCount: 1 resultSize: 100000
> cost: 2442 ms.
*************************************
| FlightSqlClient |
*************************************
FlightSqlClient > getFlightInfoFromDorisFe
> Schema<l_shipdate: Date(DAY) not null>
> 1994-08-15,
> batchCount: 25, rowCount: 100000
FlightSqlClient > constructDummyFlightInfo, don't be afraid! expected to get error `INVALID_ARGUMENT: Malformed ticket`
org.apache.arrow.flight.FlightRuntimeException: INVALID_ARGUMENT: Malformed ticket, size: 1
at org.apache.arrow.flight.CallStatus.toRuntimeException(CallStatus.java:121)
at org.apache.arrow.flight.grpc.StatusUtils.fromGrpcRuntimeException(StatusUtils.java:161)
at org.apache.arrow.flight.grpc.StatusUtils.fromThrowable(StatusUtils.java:182)
at org.apache.arrow.flight.FlightStream$Observer.onError(FlightStream.java:489)
at org.apache.arrow.flight.FlightClient$1.onError(FlightClient.java:371)
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481)
at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
at org.apache.arrow.flight.grpc.ClientInterceptorAdapter$FlightClientCallListener.onClose(ClientInterceptorAdapter.java:118)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:564)
at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:72)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:729)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:710)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:842)
Process finished with exit code 0
```
0 commit comments