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

Ismaël Mejía updated BEAM-1006:
-------------------------------
    Component/s:     (was: z-do-not-use-sdk-java-extensions)
                 io-java-mongodb

> splitKeysToFilter method is creating a bad query string.
> --------------------------------------------------------
>
>                 Key: BEAM-1006
>                 URL: https://issues.apache.org/jira/browse/BEAM-1006
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-mongodb
>    Affects Versions: 0.3.0-incubating
>            Reporter: David Billings
>            Assignee: Jean-Baptiste Onofré
>            Priority: Critical
>              Labels: mongodb
>             Fix For: 0.4.0
>
>
> When you have a large number of documents in your mongo collection the 
> splitKeysToFilter method is invoked. 
> Currently Document{{_id= is prefixed to the query string
> {code}{ $and: [ 
> {"_id":{$lte:Objectd("Document{{_id=564a0ad6e21b840001d75f5d}}")}} ]}{code}
> This causes the document parse to fail with the following exception: 
> {code}Exception in thread "main" java.lang.IllegalArgumentException: invalid 
> hexadecimal representation of an ObjectId: 
> [Document{{_id=56e1ec546b2f0700015e61b2}}]{code}
> This is caused by line 305 
> {code}
> String splitKey = splitKeys.get(i).toString();
> {code}
> The code should use 
> {code}
> String splitKey = splitKeys.get(i).get("_id").toString();
> {code}
> to just return the ID. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to