You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by haohui <gi...@git.apache.org> on 2015/11/20 00:15:11 UTC
[GitHub] storm pull request: STORM-1221. Create a common interface for all ...
GitHub user haohui opened a pull request:
https://github.com/apache/storm/pull/895
STORM-1221. Create a common interface for all Trident spout.
This PR marks the trident spouts with a common interface. Such a common interface allows StormSQL to manage external data sources with a unified interface.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/haohui/storm STORM-1221
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/895.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 #895
----
commit a280891bafb55a3d221a8198e7e80eeb30d0250a
Author: Haohui Mai <wh...@apache.org>
Date: 2015-11-19T22:28:55Z
STORM-1221. Create a common interface for all Trident spout.
----
---
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] storm pull request: STORM-1221. Create a common interface for all ...
Posted by harshach <gi...@git.apache.org>.
Github user harshach commented on the pull request:
https://github.com/apache/storm/pull/895#issuecomment-158480105
+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] storm pull request: STORM-1221. Create a common interface for all ...
Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the pull request:
https://github.com/apache/storm/pull/895#issuecomment-158236763
+1 as well.
---
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] storm pull request: STORM-1221. Create a common interface for all ...
Posted by harshach <gi...@git.apache.org>.
Github user harshach commented on the pull request:
https://github.com/apache/storm/pull/895#issuecomment-158553123
thanks @haohui merged into master.
---
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] storm pull request: STORM-1221. Create a common interface for all ...
Posted by haohui <gi...@git.apache.org>.
Github user haohui commented on a diff in the pull request:
https://github.com/apache/storm/pull/895#discussion_r45505881
--- Diff: storm-core/src/jvm/storm/trident/TridentTopology.java ---
@@ -127,7 +128,21 @@ public Stream newStream(String txId, IPartitionedTridentSpout spout) {
public Stream newStream(String txId, IOpaquePartitionedTridentSpout spout) {
return newStream(txId, new OpaquePartitionedTridentSpoutExecutor(spout));
}
-
+
+ public Stream newStream(String txId, ITridentDataSource dataSource) {
+ if (dataSource instanceof IBatchSpout) {
+ return newStream(txId, (IBatchSpout) dataSource);
+ } else if (dataSource instanceof ITridentSpout) {
+ return newStream(txId, (ITridentSpout) dataSource);
+ } else if (dataSource instanceof IPartitionedTridentSpout) {
+ return newStream(txId, (IPartitionedTridentSpout) dataSource);
+ } else if (dataSource instanceof IOpaquePartitionedTridentSpout) {
+ return newStream(txId, (IOpaquePartitionedTridentSpout) dataSource);
+ } else {
+ throw new UnsupportedOperationException();
--- End diff --
Addressed in the latest version. Thanks!
---
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] storm pull request: STORM-1221. Create a common interface for all ...
Posted by hmcl <gi...@git.apache.org>.
Github user hmcl commented on the pull request:
https://github.com/apache/storm/pull/895#issuecomment-158495768
+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] storm pull request: STORM-1221. Create a common interface for all ...
Posted by Parth-Brahmbhatt <gi...@git.apache.org>.
Github user Parth-Brahmbhatt commented on the pull request:
https://github.com/apache/storm/pull/895#issuecomment-158230675
+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] storm pull request: STORM-1221. Create a common interface for all ...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/storm/pull/895
---
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] storm pull request: STORM-1221. Create a common interface for all ...
Posted by hmcl <gi...@git.apache.org>.
Github user hmcl commented on a diff in the pull request:
https://github.com/apache/storm/pull/895#discussion_r45504842
--- Diff: storm-core/src/jvm/storm/trident/TridentTopology.java ---
@@ -127,7 +128,21 @@ public Stream newStream(String txId, IPartitionedTridentSpout spout) {
public Stream newStream(String txId, IOpaquePartitionedTridentSpout spout) {
return newStream(txId, new OpaquePartitionedTridentSpoutExecutor(spout));
}
-
+
+ public Stream newStream(String txId, ITridentDataSource dataSource) {
+ if (dataSource instanceof IBatchSpout) {
+ return newStream(txId, (IBatchSpout) dataSource);
+ } else if (dataSource instanceof ITridentSpout) {
+ return newStream(txId, (ITridentSpout) dataSource);
+ } else if (dataSource instanceof IPartitionedTridentSpout) {
+ return newStream(txId, (IPartitionedTridentSpout) dataSource);
+ } else if (dataSource instanceof IOpaquePartitionedTridentSpout) {
+ return newStream(txId, (IOpaquePartitionedTridentSpout) dataSource);
+ } else {
+ throw new UnsupportedOperationException();
--- End diff --
Perhaps you could add a meaningful message here. Something like "unsupported stream"
---
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.
---