[accumulo] branch main updated: Create new internal GC class (#2670)
This is an automated email from the ASF dual-hosted git repository. mmiller 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 16b5e3bb7b Create new internal GC class (#2670) 16b5e3bb7b is described below commit 16b5e3bb7b3598896004f5648a9418f3e238d570 Author: Mike Miller AuthorDate: Tue May 3 08:40:33 2022 -0400 Create new internal GC class (#2670) * Pull out the GCEnv inner class of SimpleGarbageCollector into its own class and call it GCRun. * Keep the logic of GCEnv but make the stats private numbers to allow dropping of synchronized block * Create separate logger classes for each instance of GCRun * Make GCRun return the stats gathered during that run * Make SimpleGarbageCollector increment the current stats based on what is returned in the GCRun class --- .../main/java/org/apache/accumulo/gc/GCRun.java| 449 + .../apache/accumulo/gc/SimpleGarbageCollector.java | 382 ++ .../accumulo/gc/SimpleGarbageCollectorTest.java| 6 +- 3 files changed, 484 insertions(+), 353 deletions(-) diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java b/server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java new file mode 100644 index 00..a4a80d99d4 --- /dev/null +++ b/server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java @@ -0,0 +1,449 @@ +/* + * 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 + * + * http://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.gc; + +import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.DIR; +import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.FILES; +import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.SCANS; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.SortedMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.stream.Stream; + +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.AccumuloClient; +import org.apache.accumulo.core.client.IsolatedScanner; +import org.apache.accumulo.core.client.Scanner; +import org.apache.accumulo.core.client.TableNotFoundException; +import org.apache.accumulo.core.conf.AccumuloConfiguration; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.data.TableId; +import org.apache.accumulo.core.manager.state.tables.TableState; +import org.apache.accumulo.core.metadata.RootTable; +import org.apache.accumulo.core.metadata.TabletFileUtil; +import org.apache.accumulo.core.metadata.schema.Ample; +import org.apache.accumulo.core.metadata.schema.MetadataSchema; +import org.apache.accumulo.core.metadata.schema.TabletMetadata; +import org.apache.accumulo.core.metadata.schema.TabletsMetadata; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.core.util.Pair; +import org.apache.accumulo.core.util.threads.ThreadPools; +import org.apache.accumulo.core.volume.Volume; +import org.apache.accumulo.server.ServerContext; +import org.apache.accumulo.server.fs.VolumeManager; +import org.apache.accumulo.server.fs.VolumeUtil; +import org.apache.accumulo.server.gc.GcVolumeUtil; +import org.apache.accumulo.server.replication.proto.Replication; +import org.apache.hadoop.fs.FileStatus; +import org.apache.hadoop.fs.Path; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.annotations.VisibleForTesting; +import com.google.common.collect.Iterators; +import com.google.common.collect.Maps; +import com.google.protobuf.InvalidProtocolBufferException; + +/** + * A single garbage collection performed on a table (Root, MD) or all User tables. + */ +public class GCRun implements GarbageCollectionEnvironment { + private final Logger log; + private final Ample.DataLevel level; + private final ServerContext context; +
[accumulo] 01/01: Merge branch 'main' into single-node-props
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch single-node-props in repository https://gitbox.apache.org/repos/asf/accumulo.git commit bb4df59cedcc0b3c1ca444da83233ec8a9ebe7ac Merge: bbf477bea3 16b5e3bb7b Author: Christopher Tubbs AuthorDate: Tue May 3 18:25:43 2022 -0400 Merge branch 'main' into single-node-props LICENSE| 2 +- .../main/java/org/apache/accumulo/gc/GCRun.java| 449 ++ .../apache/accumulo/gc/SimpleGarbageCollector.java | 382 +--- .../accumulo/gc/SimpleGarbageCollectorTest.java| 6 +- .../external/bootstrap/css/bootstrap-theme.css | 200 ++--- .../external/bootstrap/css/bootstrap-theme.css.map | 1 + .../resources/external/bootstrap/css/bootstrap.css | 985 +++-- .../external/bootstrap/css/bootstrap.css.map | 1 + .../resources/external/bootstrap/js/bootstrap.js | 397 +++-- .../accumulo/monitor/resources/js/bulkImport.js| 1 + .../accumulo/monitor/resources/js/compactions.js | 1 + .../org/apache/accumulo/monitor/resources/js/ec.js | 1 + .../accumulo/monitor/resources/js/functions.js | 1 + .../org/apache/accumulo/monitor/resources/js/gc.js | 1 + .../apache/accumulo/monitor/resources/js/global.js | 1 + .../accumulo/monitor/resources/js/listType.js | 1 + .../accumulo/monitor/resources/js/manager.js | 1 + .../apache/accumulo/monitor/resources/js/navbar.js | 1 + .../accumulo/monitor/resources/js/overview.js | 1 + .../accumulo/monitor/resources/js/problems.js | 1 + .../accumulo/monitor/resources/js/replication.js | 1 + .../apache/accumulo/monitor/resources/js/scans.js | 1 + .../apache/accumulo/monitor/resources/js/server.js | 1 + .../apache/accumulo/monitor/resources/js/show.js | 1 + .../accumulo/monitor/resources/js/summary.js | 1 + .../apache/accumulo/monitor/resources/js/table.js | 1 + .../accumulo/monitor/resources/js/tservers.js | 33 +- .../apache/accumulo/monitor/templates/tservers.ftl | 1 + 28 files changed, 1467 insertions(+), 1007 deletions(-)
[accumulo] branch single-node-props updated (bbf477bea3 -> bb4df59ced)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a change to branch single-node-props in repository https://gitbox.apache.org/repos/asf/accumulo.git from bbf477bea3 Merge branch 'main' into single-node-props add d51e2f1c44 Upgrade to Bootstrap v3.4.1 and include missing map files (#2662) add bbcf67424d Add js strict directive to each js file (#2664) add b3ac225d43 Highlight rows with recovering tservers in the tserver status table (#2663) add 16b5e3bb7b Create new internal GC class (#2670) new bb4df59ced Merge branch 'main' into single-node-props The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: LICENSE| 2 +- .../main/java/org/apache/accumulo/gc/GCRun.java| 449 ++ .../apache/accumulo/gc/SimpleGarbageCollector.java | 382 +--- .../accumulo/gc/SimpleGarbageCollectorTest.java| 6 +- .../external/bootstrap/css/bootstrap-theme.css | 200 ++--- .../external/bootstrap/css/bootstrap-theme.css.map | 1 + .../resources/external/bootstrap/css/bootstrap.css | 985 +++-- .../external/bootstrap/css/bootstrap.css.map | 1 + .../resources/external/bootstrap/js/bootstrap.js | 397 +++-- .../accumulo/monitor/resources/js/bulkImport.js| 1 + .../accumulo/monitor/resources/js/compactions.js | 1 + .../org/apache/accumulo/monitor/resources/js/ec.js | 1 + .../accumulo/monitor/resources/js/functions.js | 1 + .../org/apache/accumulo/monitor/resources/js/gc.js | 1 + .../apache/accumulo/monitor/resources/js/global.js | 1 + .../accumulo/monitor/resources/js/listType.js | 1 + .../accumulo/monitor/resources/js/manager.js | 1 + .../apache/accumulo/monitor/resources/js/navbar.js | 1 + .../accumulo/monitor/resources/js/overview.js | 1 + .../accumulo/monitor/resources/js/problems.js | 1 + .../accumulo/monitor/resources/js/replication.js | 1 + .../apache/accumulo/monitor/resources/js/scans.js | 1 + .../apache/accumulo/monitor/resources/js/server.js | 1 + .../apache/accumulo/monitor/resources/js/show.js | 1 + .../accumulo/monitor/resources/js/summary.js | 1 + .../apache/accumulo/monitor/resources/js/table.js | 1 + .../accumulo/monitor/resources/js/tservers.js | 33 +- .../apache/accumulo/monitor/templates/tservers.ftl | 1 + 28 files changed, 1467 insertions(+), 1007 deletions(-) create mode 100644 server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java create mode 100644 server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/external/bootstrap/css/bootstrap-theme.css.map create mode 100644 server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/external/bootstrap/css/bootstrap.css.map