You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by jb...@apache.org on 2016/11/29 07:15:21 UTC
[1/2] incubator-beam git commit: [BEAM-1006] Fixing the MongoDbIO
splitKeysToFilters,
calling to string on the BSON document prefixed Document to the string,
updated it to just get the value of ID
Repository: incubator-beam
Updated Branches:
refs/heads/master aeff1d5c2 -> 3f16f2660
[BEAM-1006] Fixing the MongoDbIO splitKeysToFilters, calling to string on the BSON document prefixed Document to the string, updated it to just get the value of ID
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/b453457f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/b453457f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/b453457f
Branch: refs/heads/master
Commit: b453457f5699963f9a72129ab86ef18b71c04e61
Parents: aeff1d5
Author: DavidB <da...@gandlake.com>
Authored: Fri Nov 18 15:11:47 2016 +0000
Committer: Jean-Baptiste Onofr� <jb...@apache.org>
Committed: Tue Nov 29 07:50:40 2016 +0100
----------------------------------------------------------------------
.../main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/b453457f/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java
----------------------------------------------------------------------
diff --git a/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java b/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java
index cd5cdaf..70239e6 100644
--- a/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java
+++ b/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java
@@ -302,12 +302,12 @@ public class MongoDbIO {
ArrayList<String> filters = new ArrayList<>();
String lowestBound = null; // lower boundary (previous split in the iteration)
for (int i = 0; i < splitKeys.size(); i++) {
- String splitKey = splitKeys.get(i).toString();
- String rangeFilter = null;
+ String splitKey = splitKeys.get(i).get("_id").toString();
+ String rangeFilter;
if (i == 0) {
// this is the first split in the list, the filter defines
// the range from the beginning up to this split
- rangeFilter = String.format("{ $and: [ {\"_id\":{$lte:Objectd(\"%s\")}}",
+ rangeFilter = String.format("{ $and: [ {\"_id\":{$lte:ObjectId(\"%s\")}}",
splitKey);
} else if (i == splitKeys.size() - 1) {
// this is the last split in the list, the filter defines
[2/2] incubator-beam git commit: [BEAM-1006] This closes #1387
Posted by jb...@apache.org.
[BEAM-1006] This closes #1387
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/3f16f266
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/3f16f266
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/3f16f266
Branch: refs/heads/master
Commit: 3f16f26600ac6e552f379c94cfae1bc57ed5f5f0
Parents: aeff1d5 b453457
Author: Jean-Baptiste Onofr� <jb...@apache.org>
Authored: Tue Nov 29 08:15:08 2016 +0100
Committer: Jean-Baptiste Onofr� <jb...@apache.org>
Committed: Tue Nov 29 08:15:08 2016 +0100
----------------------------------------------------------------------
.../main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------