This is an automated email from the ASF dual-hosted git repository.
xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 70a1335460 Remove deprecated Request class from pinot-java-client
(#11614)
70a1335460 is described below
commit 70a13354609af420f1c3c2f8e9bb6b00bb50c0c6
Author: lucifer4j <[email protected]>
AuthorDate: Tue Sep 19 05:17:46 2023 +0530
Remove deprecated Request class from pinot-java-client (#11614)
also delete related methods.
partially fix: #11582
---
.../java/org/apache/pinot/client/Connection.java | 49 ---------------------
.../client/JsonAsyncHttpPinotClientTransport.java | 16 -------
.../apache/pinot/client/PinotClientTransport.java | 8 ----
.../org/apache/pinot/client/PreparedStatement.java | 5 ---
.../main/java/org/apache/pinot/client/Request.java | 50 ----------------------
.../apache/pinot/client/PreparedStatementTest.java | 12 ------
.../apache/pinot/client/ResultSetGroupTest.java | 12 ------
.../pinot/client/DummyPinotClientTransport.java | 14 ------
.../apache/pinot/client/PinotResultSetTest.java | 12 ------
9 files changed, 178 deletions(-)
diff --git
a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/Connection.java
b/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/Connection.java
index 0c11b36655..99c2121e96 100644
---
a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/Connection.java
+++
b/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/Connection.java
@@ -72,17 +72,6 @@ public class Connection {
return new PreparedStatement(this, query);
}
- /**
- * Creates a prepared statement, to escape query parameters.
- *
- * @param request The request for which to create a prepared statement.
- * @return A prepared statement for this connection.
- */
- @Deprecated
- public PreparedStatement prepareStatement(Request request) {
- return new PreparedStatement(this, request);
- }
-
/**
* Executes a query.
*
@@ -94,18 +83,6 @@ public class Connection {
return execute(null, query);
}
- /**
- * Executes a Pinot Request.
- * @param request The request to execute
- * @return The result of the query
- * @throws PinotClientException If an exception occurs while processing the
query
- */
- @Deprecated
- public ResultSetGroup execute(Request request)
- throws PinotClientException {
- return execute(null, request);
- }
-
/**
* Executes a query.
*
@@ -128,19 +105,6 @@ public class Connection {
return new ResultSetGroup(response);
}
- /**
- * Executes a Pinot Request.
- *
- * @param request The request to execute
- * @return The result of the query
- * @throws PinotClientException If an exception occurs while processing the
query
- */
- @Deprecated
- public ResultSetGroup execute(@Nullable String tableName, Request request)
- throws PinotClientException {
- return execute(tableName, request.getQuery());
- }
-
/**
* Executes a query asynchronously.
*
@@ -153,19 +117,6 @@ public class Connection {
return executeAsync(null, query);
}
- /**
- * Executes a Pinot Request asynchronously.
- *
- * @param request The request to execute
- * @return A future containing the result of the query
- * @throws PinotClientException If an exception occurs while processing the
query
- */
- @Deprecated
- public CompletableFuture<ResultSetGroup> executeAsync(Request request)
- throws PinotClientException {
- return executeAsync(null, request.getQuery());
- }
-
/**
* Executes a query asynchronously.
*
diff --git
a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/JsonAsyncHttpPinotClientTransport.java
b/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/JsonAsyncHttpPinotClientTransport.java
index e60d6ca023..8e888ff915 100644
---
a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/JsonAsyncHttpPinotClientTransport.java
+++
b/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/JsonAsyncHttpPinotClientTransport.java
@@ -136,22 +136,6 @@ public class JsonAsyncHttpPinotClientTransport implements
PinotClientTransport<C
}
}
- @Override
- public BrokerResponse executeQuery(String brokerAddress, Request request)
- throws PinotClientException {
- try {
- return executeQueryAsync(brokerAddress, request).get(_brokerReadTimeout,
TimeUnit.MILLISECONDS);
- } catch (Exception e) {
- throw new PinotClientException(e);
- }
- }
-
- @Override
- public CompletableFuture<BrokerResponse> executeQueryAsync(String
brokerAddress, Request request)
- throws PinotClientException {
- return executeQueryAsync(brokerAddress, request.getQuery());
- }
-
@Override
public void close()
throws PinotClientException {
diff --git
a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/PinotClientTransport.java
b/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/PinotClientTransport.java
index 9e4d2a6656..8d9b1dee41 100644
---
a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/PinotClientTransport.java
+++
b/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/PinotClientTransport.java
@@ -32,14 +32,6 @@ public interface PinotClientTransport<METRICS> {
CompletableFuture<BrokerResponse> executeQueryAsync(String brokerAddress,
String query)
throws PinotClientException;
- @Deprecated
- BrokerResponse executeQuery(String brokerAddress, Request request)
- throws PinotClientException;
-
- @Deprecated
- CompletableFuture<BrokerResponse> executeQueryAsync(String brokerAddress,
Request request)
- throws PinotClientException;
-
void close()
throws PinotClientException;
diff --git
a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/PreparedStatement.java
b/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/PreparedStatement.java
index 600627f5fc..6d1a43b9e6 100644
---
a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/PreparedStatement.java
+++
b/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/PreparedStatement.java
@@ -35,11 +35,6 @@ public class PreparedStatement {
_parameters = new String[getQuestionMarkCount(query)];
}
- @Deprecated
- PreparedStatement(Connection connection, Request request) {
- this(connection, request.getQuery());
- }
-
private int getQuestionMarkCount(String query) {
int questionMarkCount = 0;
int index = query.indexOf('?');
diff --git
a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/Request.java
b/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/Request.java
deleted file mode 100644
index f267267c65..0000000000
---
a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/Request.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.pinot.client;
-
-/**
- * Request is used in server request to host multiple pinot query types, like
PQL, SQL.
- */
-@Deprecated
-public class Request {
-
- private String _queryFormat;
- private String _query;
-
- public Request(String queryFormat, String query) {
- _queryFormat = queryFormat;
- _query = query;
- }
-
- public String getQueryFormat() {
- return _queryFormat;
- }
-
- public void setQueryFormat(String queryType) {
- _queryFormat = queryType;
- }
-
- public String getQuery() {
- return _query;
- }
-
- public void setQuery(String query) {
- _query = query;
- }
-}
diff --git
a/pinot-clients/pinot-java-client/src/test/java/org/apache/pinot/client/PreparedStatementTest.java
b/pinot-clients/pinot-java-client/src/test/java/org/apache/pinot/client/PreparedStatementTest.java
index 0da2a2f260..97dee69ce1 100644
---
a/pinot-clients/pinot-java-client/src/test/java/org/apache/pinot/client/PreparedStatementTest.java
+++
b/pinot-clients/pinot-java-client/src/test/java/org/apache/pinot/client/PreparedStatementTest.java
@@ -84,18 +84,6 @@ public class PreparedStatementTest {
return CompletableFuture.completedFuture(executeQuery(brokerAddress,
query));
}
- @Override
- public BrokerResponse executeQuery(String brokerAddress, Request request)
- throws PinotClientException {
- return executeQuery(brokerAddress, request.getQuery());
- }
-
- @Override
- public CompletableFuture<BrokerResponse> executeQueryAsync(String
brokerAddress, Request request)
- throws PinotClientException {
- return executeQueryAsync(brokerAddress, request.getQuery());
- }
-
public String getLastQuery() {
return _lastQuery;
}
diff --git
a/pinot-clients/pinot-java-client/src/test/java/org/apache/pinot/client/ResultSetGroupTest.java
b/pinot-clients/pinot-java-client/src/test/java/org/apache/pinot/client/ResultSetGroupTest.java
index 91590a413c..e9688b1905 100644
---
a/pinot-clients/pinot-java-client/src/test/java/org/apache/pinot/client/ResultSetGroupTest.java
+++
b/pinot-clients/pinot-java-client/src/test/java/org/apache/pinot/client/ResultSetGroupTest.java
@@ -170,18 +170,6 @@ public class ResultSetGroupTest {
return null;
}
- @Override
- public BrokerResponse executeQuery(String brokerAddress, Request request)
- throws PinotClientException {
- return executeQuery(brokerAddress, request.getQuery());
- }
-
- @Override
- public CompletableFuture<BrokerResponse> executeQueryAsync(String
brokerAddress, Request request)
- throws PinotClientException {
- return null;
- }
-
@Override
public void close()
throws PinotClientException {
diff --git
a/pinot-clients/pinot-jdbc-client/src/test/java/org/apache/pinot/client/DummyPinotClientTransport.java
b/pinot-clients/pinot-jdbc-client/src/test/java/org/apache/pinot/client/DummyPinotClientTransport.java
index 40a0dbd768..dc2040066b 100644
---
a/pinot-clients/pinot-jdbc-client/src/test/java/org/apache/pinot/client/DummyPinotClientTransport.java
+++
b/pinot-clients/pinot-jdbc-client/src/test/java/org/apache/pinot/client/DummyPinotClientTransport.java
@@ -38,20 +38,6 @@ public class DummyPinotClientTransport implements
PinotClientTransport {
return null;
}
- @Override
- public BrokerResponse executeQuery(String brokerAddress, Request request)
- throws PinotClientException {
- _lastQuery = request.getQuery();
- return BrokerResponse.empty();
- }
-
- @Override
- public CompletableFuture<BrokerResponse> executeQueryAsync(String
brokerAddress, Request request)
- throws PinotClientException {
- _lastQuery = request.getQuery();
- return null;
- }
-
public String getLastQuery() {
return _lastQuery;
}
diff --git
a/pinot-clients/pinot-jdbc-client/src/test/java/org/apache/pinot/client/PinotResultSetTest.java
b/pinot-clients/pinot-jdbc-client/src/test/java/org/apache/pinot/client/PinotResultSetTest.java
index abcddfbe9e..c96821b6c8 100644
---
a/pinot-clients/pinot-jdbc-client/src/test/java/org/apache/pinot/client/PinotResultSetTest.java
+++
b/pinot-clients/pinot-jdbc-client/src/test/java/org/apache/pinot/client/PinotResultSetTest.java
@@ -194,18 +194,6 @@ public class PinotResultSetTest {
return null;
}
- @Override
- public BrokerResponse executeQuery(String brokerAddress, Request request)
- throws PinotClientException {
- return executeQuery(brokerAddress, request.getQuery());
- }
-
- @Override
- public CompletableFuture<BrokerResponse> executeQueryAsync(String
brokerAddress, Request request)
- throws PinotClientException {
- return null;
- }
-
@Override
public void close()
throws PinotClientException {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]