[
https://issues.apache.org/jira/browse/BEAM-3165?focusedWorklogId=740963&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-740963
]
ASF GitHub Bot logged work on BEAM-3165:
----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Mar/22 15:49
Start Date: 14/Mar/22 15:49
Worklog Time Spent: 10m
Work Description: OreOreDa opened a new pull request #17084:
URL: https://github.com/apache/beam/pull/17084
MongoDbIO does not support _id other than ObjectId during the split
operation, e.g. a custom short business-oriented string
A bug has been opened 4 years ago, and updated last November, but without
fix : https://issues.apache.org/jira/browse/BEAM-3165
Obviously, this is very blocking - as a quick workaround, this PR proposes
to bypass the split entirely if the numSplit parameter is set to 0 by the user,
as this only impacts read operations
------------------------
Thank you for your contribution! Follow this checklist to help us
incorporate your contribution quickly and easily:
- [X] [**Choose
reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and
mention them in a comment (`R: @username`). @benWize
- [X] Format the pull request title like `[BEAM-XXX] Fixes bug in
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA
issue, if applicable. This will automatically link the pull request to the
issue.
- [X] Update `CHANGES.md` with noteworthy changes.
- [X] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more
tips on [how to make review process
smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
To check the build health, please visit
[https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more
information about GitHub Actions CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 740963)
Remaining Estimate: 0h
Time Spent: 10m
> Mongo document read with non hex objectid
> -----------------------------------------
>
> Key: BEAM-3165
> URL: https://issues.apache.org/jira/browse/BEAM-3165
> Project: Beam
> Issue Type: Bug
> Components: io-java-mongodb
> Affects Versions: 2.1.0
> Reporter: Utkarsh Sopan
> Priority: P3
> Time Spent: 10m
> Remaining Estimate: 0h
>
> I have a mongo collection which has non-hex '_id' in form a string.
> I cant read them into a PCollection getting following exception
> Exception in thread "main" java.lang.IllegalArgumentException: invalid
> hexadecimal representation of an ObjectId: [somestring]
> at org.bson.types.ObjectId.parseHexString(ObjectId.java:523)
> at org.bson.types.ObjectId.<init>(ObjectId.java:237)
> at
> org.bson.json.JsonReader.visitObjectIdConstructor(JsonReader.java:674)
> at org.bson.json.JsonReader.readBsonType(JsonReader.java:197)
> at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:139)
> at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:45)
> at org.bson.codecs.configuration.LazyCodec.decode(LazyCodec.java:47)
> at org.bson.codecs.DocumentCodec.readValue(DocumentCodec.java:215)
> at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:141)
> at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:45)
> at org.bson.codecs.DocumentCodec.readValue(DocumentCodec.java:215)
> at org.bson.codecs.DocumentCodec.readList(DocumentCodec.java:222)
> at org.bson.codecs.DocumentCodec.readValue(DocumentCodec.java:208)
> at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:141)
> at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:45)
> at org.bson.Document.parse(Document.java:105)
> at org.bson.Document.parse(Document.java:90)
> at
> org.apache.beam.sdk.io.mongodb.MongoDbIO$BoundedMongoDbReader.start(MongoDbIO.java:472)
> at
> org.apache.beam.runners.direct.BoundedReadEvaluatorFactory$BoundedReadEvaluator.processElement(BoundedReadEvaluatorFactory.java:141)
> at
> org.apache.beam.runners.direct.TransformExecutor.processElements(TransformExecutor.java:146)
> at
> org.apache.beam.runners.direct.TransformExecutor.run(TransformExecutor.java:110)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:748)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)