[
https://issues.apache.org/jira/browse/BEAM-1240?focusedWorklogId=184842&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-184842
]
ASF GitHub Bot logged work on BEAM-1240:
----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Jan/19 15:31
Start Date: 14/Jan/19 15:31
Worklog Time Spent: 10m
Work Description: alafanechere commented on issue #1729: [BEAM-1240]
Create RabbitMqIO
URL: https://github.com/apache/beam/pull/1729#issuecomment-454046116
I tried to use the `RabbitMqIO` with the direct runner to generate an
unbounded `PCollection` from a queue. I encounter a NPE :
````
java.lang.NullPointerException
at
org.apache.beam.runners.direct.UnboundedReadEvaluatorFactory$UnboundedReadEvaluator.processElement
(UnboundedReadEvaluatorFactory.java:169)
...
````
After investigation it looks like it's caused by the fact that no default is
given to
`checkpointMark.oldestTimestamp`. `getWatermark()` is called before the
mutation of the currentTimestamp variable, raising a NPE. I fixed the problem
on my side, reimplementing the class and overriding `getWatermark` to return
`Instant.now()` if `checkpointMark.oldestTimestamp` is null :
```
@Override
publicInstantgetWatermark() {
if (checkpointMark.oldestTimestamp == null) {
returnInstant.now();
}
return checkpointMark.oldestTimestamp;
}
```
It looks likes this bug as already been raised [on
Jira](https://jira.apache.org/jira/browse/BEAM-1240?focusedCommentId=16566869&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16566869)
and on [Stack
Overflow](https://stackoverflow.com/questions/54042757/read-rabbitmq-from-beam-dataflow)
Do you think it's a problem that needs to be corrected ? Is there any
workaround you might think of ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 184842)
Time Spent: 14h (was: 13h 50m)
> Create RabbitMqIO
> -----------------
>
> Key: BEAM-1240
> URL: https://issues.apache.org/jira/browse/BEAM-1240
> Project: Beam
> Issue Type: New Feature
> Components: io-ideas
> Reporter: Jean-Baptiste Onofré
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 2.9.0
>
> Time Spent: 14h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)