Skip to content

Commit

Permalink
Cleanup of main branch (#4747)
Browse files Browse the repository at this point in the history
* Cleanup of main branch

* Remove log4j-1.2-api dependency except as a bridge in the binary
  assembly (left a note in the assemble/pom.xml), and as a runtime
  dependency of hadoop minicluster, in the proper scope where needed
* Move log4j dependencies in core back to test scope. These were moved
  to the provided scope in #4743 to work around an issue because
  log4j-1.2-api was still used in the core module in 2.1; now that the
  legacy log4j stuff was removed from core in 3.1 and later, we can move
  these back to the test scope where they belong as #4558 intended
* Specify the exact version for deprecation "since" parameters (3.1.0,
  instead of 3.1)
* Drop the unused and deprecated `tserver.workq.threads` property
* Remove a few unused imports and variables, and drop the legacy
  MeterRegistryFactory that was deprecated in 2.1.3
* Suppress some deprecation warnings and use var in a few places for
  readability
* Delete unused test code in CompactionIT
  • Loading branch information
ctubbsii authored Jul 24, 2024
1 parent 49e1b5c commit d54b4e5
Show file tree
Hide file tree
Showing 20 changed files with 102 additions and 206 deletions.
1 change: 1 addition & 0 deletions assemble/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@
<optional>true</optional>
</dependency>
<dependency>
<!-- we don't use this ourselves, but this bridges any dependencies using log4j1 to log4j2 -->
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<optional>true</optional>
Expand Down
30 changes: 15 additions & 15 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client-api</artifactId>
</dependency>
<dependency>
<!-- used at compile scope by legacy mapreduce classes -->
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
Expand All @@ -142,26 +137,31 @@
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client-runtime</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<!-- used by log4j-api; needed here for compile time linting only; we don't actually use it -->
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bnd.annotation</artifactId>
<scope>provided</scope>
<scope>test</scope>
</dependency>
<dependency>
<!-- used indirectly at compile scope by log4j-1.2-api; also needed for tests -->
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<scope>provided</scope>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client-minicluster</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client-runtime</artifactId>
<scope>runtime</scope>
<!-- legacy log4j is still used by hadoop-client-minicluster -->
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client-minicluster</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public enum CompactionReason {
* @deprecated Chop compactions no longer occur and it's not expected that listing compaction
* would ever return this.
*/
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
CHOP,
/**
* idle compaction
Expand Down
42 changes: 18 additions & 24 deletions core/src/main/java/org/apache/accumulo/core/conf/Property.java
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ public enum Property {
"The amount of memory used to store write-ahead-log mutations before flushing them.",
"1.7.0"),
@ReplacedBy(property = SPLIT_MAXOPEN)
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_TABLET_SPLIT_FINDMIDPOINT_MAXOPEN("tserver.tablet.split.midpoint.files.max", "300",
PropertyType.COUNT,
"To find a tablets split points, all RFiles are opened and their indexes"
Expand Down Expand Up @@ -618,64 +618,64 @@ public enum Property {
"The maximum number of concurrent tablet migrations for a tablet server.", "1.3.5"),
TSERV_MAJC_DELAY("tserver.compaction.major.delay", "30s", PropertyType.TIMEDURATION,
"Time a tablet server will sleep between checking which tablets need compaction.", "1.3.5"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
@ReplacedBy(property = COMPACTION_SERVICE_PREFIX)
TSERV_COMPACTION_SERVICE_PREFIX("tserver.compaction.major.service.", null, PropertyType.PREFIX,
"Prefix for compaction services.", "2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_ROOT_PLANNER("tserver.compaction.major.service.root.planner",
DefaultCompactionPlanner.class.getName(), PropertyType.CLASSNAME,
"Compaction planner for root tablet service.", "2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_ROOT_RATE_LIMIT("tserver.compaction.major.service.root.rate.limit", "0B",
PropertyType.BYTES,
"Maximum number of bytes to read or write per second over all major"
+ " compactions in this compaction service, or 0B for unlimited. This property has"
+ " been deprecated in anticipation of it being removed in a future release that"
+ " removes the rate limiting feature.",
"2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_ROOT_MAX_OPEN(
"tserver.compaction.major.service.root.planner.opts.maxOpen", "30", PropertyType.COUNT,
"The maximum number of files a compaction will open.", "2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_ROOT_EXECUTORS(
"tserver.compaction.major.service.root.planner.opts.executors",
"[{'name':'small','type':'internal','maxSize':'32M','numThreads':1},{'name':'huge','type':'internal','numThreads':1}]"
.replaceAll("'", "\""),
PropertyType.STRING,
"See {% jlink -f org.apache.accumulo.core.spi.compaction.DefaultCompactionPlanner %}.",
"2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_META_PLANNER("tserver.compaction.major.service.meta.planner",
DefaultCompactionPlanner.class.getName(), PropertyType.CLASSNAME,
"Compaction planner for metadata table.", "2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_META_RATE_LIMIT("tserver.compaction.major.service.meta.rate.limit", "0B",
PropertyType.BYTES,
"Maximum number of bytes to read or write per second over all major"
+ " compactions in this compaction service, or 0B for unlimited. This property has"
+ " been deprecated in anticipation of it being removed in a future release that"
+ " removes the rate limiting feature.",
"2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_META_MAX_OPEN(
"tserver.compaction.major.service.meta.planner.opts.maxOpen", "30", PropertyType.COUNT,
"The maximum number of files a compaction will open.", "2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_META_EXECUTORS(
"tserver.compaction.major.service.meta.planner.opts.executors",
"[{'name':'small','type':'internal','maxSize':'32M','numThreads':2},{'name':'huge','type':'internal','numThreads':2}]"
.replaceAll("'", "\""),
PropertyType.JSON,
"See {% jlink -f org.apache.accumulo.core.spi.compaction.DefaultCompactionPlanner %}.",
"2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_DEFAULT_PLANNER(
"tserver.compaction.major.service." + DEFAULT_COMPACTION_SERVICE_NAME + ".planner",
DefaultCompactionPlanner.class.getName(), PropertyType.CLASSNAME,
"Planner for default compaction service.", "2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_DEFAULT_RATE_LIMIT(
"tserver.compaction.major.service." + DEFAULT_COMPACTION_SERVICE_NAME + ".rate.limit", "0B",
PropertyType.BYTES,
Expand All @@ -684,12 +684,12 @@ public enum Property {
+ " been deprecated in anticipation of it being removed in a future release that"
+ " removes the rate limiting feature.",
"2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_DEFAULT_MAX_OPEN(
"tserver.compaction.major.service." + DEFAULT_COMPACTION_SERVICE_NAME
+ ".planner.opts.maxOpen",
"10", PropertyType.COUNT, "The maximum number of files a compaction will open.", "2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_COMPACTION_SERVICE_DEFAULT_EXECUTORS(
"tserver.compaction.major.service." + DEFAULT_COMPACTION_SERVICE_NAME
+ ".planner.opts.executors",
Expand All @@ -700,7 +700,7 @@ public enum Property {
"2.1.0"),
TSERV_MINC_MAXCONCURRENT("tserver.compaction.minor.concurrent.max", "4", PropertyType.COUNT,
"The maximum number of concurrent minor compactions for a tablet server.", "1.3.5"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
@ReplacedBy(property = COMPACTION_WARN_TIME)
TSERV_COMPACTION_WARN_TIME("tserver.compaction.warn.time", "10m", PropertyType.TIMEDURATION,
"When a compaction has not made progress for this time period, a warning will be logged.",
Expand Down Expand Up @@ -758,12 +758,6 @@ public enum Property {
+ " that begin with 'table.file' can be used here. For example, to set the compression"
+ " of the sorted recovery files to snappy use 'tserver.wal.sort.file.compress.type=snappy'.",
"2.1.0"),
@Deprecated(since = "2.1.3")
TSERV_WORKQ_THREADS("tserver.workq.threads", "2", PropertyType.COUNT,
"The number of threads for the distributed work queue. These threads are"
+ " used for copying failed bulk import RFiles. Note that as of version 3.1.0 this property"
+ " is not used and will be removed in a future release.",
"1.4.2"),
TSERV_WAL_SYNC("tserver.wal.sync", "true", PropertyType.BOOLEAN,
"Use the SYNC_BLOCK create flag to sync WAL writes to disk. Prevents"
+ " problems recovering from sudden system resets.",
Expand Down Expand Up @@ -801,7 +795,7 @@ public enum Property {
"The number of threads on each tablet server available to retrieve"
+ " summary data, that is not currently in cache, from RFiles.",
"2.0.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TSERV_LAST_LOCATION_MODE("tserver.last.location.mode", "compaction",
PropertyType.LAST_LOCATION_MODE,
"Describes how the system will record the 'last' location for tablets, which can be used for"
Expand Down Expand Up @@ -936,13 +930,13 @@ public enum Property {
+ "specified time. If a system compaction cancels a hold and runs, then the user compaction"
+ " can reselect and hold files after the system compaction runs.",
"2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TABLE_COMPACTION_SELECTOR("table.compaction.selector", "", PropertyType.CLASSNAME,
"A configurable selector for a table that can periodically select file for mandatory "
+ "compaction, even if the files do not meet the compaction ratio. This option was deprecated in "
+ "3.1, see the CompactionKind.SELECTOR enum javadoc for details.",
"2.1.0"),
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
TABLE_COMPACTION_SELECTOR_OPTS("table.compaction.selector.opts.", null, PropertyType.PREFIX,
"Options for the table compaction dispatcher.", "2.1.0"),
TABLE_COMPACTION_CONFIGURER("table.compaction.configurer", "", PropertyType.CLASSNAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
import com.google.common.base.Suppliers;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSortedMap.Builder;
import com.google.common.net.HostAndPort;

public class TabletMetadata {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface TabletStatistics extends Comparable<TabletStatistics> {

long getNumEntries();

@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
long getSplitCreationTime();

double getIngestRate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ public enum CompactionKind {
/**
* Set of files selected by a {@link CompactionSelector} configured for a table.
*
* @deprecated since 3.1. Use of selector compactions should be replaced with user compactions
* initiated via
* @deprecated Use of selector compactions should be replaced with user compactions initiated via
* {@link org.apache.accumulo.core.client.admin.TableOperations#compact(String, CompactionConfig)}.
* Everything that can be done with selector compactions can also be done with user
* compactions. User compactions offer more control over when compactions run, the
* range of data compacted, and the ability to cancel. Selector compactions offer none
* of these features and were deprecated in favor of only offering user compactions.
*/
@Deprecated(since = "3.1")
@Deprecated(since = "3.1.0")
SELECTOR,
/**
* A user initiated a one time compaction using an Accumulo client.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,6 @@ public ThreadPoolExecutor createExecutorService(final AccumuloConfiguration conf
builder.enableThreadPoolMetrics();
}
return builder.build();
case TSERV_WORKQ_THREADS:
builder = getPoolBuilder("distributed work queue").numCoreThreads(conf.getCount(p));
if (emitThreadPoolMetrics) {
builder.enableThreadPoolMetrics();
}
return builder.build();
case TSERV_MINC_MAXCONCURRENT:
builder = getPoolBuilder("minor compactor").numCoreThreads(conf.getCount(p)).withTimeOut(0L,
MILLISECONDS);
Expand Down
Loading

0 comments on commit d54b4e5

Please sign in to comment.