tkhurana commented on code in PR #1880:
URL: https://github.com/apache/phoenix/pull/1880#discussion_r1575134090


##########
phoenix-core-client/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java:
##########
@@ -99,22 +99,48 @@ public interface ConnectionQueryServices extends 
QueryServices, MetaDataMutated
     public TableDescriptor getTableDescriptor(byte[] tableName) throws 
SQLException;
 
     public HRegionLocation getTableRegionLocation(byte[] tableName, byte[] 
row) throws SQLException;
+
+    /**
+     * Retrieve the region metadata locations for all regions of the given 
table.
+     * This method is Deprecated. Use {@link #getAllTableRegions(byte[], int)} 
instead.
+     *
+     * @param tableName The table name.
+     * @return The list of table region locations.
+     * @throws SQLException If fails to retrieve region locations.
+     */
+    @Deprecated
     public List<HRegionLocation> getAllTableRegions(byte[] tableName) throws 
SQLException;
 
+    /**
+     * Retrieve the region metadata locations for all regions of the given 
table.
+     * The operation to retrieve the table region locations must be completed 
within
+     * the query timeout.
+     *
+     * @param tableName Table name.
+     * @param queryTimeout Phoenix query timeout.
+     * @return The list of region locations.
+     * @throws SQLException If fails to retrieve region locations.
+     */
+    public List<HRegionLocation> getAllTableRegions(byte[] tableName, int 
queryTimeout)
+            throws SQLException;
+
     /**
      * Retrieve table region locations that cover the startRowKey and 
endRowKey. The start key
      * of the first region of the returned list must be less than or equal to 
startRowKey.
      * The end key of the last region of the returned list must be greater 
than or equal to
-     * endRowKey.
+     * endRowKey. The operation to retrieve the table region locations must be 
completed within
+     * the query timeout.
      *
-     * @param tableName Table name.
-     * @param startRowKey Start RowKey.
-     * @param endRowKey End RowKey.
+     * @param tableName    Table name.
+     * @param startRowKey  Start RowKey.
+     * @param endRowKey    End RowKey.
+     * @param queryTimeout Phoenix query timeout.
      * @return The list of region locations that cover the startRowKey and 
endRowKey key boundary.
      * @throws SQLException If fails to retrieve region locations.
      */
     public List<HRegionLocation> getTableRegions(byte[] tableName, byte[] 
startRowKey,
-        byte[] endRowKey) throws SQLException;
+                                                 byte[] endRowKey,
+                                                 int queryTimeout) throws 
SQLException;

Review Comment:
   We should keep the existing API for this too and mark it deprecated just 
like the other one.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to