You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2016/01/11 21:34:10 UTC
[3/5] storm git commit: Whitespace fixes
Whitespace fixes
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/793de733
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/793de733
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/793de733
Branch: refs/heads/master
Commit: 793de733580799f74f0bc59308ec7243e6f0dad6
Parents: e8c0892
Author: Jang-Soo Lee <ja...@gmail.com>
Authored: Wed Jan 6 21:20:03 2016 -0500
Committer: Jang-Soo Lee <ja...@gmail.com>
Committed: Wed Jan 6 21:24:33 2016 -0500
----------------------------------------------------------------------
.../storm/topology/TopologyBuilder.java | 46 ++++++++++----------
1 file changed, 23 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/793de733/storm-core/src/jvm/backtype/storm/topology/TopologyBuilder.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/topology/TopologyBuilder.java b/storm-core/src/jvm/backtype/storm/topology/TopologyBuilder.java
index f917e61..56d5dbd 100644
--- a/storm-core/src/jvm/backtype/storm/topology/TopologyBuilder.java
+++ b/storm-core/src/jvm/backtype/storm/topology/TopologyBuilder.java
@@ -104,32 +104,32 @@ public class TopologyBuilder {
for(String boltId: _bolts.keySet()) {
IRichBolt bolt = _bolts.get(boltId);
ComponentCommon common = getComponentCommon(boltId, bolt);
- try{
- boltSpecs.put(boltId, new Bolt(ComponentObject.serialized_java(Utils.javaSerialize(bolt)), common));
- }catch(RuntimeException wrapperCause){
- if (wrapperCause.getCause() != null && NotSerializableException.class.equals(wrapperCause.getCause().getClass())){
- throw new IllegalStateException(
- "Bolt '" + boltId + "' contains a non-serializable field of type " + wrapperCause.getCause().getMessage() + ", " +
- "which was instantiated prior to topology creation. " + wrapperCause.getCause().getMessage() + " " +
- "should be instantiated within the prepare method of '" + boltId + " at the earliest.", wrapperCause);
- }
- throw wrapperCause;
- }
+ try{
+ boltSpecs.put(boltId, new Bolt(ComponentObject.serialized_java(Utils.javaSerialize(bolt)), common));
+ }catch(RuntimeException wrapperCause){
+ if (wrapperCause.getCause() != null && NotSerializableException.class.equals(wrapperCause.getCause().getClass())){
+ throw new IllegalStateException(
+ "Bolt '" + boltId + "' contains a non-serializable field of type " + wrapperCause.getCause().getMessage() + ", " +
+ "which was instantiated prior to topology creation. " + wrapperCause.getCause().getMessage() + " " +
+ "should be instantiated within the prepare method of '" + boltId + " at the earliest.", wrapperCause);
+ }
+ throw wrapperCause;
+ }
}
for(String spoutId: _spouts.keySet()) {
IRichSpout spout = _spouts.get(spoutId);
ComponentCommon common = getComponentCommon(spoutId, spout);
- try{
- spoutSpecs.put(spoutId, new SpoutSpec(ComponentObject.serialized_java(Utils.javaSerialize(spout)), common));
- }catch(RuntimeException wrapperCause){
- if (wrapperCause.getCause() != null && NotSerializableException.class.equals(wrapperCause.getCause().getClass())){
- throw new IllegalStateException(
- "Spout '" + spoutId + "' contains a non-serializable field of type " + wrapperCause.getCause().getMessage() + ", " +
- "which was instantiated prior to topology creation. " + wrapperCause.getCause().getMessage() + " " +
- "should be instantiated within the prepare method of '" + spoutId + " at the earliest.", wrapperCause);
- }
- throw wrapperCause;
- }
+ try{
+ spoutSpecs.put(spoutId, new SpoutSpec(ComponentObject.serialized_java(Utils.javaSerialize(spout)), common));
+ }catch(RuntimeException wrapperCause){
+ if (wrapperCause.getCause() != null && NotSerializableException.class.equals(wrapperCause.getCause().getClass())){
+ throw new IllegalStateException(
+ "Spout '" + spoutId + "' contains a non-serializable field of type " + wrapperCause.getCause().getMessage() + ", " +
+ "which was instantiated prior to topology creation. " + wrapperCause.getCause().getMessage() + " " +
+ "should be instantiated within the prepare method of '" + spoutId + " at the earliest.", wrapperCause);
+ }
+ throw wrapperCause;
+ }
}
StormTopology stormTopology = new StormTopology(spoutSpecs,
@@ -140,7 +140,7 @@ public class TopologyBuilder {
return stormTopology;
}
-
+
/**
* Define a new bolt in this topology with parallelism of just one thread.
*