You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2022/02/02 15:39:09 UTC

[accumulo] branch main updated: Remove redundant native map loading (#2453)

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

ctubbsii 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 da1944c  Remove redundant native map loading (#2453)
da1944c is described below

commit da1944c5a5b9261619e7330feb551e1d0034159e
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Wed Feb 2 10:39:01 2022 -0500

    Remove redundant native map loading (#2453)
    
    Remove redundant call to NativeMapLoader.load() in NativeMap, which
    isn't needed because the TabletServerResourceManager already loads it
    when the tserver starts up. This static initializer caused problems with
    test references to NativeMap, and tried to load the native map library
    before the test had a chance to load it from the search path.
    
    Instead, if NativeMap is attempted to be used without loading the native
    library, it will just naturally throw an UnsatisfiedLinkError.
    
    This fixes #2450
---
 .../tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
index 5d4d9fa..50cc142 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
@@ -46,7 +46,6 @@ import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iteratorsImpl.system.InterruptibleIterator;
 import org.apache.accumulo.core.iteratorsImpl.system.IterationInterruptedException;
 import org.apache.accumulo.core.util.PreAllocatedArray;
-import org.apache.accumulo.tserver.memory.NativeMapLoader;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -67,10 +66,6 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
 
   private static final Logger log = LoggerFactory.getLogger(NativeMap.class);
 
-  static {
-    NativeMapLoader.load();
-  }
-
   private final AtomicLong nmPtr = new AtomicLong(0);
 
   private final ReadWriteLock rwLock;