/** * * @param statement * @param signature * @throws SQLException */ DrillCursor(DrillConnectionImpl connection, AvaticaStatement statement, Signature signature) throws SQLException { this.connection = connection; this.statement = statement; this.signature = signature; DrillClient client = connection.getClient(); final int batchQueueThrottlingThreshold = client.getConfig().getInt( ExecConstants.JDBC_BATCH_QUEUE_THROTTLING_THRESHOLD ); resultsListener = new ResultsListener(this, batchQueueThrottlingThreshold); currentBatchHolder = new RecordBatchLoader(client.getAllocator()); setTimeout(this.statement.getQueryTimeout()); }
for (String query : queries) { AwaitableUserResultsListener listener = new AwaitableUserResultsListener(new LoggingResultsListener(client.getConfig(), outputFormat, width)); watch.start(); client.runQuery(queryType, query, listener);
/** * * @param statement * @param signature * @throws SQLException */ DrillCursor(DrillConnectionImpl connection, AvaticaStatement statement, Signature signature) throws SQLException { this.connection = connection; this.statement = statement; this.signature = signature; DrillClient client = connection.getClient(); final int batchQueueThrottlingThreshold = client.getConfig().getInt( ExecConstants.JDBC_BATCH_QUEUE_THROTTLING_THRESHOLD ); resultsListener = new ResultsListener(this, batchQueueThrottlingThreshold); currentBatchHolder = new RecordBatchLoader(client.getAllocator()); setTimeout(this.statement.getQueryTimeout()); }