cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward Ribeiro (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-12271) NonSystemKeyspaces jmx attribute needs to return jre list
Date Tue, 02 Aug 2016 18:15:21 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-12271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Edward Ribeiro updated CASSANDRA-12271:
---------------------------------------
    Attachment: screenshot-2.png
                CASSANDRA-12271.patch

Hey [~cnlwsu], I am submitting a small patch to address this.
Some considerations:

1.  I could have just written 

{code}
return Collections.unmodifiableList(ArrayList<>(Schema.instance.getNonSystemKeyspaces()));
{code}

But I chose to maintain the "look" of the above method ({{getKeyspaces()}}).

wdyt?

2. The main problem with mine approach to this patch is that it copies the content from a
ImmutableList that has been itself copied from other collection (inside {{Schema.instance.getNonSystemKeyspaces}}).
:(

*But* I would prefer to do this than alter {{Schema.instance.getNonSystemKeyspaces}}. Also,
I suppose the keyspace list is not that large, and this method changed is basically called
by the nodeProbe (JMX). wdyt?

3. As you can see from the screenshot I have attached (and the code), {{NonSystemKeyspaces}}
is equals to {{NonLocalStrategyKeyspaces}}. Is that right?

> NonSystemKeyspaces jmx attribute needs to return jre list
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-12271
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12271
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Chris Lohfink
>              Labels: lhf
>         Attachments: CASSANDRA-12271.patch, screenshot-1.png, screenshot-2.png
>
>
> If you dont have right guava in classpath you cant query the NonSystemKeyspaces attribute.
i.e. jconsole. can reproduce using Swiss java knife:
> {code}
> # java -jar sjk.jar mx -s localhost:7199 -mg -b "org.apache.cassandra.db:type=StorageService"
-f NonSystemKeyspaces
> org.apache.cassandra.db:type=StorageService
> java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
> 	java.lang.ClassNotFoundException: com.google.common.collect.ImmutableList$SerializedForm
(no security manager: RMI class loader disabled)
> {code}
> If return a ArrayList or LinkedList or anything in JRE this will be fixed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message