cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-9381) AbstractColumnFamilyInputFormat is incorrectly interpreting token values when building ColumnFamilySplit
Date Fri, 15 May 2015 11:28:03 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-9381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14545349#comment-14545349
] 

Aleksey Yeschenko commented on CASSANDRA-9381:
----------------------------------------------

Committed to trunk as {{1644e82f757024df8833668e54cb75e309d9f427}}, thanks.

> AbstractColumnFamilyInputFormat is incorrectly interpreting token values when building
ColumnFamilySplit
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9381
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9381
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>            Reporter: Mike Adamson
>            Assignee: Philip Thompson
>             Fix For: 2.2 beta 1
>
>         Attachments: 9381-1.txt
>
>
> The SplitCallable.call method in AbstractColumnFamilyInputFormat has the following code
for building ColumnFamilySplits:
> {noformat}
>             for (TokenRange subSplit : subSplits.keySet())
>             {
>                 List<TokenRange> ranges = subSplit.unwrap();
>                 for (TokenRange subrange : ranges)
>                 {
>                     ColumnFamilySplit split =
>                             new ColumnFamilySplit(
>                                     subrange.getStart().toString().substring(2),
>                                     subrange.getEnd().toString().substring(2),
>                                     subSplits.get(subSplit),
>                                     endpoints);
>                     logger.debug("adding {}", split);
>                     splits.add(split);
>                 }
>             }
> {noformat}
> The subrange.getStart().toString().substring(2) works for the OrderPreservingPartitioner
because the toString for the OPPToken in the java driver returns a hex value preceded by 0x.
It doesn't work for the Murmur3Partitioner because the toString for the M3PToken returns Long.toString.
> As a result the tokens lose their first 2 digits.



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

Mime
View raw message