zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norbert Kalmar <nkal...@cloudera.com>
Subject [SUGGESTION] Migrate project structure to Maven build
Date Thu, 19 Apr 2018 11:28:23 GMT
Hi ZooKeeper community,

As the vast majority of the components in the Hadoop ecosystem is built
with Maven, what do you think of moving Zookeeper to a Maven structure as
well?

This would bring the benefit of a more consistent project structure, better
dependency management and more possibilities for future changes (i.e.: we
could separate java client code so that projects like HDFS that only needs
the client doesn't have to import the whole ZooKeeper).

This could be done as a multi-step change.

The change would also include the separation of unit tests from integration
and/or functional tests.

In the first iteration, the project structure could be separated something
like:

zookeeper
|-bin
|-conf
|-zk-client-c
|-zk-contrib
| |-zk-contrib-fatjar
| |-zk-contrib-huebrowser
| |-zk-contrib-loggraph
| |-zk-contrib-monitoring
| |-zk-contrib-rest
| |-zk-contrib-zkfuse
| |-zk-contrib-zkperl
| |-zk-contrib-zkpython
| |-zk-contrib-zktreeutil
| \-zk-contrib-zooinspector
|-zk-docs
|-zk-it (integration tests)
|-zk-server
|-zk-recipes
| |-zk-recipes-election
| |-zk-recipes-lock
\ \-zk-recipes-queue


With this kind of structure, the code change could be kept to a bare
minimum, if any at all.
Just change the ant script to conform to the new structure.

In a second iteration, we could start the changes that require code changes
as well:

zookeeper
|-bin
|-conf
|-jute
|-zk-client
| |-zk-client-c
| |-zk-client-java
| \-zk-client-go (or any other language)
|-zk-common
|-zk-contrib
| |-zk-contrib-fatjar
| |-zk-contrib-huebrowser
| |-zk-contrib-loggraph
| |-zk-contrib-monitoring
| |-zk-contrib-rest
| |-zk-contrib-zkfuse
| |-zk-contrib-zkperl
| |-zk-contrib-zkpython
| |-zk-contrib-zktreeutil
| \-zk-contrib-zooinspector
|-zk-docs
|-zk-it (integration tests)
|-zk-server
|-zk-recipes
| |-zk-recipes-election
| |-zk-recipes-lock
\ \-zk-recipes-queue


Here, java client code is separated from the server code (and any other
supported languages client code).

The final iteration would be something like:

zk-something
|-src
| |-main
| |  |-java
| |  | \org...
| |   \resources
| \test (unit tests only?)
|  |-java
|  |  \org...
|  \resources
\pom.xml


But this is just to give a high level example/vision.

Of course, with all the iteration, even at the end when possibly moving to
a full Maven build, it is important that the final jar structure remains
the same.

What do you think?

Kind regards,
Norbert

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message