dlmarion commented on code in PR #3294:
URL: https://github.com/apache/accumulo/pull/3294#discussion_r1165751125
##########
core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java:
##########
@@ -1014,39 +1014,15 @@ default TimeType getTimeType(String tableName) throws
TableNotFoundException {
}
/**
- * Initiates setting a table to an on-demand state, but does not wait for
action to complete
+ * Sets the hosting goal for a range of Tablets in the specified table.
*
- * @param tableName the table to set to an on-demand state
- * @throws AccumuloException when there is a general accumulo error
- * @throws AccumuloSecurityException when the user does not have the proper
permissions
- * @since 3.1.0
- */
- void onDemand(String tableName)
- throws AccumuloSecurityException, AccumuloException,
TableNotFoundException;
-
- /**
- * Initiates setting a table to an on-demand state, optionally waits for
action to complete
- *
- * @param tableName the table to set to an on-demand state
- * @param wait if true, then will not return until table state is set to an
on-demand state
- * @throws AccumuloException when there is a general accumulo error
- * @throws AccumuloSecurityException when the user does not have the proper
permissions
- * @since 3.1.0
- */
- void onDemand(String tableName, boolean wait)
- throws AccumuloSecurityException, AccumuloException,
TableNotFoundException;
-
- /**
- * Check if a table is on-demand through its current goal state only. Could
run into issues if the
- * current state of the table is in between states. If you require a
specific state, call
- * <code>onDemand(tableName, true)</code>, this will wait until the table
reaches the desired
- * state before proceeding.
- *
- * @param tableName the table to check if in an on-demand state
- * @throws AccumuloException when there is a general accumulo error
- * @return true if table's goal state is online
- * @since 3.1.0
+ * @param tableName table name
+ * @param range tablet range
+ * @param goal hosting goal (one of {@literal ALWAYS, DEFAULT, NEVER})
Review Comment:
* `default` means the Tablet is unassigned. This is the default Tablet
state and is set to this value when an ondemand Tablet is unloaded.
* `ondemand` means the Tablet is assigned. `ondemand` is set by the
TabletLocator to signal that a Tablet needs to be hosted for a user operation.
* `always` means that the Tablet is assigned and does not need to be
loaded on-demand
* `never` means that the Tablet is unassigned and cannot be loaded
on-demand
Users can only set the TabletHostingGoal to always, default, or never. When
these are set by the user they get stored in the tablet metadata in the column
`hosting_goal` with the Value being the string literal. When a tablet is
unloaded, it's `hosting_goal` column value is set to `default`. A non-existent
`hosting_goal` column, or one with an empty Value, is treated like `default`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]