beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Billings (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BEAM-1006) splitKeysToFilter method is creating a bad query string.
Date Fri, 18 Nov 2016 16:18:00 GMT
David Billings created BEAM-1006:
------------------------------------

             Summary: 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: James Malone
            Priority: Critical
             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: 

Exception in thread "main" java.lang.IllegalArgumentException: invalid hexadecimal representation
of an ObjectId: [Document{{_id=56e1ec546b2f0700015e61b2}}]

This is caused by line 305 
{code}
String splitKey = splitKeys.get(i).toString();
{code}

The code should use 
{code}
String splitKey = splitKeys.get(i).toString();
{code}

to just return the ID. 



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

Mime
View raw message