Created attachment 191234 [details] New port databases/cassandra3 shar archive New port for Cassandra 3.11.2 Apache Cassandra is a free and open-source distributed database. It is a Java-based, highly scalable, eventually consistent, wide column store.
For the record, cassandra has been in the tree, 2 versions have been deleted before: > $ grep cassandra MOVED > databases/cassandra||2016-03-29|Has expired: 1.2.x has reached EOL, upgrade to a supported version of Cassandra > databases/cassandra2||2017-11-12|Has expired: Broken for more than 6 months
Created attachment 191294 [details] Updated shar archive Updated shar archive fixes external lib issues.
Hi Angelo, cassandra2 had the rc script (in files/cassandra.in). Could you please add one too? Thanks! Yuri
Created attachment 191502 [details] Updated shar with rc script Yuri, Please see the new shar, including rc script. Angelo
(In reply to Angelo Polo from comment #4) Thank you Angelo, Yuri
I've tried the port, unfortunately it fails to build in poudriere: maven-ant-tasks-download: [echo] Downloading Maven ANT Tasks... [get] Getting: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar [get] To: /wrkdirs/usr/ports/kdp/cassandra3/work/apache-cassandra-3.11.2-src/build/maven-ant-tasks-2.1.3.jar [get] Error getting http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar to /wrkdirs/usr/ports/kdp/cassandra3/work/apache-cassandra-3.11.2-src/build/maven-ant-tasks-2.1.3.jar BUILD FAILED /wrkdirs/usr/ports/kdp/cassandra3/work/apache-cassandra-3.11.2-src/build.xml:296: java.net.SocketException: Permission denied (connect failed) AFAIK ports should NEVER download anything during build process. All downloads must be happening on fetch stage and be checked with distfiles. We should either do all downloads before build, or consider using tarball with prebuild binary distribution which is available on official download page.
Thanks Sergey, Taking a look into it. Angelo
Created attachment 195202 [details] Updated shar Uses a pre-assembled Maven repository. Removed duplicate copies of tools/bin scripts from staging.
Ok, thanks, I will take a look.
If anyone wants to use or test the port, for now you can manually download the Maven repository "apache-cassandra-3.11.2-repo.tar.gz" to /usr/ports/distfiles from here: https://drive.google.com/open?id=1U81megQnir68r3HbFvrTQTqTjgWNj7wg
Strangely enough I could add the file to my GDrive, but when I attempt download it stucks indefinitely or fails with a 409 error.
…and of course I tried 4 times, I wrote that comment, then I tried again "for the sake of it" and it finally worked perfectly.
BTW: the rc.d uses a "cassandra" user by default, but it's not created during install.
Created attachment 196689 [details] Updated shar
Created attachment 196690 [details] GIDs diff taking ID 236
Created attachment 196691 [details] UIDs diff taking ID 236
Thanks Lapo, updated Makefile now creates the cassandra user and group during install.
Would also be nice to change "/var/lib/cassandra" to "/var/db/cassandra" (and uncomment those lines) in $PREFIX/etc/cassandra/cassandra.yaml to have the default database directory similar to other Ports. (/var/db/mysql, /var/db/mongodb, /var/db/pgsql) Also logs should (probably) be adapted to FreeBSD hierarchy, something like /var/log/cassandra (?) Can bechanged in $PREFIX/etc/cassandra/logback.xml PS: sorry about trickling comments, I'm writing as I'm interested in it as a user and noticing one thing at a time.
These are good ideas. I'll update this too.
Created attachment 196954 [details] Updated shar Default data and log directories set.
Oh, nice, changing -Dcassandra.logdir is better than logback.xml as I did locally. Only bug I can notice right now (and I consider it marginal) is that the cqlsh client doesn't seem to find readline and does not allow line editing (e.g. pressing left arrow and right arrow prints "^[[D^[[C"). I hope this gets committed soon.
Meanwhile, 3.11.3 is out. =)
PS: the readline bug I mentioned in comment 21 was produced by an old libreadline I had still in /lib/, it works perfectly.
Created attachment 197462 [details] Updated shar Don't pack the broken ohc libs.
To use the (normally default) off-heap row cache, you can build this pending port: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227392 Then link the following two files from $JAVASHAREDIR/classes into $JAVASHAREDIR/cassandra/lib: ohc-core-0.4.4.jar ohc-core-j8-0.4.4.jar And set: row_cache_class_name: org.apache.cassandra.cache.OHCProvider When the OHC port gets committed I will update the Cassandra port to depend on it and reinstate the default row cache.
Created attachment 197936 [details] Updated shar Update to Cassandra 3.11.3. The updated Maven repository is available here: https://drive.google.com/open?id=1ICXEf4D5_XBQSQz_OuJHoShb37yXA7Ms
Thanks! I'm deploying 3.11.3 and seems to be working fine.
Committed with changes. Thank you for your submission! Sorry again for the delay!
A commit references this bug: Author: yuri Date: Mon Jan 28 06:12:22 UTC 2019 New revision: 491455 URL: https://svnweb.freebsd.org/changeset/ports/491455 Log: New port: databases/cassandra3: Highly scalable distributed database Versions 1.X and 2.X existed previously, but were removed due to build issues. PR: 226377 Submitted by: Angelo Polo <language.devel@gmail.com> Changes: head/GIDs head/UIDs head/databases/Makefile head/databases/cassandra3/ head/databases/cassandra3/Makefile head/databases/cassandra3/distinfo head/databases/cassandra3/files/cassandra.in head/databases/cassandra3/files/patch-bin_cassandra head/databases/cassandra3/files/patch-bin_cassandra.in.sh head/databases/cassandra3/files/patch-build.xml head/databases/cassandra3/files/patch-conf_cassandra-env.sh head/databases/cassandra3/files/patch-conf_cassandra.yaml head/databases/cassandra3/files/patch-doc_Makefile head/databases/cassandra3/files/patch-src_java_org_apache_cassandra_config_Config.java head/databases/cassandra3/files/patch-src_java_org_apache_cassandra_service_StartupChecks.java head/databases/cassandra3/files/patch-src_java_org_apache_cassandra_utils_FastByteOperations.java head/databases/cassandra3/files/patch-test_conf_cassandra.yaml head/databases/cassandra3/files/patch-tools_bin_cassandra.in.sh head/databases/cassandra3/files/repaircluster.in head/databases/cassandra3/pkg-deinstall head/databases/cassandra3/pkg-descr head/databases/cassandra3/pkg-install head/databases/cassandra3/pkg-message head/databases/cassandra3/pkg-plist