-
Notifications
You must be signed in to change notification settings - Fork 324
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
CLAs look good, thanks! |
Run tests with Maven. The following command will launch a producer and consumer job respectively.<BR> | ||
The producer publishes messages and the consumer will receive them via NATS server. | ||
```bash | ||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge conflicts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -0,0 +1,58 @@ | |||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to follow the model set out in the contrib join library. Specifically
- Artifact naming
- License information
- Compiler source and target versions (1.7, probably)
- optionally, Checkstyle
Also,
- review dependencies
} catch (InterruptedException e) { | ||
e.printStackTrace(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like a NullPointerException
can happen here when the thread is interrupted. This seems like the wrong handling of the InterruptedException
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. I will change to throw an IOException.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is for a source/sink, what you want to do is effectively tell the caller above that you were closed by an interrupt.
Throwing something like ClosedByInterruptException
seems to make sense after cleaning up any resources.
We will fail the task, and restart the write operation again (on this or another worker).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that makes more sense. I will change it to throw ClosedByInterruptException.
Hi @tyagihas: I am encountering the following error installing this module:
Here's a log of the important commands I have run, on a fresh Ubuntu 15.04 VM:
I suspect you want the NatsIOBench class to be in the |
Assigning back to you for now, please reassign to me once fixed :). |
Hmm, can't re-assign to you, so please just bump the request once fixed. Thanks. |
Fixed the class reference. NatsIOBench shouldn't include reference to NatsIOTest. mvn install -Dproject="project id" -DstagingLocation="bucket" -Dnats.servers=nats://"GCE private ip":4222 |
I ran the job as follows: Two Dataflow jobs start in my project, but they never make any progress and have not stopped after at least 10 minutes of running. In Cloud Logging, I see some very confusing logs, attached below. It looks like some of the code needs to use a This failure is somehow not failing the job, and I think it should. |
Both jobs did fail after 15 minutes, I guess because it was retried 4 times. |
```bash | ||
% mvn test -Dtest=NatsIOTest#publishSubscribe -DstagingLocation=gs://<bucket> ¥ | ||
-Dproject=<project id> -Dnats.servers=nats://<server>:4222 -Dnats.queue=queue1 ¥ | ||
-Dloop=30000 -Dinterval=0 -Dsubjects=test1 -Dconsumers=1 -Dproducers=1 -Dnats.maxRecords=20000 ¥ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This symbol that is rendering as a Yen sign for me -- is this a Japanese keyboard version of \
to mean "continues on next line"? (if so, cool!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's same meaning as backslash.
GitHub notifications don't come when patches are pushed; please comment once code is updated next. Thanks! |
Thank you for all the feedbacks. I've just pushed the latest code. |
Thank you for the comments. I just push a new commit. |
Hi @dhalperi It's been a while since last update. Did you have time to look at the latest commit? |
|
||
public NatsSource(String subject, Properties props) { | ||
if (subject == null) { | ||
throw new NullPointerException("subject"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be simpler if you use Guava Preconditions:
import static com.google.common.base.Preconditions.checkNotNull;
....
checkNotNull(subject, "subject");
...
No movement for 60 days since last review, so I'm closing. Note that we are moving active development to Apache Beam (incubating). If you wish to resubmit, please read the Beam contribution guide and submit there. |
No description provided.