You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2016/11/28 18:34:59 UTC

[jira] [Assigned] (BEAM-1006) splitKeysToFilter method is creating a bad query string.

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

Jean-Baptiste Onofré reassigned BEAM-1006:
------------------------------------------

    Assignee: Jean-Baptiste Onofré  (was: James Malone)

> 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: sdk-java-extensions
>    Affects Versions: 0.3.0-incubating
>            Reporter: David Billings
>            Assignee: Jean-Baptiste Onofré
>            Priority: Critical
>              Labels: mongodb
>             Fix For: 0.4.0-incubating
>
>
> 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
(v6.3.4#6332)