cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Kjellman (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-13233) Improve testing on macOS by eliminating sigar logging
Date Thu, 02 Mar 2017 23:07:45 GMT


Michael Kjellman commented on CASSANDRA-13233:

Attaching an updated patch to add the class member constants back. Looks like this was changed
to use a static constant vs calling getField each time in some 3.x version -- which was after
I did the initial patch back on 2.1 and I just didn't catch it when I rebased the patch for

> Improve testing on macOS by eliminating sigar logging
> -----------------------------------------------------
>                 Key: CASSANDRA-13233
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Michael Kjellman
>            Assignee: Michael Kjellman
>         Attachments: 28827709.diff, CASSANDRA-13233-trunk-v2.diff
> The changes introduced in CASSANDRA-7838 (Resolved; Fixed; 2.2.0 beta 1): "Warn user
when OS settings are poor / integrate sigar" are not Mac friendly.
> {code}
> INFO  [main] 2016-10-18T11:20:10,330 - Initializing SIGAR library
> DEBUG [main] 2016-10-18T11:20:10,342 - no libsigar-universal64-macosx.dylib
in java.library.path
> org.hyperic.sigar.SigarException: no libsigar-universal64-macosx.dylib in java.library.path
>         at org.hyperic.sigar.Sigar.loadLibrary( ~[sigar-1.6.4.jar:?]
>         at org.hyperic.sigar.Sigar.<clinit>( [sigar-1.6.4.jar:?]
>         at org.apache.cassandra.utils.SigarLibrary.<init>(
>         at org.apache.cassandra.utils.SigarLibrary.<clinit>(
>         at org.apache.cassandra.utils.UUIDGen.hash( [main/:?]
>         at org.apache.cassandra.utils.UUIDGen.makeNode( [main/:?]
>         at org.apache.cassandra.utils.UUIDGen.makeClockSeqAndNode( [main/:?]
>         at org.apache.cassandra.utils.UUIDGen.<clinit>( [main/:?]
>         at org.apache.cassandra.config.CFMetaData$
>         at org.apache.cassandra.SchemaLoader.standardCFMD( [classes/:?]
>         at org.apache.cassandra.SchemaLoader.standardCFMD( [classes/:?]
>         at org.apache.cassandra.SchemaLoader.standardCFMD( [classes/:?]
>         at org.apache.cassandra.batchlog.BatchTest.defineSchema( [classes/:?]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>         at java.lang.reflect.Method.invoke( ~[?:1.8.0_66]
>         at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(
>         at
>         at org.junit.runners.model.FrameworkMethod.invokeExplosively(
>         at org.junit.internal.runners.statements.RunBefores.evaluate(
>         at org.junit.internal.runners.statements.RunAfters.evaluate(
>         at [junit-4.6.jar:?]
>         at [junit-4.6.jar:?]
>         at
>         at
>         at
> INFO  [main] 2016-10-18T11:20:10,350 - Could not initialize SIGAR
library org.hyperic.sigar.Sigar.getFileSystemListNative()[Lorg/hyperic/sigar/FileSystem;
> {code}
> There are 2 issues addressed by the attached patch:
> # Create platform aware (windows, Darwin, linux) implementations of CLibrary (for instance
CLibrary today assumes all platforms have support for posix_fadvise but this doesn't exist
in the Darwin kernel). If methods are defined with the "native" JNI keyword in java when the
class is loaded it will cause our jna check to fail incorrectly making all of CLibrary "disabled"
even though because jnaAvailable = false even though on a platform like Darwin all of the
native methods except posix_fadvise are supported.
> # Replace sigar usage to get current pid with calls to CLibrary/native equivalent --
and fall back to Sigar for platforms like Windows who don't have that support with JDK8 (and
without a CLibrary equivalent)

This message was sent by Atlassian JIRA

View raw message