Uh oh!
There was an error while loading. Please reload this page.
[STORM-1015] Allow Kafka offsets to be saved using Kafka's consumer offset management api - #705
[STORM-1015] Allow Kafka offsets to be saved using Kafka's consumer offset management api#705ooasis wants to merge 19 commits into
Conversation
…using Kafka's offset management api
rmkellogg
commented
Sep 8, 2015
A few minor nits: When providing javadoc on variables/methods, be sure to use the following syntax:
Instead of the following:
The first variation will provide fly-over-help within IDE and generated Javadoc files. Secondly: Thirdly: |
ooasis
commented
Sep 9, 2015
Thanks for the advices. Will get them fixed as soon as I get some time. |
sweetest
commented
Sep 9, 2015
how will this change affect the format of spout's offset message in zookeeper? |
ooasis
commented
Sep 9, 2015
I assume you are referring to the json format of the spout "state" stored in ZK? The "state" will be saved using the exact same json format in Kafka's internal topic as the "metadata" associated with the offsets. |
ooasis
commented
Sep 12, 2015
Fixed coding styles suggested by rmkellogg. |
There was a problem hiding this comment.
please expand this * import to explicitly include the classes you depend on
erikdw
commented
Sep 15, 2015
This seems like it might not be backwards compatible with the existing kafka-spout; i.e., the offsets in ZK are presumably not going to be stored exactly the same as they were before. Is there any plan for supporting migration from the current kafka-spout to this one? |
erikdw
commented
Sep 16, 2015
Furthermore, can you please provide a reference to "Kafka's consumer offset management api" in your description? |
ooasis
commented
Sep 16, 2015
Erik, I added 2 reference links in the description with more information on "Kafka's consumer offset management api". As of migration from existing offsets stored in ZK to Kafka, it could be done with a simple migration utility similar to the tools provided by Kafka (https://cwiki.apache.org/confluence/display/KAFKA/System+Tools). Question is where it belongs to in Storm codebase. -thanks |
There was a problem hiding this comment.
minor nit: Zookeeper -> ZooKeeper.
erikdw
commented
Sep 21, 2015
@hsun-cnnxty : I'm guessing the following are the links you meant to put:
I just want it to be very clear that this PR's purpose is to change from the kafka spout's consumer offsets being stored in ZooKeeper, to instead being stored directly in Kafka. We should also be clear about the version of Kafka required for such support (0.8.2+). I know the current version of the storm-kafka pom.xml (as of this change) is already referencing 0.8.2.1, but I feel like it should be called out as an explicit requirement in the commit. |
…er instead of storm to avoid confusion
ooasis
commented
Sep 22, 2015
Erik, Pushed the change to rename config from "storm" to "zookeeper" (also fixed the typo). As of Kafka dependency, it is a good question. Actually I am not clear on how the "storm-kafka" module is built with Maven. Without adding the particular Kafka dependencies in pom.xml, the local build just won't work for me. Do I suppose to use some external config (such as settings.xml) to make it built locally? -thanks |
choang
commented
Sep 28, 2015
I recommend making your abstraction at the state store, so you would have: You would not need different PartitionStateManager for different stores. You would just have: |
ooasis
commented
Oct 4, 2015
Hi Chi, Storm stores more than just offset/partition data in the "state", would it be necessary to declare? -thanks |
choang
commented
Oct 4, 2015
I would make state more concrete, but I suppose your approach is fine. |
erikdw
commented
Oct 5, 2015
@hsun-cnnxty : can you please make your statement a bit more concrete? i.e., what other info is stored in a given kafka topic's consumer state? (other than the offset/partition) |
ooasis
commented
Oct 5, 2015
@choang: the refactored code is pushed @erikdw: I was referring to the internal Json structure used to store offsets as shown by example below: { |
There was a problem hiding this comment.
is there a mechanism/section in the release notes to call out this change? changing this var name would break existing code.
There was a problem hiding this comment.
instead of a factory, you can make the developer declare the StateStore:
public void createTopology() {
Spout spout = new KafkaSpout(..., new KafkaStateStore(...));
...
}
This should keep the KafkaSpout code much simpler and more explicit, and eliminate the need for a factory.
…riables to be consistent and corrected a few typos
…n handle all partitions
There was a problem hiding this comment.
stormConf isn't used so remove. By using spoutConfig, you are bleeding the spout state into the store. I understand it is for convenience, but using explicit would be better, so perhaps you can create a KafkaStoreConfig.
choang
commented
Oct 6, 2015
looks really good. just had a few nits that shouldn't block. I also don't have a vote, so you'll need to find a proper reviewer :) |
ooasis
commented
Oct 6, 2015
@choang thanks for the code review. Your comment on sharing the kafka store for all partitions is really helpful and I was able to cleanup a lot of unnecessary logic. I still have some code to check in and need to run a few tests. Maybe you can hold on for a while as I don't want to waste your time on the changing code base. I will try to write a response as soon as I get some time. Thanks again. |
ooasis
commented
Oct 14, 2015
@choang In recent changes, I have made it possible to plug in custom store implementations. The custom implementation is given the opportunity to initialize itself by injecting two configuration objects into the constructor which takes the form like In addition, I feel it is better to keep the implementation specific details, such as zookeeper quorum, inside the store implementation instead of leaving it to external class to build a implementation specific configuration object such as KafkaStoreConfig. What do you think? Thanks again for the code review. |
choang
commented
Oct 14, 2015
What I'm trying to illustrate are two factors:
With the above, it would be pretty easy for someone to implement |
* apache/master: (21 commits) Added STORM-1204 to Changelog Added STORM-831 to Changelog Added STORM-1208 to Changelog Guard against both Infinity and NaN Added STORM-1016 to Changelog add apache license header Guard against NPE, and avoid using NaN values Fixing attempt to access to directory before checking user authorization and avoid dumps listing error Fix copyright year and holder. Adding MIT license for statistics image Added STORM-1190 to Changelog replace HashSet with LinkedHashSet in TridentTopology.java Use generic name bugtracker instead of jira and use public domain images Some more fixes to the test so they shutdown correctly. Fixes for unit tests getting stuck. Some fixes to improve performance Better performance with batching disabled, and better CPU utilization from flushers STORM-1190: System Load too high after recent changes STORM-1016: Generate trident bolt ids with sorted group names Remove default JIRA URL so that custom deployments won't default to apache jira link ...
ooasis
commented
Jan 6, 2016
@choang changes are made and latest code from master merged in. Please review whenever you have time. -thanks |
choang
commented
Jan 7, 2016
this looks good enough |
* apache/master: (64 commits) add STORM-1496 to CHANGELOG.md fixing sporadic nimbus log failure and topology visualization backport STORM-1484/1478 to 1.0.0, too add STORM-1499 to CHANGELOG.md fix wrong package name for storm trident Added STORM-1463 to Changelog Added STORM-1485 to Changelog Added STORM-1486 to Changelog Added STORM-1214 to Changelog [STORM-1486] Fix storm-kafa documentation CHANGELOG: move STORM-1450 to 1.0.0 (backported) CHANGELOG.md: move 0.10.0-beta2 to 0.10.0 Fix CHANGELOG.md to have 0.10.1 and move issues Fix misplaced CHANGELOGs add STORM-1452 to changelog add STORM-1406 to changelog adds comments about licensing the profiler feature Fixes profiling/debugging out of the box add storm-mqtt to binary distribution Fixing minor code comments ...
AwesomeJohnR
commented
Feb 22, 2016
Any updates on the status of this merge? This update would be very helpful |
ooasis
commented
Feb 25, 2016
Just did another merge to keep it up to date with master branch. Not sure what the plan is now. I would be happy to make any changes that can help to make the final merge happen. |
We are closing stale Pull Requests to make the list more manageable. Please re-open any Pull Request that has been closed in error. Closesapache#608Closesapache#639Closesapache#640Closesapache#648Closesapache#662Closesapache#668Closesapache#692Closesapache#705Closesapache#724Closesapache#728Closesapache#730Closesapache#753Closesapache#803Closesapache#854Closesapache#922Closesapache#986Closesapache#992Closesapache#1019Closesapache#1040Closesapache#1041Closesapache#1043Closesapache#1046Closesapache#1051Closesapache#1078Closesapache#1146Closesapache#1164Closesapache#1165Closesapache#1178Closesapache#1213Closesapache#1225Closesapache#1258Closesapache#1259Closesapache#1268Closesapache#1272Closesapache#1277Closesapache#1278Closesapache#1288Closesapache#1296Closesapache#1328Closesapache#1342Closesapache#1353Closesapache#1370Closesapache#1376Closesapache#1391Closesapache#1395Closesapache#1399Closesapache#1406Closesapache#1410Closesapache#1422Closesapache#1427Closesapache#1443Closesapache#1462Closesapache#1468Closesapache#1483Closesapache#1506Closesapache#1509Closesapache#1515Closesapache#1520Closesapache#1521Closesapache#1525Closesapache#1527Closesapache#1544Closesapache#1550Closesapache#1566Closesapache#1569Closesapache#1570Closesapache#1575Closesapache#1580Closesapache#1584Closesapache#1591Closesapache#1600Closesapache#1611Closesapache#1613Closesapache#1639Closesapache#1703Closesapache#1711Closesapache#1719Closesapache#1737Closesapache#1760Closesapache#1767Closesapache#1768Closesapache#1785Closesapache#1799Closesapache#1822Closesapache#1824Closesapache#1844Closesapache#1874Closesapache#1918Closesapache#1928Closesapache#1937Closesapache#1942Closesapache#1951Closesapache#1957Closesapache#1963Closesapache#1964Closesapache#1965Closesapache#1967Closesapache#1968Closesapache#1971Closesapache#1985Closesapache#1986Closesapache#1998Closesapache#2031Closesapache#2032Closesapache#2071Closesapache#2076Closesapache#2108Closesapache#2119Closesapache#2128Closesapache#2142Closesapache#2174Closesapache#2206Closesapache#2297Closesapache#2322Closesapache#2332Closesapache#2341Closesapache#2377Closesapache#2414Closesapache#2469
We are closing stale Pull Requests to make the list more manageable. Please re-open any Pull Request that has been closed in error. Closesapache#608Closesapache#639Closesapache#640Closesapache#648Closesapache#662Closesapache#668Closesapache#692Closesapache#705Closesapache#724Closesapache#728Closesapache#730Closesapache#753Closesapache#803Closesapache#854Closesapache#922Closesapache#986Closesapache#992Closesapache#1019Closesapache#1040Closesapache#1041Closesapache#1043Closesapache#1046Closesapache#1051Closesapache#1078Closesapache#1146Closesapache#1164Closesapache#1165Closesapache#1178Closesapache#1213Closesapache#1225Closesapache#1258Closesapache#1259Closesapache#1268Closesapache#1272Closesapache#1277Closesapache#1278Closesapache#1288Closesapache#1296Closesapache#1328Closesapache#1342Closesapache#1353Closesapache#1370Closesapache#1376Closesapache#1391Closesapache#1395Closesapache#1399Closesapache#1406Closesapache#1410Closesapache#1422Closesapache#1427Closesapache#1443Closesapache#1462Closesapache#1468Closesapache#1483Closesapache#1506Closesapache#1509Closesapache#1515Closesapache#1520Closesapache#1521Closesapache#1525Closesapache#1527Closesapache#1544Closesapache#1550Closesapache#1566Closesapache#1569Closesapache#1570Closesapache#1575Closesapache#1580Closesapache#1584Closesapache#1591Closesapache#1600Closesapache#1611Closesapache#1613Closesapache#1639Closesapache#1703Closesapache#1711Closesapache#1719Closesapache#1737Closesapache#1760Closesapache#1767Closesapache#1768Closesapache#1785Closesapache#1799Closesapache#1822Closesapache#1824Closesapache#1844Closesapache#1874Closesapache#1918Closesapache#1928Closesapache#1937Closesapache#1942Closesapache#1951Closesapache#1957Closesapache#1963Closesapache#1964Closesapache#1965Closesapache#1967Closesapache#1968Closesapache#1971Closesapache#1985Closesapache#1986Closesapache#1998Closesapache#2031Closesapache#2032Closesapache#2071Closesapache#2076Closesapache#2108Closesapache#2119Closesapache#2128Closesapache#2142Closesapache#2174Closesapache#2206Closesapache#2297Closesapache#2322Closesapache#2332Closesapache#2341Closesapache#2377Closesapache#2414Closesapache#2469
Not sure when it will be reviewed. So I chose to implement it based on master branch. Could be ported to other branches if needed.
-thanks