, December 20, 2017 6:09 PM
To: dev
Subject: Re: How to fetch replication factor of a given keyspace
I think you want:
Schema.instance.getKeyspaceMetadata
There is a ReplicationParams nested under there which should have everything
you need fully populated.
On Thu, Dec 21, 2017 at 2:02 PM, Tyagi
Did you look at how status fetches and initialises the keyspace? Have a
look at org.apache.cassandra.service.StorageService#effectiveOwnership. It
uses a keyspace and its RF to measure ownership. The same method should
work for any nodetool command that needs a keyspace. Note that depending on
what
I think you want:
Schema.instance.getKeyspaceMetadata
There is a ReplicationParams nested under there which should have
everything you need fully populated.
On Thu, Dec 21, 2017 at 2:02 PM, Tyagi, Preetika
wrote:
> Hi,
>
> If I need to get the replication factor of a given keyspace in nodetool