Skip to content

Commit

Permalink
ARROW-17199: [Java][FlightRPC] Clean up example Flight RPC server
Browse files Browse the repository at this point in the history
  • Loading branch information
lidavidm committed Jul 26, 2022
1 parent a5a2837 commit b230b5b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 544 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.nio.channels.Channels;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
Expand Down Expand Up @@ -442,12 +441,8 @@ public PreparedStatement prepare(final String query, final CallOption... options
}

@Override
public void close() throws SQLException {
try {
AutoCloseables.close(client);
} catch (final Exception e) {
throw new SQLException(e);
}
public void close() throws Exception {
AutoCloseables.close(client);
}

/**
Expand Down Expand Up @@ -557,7 +552,7 @@ private Schema deserializeSchema(final ByteString bytes) {
* @param options RPC-layer hints for this call.
* @return a FlightInfo object representing the stream(s) to fetch.
*/
public FlightInfo execute(final CallOption... options) throws SQLException {
public FlightInfo execute(final CallOption... options) {
checkOpen();

final FlightDescriptor descriptor = FlightDescriptor
Expand Down
Loading

0 comments on commit b230b5b

Please sign in to comment.