Repository: storm Updated Branches: refs/heads/master 3aed9165d -> 2cd27e044
[STORM-1095] Tuple.getSourceGlobalStreamid() has wrong camel-case naming Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/68d81ab0 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/68d81ab0 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/68d81ab0 Branch: refs/heads/master Commit: 68d81ab092e76e790da4c69fc9215fd1f2633821 Parents: 3aed916 Author: mjsax <mj...@informatik.hu-berlin.de> Authored: Wed Oct 7 21:24:24 2015 +0200 Committer: mjsax <mj...@informatik.hu-berlin.de> Committed: Fri Oct 9 12:37:35 2015 +0200 ---------------------------------------------------------------------- .../src/jvm/backtype/storm/coordination/CoordinatedBolt.java | 2 +- storm-core/src/jvm/backtype/storm/tuple/Tuple.java | 8 ++++++++ storm-core/src/jvm/backtype/storm/tuple/TupleImpl.java | 7 ++++++- .../src/jvm/storm/trident/topology/TridentBoltExecutor.java | 4 ++-- 4 files changed, 17 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/68d81ab0/storm-core/src/jvm/backtype/storm/coordination/CoordinatedBolt.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/coordination/CoordinatedBolt.java b/storm-core/src/jvm/backtype/storm/coordination/CoordinatedBolt.java index 6f337a6..61e5e29 100644 --- a/storm-core/src/jvm/backtype/storm/coordination/CoordinatedBolt.java +++ b/storm-core/src/jvm/backtype/storm/coordination/CoordinatedBolt.java @@ -364,7 +364,7 @@ public class CoordinatedBolt implements IRichBolt { private TupleType getTupleType(Tuple tuple) { if(_idStreamSpec!=null - && tuple.getSourceGlobalStreamid().equals(_idStreamSpec._id)) { + && tuple.getSourceGlobalStreamId().equals(_idStreamSpec._id)) { return TupleType.ID; } else if(!_sourceArgs.isEmpty() && tuple.getSourceStreamId().equals(Constants.COORDINATED_STREAM_ID)) { http://git-wip-us.apache.org/repos/asf/storm/blob/68d81ab0/storm-core/src/jvm/backtype/storm/tuple/Tuple.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/tuple/Tuple.java b/storm-core/src/jvm/backtype/storm/tuple/Tuple.java index 799bf68..c4ea7c8 100644 --- a/storm-core/src/jvm/backtype/storm/tuple/Tuple.java +++ b/storm-core/src/jvm/backtype/storm/tuple/Tuple.java @@ -36,10 +36,18 @@ public interface Tuple extends ITuple{ /** * Returns the global stream id (component + stream) of this tuple. + * + * @deprecated replaced by {@link #getSourceGlobalStreamId()} due to broken naming convention */ + @Deprecated public GlobalStreamId getSourceGlobalStreamid(); /** + * Returns the global stream id (component + stream) of this tuple. + */ + public GlobalStreamId getSourceGlobalStreamId(); + + /** * Gets the id of the component that created this tuple. */ public String getSourceComponent(); http://git-wip-us.apache.org/repos/asf/storm/blob/68d81ab0/storm-core/src/jvm/backtype/storm/tuple/TupleImpl.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/tuple/TupleImpl.java b/storm-core/src/jvm/backtype/storm/tuple/TupleImpl.java index 818eff1..6fd6789 100644 --- a/storm-core/src/jvm/backtype/storm/tuple/TupleImpl.java +++ b/storm-core/src/jvm/backtype/storm/tuple/TupleImpl.java @@ -196,8 +196,13 @@ public class TupleImpl extends IndifferentAccessMap implements Seqable, Indexed, public List<Object> select(Fields selector) { return getFields().select(selector, values); } - + + @Deprecated public GlobalStreamId getSourceGlobalStreamid() { + return getSourceGlobalStreamId(); + } + + public GlobalStreamId getSourceGlobalStreamId() { return new GlobalStreamId(getSourceComponent(), streamId); } http://git-wip-us.apache.org/repos/asf/storm/blob/68d81ab0/storm-core/src/jvm/storm/trident/topology/TridentBoltExecutor.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/storm/trident/topology/TridentBoltExecutor.java b/storm-core/src/jvm/storm/trident/topology/TridentBoltExecutor.java index fa68ae2..ec67af7 100644 --- a/storm-core/src/jvm/storm/trident/topology/TridentBoltExecutor.java +++ b/storm-core/src/jvm/storm/trident/topology/TridentBoltExecutor.java @@ -307,7 +307,7 @@ public class TridentBoltExecutor implements IRichBolt { } return; } - String batchGroup = _batchGroupIds.get(tuple.getSourceGlobalStreamid()); + String batchGroup = _batchGroupIds.get(tuple.getSourceGlobalStreamId()); if(batchGroup==null) { // this is so we can do things like have simple DRPC that doesn't need to use batch processing _coordCollector.setCurrBatch(null); @@ -407,7 +407,7 @@ public class TridentBoltExecutor implements IRichBolt { private TupleType getTupleType(Tuple tuple, TrackedBatch batch) { CoordCondition cond = batch.condition; if(cond.commitStream!=null - && tuple.getSourceGlobalStreamid().equals(cond.commitStream)) { + && tuple.getSourceGlobalStreamId().equals(cond.commitStream)) { return TupleType.COMMIT; } else if(cond.expectedTaskReports > 0 && tuple.getSourceStreamId().startsWith(COORD_STREAM_PREFIX)) {