You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2024/05/22 14:51:35 UTC

(accumulo) branch elasticity updated (8f18d29f32 -> 0b0d0d39a4)

This is an automated email from the ASF dual-hosted git repository.

kturner pushed a change to branch elasticity
in repository https://gitbox.apache.org/repos/asf/accumulo.git


    from 8f18d29f32 adds toggle for automatically setting lock on mutation (#4584)
     add 187074c908 log cache type when logging cache stats (#4585)
     add 9edd74bb06 Merge branch '2.1'
     new 0b0d0d39a4 Merge branch 'main' into elasticity

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:
 .../accumulo/core/file/blockfile/cache/lru/LruBlockCache.java  | 10 +++++-----
 .../file/blockfile/cache/lru/LruBlockCacheConfiguration.java   |  4 ++++
 .../core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java   |  4 +++-
 3 files changed, 12 insertions(+), 6 deletions(-)


(accumulo) 01/01: Merge branch 'main' into elasticity

Posted by kt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch elasticity
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit 0b0d0d39a415decae13099cd68beac85ef30109d
Merge: 8f18d29f32 9edd74bb06
Author: Keith Turner <kt...@apache.org>
AuthorDate: Wed May 22 10:49:34 2024 -0400

    Merge branch 'main' into elasticity

 .../accumulo/core/file/blockfile/cache/lru/LruBlockCache.java  | 10 +++++-----
 .../file/blockfile/cache/lru/LruBlockCacheConfiguration.java   |  4 ++++
 .../core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java   |  4 +++-
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --cc core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java
index ab86ac1a58,7ee9dadbf8..2baba46caf
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java
@@@ -64,14 -63,15 +64,15 @@@ public final class TinyLfuBlockCache im
    private final int maxSize;
    private final ScheduledExecutorService statsExecutor = ThreadPools.getServerThreadPools()
        .createScheduledExecutorService(1, "TinyLfuBlockCacheStatsExecutor");
+   private final CacheType type;
  
    public TinyLfuBlockCache(Configuration conf, CacheType type) {
 -    cache = Caffeine.newBuilder()
 +    cache = Caches.getInstance().createNewBuilder(CacheName.TINYLFU_BLOCK_CACHE, false)
          .initialCapacity((int) Math.ceil(1.2 * conf.getMaxSize(type) / conf.getBlockSize()))
 -        .weigher((String blockName, Block block) -> {
 +        .recordStats().weigher((String blockName, Block block) -> {
            int keyWeight = ClassSize.align(blockName.length()) + ClassSize.STRING;
            return keyWeight + block.weight();
 -        }).maximumWeight(conf.getMaxSize(type)).recordStats().build();
 +        }).maximumWeight(conf.getMaxSize(type)).build();
      policy = cache.policy().eviction().orElseThrow();
      maxSize = (int) Math.min(Integer.MAX_VALUE, policy.getMaximum());
      ScheduledFuture<?> future = statsExecutor.scheduleAtFixedRate(this::logStats, STATS_PERIOD_SEC,