diff options
author | Nelson, Thomas (arthurdent3) <nelson24@att.com> | 2019-05-09 14:16:37 +0000 |
---|---|---|
committer | Tschaen, Brendan <ctschaen@att.com> | 2019-05-13 14:34:05 -0400 |
commit | d6e7b63cc580e7b3822be61fe92a493ad5e222a3 (patch) | |
tree | 5a055529781a2989585075e13426979464f5fb33 /distribution/cassandra | |
parent | 9a8b8ae8d7c8d6931f99def68068f8936a8cc0b3 (diff) |
Changes Listed below:
- Added build version API
- Updated Keyspace active to use Properties setting
- Update Libraries Netty,jbcrypt,Jackson Databind and log4j
- Removed some irrelivant files
- Updated some usint tests to ignore some tests(This will be updated soon)
- Bugfixes
- Missing Values, inform user.
- Respond with proper error
- Fix Locking Contention issue.
- Add locking retry for atomic calls.
Change-Id: Ie218dd92edb0c20e4a0efe33eeaaec84e5293c44
Issue-ID: MUSIC-393
Signed-off-by: Nelson, Thomas (arthurdent3) <nelson24@att.com>
Diffstat (limited to 'distribution/cassandra')
-rw-r--r-- | distribution/cassandra/docker-entrypoint.sh | 46 |
1 files changed, 9 insertions, 37 deletions
diff --git a/distribution/cassandra/docker-entrypoint.sh b/distribution/cassandra/docker-entrypoint.sh index a42d498e..34825bd2 100644 --- a/distribution/cassandra/docker-entrypoint.sh +++ b/distribution/cassandra/docker-entrypoint.sh @@ -4,13 +4,13 @@ set -e # first arg is `-f` or `--some-option` # or there are no args if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - set -- cassandra -f "$@" + set -- cassandra -f "$@" fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" - exec gosu cassandra "$BASH_SOURCE" "$@" + chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" + exec gosu cassandra "$BASH_SOURCE" "$@" fi _ip_address() { @@ -33,45 +33,17 @@ if [ "$1" = 'cassandra' ]; then CASSANDRA_LISTEN_ADDRESS="$(_ip_address)" fi - : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} +echo "#############################################" +echo "############## Update music.cql #############" +echo "#############################################" if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then CASSANDRA_BROADCAST_ADDRESS="$(_ip_address)" fi - : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} - - if [ -n "${CASSANDRA_NAME:+1}" ]; then - : ${CASSANDRA_SEEDS:="cassandra"} + if [ "${MUSIC_REPLICATION_FACTOR}" ]; then + sed -ri 's/REPLICATION_FACTOR/'${MUSIC_REPLICATION_FACTOR}'/' "$f" fi - : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - sed -ri 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" - - for yaml in \ - broadcast_address \ - broadcast_rpc_address \ - cluster_name \ - endpoint_snitch \ - listen_address \ - num_tokens \ - rpc_address \ - start_rpc \ - ; do - var="CASSANDRA_${yaml^^}" - val="${!var}" - if [ "$val" ]; then - sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" - fi - done - - for rackdc in dc rack; do - var="CASSANDRA_${rackdc^^}" - val="${!var}" - if [ "$val" ]; then - sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" - fi - done -fi +done echo "#############################################" echo "############## Update music.cql #############" |