[LIVY-717] introduce maven property to set ZooKeeper version#262
[LIVY-717] introduce maven property to set ZooKeeper version#262symat wants to merge 1 commit intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #262 +/- ##
============================================
- Coverage 67.95% 67.88% -0.07%
+ Complexity 940 939 -1
============================================
Files 102 102
Lines 5876 5876
Branches 891 891
============================================
- Hits 3993 3989 -4
- Misses 1311 1315 +4
Partials 572 572
Continue to review full report at Codecov.
|
|
Can it really be worked if you're using different version of ZK/Curator? I'm OK to make the version property configurable, but I'm more concerned about the question "can it really be worked after version is changed". CC @yiheng I remembered you fixed a version incompatible issue in Curator, right? |
|
Yes, here's the patch. The problem I have fixed is the curator-recipes lib version is not compatible with curator-client and curator-framework. |
|
@jerryshao I think the current problem is even if we set the |
|
Thanks for the comments!
yes, that is true as well. The new Curator 4.2.0 pulls ZK 3.5.4-beta, and we don't want to use a beta version in production. (the last stable official ZK release is 3.5.6)
it depends on the combination of versions. You are right, that it won't work if you only change ZooKeeper version. Curator 2.x is only compatible with ZooKeeper 3.4.x, while Curator 3.x is compatible only with ZooKeeper 3.5.x. The new Curator 4.x is said to be compatible with both ZooKeeper versions, but we found during testing, that it is not necessarily works with the old ZooKeeper. (also one thing is compile time compatibility and an other the run-time one) So we found, that the best is to use the latest Curator only with the new ZooKeeper. (it is good to know, that on the Hadoop trunk we already have Curator 4.2.0 and ZooKeeper 3.5.6, but I am not aware of any released Hadoop version yet that contains this change) So the trick is to make sure to use proper (compatible) Curator-Hadoop-ZooKeeper versions.
When you try to build Livy with the new Curator/ZooKeeper, then you will face an other small issue (one mock object needs to be changed in the integration tests), but other than that, Livy is working for us. Assuming you exclude the old ZooKeeper that comes from Hadoop. I am mainly a ZooKeeper contributor, so I don't want to change the default Curator / ZooKeeper version in Livy, I think that is something the Livy community should decide / schedule. But I think it is an important feature to have the ability to explicitly set the ZooKeeper and Curator versions in Livy. So at least the community can test / experiment with the new third party versions. |
When we want to use Livy in a cluster where a newer ZooKeeper server version is used, we might run into run-time errors if we compile Livy using the current Curator / Hadoop versions. The Curator version can already explicitly set with the
curator.versionmaven property in build time, but we were still missed the same parameter for ZooKeeper.In this PR I added a new maven parameter called
zookeeper.versionand after analyzing the maven dependency tree, I made sure that the Curator and ZooKeeper versions used in compile time are always harmonized and controlled by the maven parameters.I set the
zookeeper.versionin maven to3.4.6to be backward compatible with the current Livy dependencies.see https://issues.apache.org/jira/browse/LIVY-717