Skip to main content

CCM extension that starts Cassandra (and related tools) under Java 8

Project description

ccm-java8

PyPi Badge

ccm-java8 is a CCM extension that explicitly sets the JAVA_HOME environment variable for all CCM-managed Cassandra nodes (and related tools) to an available Java 8 installation, which is required to run Cassandra 3.11 and lower.

Platforms Currently Supported:

  • macOS
  • Linux
    • Arch
    • Debian-based
    • RHEL-based

Usage

ccm-java8 is available on PyPI.

  1. Install it alongside CCM:

    pip install ccm ccm-java8
    
  2. Run CCM commands as normal.

    Cassandra and various tools will launch using the Java 8 VM.

    If no Java 8 VM can be found, CCM will refuse to start. Install Java 8 if this occurs.

Motivation

Many operating systems support the side-by-side installation of multiple Java versions, yet only one version can be selected as the default (i.e., what version of java is on $PATH).

Cassandra's bin/cassandra launch script prefers the java binary under $JAVA_HOME, and will fallback to using the java binary on $PATH if $JAVA_HOME isn't set. Hence, unless $JAVA_HOME or the platform default is explicitly set to a Java 8 installation, Cassandra will try, and fail, to start under an incompatible Java version.

ccm-java8 works by registering a CCM extension that when loaded by CCM explicitly sets the JAVA_HOME environment variable to a directory containing a Java 8 installation, or throws an exception otherwise.

Older versions used to register a hook into the append_to_server_env function, but this function doesn't get called for tools (nodetool, sstabledump, etc.). The current version sets the JAVA_HOME environment variable globally in the CCM Python process, which gets inherited by all sub-processes launched by CCM.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccm_java8-1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

ccm_java8-1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file ccm_java8-1.0.tar.gz.

File metadata

  • Download URL: ccm_java8-1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for ccm_java8-1.0.tar.gz
Algorithm Hash digest
SHA256 0f7b149781412577b47b1ff9b7de07182a17b33d4cea60aeacb660dbca1a754b
MD5 2802cba77562b4632afb9f1f4537ded1
BLAKE2b-256 af06689b5a1df4b8f2fa009d07aca9429e11660c801981c4d6650380ae43cef0

See more details on using hashes here.

File details

Details for the file ccm_java8-1.0-py3-none-any.whl.

File metadata

  • Download URL: ccm_java8-1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for ccm_java8-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8bd622fcaa9ab66bc603201cbf4558063b20c1a12d0be50ea9d87c0aa3effb65
MD5 9bb6d4b13e77720138ce883298a0e5d7
BLAKE2b-256 620fe85dfc85f0914ea283b70524f9b0112e1f34cd43b21acf417d74ea249ebb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page