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

Niel Drummond updated CASSANDRA-4466:
-------------------------------------

    Description: 
When running hadoop-cassandra jobs with range queries over ghost keys, the 
ColumnFamilyRecordReader throws an exception if the last key in a slice_range 
query is a ghost key. 

This seems to be related to changes made in #2855 ( 
https://issues.apache.org/jira/browse/CASSANDRA-2855 ), to prevent ghost keys 
appearing in a hadoop map. 

The call stack trace is attached.

I made a one-line change to ColumnFamilyRecordReader.java, which seems to solve 
this issue for us.


  was:
When running hadoop-cassandra jobs with range queries over ghost keys, the 
ColumnFamilyRecordReader throws an exception if the last key in a slice_range 
query is a ghost key. 

This seems to be related to changes made in #2855 ( 
https://issues.apache.org/jira/browse/CASSANDRA-2855 ), to prevent ghost keys 
appearing in a hadoop map. 

The stack trace I get is:
java.lang.RuntimeException: java.util.NoSuchElementException
        at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:392)
 ~[cassandra-all-1.1.2.jar:1.1.2]
        at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:398)
 ~[cassandra-all-1.1.2.jar:1.1.2]
        at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:324)
 ~[cassandra-all-1.1.2.jar:1.1.2]
        at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
 ~[guava-r09.jar:na]
        at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) 
~[guava-r09.jar:na]
        at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader.nextKeyValue(ColumnFamilyRecordReader.java:189)
 ~[cassandra-all-1.1.2.jar:1.1.2]
        at 
org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)
 ~[hadoop-core-0.20.205.0.jar:na]
        at 
org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67) 
~[hadoop-core-0.20.205.0.jar:na]
        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143) 
~[hadoop-core-0.20.205.0.jar:na]
        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764) 
~[hadoop-core-0.20.205.0.jar:na]
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370) 
~[hadoop-core-0.20.205.0.jar:na]
        at 
org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:212) 
~[hadoop-core-0.20.205.0.jar:na]
Caused by: java.util.NoSuchElementException: null
        at com.google.common.collect.Iterables.getLast(Iterables.java:713) 
~[guava-r09.jar:na]
        at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:342)
 ~[cassandra-all-1.1.2.jar:1.1.2]
        at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:382)
 ~[cassandra-all-1.1.2.jar:1.1.2]
        ... 11 common frames omitted


I made a one-line change to ColumnFamilyRecordReader.java, which seems to solve 
this issue for us.


    
> ColumnFamilyRecordReader hadoop integration fails with ghost keys
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-4466
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4466
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 1.1.2
>            Reporter: Niel Drummond
>            Priority: Minor
>         Attachments: 4466-stack, 4466-v0.patch
>
>
> When running hadoop-cassandra jobs with range queries over ghost keys, the 
> ColumnFamilyRecordReader throws an exception if the last key in a slice_range 
> query is a ghost key. 
> This seems to be related to changes made in #2855 ( 
> https://issues.apache.org/jira/browse/CASSANDRA-2855 ), to prevent ghost keys 
> appearing in a hadoop map. 
> The call stack trace is attached.
> I made a one-line change to ColumnFamilyRecordReader.java, which seems to 
> solve this issue for us.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to