You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "David Billings (JIRA)" <ji...@apache.org> on 2016/11/18 16:20:59 UTC
[jira] [Updated] (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 ]
David Billings updated BEAM-1006:
---------------------------------
Description:
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.
was:
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.
> 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
> 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)