You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streams.apache.org by robdouglas <gi...@git.apache.org> on 2014/05/19 21:52:14 UTC
[GitHub] incubator-streams pull request: STREAMS-87 | We now try to collect...
GitHub user robdouglas opened a pull request:
https://github.com/apache/incubator-streams/pull/19
STREAMS-87 | We now try to collect an ID's timeline put to 5 times befor...
...e giving up
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/robdouglas/incubator-streams STREAMS-87
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-streams/pull/19.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #19
----
commit a84ec40452f9d257804ddffc28ed511e7391f785
Author: Robert Douglas <rd...@w2odigital.com>
Date: 2014-05-19T19:51:43Z
STREAMS-87 | We now try to collect an ID's timeline put to 5 times before giving up
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-streams pull request: STREAMS-87 | We now try to collect...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-streams/pull/19
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-streams pull request: STREAMS-87 | We now try to collect...
Posted by robdouglas <gi...@git.apache.org>.
Github user robdouglas commented on the pull request:
https://github.com/apache/incubator-streams/pull/19#issuecomment-43942845
Added comment detailing thoughts on why 5 is a reasonable number of retry attempts
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-streams pull request: STREAMS-87 | We now try to collect...
Posted by mfranklin <gi...@git.apache.org>.
Github user mfranklin commented on the pull request:
https://github.com/apache/incubator-streams/pull/19#issuecomment-43944968
:+1:
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-streams pull request: STREAMS-87 | We now try to collect...
Posted by smashew <gi...@git.apache.org>.
Github user smashew commented on a diff in the pull request:
https://github.com/apache/incubator-streams/pull/19#discussion_r12817666
--- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java ---
@@ -116,10 +116,8 @@ protected void captureTimeline(long currentId) {
int keepTrying = 0;
// keep trying to load, give it 5 attempts.
- //while (keepTrying < 10)
- while (keepTrying < 1)
+ while (keepTrying < 5)
--- End diff --
5 is a magic number. It is the typical number of times I had to ask a girl if she would go on a date with me. If she said 'no' 5 times, that is when I retreated. Empirical or not, it is a good rule of thumb.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-streams pull request: STREAMS-87 | We now try to collect...
Posted by mfranklin <gi...@git.apache.org>.
Github user mfranklin commented on a diff in the pull request:
https://github.com/apache/incubator-streams/pull/19#discussion_r12817536
--- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java ---
@@ -116,10 +116,8 @@ protected void captureTimeline(long currentId) {
int keepTrying = 0;
// keep trying to load, give it 5 attempts.
- //while (keepTrying < 10)
- while (keepTrying < 1)
+ while (keepTrying < 5)
--- End diff --
Minor nit. Where does 5 come from? Is it a guess or a value determined through empirical evidence? Would be good to see in the comment.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-streams pull request: STREAMS-87 | We now try to collect...
Posted by smashew <gi...@git.apache.org>.
Github user smashew commented on a diff in the pull request:
https://github.com/apache/incubator-streams/pull/19#discussion_r12817778
--- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java ---
@@ -116,10 +116,8 @@ protected void captureTimeline(long currentId) {
int keepTrying = 0;
// keep trying to load, give it 5 attempts.
- //while (keepTrying < 10)
- while (keepTrying < 1)
+ while (keepTrying < 5)
--- End diff --
I mean, it could be user specified, but it is typically better to assume that a 'service' could have an issue on first attempt. There are a lot of reasons, legitimately that it would fail, including the service being unavailable, too many questions being asked by the user, etc. 5 is a pretty good default to let the backoff do it's job and wait for the service to become available again.
Personally, I'm not a fan of 'magic numbers' either, but, something > 1 is really necessary to be fault tolerant...
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-streams pull request: STREAMS-87 | We now try to collect...
Posted by mfranklin <gi...@git.apache.org>.
Github user mfranklin commented on a diff in the pull request:
https://github.com/apache/incubator-streams/pull/19#discussion_r12817799
--- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java ---
@@ -116,10 +116,8 @@ protected void captureTimeline(long currentId) {
int keepTrying = 0;
// keep trying to load, give it 5 attempts.
- //while (keepTrying < 10)
- while (keepTrying < 1)
+ while (keepTrying < 5)
--- End diff --
Not saying it isn't but it would be nice to have it noted in the comment. Minor nit though.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---