apache / incubator-heron

Apache Heron (Incubating) is a realtime, distributed, fault-tolerant stream processing engine from Twitter
https://heron.apache.org/
Apache License 2.0
3.65k stars 598 forks source link

remove duplicated code copied from apache storm #1145

Open caofangkun opened 8 years ago

caofangkun commented 8 years ago

There's a lot duplicated code in the project as we copied a lot of code from Apache Storm. For example:

➜  heron git:(master) ✗ find ./ -name IBolt.java
./storm/src/java/backtype/storm/task/IBolt.java 
./storm/src/java/org/apache/storm/task/IBolt.java
./api/src/java/com/twitter/heron/api/bolt/IBolt.java

It will increase the difficulty of maintaining code.

We may provide external sub-project or plugin to resolve Apache Storm Topology compatibility.

Ref: Apache Storm proivde backward compatibility feature for smooth migration to package renaming As described at https://github.com/apache/storm/pull/889 .

nlu90 commented 8 years ago

@caofangkun These duplicated code is for namespace compatibility. We want to support both the old and new storm namespace. If you have any good idea on how to maintain the namespace compatibility without duplicated code, please let me know.

caofangkun commented 8 years ago

@nlu90

Apache Storm provided external tool storm-rename-hack to deal with namespace compatibility.

nlu90 commented 8 years ago

@caofangkun The hack you provided is replacing namespace from "backtype.storm" to "org.apache.storm". It's not for namespace compatibility but for namespace replacement.

Once replaced, people will not be able to use the old "backtype.storm" namespace with the new release of heron-api/heron-storm.