Dave Marion [Thu, 30 Jun 2022 10:56:12 +0000 (06:56 -0400)]
Move MiniAccumuloClusterTest.testPerTableClasspath to new test class (#2794)
MiniAccumuloClusterTest.testPerTableClasspath is intermittently failing with
a MutationsRejectedException when the BatchWriter is closed because the TabletServer
is not seeing property changes made in the test right before the BatchWriter is
created. This change moves this test method to its own test class so that MAC is
configured with the classpath context configuration properties from the start.
Nicholas Coltharp [Wed, 29 Jun 2022 18:49:41 +0000 (18:49 +0000)]
Improve use of Futures in Gatherer (#2752)
- Add a new utility method `iterateUntil` that creates a future
that iterates some action (that returns a `CompletableFuture`) until
some condition is met.
- Change the `PartitionFuture` class to be a thin wrapper around a
future created by `iterateUntil`. (We can't remove the class
entirely, because we still need to carry around the `cancelFlag` so that
we can pass it to `FileProcessor`.)
Keith Turner [Wed, 29 Jun 2022 14:16:08 +0000 (10:16 -0400)]
simplifies accumulo-cluster compactor config (#2791)
EdColeman [Tue, 28 Jun 2022 16:09:51 +0000 (16:09 +0000)]
Fix Fate print command and improve ShellServerIT test (#2755)
* modify filter conditions for status
* Add additional tests to code provided by millerruntime, modified to add cluster accumulo.properties
Dom G [Mon, 27 Jun 2022 17:15:05 +0000 (13:15 -0400)]
Convert tables in bulkImport.js to DataTables (#2784)
* Convert tables to DataTables
Dom G [Mon, 27 Jun 2022 13:35:19 +0000 (09:35 -0400)]
Convert the tables in table.js to DataTables (#2765)
Mike Miller [Thu, 23 Jun 2022 21:59:43 +0000 (21:59 +0000)]
Create Reference interface for new GC classes (#2767)
* Create ReferenceFile class to implement Reference interface
* Make ReferenceDirectory extend ReferenceFile
* Create AllVolumesDiretory class to extend ReferenceFile and move GcVolumeUtil method to class
* Comment and clean up GC code
* Update MetadataSchema.isValidDirCol regex to be more strict
* Make TableGroupWatcher use ReferenceFile for calls to GC
* Updates to various relevant tests
Dave Marion [Wed, 22 Jun 2022 14:47:12 +0000 (10:47 -0400)]
Update Micrometer and OpenTelemetry dependencies (#2782)
EdColeman [Fri, 17 Jun 2022 21:08:18 +0000 (21:08 +0000)]
lazy load prop store (#2781)
Mike Miller [Thu, 16 Jun 2022 10:35:45 +0000 (10:35 +0000)]
Make ByteSequence Serializable (#2779)
Mike Miller [Wed, 15 Jun 2022 13:37:59 +0000 (13:37 +0000)]
Make auths classes in Authorizations (#2777)
* Change private member types from interfaces to classes to get rid of Java 18 warnings
* For #2777
EdColeman [Wed, 15 Jun 2022 12:48:30 +0000 (12:48 +0000)]
Add delete event watcher to ServerConfigurationFactory (#2773)
This partially satisfies PR #2769.
Christopher Tubbs [Tue, 14 Jun 2022 07:47:04 +0000 (03:47 -0400)]
Trivial: Use https in more places (#2774)
* Update license header template to use https (this has been discussed
at length on the legal mailing list and elsewhere, and is an
acceptable URL to reference the license text that the rat plugin has
been made to support)
* Update to rat 0.14 to support https
* Find other uses of http and replace with https unless it breaks a link
or is a namespace identifier or other situation where http is required
* Use the standardized format of the license header text for the
markdown files and gitignore files
* Update the gitignore files to sync with each other, so they all
suppress the same IDE files
* Remove unneeded CHECKSTYLE:ON comment in Accumulo.java
* Remove redundant license header in WholeColumnFamilyIteratorTest
* Apply automated changes from updating contrib/license-header.txt
Mark Owens [Mon, 13 Jun 2022 16:12:02 +0000 (12:12 -0400)]
Implement consistent Namespace and Table property handling (#2771)
TablePropUtil and NamespacePropUtil handle invalid properties differently. This update updates the two classes to handle properties in a similar manner. They both will now throw an exception on an invalid property value.
This is the first step in what may be a multi-step process. With this change, both TablePropUtil and NamespacePropUtil are very similar and could possibly be combined into one method. I will create a follow-on ticket to look into that possibility. But I wanted to get the initial task of making them consistent completed first.
Closes #2633
Dave Marion [Mon, 13 Jun 2022 14:20:04 +0000 (10:20 -0400)]
Protect against error in Manager shutdownTabletServer when tserver not found (#2766)
Closes #2747
Mike Miller [Fri, 10 Jun 2022 16:15:20 +0000 (16:15 +0000)]
Log RootTabletMetadata object creation at trace (#2768)
Mike Miller [Fri, 10 Jun 2022 11:24:17 +0000 (11:24 +0000)]
Fix Reference in TabletGroupWatcher (#2764)
* Closes #2763
* Move tabletDir variable down to ReferenceDirectory
Mike Miller [Wed, 8 Jun 2022 18:38:23 +0000 (18:38 +0000)]
Use Reference class in GC, Ample & TabletGroupWatcher (#2750)
* Replace uses of String with Reference to prevent errors with
over use of String in GC, Ample and TabletGroupWatcher
* Make Reference comparable and implement required methods
* Rename RelativeTabletDirectory to ReferenceDirectory
* Rename TabletFileUtil to ValidationUtil and add new method for Reference
* Make TabletDirectory its own independent class and clean it up
* Create package org.apache.accumulo.core.gc and move Reference and
ReferenceDirectory to the new package
* Update GcVolumeUtil, MetadataTableUtil, CleanUpBulkImport to use Reference class
* Update Upgrader and tests
Co-authored-by: Dave Marion <dlmarion@apache.org>
Christopher Tubbs [Wed, 8 Jun 2022 16:46:30 +0000 (12:46 -0400)]
Update default log configuration (#2759)
Change default filename and size triggering limit for rolling log files:
* Drop hour from filename to use daily logs instead of hourly
* Use 4 digit year to disambiguate between 2 digit time components
* Put year first so file names sort better and read more clearly
* Increase size trigger from 100MB to 512MB to roll less often
Christopher Tubbs [Wed, 8 Jun 2022 04:59:20 +0000 (00:59 -0400)]
Bump versions (#2758)
* Bump versions of plugins and dependencies
* Update CI config to use ZooKeeper 3.5.10 with reload4j
* Keep jersey back at 3.0.4 to avoid breaking WebViews IT, since
jakartaee-bom is not yet available for jakartaee 10, and I don't
want to manage individual versions for jakarta.ws.rs-api outside
the bom
* Exclude slf4j transitive deps from minikdc, regardless of whether it's
reload4j or log4j, depending on the hadoop.version
* Fix TransformTokenIT breakage by ensuring auths are set for
recursive delete
Also try to fix some flaky tests:
* Update verifyUp to check for instanceId in the retry loop, but don't
iterate over the instance names, since that's pointless; also update
exceptions to be more specific than basic RuntimeException (newer
versions of spotbugs will complain about this)
* Also avoid printing a NullPointerException in LogSorter when the input
stream is closed (seen turning testing these changes)
Mike Miller [Tue, 7 Jun 2022 10:58:26 +0000 (10:58 +0000)]
Add Verify & fix test in NamespaceConfigurationTest (#2756)
* Add Verify calls to NamespaceConfigurationTest
* Fix the testGet_InParent test in NamespaceConfigurationTest
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Dom G [Fri, 3 Jun 2022 17:42:10 +0000 (13:42 -0400)]
Convert monitor tables in server.js to DataTables (#2725)
* Convert all tables in server.js to DataTables
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Christopher Tubbs [Wed, 1 Jun 2022 21:50:02 +0000 (17:50 -0400)]
Clear property caches on RPC request for props (#2740)
Mitigation for test instability in #2739
* Clear namespace, table, and system property cache entries when that
particular configuration is being requested from the client
API improvements for PropStore
* Rename PropCacheKey to PropStoreKey, since it's a first-class citizen
of the PropStore interface
* Add getCache() method to PropStore, because it is expected that
PropStores are caching, so this makes it explicit
* Use .getCache().remove() instead of casting to ZooPropStore and
simulating a ZK change event to remove an item from the cache to force
it to reload
Christopher Tubbs [Wed, 1 Jun 2022 18:26:02 +0000 (14:26 -0400)]
Minor grammar fix in Admin StopAllCommand description
Follow on from #2748, fix a minor grammar issue by making the
description more succinct (replace "all of the X" with "all X") and
replace "tablets servers" with "tablet servers"
Dom G [Wed, 1 Jun 2022 18:20:56 +0000 (14:20 -0400)]
Fix async bug when clearing logs in monitor (#2735)
* Add refresh function as callback when making the post request to clear the logs
Christopher Tubbs [Wed, 1 Jun 2022 18:04:48 +0000 (14:04 -0400)]
Improve deprecated property resolution (#2730)
* Improve deprecated property resolution
Resolve a sequence of deprecation changes, instead of just a single
deprecation with a replacement (for example, if property A is deprecated
and replaced with property B, then B is deprecated and replaced with C,
we'd resolve like:
```java
resolve(C, B, A);
```
rather than:
```java
resolve(C, resolve(B, A));
```
Also:
* To avoid errors, ensure that the current property isn't deprecated
* Check that the deprecated properties are actually deprecated
* Add a unit test case
* Update the javadoc
* Don't make method final (messes with EasyMock)
Mike Miller [Tue, 31 May 2022 16:08:07 +0000 (16:08 +0000)]
Log error in Admin for no servers (#2748)
Mike Miller [Tue, 31 May 2022 12:14:29 +0000 (12:14 +0000)]
Add new test to FateCommandTest (#2742)
Mike Miller [Tue, 31 May 2022 10:54:51 +0000 (10:54 +0000)]
Add check to Admin (#2743)
* Closes #1753
* Add check to prevent all tservers from being shutdown, unless forced
Christopher Tubbs [Sat, 28 May 2022 20:34:57 +0000 (16:34 -0400)]
Allow overriding default env without editing conf (#2746)
Update the default conf/accumulo-env.sh script to support overriding
some of the default java options it sets by placing user-provided
options specified by the `ACCUMULO_JAVA_OPTS` environment variable after
any options set in the script (because Java will likely take the last
value set on the command-line).
This fixes #2744
Mike Miller [Fri, 27 May 2022 11:26:59 +0000 (11:26 +0000)]
Refactor Root Tablet serialization code (#2718)
* Remove static state from RootTabletMetadata and RootGcCandidates
* Replaced static from() methods in RootTabletMetadata and RootGcCandidates with constructors
* Added comment to AccumuloDataVersion javadoc
* Store entries natively in the simpler string-based multi-map, rather
than converting to key/value pairs and back again. Only convert to
key/value pairs when needed.
* Get rid of `new GsonBuilder().create()`. Even Gson's own javadoc
recommends `new Gson()` if all you want is the defaults.
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Dave Marion [Thu, 26 May 2022 17:21:23 +0000 (13:21 -0400)]
Protect against NPE in FateCommand.printTx (#2738)
Closes #2736
EdColeman [Thu, 26 May 2022 16:41:46 +0000 (16:41 +0000)]
Address ZooKeeper version rollover - #2281 (#2737)
* Address ZooKeeper version rollover - #2281
* doc update
Dave Marion [Thu, 26 May 2022 11:45:04 +0000 (07:45 -0400)]
Cached last 64 successful ZKSecurityTool.checkCryptPass password checks (#2707)
Apache Commons Codec Crypt.crypt() can be expensive as it creates
numerous MessageDigest objects. Under heavy load the creation of
these MessageDigest objects becomes an issue as there is a synchronization
point in the call stack for MessageDigest.getInstance. As an optimization,
we temporarily cache the last 64 unique inputs to the
ZKSecurityTool.checkCryptPass method that result in a positive return value.
Related to #2700
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Luke Foster [Thu, 26 May 2022 03:00:23 +0000 (23:00 -0400)]
Remove TODOs and rename PerTableVolumeChooser (#2734)
* Remove TODOs and rename PerTableVolumeChooser
* Rename corresponding test and clean up spotbugs suppressions
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
kitswas [Wed, 25 May 2022 02:18:48 +0000 (07:48 +0530)]
Rename GENERAL_SIMPLETIMER_THREADPOOL_SIZE (#2712)
* Added property with new name, `GENERAL_THREADPOOL_SIZE`
* Marked old property as Deprecated
* Reconcile which property is used, depending on which the
user has set in the configuration
* Updated usages
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Mike Miller [Tue, 24 May 2022 18:48:31 +0000 (18:48 +0000)]
Use href links in Javadoc (#2724)
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Co-authored-by: Luke Foster <84727868+foster33@users.noreply.github.com>
Co-authored-by: Dom G. <domgarguilo@apache.org>
Mike Miller [Tue, 24 May 2022 17:56:59 +0000 (13:56 -0400)]
Merge remote-tracking branch 'upstream/1.10' into main
Mike Miller [Tue, 24 May 2022 17:38:39 +0000 (17:38 +0000)]
Disable Merging MINC by default (#2708)
* Merging minor compactions can lead to bad situations where a Tablet
can't flush. They have been removed in version 2.1. This change makes
the default value of table.compaction.minor.merge.file.size.max 1 byte,
which should disable merging minc by default.
* Here is the situation where a Tablet couldn't flush: An overwhelmed tserver hosting a hot spot Tablet was hitting its max WAL limit (TABLE_MINC_LOGS_MAX) so it was forcing a flush on the Tablet. The TabletServerBatchWriter would try to flush its data by calling applyUpdates() to the current commit session. The flush would timeout on the tserver, presumably due to hitting max number of write threads and/or connection pools filling up. A HoldTimeoutException would be thrown on the client. The WALs would keep growing due to the Tablet not flushing and live ingest continuing.
Christopher Tubbs [Tue, 24 May 2022 17:18:28 +0000 (13:18 -0400)]
Simplify config handling for compaction tests (#2727)
In pom.xml files:
* ensure unit tests configured to run without reusing forks explicitly
override any other includes
In compaction tests:
* avoid use of mock object for AccumuloConfiguration when
DefaultConfiguration or ConfigurationCopy will suffice
* use static import for EasyMock
* Remove unnecessary parameter in test class for AccumuloConfiguration
(retrieve from mocked context object instead)
* use `var` in a few places where it made sense
Avoid UnsupportedOperationException in AccumuloConfiguration:
* Make AccumuloConfiguration.isPropertySet abstract and add missing
implementation
* Remove unnecessary anonymous inner class subclass instances of
AccumuloConfiguration when ConfigurationCopy initialized with
DefaultConfiguration would suffice
Small Compaction constructor improvements:
* Remove redundant constructor code in Compactor and
CompactionCoordinator and ensure code uses the provided
AccumuloConfiguration from tests for all tasks
Nicholas Coltharp [Tue, 24 May 2022 17:12:45 +0000 (17:12 +0000)]
Match new[] with delete[] (#2723)
The C++ standard requires that memory allocated via operator new[] be
freed via operator delete[], but we were freeing it via operator
delete() in a few places. This was causing warnings on GCC12 with
the -Wmismatched-new-delete flag.
Christopher Tubbs [Tue, 24 May 2022 13:19:15 +0000 (09:19 -0400)]
Fix recently broken ZooKeeper ITs (#2728)
Fix ZooKeeper-related ITs broken by #2721, which added authentication to
configuration nodes stored in ZooKeeper. This adds the auth info to the
ZooKeeper object used by the ITs, matching the ZooKeeperTestingServer's
SECRET.
Christopher Tubbs [Tue, 24 May 2022 01:17:25 +0000 (21:17 -0400)]
Ensure ServerUtilOpts is parsed (#2726)
As follow-on to #2651, I noticed that the help no longer worked:
`bin/accumulo org.apache.accumulo.server.util.ChangeSecret --help`
This change ensures that the ServerUtilOpts is parsed in ChangeSecret,
so that if the config file name is specified, the ServerContext can
still be constructed correctly, and so the help feature works correctly
to view the command's usage.
Also, remove an unnecessary subclass of ServerUtilOpts that didn't add
any new parameters, and use the ServerUtilOpts class directly in
ConfigPropertyUpgrader.
Christopher Tubbs [Mon, 23 May 2022 22:56:02 +0000 (18:56 -0400)]
Improve JS formatter script (#2720)
Improve script that formats the JavaScript by echoing the command used
to format, and falling back to formatting one file at a time to support
formatting using older versions of npm/npx
This fixes #2720 to support older versions of npm/npx
Also limit the echo-ing of commands in run-shellcheck.sh to only the
main command
EdColeman [Mon, 23 May 2022 22:37:50 +0000 (22:37 +0000)]
Add ZooKeeper ACLs to encoded propety nodes. (#2721)
* Add ACLs to encoded prop nodes
* update test to get ACLs using ZooReaderWriter method
* add doc update to specify ZooReader needs authenticated session to read props
Christopher Tubbs [Mon, 23 May 2022 20:38:18 +0000 (16:38 -0400)]
Configure opportunistic formatting of JavaScript (#2720)
As part of the formatting profile during the Maven build, attempt to
format JavaScript files in the monitor if the `npx` command is available
to run js-beautify
Include formatting changes to the monitor's JavaScript files
This fixes #2713
Christopher Tubbs [Mon, 23 May 2022 16:25:06 +0000 (12:25 -0400)]
Keep new exception when closing socket (#2722)
When closing a socket as the result of an exception, also keep any
exception from the attempt to close it, appended to the original
exception as a suppressed exception
Dom G [Fri, 20 May 2022 14:57:52 +0000 (10:57 -0400)]
Convert tables in monitor `/manager` page to DataTables (#2703)
* Convert tables to datatables
* Create function for reloading datatable in functions.js
* Apply formatting
Dom G [Thu, 19 May 2022 13:35:57 +0000 (09:35 -0400)]
Format functions.js (#2711)
* Format file to conform to jslint
Mike Miller [Thu, 19 May 2022 11:02:52 +0000 (11:02 +0000)]
Improve the madness in the GC (#2716)
* Add comments to makeRelative method and simplify
* Create new emptyPathsTest in GarbageCollectionTest
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Mike Miller [Wed, 18 May 2022 15:19:09 +0000 (15:19 +0000)]
Create TabletDirectory classes (#2688)
* Create TabletDirectory and RelativeTabletDirectory
* Move Reference class and improve it so other classes can be children
* Add validate method to StoredTabletFile
* Use TabletDirectory in TabletFile
* Refactor some GC code
Christopher Tubbs [Tue, 17 May 2022 21:10:02 +0000 (17:10 -0400)]
Merge branch '1.10'
EdColeman [Tue, 17 May 2022 20:58:03 +0000 (16:58 -0400)]
Update documentation with purpose of the "cache" (#2714)
* Update documentation with purpose of the "cache"
- Remove the TODO with an explanation that the class supports legacy
clients.
* Update core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCacheFactory.java
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
* Fix formatting
Co-authored-by: Ed Coleman etcoleman <edcoleman@apache.org>
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Mike Miller [Tue, 17 May 2022 19:26:00 +0000 (19:26 +0000)]
General improvements to CI (#2715)
Dave Marion [Tue, 17 May 2022 15:15:51 +0000 (11:15 -0400)]
Resolve todo by removing unused MajorCompactionRequest.openReader method (#2710)
Related to #2699
Christopher Tubbs [Mon, 16 May 2022 12:32:04 +0000 (08:32 -0400)]
Bump libthrift to 0.16.0 (#2706)
Christopher Tubbs [Mon, 16 May 2022 12:31:49 +0000 (08:31 -0400)]
Delete undefined thrift-generated files (#2705)
Update generate-thrift.sh to detect and delete any files that were
generated from a previous version of the `*.thrift` IDL files, but are
no longer generated in the current version.
EdColeman [Sat, 14 May 2022 23:09:38 +0000 (19:09 -0400)]
Update test documentation to clarify purpose. (#2704)
Christopher Tubbs [Fri, 13 May 2022 22:18:42 +0000 (18:18 -0400)]
Minor little cleanups (#2695)
* Remove or narrow unnecessary or broad warnings suppressions
* Shorten the lookup of annotations in Property.java
* Use Streams where they simplify or improve the processing of big loops
* Shorten a few lines with casts using var
* Improve use of generics in a few places
* Fix license header in proto generation to be consistent with project
* Avoid unnecessary reflection to load DistCp in ShellServerIT
* Remove unneeded super()
Emily [Fri, 13 May 2022 22:09:16 +0000 (18:09 -0400)]
Add front-end console logging in Monitor (#2679)
* Add console logging to REST calls
* Consolidate REST GET call code into single function
* Consolidate REST POST code and update in-line args
Dave Marion [Fri, 13 May 2022 21:47:39 +0000 (17:47 -0400)]
Consolidated duplicate Thrift client code (#2647)
* Consolidated Thrift client methods, removed ManagerClient, ServerClient and ReplicationClient
* Add missing dependency
* Removed unused ClientExec, moved ClientExecReturn into replication code
* Moved ThriftClientTypes to a new subpackage and created new classes for
each implementation that required special logic. Added an executeVoid
method and used that to remove the extraneous `return null` lines.
* Consolidated code added in #2622 into utility method
* Narrow the exceptions being thrown from Exec methods to just Thrift
TException (plus RuntimeExceptions)
* Remove catch clauses that aren't needed due to never being thrown or
redundant with another catch clause
* Remove unnecessary class nesting layers
* Remove unnecessary second generic parameter for ThriftClientTypes
* Use AtomicBoolean to force pass by reference, instead of trying to
pass boxed Boolean objects, which is a bit dubious, because it's not
clear to the reader that it's not being auto-boxed/auto-unboxed and
using pass by value instead of the intended pass by reference
* Make ThriftClientTypes abstract, to make implementing subclasses more
clear and to more easily identify classes that don't implement certain
critical methods
* IDE also optimized a few things, removing extra parens, converting
some anonymous inner classes to lambdas, using method references for
simple lambdas, and removing unnecessary return statements
* Get rid of unnecessary passing AccumuloConfiguration
* Avoid unnecessary rewrapping of RuntimeExceptions as another
RuntimeException when creating the processors
* Fix extremely trivial warnings suppression
* Use narrower exceptions
* Rethrow exception in missing case, where cause of
TableNotFoundException is not NamespaceNotFoundException
* Add compile-time dependency to shell (hopefully we can fix that in
future, but it's hard to track down)
* Implement the execute method in ReplicationCoordinatorThriftClient
* Fix failure in NamespacesIT
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Dave Marion [Fri, 13 May 2022 16:35:29 +0000 (12:35 -0400)]
Make variables/functions more clear in TabletLocatorImplTest (#2702)
Closes #2698
EdColeman [Thu, 12 May 2022 14:26:21 +0000 (10:26 -0400)]
Narrow static util method, writer not needed, use ZooReader (#2694)
Dom G [Wed, 11 May 2022 22:32:01 +0000 (18:32 -0400)]
Improve MiniAccumuloClusterTest (#2693)
Emily [Wed, 11 May 2022 22:06:24 +0000 (22:06 +0000)]
Add check for ReplicationTable online status in Monitor (#2666)
Dom G [Wed, 11 May 2022 18:32:24 +0000 (14:32 -0400)]
Convert deadTServers and badTServers tables to DataTables (#2685)
* replace tables with DataTables
* format code via jslint standards
Dave Marion [Wed, 11 May 2022 16:10:18 +0000 (12:10 -0400)]
Prevent NPE in TabletServer.run by starting Thrift server after CompactionManager (#2684)
Closes #2669
Dave Marion [Wed, 11 May 2022 16:09:26 +0000 (12:09 -0400)]
Execute Caffeine tasks in current Thread for tests (#2691)
* Execute Caffeine tasks in current Thread for tests
As described at https://github.com/ben-manes/caffeine/wiki/Testing, Caffeine
delegates maintenance tasks (eviction, refreshes, etc.) to background threads
to take advantage of batching. This change implements the suggestion at
https://github.com/ben-manes/caffeine/issues/455#issuecomment-
689398669 to
run all of the maintenance tasks in the current Thread for testing. Using
Cache.cleanup as suggested in the wiki page did not appear to work, but this
approach allows us to remove all of the calls to Thread.sleep in the tests.
Emily [Tue, 10 May 2022 21:59:48 +0000 (21:59 +0000)]
Add declaration for scansList prior to usage (#2687)
Christopher Tubbs [Tue, 10 May 2022 21:28:37 +0000 (17:28 -0400)]
Merge branch 'single-node-props'
This closes #1225, #1454, #1809
EdColeman [Tue, 10 May 2022 21:13:08 +0000 (17:13 -0400)]
Single node prop store (#2569)
Convert multiple node property configuration to a single-node encoded store.
This reduces the number of ZooKeeper watchers needed to track property
changes, and sets the groundwork for atomic changes to multiple properties
in the future.
Co-authored-by: Ed Coleman etcoleman <edcoleman@apache.org>
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Christopher Tubbs [Wed, 27 Apr 2022 19:51:56 +0000 (15:51 -0400)]
Minor enhancements to ZK utilities
Christopher Tubbs [Wed, 27 Apr 2022 19:31:22 +0000 (15:31 -0400)]
Include classloader context in log message
Christopher Tubbs [Wed, 27 Apr 2022 17:46:24 +0000 (13:46 -0400)]
Improve getting parent from AccumuloConfiguration
* Also improve the singleton loading of DefaultConfiguration to reduce
object creation
Christopher Tubbs [Tue, 26 Apr 2022 19:53:32 +0000 (15:53 -0400)]
Remove isPropertySet option for caching
This is an incremental change from the single-node property changes
EdColeman [Tue, 10 May 2022 20:26:40 +0000 (16:26 -0400)]
Remove json prettyPrint from RootGcCandidates (#2681)
- removes multi-line json output from logs
Co-authored-by: Ed Coleman etcoleman <edcoleman@apache.org>
Mike Miller [Tue, 10 May 2022 14:46:57 +0000 (10:46 -0400)]
Rename some confusing GC methods (#2686)
Christopher Tubbs [Mon, 9 May 2022 19:12:22 +0000 (15:12 -0400)]
Run shfmt and shellcheck on scripts (#2677)
* Run shfmt to format scripts
* Run shellcheck to check all scripts for bugs
* Add automated check for shfmt and shellcheck during CI
Christopher Tubbs [Sat, 7 May 2022 00:44:45 +0000 (20:44 -0400)]
Add VFS type mapping for new jar mime type (#2683)
Add VFS type mapping for the new jar mime type added in newer versions
of Java 17, application/java-archive, to ensure it is associated with
the "jar" scheme in VFS. This ensures VFS loads jars correctly when run
on a newer version of Java.
This fixes #2682
See related: https://issues.apache.org/jira/browse/VFS-819
Mike Miller [Fri, 6 May 2022 15:29:39 +0000 (11:29 -0400)]
GC Blip Count Follow up Fixes (#2678)
* Move blip counter to the correct place
* Improve GarbageCollectionTest
Dom G [Fri, 6 May 2022 15:10:14 +0000 (11:10 -0400)]
Bug fix for caption in tservers table in monitor (#2674)
* Patch bug with caption remaining highlighted
Mike Miller [Fri, 6 May 2022 10:33:34 +0000 (06:33 -0400)]
Clean up bulkImport js (#2675)
* Refactor bulkImport.js to be formatted properly and use concise jquery
Co-authored-by: Dom G. <domgarguilo@apache.org>
Emily [Wed, 4 May 2022 22:56:13 +0000 (22:56 +0000)]
Update Replication Table offline message in Monitor (#2676)
Mike Miller [Wed, 4 May 2022 20:12:13 +0000 (16:12 -0400)]
Add new blip count to GC (#2672)
* Update GarbageCollectionTest to count blips
* Split up confirmDeletes into 3 methods
Mike Miller [Tue, 3 May 2022 12:40:33 +0000 (08:40 -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
Dom G [Fri, 29 Apr 2022 20:50:18 +0000 (16:50 -0400)]
Highlight rows with recovering tservers in the tserver status table (#2663)
* highlight recovering tservers
* add caption when there are recovering tservers
Mike Miller [Fri, 29 Apr 2022 20:21:12 +0000 (16:21 -0400)]
Add js strict directive to each js file (#2664)
Mike Miller [Fri, 29 Apr 2022 10:51:51 +0000 (06:51 -0400)]
Upgrade to Bootstrap v3.4.1 and include missing map files (#2662)
* Upgrade to Bootstrap v3.4.1
* Add missing map files to fix console errors
* Update License file
Christopher Tubbs [Fri, 29 Apr 2022 00:56:24 +0000 (20:56 -0400)]
Check for misplaced ITs
Christopher Tubbs [Fri, 29 Apr 2022 00:56:03 +0000 (20:56 -0400)]
Use getCount for COUNT property types
Christopher Tubbs [Fri, 29 Apr 2022 00:44:43 +0000 (20:44 -0400)]
Bump caffeine dependency
Dave Marion [Thu, 28 Apr 2022 20:06:57 +0000 (16:06 -0400)]
Add base objects for Tablet and TabletServer for the upcoming ScanServer feature (#2661)
This commit introduces TabletBase, a base class for Tablets, and TabletHostingServer,
an interface for server components that host Tablets. These changes will be used by
the ScanServer feature that is in the works.
Related to #2411
Co-authored-by: Keith Turner <kturner@apache.org>
Christopher Tubbs [Thu, 28 Apr 2022 17:47:21 +0000 (13:47 -0400)]
Use memoized suppliers to lazy load resources (#2658)
* Remove the need to synchronize on reads for lazily initialized
singleton resources, particularly in the configuration and context
utilities, using Suppliers.memoize
* Apply to DefaultConfiguration.getInstance() to avoid unnecessary
object creation whenever that is called
* Make all ServerContext fields final, and use memoize to lazily load
anything that was previously checking if it was set in a synchronized
getter method
* Use computeIfAbsent in ServerConfigurationFactory, and make its caches
of configuration objects non-static, so they only live as long as the
ServerContext that created it lives; this, along with using
ConcurrentHashMaps, dramatically simplifies this code
* Reduce ServerContext reliance on ServerConfigurationFactory when it
already has the information (notably, it has the instance of
SiteConfiguration it used to construct the ServerConfigurationFactory)
* Add a builder option for SiteConfiguration.empty() for use with tests
* Update related tests, and make ServerContextTest.testCanRun more
robust
Mark Owens [Thu, 28 Apr 2022 17:40:34 +0000 (13:40 -0400)]
Resolve unused format arguments (#2655)
* Resolve unused format arguments
Updated instances where the number of format arguments did not
match number of arguments.
In CompactionCoordinator the compactorAddress was a third argument for
a statement containing only two format arguments. The compactorAddress
was dropped as it did not seem to be necessary.
In AuditedSecurityOperation there were two occasions of mismatched
formats and arguments. In both cases, an additional format argument was
added to allow both the tableName and tableId to be displayed in the
audit log.
Changes to AuditMessage formatting affected the associated IT test as
well. Updated the IT test to work with the previous changes.
Mike Miller [Thu, 28 Apr 2022 14:46:01 +0000 (10:46 -0400)]
Replace more js with jquery in server.js (#2652)
* Replace javascript code with more readable and clearer jquery
* Add static rows and table cells to tserver tables instead of dynamically creating the rows
* Create clearAllTableCells() js function to be reused
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Dom G [Thu, 28 Apr 2022 13:05:52 +0000 (09:05 -0400)]
Replace iterator usage (#2646)
* Use streams to simplify iterator usage
* Add more short-circuit empty/non-empty checks
Dom G [Thu, 28 Apr 2022 11:24:11 +0000 (07:24 -0400)]
Address TODOs found in code (#2648)
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Dave Marion [Thu, 28 Apr 2022 11:05:28 +0000 (07:05 -0400)]
Modified Shell tracing to use native OpenTelemetry Tracer (#2656)
Removed TraceUtil.enable/disable and modified the Shell to
create a Tracer like a normal application would do when using
Accumulo
Closes #2623
Christopher Tubbs [Thu, 28 Apr 2022 06:30:43 +0000 (02:30 -0400)]
More improvements to new SecurityOperation
* Make all fields private final, and non-static
* Lazily load root username so synchronization isn't needed to read it
after it's loaded, using Suppliers.memoize()
* Limit visibility of methods to private that are intended as internal
Dave Marion [Wed, 27 Apr 2022 20:48:22 +0000 (20:48 +0000)]
Moved AuditedSecurityOperation to ServerContext
Closes #2504