You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/07/28 16:48:45 UTC

[GitHub] [accumulo] dlmarion commented on pull request #2834: Provide getProperties method on Configuration that does not filter

dlmarion commented on PR #2834:
URL: https://github.com/apache/accumulo/pull/2834#issuecomment-1198394023

   User was running tests against 2.1.0-SNAPSHOT and found that getting properties was consuming an unexpected amount of CPU time. User provided stack trace:
   
   ```
   "Split/MajC initiator" #51 daemon prio=5 os_prio=0 cpu=8876417.63ms elapsed=70703.21s tid=0x0000561224710000 nid=0x29e1 runnable  [0x00007fbceee29000]    java.lang.Thread.State: RUNNABLE
            at org.apache.accumulo.core.conf.DefaultConfiguration.lambda$getProperties$1(DefaultConfiguration.java:59)
            at org.apache.accumulo.core.conf.DefaultConfiguration$$Lambda$247/0x00000008403ce840.test(Unknown Source)
            at java.util.stream.ReferencePipeline$2$1.accept(java.base@11.0.15/ReferencePipeline.java:176)
            at java.util.HashMap$EntrySpliterator.forEachRemaining(java.base@11.0.15/HashMap.java:1764)
            at java.util.stream.AbstractPipeline.copyInto(java.base@11.0.15/AbstractPipeline.java:484)
            at java.util.stream.AbstractPipeline.wrapAndCopyInto(java.base@11.0.15/AbstractPipeline.java:474)
            at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(java.base@11.0.15/ForEachOps.java:150)
            at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(java.base@11.0.15/ForEachOps.java:173)
            at java.util.stream.AbstractPipeline.evaluate(java.base@11.0.15/AbstractPipeline.java:234)
            at java.util.stream.ReferencePipeline.forEach(java.base@11.0.15/ReferencePipeline.java:497)
            at org.apache.accumulo.core.conf.DefaultConfiguration.getProperties(DefaultConfiguration.java:60)
            at org.apache.accumulo.core.conf.SiteConfiguration.getProperties(SiteConfiguration.java:272)
            at org.apache.accumulo.core.conf.SiteConfiguration.getProperties(SiteConfiguration.java:266)
            at org.apache.accumulo.server.conf.ZooBasedConfiguration.getProperties(ZooBasedConfiguration.java:127)
            at org.apache.accumulo.core.conf.AccumuloConfiguration.get(AccumuloConfiguration.java:84)
            at org.apache.accumulo.server.conf.NamespaceConfiguration.get(NamespaceConfiguration.java:62)
            at org.apache.accumulo.server.conf.TableConfiguration.get(TableConfiguration.java:98)
            at org.apache.accumulo.core.conf.AccumuloConfiguration.getAsBytes(AccumuloConfiguration.java:240)
            at org.apache.accumulo.tserver.tablet.Tablet.findSplitRow(Tablet.java:1196)
            at org.apache.accumulo.tserver.tablet.Tablet.needsSplit(Tablet.java:1344)
            - locked <0x0000000547991f30> (a org.apache.accumulo.tserver.tablet.Tablet)
            at org.apache.accumulo.tserver.TabletServer$MajorCompactor.run(TabletServer.java:457)
   ```
   
   The DefaultConfiguration.getProperties method is inefficient (O(n)) when you know which properties you want to pull from the map (O(1)).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org