cassandra-commits mailing list archives

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

    [ https://issues.apache.org/jira/browse/CASSANDRA-13233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15893204#comment-15893204
] 

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
trunk.

> Improve testing on macOS by eliminating sigar logging
> -----------------------------------------------------
>
>                 Key: CASSANDRA-13233
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13233
>             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 SigarLibrary.java:44 - Initializing SIGAR library
> DEBUG [main] 2016-10-18T11:20:10,342 SigarLog.java:60 - 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.java:172) ~[sigar-1.6.4.jar:?]
>         at org.hyperic.sigar.Sigar.<clinit>(Sigar.java:100) [sigar-1.6.4.jar:?]
>         at org.apache.cassandra.utils.SigarLibrary.<init>(SigarLibrary.java:47)
[main/:?]
>         at org.apache.cassandra.utils.SigarLibrary.<clinit>(SigarLibrary.java:28)
[main/:?]
>         at org.apache.cassandra.utils.UUIDGen.hash(UUIDGen.java:363) [main/:?]
>         at org.apache.cassandra.utils.UUIDGen.makeNode(UUIDGen.java:342) [main/:?]
>         at org.apache.cassandra.utils.UUIDGen.makeClockSeqAndNode(UUIDGen.java:291) [main/:?]
>         at org.apache.cassandra.utils.UUIDGen.<clinit>(UUIDGen.java:42) [main/:?]
>         at org.apache.cassandra.config.CFMetaData$Builder.build(CFMetaData.java:1278)
[main/:?]
>         at org.apache.cassandra.SchemaLoader.standardCFMD(SchemaLoader.java:369) [classes/:?]
>         at org.apache.cassandra.SchemaLoader.standardCFMD(SchemaLoader.java:356) [classes/:?]
>         at org.apache.cassandra.SchemaLoader.standardCFMD(SchemaLoader.java:351) [classes/:?]
>         at org.apache.cassandra.batchlog.BatchTest.defineSchema(BatchTest.java:59) [classes/:?]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_66]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_66]
>         at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66]
>         at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
[junit-4.6.jar:?]
>         at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
[junit-4.6.jar:?]
>         at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
[junit-4.6.jar:?]
>         at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
[junit-4.6.jar:?]
>         at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
[junit-4.6.jar:?]
>         at org.junit.runners.ParentRunner.run(ParentRunner.java:220) [junit-4.6.jar:?]
>         at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) [junit-4.6.jar:?]
>         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:535)
[ant-junit.jar:?]
>         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1182)
[ant-junit.jar:?]
>         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1033)
[ant-junit.jar:?]
> INFO  [main] 2016-10-18T11:20:10,350 SigarLibrary.java:57 - 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
(v6.3.15#6346)

Mime
View raw message