cassandra-commits mailing list archives

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


Jason Brown commented on CASSANDRA-13233:

On the whole, this is pretty good, but why did you remove the class member constants {{FILE_DESCRIPTOR_FD_FIELD}}
and {{FILE_CHANNEL_FD_FIELD}} from {{CLIbrary}}? The code now needs to get the protected field
on every invocation of {{getfd(FileChannel)}} and  {{getfd(FileDescriptor)}}. Is there something
inherently more safe in fetching the reference to the {{Field}} on every invocation?

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