1

Cassandra DB version is 4.0.5, cassandra nodejs driver version is 4.6.4.

According to this solution I'm creating a cassandra nodejs client with the following code:

const client = new cassandra.Client({
    contactPoints: ['127.0.0.1'],
    localDataCenter: 'datacenter1',
    encoding: {
        map: Map
    }
})

When I try to get keyspaces with client.metadata.keyspaces the result is the following:

...
"system_auth": {
        "name": "system_auth",
        "strategyOptions": {},
        "strategy": undefined,
        ...
    },

The fields "strategy", "strategyOptions" are not populated by cassandra nodejs driver.
If I don't specify encoding for client:

const client = new cassandra.Client({
    contactPoints: ['127.0.0.1'],
    localDataCenter: 'datacenter1'
})

then the result of client.metadata.keyspaces is:

...,
"system_auth": {
        "name": "system_auth",
        "strategy": "org.apache.cassandra.locator.SimpleStrategy",
        "strategyOptions": {
            "replication_factor": "1"
        },
        ...
}

The keyspace strategy here is populated.
Why is this happening and how can I get the keyspaces metadata in the situation when I need to specify the encoding for the client?

Liberator
  • 75
  • 7

0 Answers0