You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2023/04/21 23:25:37 UTC

[GitHub] [accumulo] dlmarion commented on a diff in pull request #3329: Throw new exception when invalid tablet hosting request made

dlmarion commented on code in PR #3329:
URL: https://github.com/apache/accumulo/pull/3329#discussion_r1174222093


##########
core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java:
##########
@@ -213,10 +214,12 @@ Collection<Text> listSplits(String tableName, int maxSplits)
    * @param ranges The input ranges that should be mapped to tablet servers and tablets.
    *
    * @throws TableOfflineException if the table is offline or goes offline during the operation
+   * @throws InvalidTabletHostingRequestException if tablet hosting is requested for table with
+   *         NEVER goal
    * @since 1.8.0
    */
-  Locations locate(String tableName, Collection<Range> ranges)
-      throws AccumuloException, AccumuloSecurityException, TableNotFoundException;

Review Comment:
   I used the checked exception because it caused things to not-compile and break in the IDE. That allowed me to figure out how/where to handle the exception. If I were to throw an AccumuloException or RuntimeException from the ClientTabletCacheImpl.requestTabletHosting method, then it would likely have been swallowed and in some cases not handled correctly. Regarding the new exception, unlike a TableNotFoundException, the client could retry the operation after removing the ranges that are set to NEVER.



-- 
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: notifications-unsubscribe@accumulo.apache.org

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