Github user jerrypeng commented on a diff in the pull request:
https://github.com/apache/storm/pull/921#discussion_r47991939
--- Diff:
storm-core/src/jvm/backtype/storm/scheduler/resource/strategies/scheduling/DefaultResourceAwareStrategy.java
---
@@ -97,7 +101,7 @@ public ResourceAwareStrategy(Cluster cluster, Topologies
topologies) {
if (spouts.size() == 0) {
LOG.error("Cannot find a Spout!");
- return null;
+ return
SchedulingResult.failure(SchedulingStatus.FAIL_INVALID_TOPOLOGY, "Cannot find a
Spout!");
--- End diff --
Well currently there is no early check in nimbus or the client for that.
Technically, a user can submit a topology without a spout. The
DefaultResourceAwareStrategy starts traversing the topology graph starting from
the spout thus we need a topology with a spout. And it doesn't really make
since for a topology not to have a spout. Perhaps we can file a jira a look
into putting additional checks for this in the client or on nimbus in the
future.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---