cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Resolved] (CASSANDRA-13350) getByPk() utility methods in Datastax session object
Date Mon, 20 Mar 2017 08:27:41 GMT


Sylvain Lebresne resolved CASSANDRA-13350.
    Resolution: Invalid

I'm pretty sure this is a request for the [DataStax Java driver|]
which is a separate. Please inquire about this with said project.

> getByPk() utility methods in Datastax session object
> ----------------------------------------------------
>                 Key: CASSANDRA-13350
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sachin Goyal
> Data modeling in Cassandra is the key to querying.
> Best way to query is to have tables where you always query by primary-key or by partition-key.
> And yet there is no method in the datastax's session object that simplifies this process.
> It would be great to have methods like:
> # session.getByPrimaryKey (String tableName, Object []primaryKeys)
> # session.getByPartitionKey (String tableName, Object []partitionKeys)
> # session.getByPartitionKeys (String tableName, Object [][]partitionKeys) // Like an
> # session.getByPrimaryKeys (String tableName, Object [][]primaryKeys)
> The last is an unsupported feature yet in Cassandra but it would be really awesome to
have the same. It would be like a read equivalent of the batch-statements in write.
> Advantages:
> # Ease-of-use: User does not have to create a string query or a prepared query.
> # User does not have to worry about [using prepared statements with select * queries|].
I am not yet sure how the driver would handle it but if it can, wow!
> # If murmur-3 hashing in the client is same as the cluster, clients can query just the
right node (Better token-aware?)
> Such methods are present in several other software. Examples:
> # Hibernate: [session.get()|]
> # JPA: [find()|].
> # Solr: [getById()|]
and several flavors of the same.
> (Please note that these links are just an example, not meant to provide implementation
details or the behavior).
> As a feature, *session.getByPrimaryKeys (String tableName, Object [][]primaryKeys)* should
 help get a performance boost to the users because it allows running queries for different
partitions in parallel and also allows getting results from the same partition in one query.
We can put this in a separate JIRA task if it is seen as a useful feature by all.

This message was sent by Atlassian JIRA

View raw message