billowy-motherboard-58443
09/29/2020, 5:40 PMbillowy-motherboard-58443
09/29/2020, 5:41 PMbillowy-motherboard-58443
09/29/2020, 5:41 PMbillowy-motherboard-58443
09/29/2020, 5:42 PMbillowy-motherboard-58443
09/29/2020, 5:42 PMbillowy-motherboard-58443
09/29/2020, 5:43 PMbillowy-motherboard-58443
09/29/2020, 5:43 PMbillowy-motherboard-58443
09/29/2020, 5:44 PMpip3 install ns.core
pip3 install ns.leaderElection.casssandrabillowy-motherboard-58443
09/29/2020, 5:44 PMbillowy-motherboard-58443
09/29/2020, 5:44 PMfrom ns.leaderElection.cassandra import CassandraElectorbillowy-motherboard-58443
09/29/2020, 5:45 PMns.core.leaderElectionbillowy-motherboard-58443
09/29/2020, 5:45 PMbillowy-motherboard-58443
09/29/2020, 5:46 PMpython_library() and two (2) python_distribution() declarations - one each for the cassandra and zookeeper implmentations?billowy-motherboard-58443
09/29/2020, 5:46 PMwitty-crayon-22786
09/29/2020, 5:59 PMwitty-crayon-22786
09/29/2020, 5:59 PMsources as well as the namewitty-crayon-22786
09/29/2020, 6:01 PMhundreds-father-404
09/29/2020, 6:13 PMpython_library(
name="cassandra",
sources=["f1.py", "f2.py"],
)
python_library(
name="zookeeper",
sources=["f3.py", "f3.py"],
)billowy-motherboard-58443
09/29/2020, 6:25 PMbillowy-motherboard-58443
09/29/2020, 6:27 PMsetup-py ns/leaderElection cause both pkgs to be built?billowy-motherboard-58443
09/29/2020, 6:28 PMsetup-py ns/leaderElection:cassandrahundreds-father-404
09/29/2020, 6:29 PMsetup-py ns/leaderElection is shorthand for setup-py ns/leaderElection:leaderElection, it will only build a target that leaves off the name field.
ns/leaderElection:cassandra will just build that one.
ns/leaderElection: is a glob to build everything in the directory. (https://www.pantsbuild.org/docs/goals#file-arguments-vs-target-arguments)billowy-motherboard-58443
09/29/2020, 6:50 PMbillowy-motherboard-58443
09/29/2020, 6:59 PMbillowy-motherboard-58443
09/29/2020, 7:00 PMbillowy-motherboard-58443
09/29/2020, 7:00 PMbillowy-motherboard-58443
09/29/2020, 7:01 PMhundreds-father-404
09/29/2020, 7:02 PMcassandra_lib and zookeeper_lib might be more clear what they are (and shorter)billowy-motherboard-58443
09/29/2020, 7:11 PMbillowy-motherboard-58443
09/29/2020, 7:12 PMhundreds-father-404
09/29/2020, 7:13 PMname only needs to be unique to the BUILD file. Because an address == the path to the BUILD file + the name, it’s guaranteed that the final address will be unique
https://www.pantsbuild.org/docs/targets#target-addressesbillowy-motherboard-58443
09/29/2020, 7:22 PM