This is an automated email from the ASF dual-hosted git repository. kturner pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push: new 6bf3aeec27 removes CHOP from CompactionKind SPI type. (#3781) 6bf3aeec27 is described below commit 6bf3aeec2710c9a9eb7b2d1bd75d476a4a3b341f Author: Keith Turner <ktur...@apache.org> AuthorDate: Tue Sep 26 14:07:09 2023 -0400 removes CHOP from CompactionKind SPI type. (#3781) This change removes CompactionKind.CHOP from the SPI w/o a deprecation cycle. This is allowed under the rules for SPI changes. The rationale for this is if CHOP is left then code will need to be added to Accumulo to avoid its use and fail if it's ever seen. Also documentation will need to be added to the SPI explaining that Accumulo should never pass CHOP to any plugins ever again that ideally plugins should error if they see it. Removing it seems like the least confusing option. --- .../core/client/admin/ActiveCompaction.java | 3 ++- .../core/spi/compaction/CompactionKind.java | 7 +------ .../core/spi/compaction/CompactionPlanner.java | 22 +--------------------- .../accumulo/tserver/tablet/CompactableImpl.java | 2 -- 4 files changed, 4 insertions(+), 30 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/ActiveCompaction.java b/core/src/main/java/org/apache/accumulo/core/client/admin/ActiveCompaction.java index cfcdc1def9..02bd68bef5 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/admin/ActiveCompaction.java +++ b/core/src/main/java/org/apache/accumulo/core/client/admin/ActiveCompaction.java @@ -54,7 +54,8 @@ public abstract class ActiveCompaction { */ SYSTEM, /** - * @deprecated Chop compactions have been removed + * @deprecated Chop compactions no longer occur and it's not expected that listing compaction + * would ever return this. */ @Deprecated(since = "3.1", forRemoval = true) CHOP, diff --git a/core/src/main/java/org/apache/accumulo/core/spi/compaction/CompactionKind.java b/core/src/main/java/org/apache/accumulo/core/spi/compaction/CompactionKind.java index 1e1fb35217..97e64216fc 100644 --- a/core/src/main/java/org/apache/accumulo/core/spi/compaction/CompactionKind.java +++ b/core/src/main/java/org/apache/accumulo/core/spi/compaction/CompactionKind.java @@ -36,10 +36,5 @@ public enum CompactionKind { /** * A user initiated a one time compaction using an Accumulo client. */ - USER, - /** - * @deprecated Chop Compactions have been deprecated - */ - @Deprecated(since = "3.1") - CHOP + USER } diff --git a/core/src/main/java/org/apache/accumulo/core/spi/compaction/CompactionPlanner.java b/core/src/main/java/org/apache/accumulo/core/spi/compaction/CompactionPlanner.java index 4b933fc744..f96ed6f022 100644 --- a/core/src/main/java/org/apache/accumulo/core/spi/compaction/CompactionPlanner.java +++ b/core/src/main/java/org/apache/accumulo/core/spi/compaction/CompactionPlanner.java @@ -141,27 +141,9 @@ public interface CompactionPlanner { * the candidates will contain the files it did not compact and the results of any previous * compactions it scheduled. The planner must eventually compact all of the files in the candidate * set down to a single file. The compaction service will keep calling the planner until it does. - * <li>CompactionKind.CHOP. The planner is required to eventually compact all candidates. One - * major difference with USER compactions is this kind is not required to compact all files to a - * single file. It is ok to return a compaction plan that compacts a subset of the candidates. - * When the planner compacts a subset, it will eventually be called later. When it is called later - * the candidates will contain the files it did not compact. * </ul> * * <p> - * For a chop compaction assume the following happens. - * <ol> - * <li>The candidate set passed to makePlan contains the files {@code [F1,F2,F3,F4]} and kind is - * CHOP - * <li>The planner returns a job to compact files {@code [F1,F2]} on executor E1 - * <li>The compaction runs compacting {@code [F1,F2]} into file {@code [F5]} - * </ol> - * - * <p> - * For the case above, eventually the planner will called again with a candidate set of - * {@code [F3,F4]} and it must eventually compact those two files. - * - * <p> * For a user and selector compaction assume the same thing happens, it will result in a slightly * different outcome. * <ol> @@ -173,9 +155,7 @@ public interface CompactionPlanner { * * <p> * For the case above, eventually the planner will called again with a candidate set of - * {@code [F3,F4,F5]} and it must eventually compact those three files to one. The difference with - * CHOP compactions is that the result of intermediate compactions are included in the candidate - * set. + * {@code [F3,F4,F5]} and it must eventually compact those three files to one. * * <p> * When a planner returns a compactions plan, task will be queued on executors. Previously queued diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java index 706f55d1c5..2d7da09b46 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java @@ -309,8 +309,6 @@ public class CompactableImpl implements Compactable { // intentional fall through case USER: return handleUserSelectorCompaction(currFiles, kind); - case CHOP: - return Set.of(); default: throw new AssertionError(); }