dlmarion commented on code in PR #3513:
URL: https://github.com/apache/accumulo/pull/3513#discussion_r1238451410
##########
minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java:
##########
@@ -631,7 +629,9 @@ public synchronized void start() throws IOException,
InterruptedException {
throw new IllegalStateException("No Compactor queues configured.");
}
for (String name : queues) {
- control.startCompactors(Compactor.class,
getConfig().getNumCompactors(), name);
+ // ELASTICITY_TODO need to reevalute numCompactors and maybe num scan
servers. The following
+ // was calling numCompactors, but it was changed to 1.
Review Comment:
I agree with this comment. Mini needs to be modified such that Compactors
and ScanServers are first class citizens.
##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/SelectedFiles.java:
##########
@@ -0,0 +1,103 @@
+/*
+ * 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
+ *
+ * https://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.accumulo.core.metadata.schema;
+
+import static java.util.stream.Collectors.toList;
+
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.apache.accumulo.core.fate.FateTxId;
+import org.apache.accumulo.core.metadata.StoredTabletFile;
+
+import com.google.common.base.Preconditions;
+import com.google.gson.Gson;
+
+/**
+ * This class is used to manage the set of files selected for a user
compaction for a tablet.
+ */
+public class SelectedFiles {
+
+ private static final Gson GSON = new Gson();
+
+ private final Set<StoredTabletFile> files;
+
+ private final boolean initiallySelectedAll;
+ private final long fateTxId;
+ private final String metadataValue;
+
+ // This class is used to serialize and deserialize this class using GSon.
Any changes to this
+ // class must consider persisted data.
+ private static class GSonData {
Review Comment:
you could create a
[TypeAdapter](https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/TypeAdapter.html)
for this class and register it with the Gson instance. That could enforce the
sorting of the files and the order in which the fields are serialized. Also,
take a look at
[versioning](https://github.com/google/gson/blob/main/UserGuide.md#versioning-support),
not sure how it would apply now, but if we added the versions to the
attributes then that may help later.
##########
minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloConfigImpl.java:
##########
@@ -164,10 +164,22 @@ MiniAccumuloConfigImpl initialize() {
mergePropWithRandomPort(Property.MONITOR_PORT.getKey());
mergePropWithRandomPort(Property.GC_PORT.getKey());
+ mergeProp(Property.COMPACTOR_PORTSEARCH.getKey(), "true");
+
+ mergeProp(Property.TSERV_COMPACTION_SERVICE_ROOT_PLANNER.getKey(),
+ Property.TSERV_COMPACTION_SERVICE_ROOT_PLANNER.getDefaultValue());
+ mergeProp(Property.TSERV_COMPACTION_SERVICE_ROOT_EXECUTORS.getKey(),
+ Property.TSERV_COMPACTION_SERVICE_ROOT_EXECUTORS.getDefaultValue());
+
+ mergeProp(Property.TSERV_COMPACTION_SERVICE_META_PLANNER.getKey(),
+ Property.TSERV_COMPACTION_SERVICE_META_PLANNER.getDefaultValue());
+ mergeProp(Property.TSERV_COMPACTION_SERVICE_META_EXECUTORS.getKey(),
+ Property.TSERV_COMPACTION_SERVICE_META_EXECUTORS.getDefaultValue());
+
mergeProp(Property.TSERV_COMPACTION_SERVICE_DEFAULT_PLANNER.getKey(),
Property.TSERV_COMPACTION_SERVICE_DEFAULT_PLANNER.getDefaultValue());
-
mergeProp("tserver.compaction.major.service.default.planner.opts.executors",
-
"[{\"name\":\"all\",\"type\":\"external\",\"queue\":\"defaultQueue\"}]");
+ mergeProp(Property.TSERV_COMPACTION_SERVICE_DEFAULT_EXECUTORS.getKey(),
Review Comment:
This caused me to look at Property. I didn't realize that you changed the
default. That's good.
##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/SelectedFiles.java:
##########
@@ -0,0 +1,103 @@
+/*
+ * 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
+ *
+ * https://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.accumulo.core.metadata.schema;
+
+import static java.util.stream.Collectors.toList;
+
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.apache.accumulo.core.fate.FateTxId;
+import org.apache.accumulo.core.metadata.StoredTabletFile;
+
+import com.google.common.base.Preconditions;
+import com.google.gson.Gson;
+
+/**
+ * This class is used to manage the set of files selected for a user
compaction for a tablet.
+ */
+public class SelectedFiles {
+
+ private static final Gson GSON = new Gson();
Review Comment:
I created #3514 when I saw this.
--
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]