Coder Social home page Coder Social logo

ccm's People

Contributors

aboudreault avatar aholmberg avatar aweisberg avatar beltran avatar blerer avatar driftx avatar ekaterinadimitrova2 avatar enigmacurry avatar jacek-lewandowski avatar jeremiahdjordan avatar jkni avatar joaquincasares avatar kishkaru avatar knifewine avatar krummas avatar lmr avatar mambocab avatar michaelsembwever avatar mike-tr-adamson avatar nutbunnies avatar pauloricardomg avatar pcmanus avatar ptnapoleon avatar smccarthy788 avatar snazy avatar spodkowinski avatar thibaultcha avatar thobbs avatar tolbertam avatar yukim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ccm's Issues

Can't install C* 2.1.0-beta1

% ccm create -d -v 2.1.0-beta1 -n 1 c210-beta1
Downloading http://archive.apache.org/dist/cassandra/2.1.0/apache-cassandra-2.1.0-beta1-src.tar.gz to /var/folders/jg/f_1fnft15hb17vtcys41t6vr0000gn/T/ccm-4yy8G_.tar.gz (13.922MB)
  14598057  [100.00%]
Extracting /var/folders/jg/f_1fnft15hb17vtcys41t6vr0000gn/T/ccm-4yy8G_.tar.gz as version 2.1.0-beta1 ...
Compiling Cassandra 2.1.0-beta1 ...
Traceback (most recent call last):
  File "/usr/local/bin/ccm", line 68, in <module>
    cmd.run()
  File "/Library/Python/2.7/site-packages/ccmlib/cmds/cluster_cmds.py", line 80, in run
    cluster = Cluster(self.path, self.name, cassandra_dir=self.options.cassandra_dir, cassandra_version=self.options.cassandra_version, verbose=True)
  File "/Library/Python/2.7/site-packages/ccmlib/cluster.py", line 34, in __init__
    common.validate_cassandra_dir(self.__cassandra_dir)
  File "/Library/Python/2.7/site-packages/ccmlib/common.py", line 129, in validate_cassandra_dir
    raise ArgumentError('Undefined cassandra directory')
ccmlib.common.ArgumentError: Undefined cassandra directory

ccm create ignored --vnodes

The cluster is only set up with virtual nodes if --vnodes is passed to the populate command, and not to create. For example
ccm create test -v 2.0.8 --vnodes
ccm populate -n 3
does not work.

wishlist: "ccm add" should default to an unused jmx-port

maybe this should take a special option, or maybe it should be the default when no jmx-port is provided, but it would be nice if ccm could just say "oh, you didn't give a jmx port, and the default is already in use by another ccm node. let me try that port plus one. oh, that's in use too. but default+2 is available! let's use that."

More context in error message (for missing ant)

I am trying to get ccm to work for me.

When I tried without having ant installed I got the following output:

./ccm create test -v 1.1.5
Downloading http://archive.apache.org/dist/cassandra/1.1.5/apache-cassandra-1.1.5-src.tar.gz to /tmp/ccm-SG1cqS.tar.gz (8.408MB)
8816668 [100.00%]
Extracting /tmp/ccm-SG1cqS.tar.gz as version 1.1.5 ...
Compiling Cassandra 1.1.5 ...
/home/stfl/.ccm/repository/1.1.5
Cannot create cluster: [Errno 2] No such file or directory

Including which file or directory is missing would have saved some time.
Even a stacktrace would have helped to find the source of the problem faster.

After having solved that problem ccm seems to be a very helpful tool, thanks a lot for that!

wishlist: "ccm $nodename nodetool"

a lot of the common nodetool functionality is already supported by ccm, but for the other things (like the stats, disablegossip, getendpoints, random stuff like that) it would be nice to have ccm fill in the parts of the nodetool command that it knows (address, port, config) and let the user specify the rest. so like:

ccm node5 nodetool getendpoints Prod1 tweets 1785a9ee2713f

would become like:

CASSANDRA_INCLUDE=~/.ccm/$ccm_cluster_name/node4/bin/cassandra.in.sh nodetool -h 127.0.0.4 -p 7304 getendpoints Prod1 tweets 1785a9ee2713f

cannot import name urllib

When trying to initialize CCM on Linux Mint 16, I get the following error:

File "/usr/local/lib/python2.7/dist-packages/ccmlib/repository.py", line 5, in
from six.moves import urllib
ImportError: cannot import name urllib

from bulkloader import BulkLoader fails

Looks like a missing file...

aarons-MBP-2011:~ aaron$ ccm create test -v 1.0.1
Traceback (most recent call last):
  File "/usr/local/bin/ccm", line 5, in <module>
    from ccmlib import common
  File "/Library/Python/2.7/site-packages/ccmlib/common.py", line 5, in <module>
    import os, common, shutil, re, sys, cluster, node, socket
  File "/Library/Python/2.7/site-packages/ccmlib/cluster.py", line 5, in <module>
    from bulkloader import BulkLoader
ImportError: No module named bulkloader

I commented out the import and it worked.

aarons-MBP-2011:ccm aaron$ ./ccm create test -v 1.0.1
Downloading http://archive.apache.org/dist/cassandra/1.0.1/apache-cassandra-1.0.1-src.tar.gz to /var/folders/hn/vg_2g82d2jqbj5ws1k7rdgs80000gn/T/ccm-JM_VLK.tar.gz (7.470MB)
   7833252  [100.00%] 
Extracting /var/folders/hn/vg_2g82d2jqbj5ws1k7rdgs80000gn/T/ccm-JM_VLK.tar.gz as version 1.0.1 ...
Compiling Cassandra 1.0.1 ...
Current cluster is now: test
aarons-MBP-2011:ccm aaron$ ./ccm populate -n 3
aarons-MBP-2011:ccm aaron$ ./ccm start
aarons-MBP-2011:ccm aaron$ ./ccm node1 ring
Address         DC          Rack        Status State   Load            Owns    Token                                       
                                                                               52021297248340010998083213052812605040      
127.0.0.3       datacenter1 rack1       Up     Normal  13.2 KB         77.60%  13902493218504448096725268289594131782      
127.0.0.2       datacenter1 rack1       Up     Normal  6.65 KB         20.04%  48007247119728595021274156242085822512      
127.0.0.1       datacenter1 rack1       Up     Normal  6.65 KB         2.36%   52021297248340010998083213052812605040 

Inet address 127.0.0.1:9042 is not available: [Errno 48] Address already in use

After running 'ccm start' I wanted to shutdown the cluster using 'ccm stop' and 'ccm remove'.

Later, when starting a new cluster, I ran 'ccm start' and received the following exception:

Traceback (most recent call last):
File "/usr/local/bin/ccm", line 68, in
cmd.run()
File "/Library/Python/2.7/site-packages/ccmlib/cmds/cluster_cmds.py", line 402, in run
if self.cluster.start(no_wait=self.options.no_wait, verbose=self.options.verbose, jvm_args=self.options.jvm_args) is None:
File "/Library/Python/2.7/site-packages/ccmlib/cluster.py", line 213, in start
p = node.start(update_pid=False, jvm_args=jvm_args)
File "/Library/Python/2.7/site-packages/ccmlib/node.py", line 312, in start
common.check_socket_available(itf)
File "/Library/Python/2.7/site-packages/ccmlib/common.py", line 176, in check_socket_available
raise UnavailableSocketError("Inet address %s:%s is not available: %s" % (addr, port, msg))
ccmlib.common.UnavailableSocketError: Inet address 127.0.0.1:9042 is not available: [Errno 48] Address already in use

It looks like org.apache.cassandra.service.CassandraDaemon is still running on that port. Is that normal? Should ccm kill that process when I do either 'ccm stop' or 'ccm remove'? Currently, I have to manually kill the process to start the cluster again.

updateconf does not work

bash-3.2$ ~/projects/ccm/ccm test updateconf
Unknown node test in cluster test
bash-3.2$ ls ~/.ccm
CURRENT test
bash-3.2$ ls ~/.ccm/test
cluster.conf node1 node2 node3

preserve comments in cassandra.yaml

cassandra.yaml provides a lot of really helpful comments. When I create a cluster with ccm, comments are stripped from cassandra.yaml. It would be great if comments in cassandra.yaml could be preserved. I am not sure how easy that would be. From a brief investigation, it looks like that could be a limitation in pyYAML.

'ccm nodeX stress' fails on --ipprefix clusters

repro:

ccm create -v 2.0.6 -n3 -i 127.1.1. 12711test
ccm node1 stress

(originally, I was tinkering with dummy interfaces when I found this - the above is simpler and suffers the same problem)

#!/bin/sh
PREFIX="192.168.0."
for i in 1 2 3; do
  sudo ip link add ccm${i} type dummy
  sudo ip addr add ${PREFIX}${i}/32 dev ccm${i}
  sudo ip link set ccm${i} up
done

ccm create -v 2.0.5 -n3 -i ${PREFIX} ipptest
ccm start
ccm stress  # this works
ccm node1 stress  # tcpdump shows this tries 127.0.0.1:9160 - same with node2,node3
mshuler@buildbot-ccm:~$ ccm node1 stress
Exception in thread "Thread-2" java.lang.RuntimeException: java.net.ConnectException: Connection refused
        at org.apache.cassandra.stress.Session.getClient(Session.java:816)
        at org.apache.cassandra.stress.Session.createKeySpaces(Session.java:730)
        at org.apache.cassandra.stress.StressAction.run(StressAction.java:64)
15:57:05.819347 IP 192.168.0.3.7000 > 192.168.0.3.58556: Flags [.], ack 995, win 1594, options [nop,nop,TS val 3299779 ecr 3299779], length 0
15:57:06.146777 IP 127.0.0.1.45374 > 127.0.0.1.9160: Flags [S], seq 3238651223, win 32792, options [mss 16396,sackOK,TS val 3299861 ecr 0,nop,wscale 5], length 0
15:57:06.146790 IP 127.0.0.1.9160 > 127.0.0.1.45374: Flags [R.], seq 0, ack 3238651224, win 0, length 0
15:57:06.539201 IP 192.168.0.2.40598 > 192.168.0.2.7000: Flags [P.], seq 719:841, ack 1, win 1025, options [nop,nop,TS val 3299959 ecr 3299779], length 122
15:57:06.539307 IP 192.168.0.2.7000 > 192.168.0.2.40598: Flags [.], ack 841, win 1795, options [nop,nop,TS val 3299959 ecr 3299959], length 0

manually running cassandra-stress against the node is fine:

mshuler@buildbot-ccm:~$ cassandra-stress -d 192.168.0.1
Unable to create stress keyspace: Keyspace names must be case-insensitively unique ("Keyspace1" conflicts with "Keyspace1")
total,interval_op_rate,interval_key_rate,latency,95th,99.9th,elapsed_time
11878,1187,1187,12.1,143.7,293.7,10
38853,2697,2697,8.9,106.6,246.4,20
<...>

CCM Cassandra instances don't start.

If I create a new cluster with one node and a version of 1.2.6 it doesn't start up at all with nothing logged anywhere. When I tried to run the cassandra instance from the bin directory I got this:

xss =  -ea -javaagent:./../lib/jamm-0.2.5.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms3999M -Xmx3999M -Xmn800M -XX:+HeapDumpOnOutOfMemoryError -Xss228k
sean@mybox:~/.ccm/test/node1/bin$ Error opening zip file or JAR manifest missing : ./../lib/jamm-0.2.5.jar
Error occurred during initialization of VM
agent library failed to init: instrument

Using release version of Cassandra fails

Here's the output:

$ ccm create test -v 1.0.7
Downloading http://archive.apache.org/dist/cassandra/1.0.7/apache-cassandra-1.0.7-src.tar.gz to /tmp/ccm-d0wjTS.tar.gz (7.536MB)
5515607 [69.80%]
Extracting /tmp/ccm-d0wjTS.tar.gz as version 1.0.7 ...
Traceback (most recent call last):
File "/usr/local/bin/ccm", line 68, in
cmd.run()
File "/usr/local/lib/python2.7/dist-packages/ccmlib/cmds/cluster_cmds.py", line 67, in run
cluster = Cluster(self.path, self.name, cassandra_dir=self.options.cassandra_dir, cassandra_version=self.options.cassandra_version, verbose=True)
File "/usr/local/lib/python2.7/dist-packages/ccmlib/cluster.py", line 29, in init
dir, v = repository.setup(cassandra_version, verbose)
File "/usr/local/lib/python2.7/dist-packages/ccmlib/repository.py", line 17, in setup
download_version(version, verbose=verbose)
File "/usr/local/lib/python2.7/dist-packages/ccmlib/repository.py", line 58, in download_version
tar.extractall(path=__get_dir())
File "/usr/lib/python2.7/tarfile.py", line 2046, in extractall
self.extract(tarinfo, path)
File "/usr/lib/python2.7/tarfile.py", line 2083, in extract
self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
File "/usr/lib/python2.7/tarfile.py", line 2159, in _extract_member
self.makefile(tarinfo, targetpath)
File "/usr/lib/python2.7/tarfile.py", line 2199, in makefile
copyfileobj(source, target)
File "/usr/lib/python2.7/tarfile.py", line 266, in copyfileobj
shutil.copyfileobj(src, dst)
File "/usr/lib/python2.7/shutil.py", line 48, in copyfileobj
buf = fsrc.read(length)
File "/usr/lib/python2.7/tarfile.py", line 817, in read
buf += self.fileobj.read(size - len(buf))
File "/usr/lib/python2.7/tarfile.py", line 735, in read
return self.readnormal(size)
File "/usr/lib/python2.7/tarfile.py", line 744, in readnormal
return self.fileobj.read(size)
File "/usr/lib/python2.7/gzip.py", line 252, in read
self._read(readsize)
File "/usr/lib/python2.7/gzip.py", line 299, in _read
self._read_eof()
File "/usr/lib/python2.7/gzip.py", line 338, in _read_eof
hex(self.crc)))
IOError: CRC check failed 0x10bb46fd != 0x635c8097L

Nodes do not join

I'm following the instructions in the readme, but the nodes don't form a cluster. Instead I get three nodes that all think they are in their own single-node clusters:

$ ccm create test -v 1.2.5
$ ccm populate -n 3 --vnodes
$ ccm start
...
$ ccm node1 status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Owns (effective)  Host ID                               Token                                    Rack
UN  127.0.0.1  85,76 KB   100,0%            13191930-9306-4ad9-b715-ed0c9a744937  8825165350184268650                      rack1
$ ccm node2 status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Owns (effective)  Host ID                               Token                                    Rack
UN  127.0.0.2  85,72 KB   100,0%            629a6760-5a51-45af-8407-97465e952a94  620078233470757682                       rack1
$ ccm node3 status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Owns (effective)  Host ID                               Token                                    Rack
UN  127.0.0.3  85,74 KB   100,0%            747d27dc-b36e-45c3-b86d-6440835611e2  8330235472454885737                      rack1

I've tested this with an older version of ccm (I installed it a couple of months ago but didn't get it working them either, same problem), and the current git head. It's on Mac OS X 10.8.4, with the Python version that comes with it.

Running nodetool -p ... join has no effect, all nodes think they've joined the cluster.

updateconf to add new paramater with true/false value

On trying to set start_native_transport: true, it returns
$:/data/ccm/ccmlib/cmds# ccm updateconf --config-dir=/cclust 'start_native_transport: true'
Traceback (most recent call last):
File "/usr/local/bin/ccm", line 66, in
cmd.validate(parser, options, args)
File "/usr/local/lib/python2.7/dist-packages/ccmlib/cmds/cluster_cmds.py", line 472, in validate
self.setting = common.parse_settings(args)
File "/usr/local/lib/python2.7/dist-packages/ccmlib/common.py", line 161, in parse_settings
if val.lower() == "false":
AttributeError: 'bool' object has no attribute 'lower'

One way to address this would be to cast the val to bool and if it fails perform the upper() and lower() calls.

OR am I doing something wrong ?

'ccm remove cluster_name' deletes the current cluster

The documentation for remove is currently:

  • Remove the current cluster (delete all data)

Which is fine, except if I type something extra like:

ccm remove test1

That will still remove whatever the current cluster is, not "test1". In this case, the remove command should be changed to either remove a cluster named "test1" or complain about an extra unknown option, rather than delete a cluster I did not intend for it to delete.

multiple DC tokens incorrect

jackson@faranth:~/workspace/ccm$ ./ccm create -v 1.0.10 -n 3:3 -s TestCCM
Downloading http://archive.apache.org/dist/cassandra/1.0.10/apache-cassandra-1.0.10-src.tar.gz to /tmp/ccm-7cLoo8.tar.gz (7.597MB)
7966008 [100.00%]
Extracting /tmp/ccm-7cLoo8.tar.gz as version 1.0.10 ...
Compiling Cassandra 1.0.10 ...
Current cluster is now: TestCCM

jackson@faranth:/workspace/ccm$
jackson@faranth:
/workspace/ccm$ ./ccm node1 ring
Address DC Rack Status State Load Owns Token
141784319550391026443072753096570088105
127.0.0.1 dc1 r1 Up Normal 6.79 KB 16.67% 0
127.0.0.2 dc1 r1 Up Normal 13.49 KB 16.67% 28356863910078205288614550619314017621
127.0.0.3 dc1 r1 Up Normal 13.49 KB 16.67% 56713727820156410577229101238628035242
127.0.0.4 dc2 r1 Up Normal 11.11 KB 16.67% 85070591730234615865843651857942052863
127.0.0.5 dc2 r1 Up Normal 11.12 KB 16.67% 113427455640312821154458202477256070484
127.0.0.6 dc2 r1 Up Normal 13.49 KB 16.67% 141784319550391026443072753096570088105

I would expect when the tokens are evenly divided per datacenter instead of the above.

Restarting a node enables vnodes

If I create a cluster running, say, version 2.0.3 without vnodes enabled, ccm will correctly init such a cluster. But if I stop a node and then restart it, it will split the token range into 256 ranges. This is because the generated cassandra.yaml file actually says 256 tokens even if vnodes are disabled (which is the default in ccm, although not default in Cassandra).

Deadlock if Cassandra fails before creating a log file

On MacOS, if Cassandra fails due to an error

ccm start 

hangs with no output. I have discovered that it gets stuck in cluster.py, line 206

   for node in self.nodes.values():
        if not node.is_running():
            p = node.start(update_pid=False)
            started.append((node, p))
            # ugly? indeed!                                                                                                                                                                                                   
            while not os.path.exists(node.logfilename()):
                time.sleep(.01)
            marks.append((node, node.mark_log()))

The while loop never exits because cassandra has already crashed and died because of a JVM error and no log files are created.

The while loop must check on every iteration that the process is in fact running and continue to wait only if its it. If its not, it should raise an error.

The function node.start is checking to see if the process is_running() but only if update_pid = True which is explicitly set to False in the code above hence that check is never performed in the start function either.

Stalling during handshake phase

I'm running a 3 node ccm setup on Travis which seems to work about 75% of the time, but fails in about 25% of cases with ccm apparently stalling the handshake phase.

This is the way I am invoking ccm:

#!/bin/bash

set -e

function run_tests() {
    local version=$1
    ccm create test -v binary:$version -n 3 -s -d --vnodes
    ccm status
    ccm updateconf 'concurrent_reads: 8' 'concurrent_writes: 32' 'rpc_server_type: sync' 'rpc_min_threads: 2' 'rpc_max_threads: 8' 'write_request_timeout_in_ms: 5000' 'read_request_timeout_in_ms: 5000'

    local proto=2
    if [[ $version == 1.2.* ]]; then
        proto=1
    fi

    go test -v -proto=$proto -rf=3 -cluster=$(ccm liveset) ./...

    ccm clear
}

run_tests $1

This is the part of the log where ccm appears to fail:

INFO [Thread-2] 2014-08-13 09:47:35,814 ThriftServer.java (line 110) Listening for thrift clients...
INFO [HANDSHAKE-/127.0.0.3] 2014-08-13 09:47:36,063 OutboundTcpConnection.java (line 418) Handshaking version with /127.0.0.3
INFO [HANDSHAKE-/127.0.0.2] 2014-08-13 09:47:36,063 OutboundTcpConnection.java (line 418) Handshaking version with /127.0.0.2
.... 60 more identical lines

The full log can be obtained here.

So I'm wondering what could be going wrong. Am I invoking ccm in the wrong way? Do I need to supply some more config? Are Travis build instances potentially underspec'ed to run a 3 node cluster? Or do I maybe have some crosstalk between different Travis build instances (considering that the 4 are run concurrently to test 4 different permutations of Cassandra and Go versions)?

For reference, the .travis.yml descriptor looks like this:

language: go

env:
  - CASS=1.2.18
  - CASS=2.0.9

go:
  - 1.2
  - 1.3

before_script:
  - sudo apt-get install -y libjna-java python-pip
  - sudo pip install cql PyYAML six
  - go get code.google.com/p/go.tools/cmd/vet
  - git clone https://github.com/pcmanus/ccm.git
  - pushd ccm
  - sudo ./setup.py install
  - popd

script:
  - bash integration.sh $CASS
  - go vet .

node remove is broken

When performing ccm node1 remove, I get following error:

Traceback (most recent call last):
  File "/Users/yuki/Developments/tools/ccm/ccm", line 68, in <module>
    cmd.run()
  File "/Users/yuki/Developments/tools/ccm/ccmlib/cmds/node_cmds.py", line 54, in run
    self.cluster.remove(self.node)
  File "/Users/yuki/Developments/tools/ccm/ccmlib/cluster.py", line 155, in remove
    del self.nodes[self.node.name]
AttributeError: Cluster instance has no attribute 'node'

ccm does not start

Just installed ccm but unfortunately it does not start. Tried different versions of Cassandra (0.8.6, 1.2.5), different java versions (latest JDK6 and JDK7) but can't get it going. Used "ccm start -v" and "ccm start -v --no-wait" but ccm just hangs and produces no output. Pid file is generated for first node but the process itself does not exist (anymore). Also tried to use "python2 -m trace --trace /usr/bin/ccm start" but don't get any reasonable output.

As I am by far no Python expert, is there a good way to troubleshoot the issue?

wishlist: "ccm cli" and "ccm $nodename cli"

"ccm cli" would run cassandra-cli connected to some (any) node in the cluster.

"ccm $nodename cli" would, obviously, run cassandra-cli connected to that node.

ccm would supply the right tool config and parameters (hostname, port, jmx-port, etc). probably you'd want to allow extra parameters to both variants; the extra parameters would be added to the arguments for cassandra-cli.

a variant of this for cqlsh would be hawt too.

use ccm cluster name as Cassandra cluster name

I thought this was already being done, but I just found out the hard way that all ccm clusters have the Cassandra cluster name "Test Cluster". I just had a couple which were supposed to be separate, join each other (since I reused an interface). That gets a little messy.

Seems like using the ccm cluster name for the Cassandra cluster name would be a pretty simple way to keep that from happening by accident.

Multiple data centres broken

When using the -n 4:4 argument to the populate command, the data centre value does not get saved in node.cfg.

Then when using the updateconf the cassandra-topology.properties is reverted back to default.

multi-dc topology is lost on some calls

For example if a cluster is mutli-dc, topology is written, then a call to
cluster.set_configuration_options
somehow causes the topology information to be lost.

This was the case earlier with cluster.set_cassandra_dir but this was fixed with a pull request. I think maybe something needs to change in node.import_config_files.

I may be able to fix this with a pull request later, but for now just worked around it.

Using binary tarballs from Apache

I was wondering if there is a way to use binary tarballs from Apache's download site as opposed to compiling Cassandra from source. The motivation is to use ccm on Travis, and sometimes the long compile times cause the overall job to timeout.

does not work at all

I installed the latest version on both Mint and Fedora 21.

Tried the steps with both 1.1.12 and 2.0.6

When I got to 'ccm start' it just sat there. No error, nothing.

After closer investigation, all the folders for each node are emty, e.g.

~/.ccm/test/node1/bin
~/.ccm/test/node1/conf

nothing in there, just an empty folder.

BUILD FAILED build.xml:208

I get the following error when running CCM create command and specifying a recent version (either 1.2.4 or 1.2.5) of C*:

[java] error(208): /home/ubuntu/.ccm/repository/1.2.5/src/java/org/apache/cassandra/cql/Cql.g:654:1: The following token definitions can never be matched because prior tokens match the same input: T__93,T__94,T__97,T__98,T__101,T__105,T__107,K_WITH,K_USING,K_USE,K_FIRST,K_COUNT,K_SET,K_APPLY,K_BATCH,K_TRUNCATE,K_IN,K_CREATE,K_KEYSPACE,K_COLUMNFAMILY,K_INDEX,K_ON,K_DROP,K_INTO,K_TIMESTAMP,K_TTL,K_ALTER,K_ADD,K_TYPE,RANGEOP,FLOAT,COMPIDENT,UUID,MULTILINE_COMMENT

Topology information is reset when a node is added

    ccm create --vnodes -v git:50fc8ba0c5a8caa9f8d14633734547187896d217 -n 2:2 c21head
    comes up fine:
        Datacenter: dc1
        ===============
        Status=Up/Down
        |/ State=Normal/Leaving/Joining/Moving
        --  Address    Load      Tokens  Owns (effective)  Host ID                              Rack
        UN  127.0.0.1  30.48 KB  256    55.4%            2d335e2c-28bf-47a1-a72e-ffc18094c930  r1
        UN  127.0.0.2  30.48 KB  256    49.4%            89c3f61f-b56d-4350-ba1a-28f2c9d78b10  r1
        Datacenter: dc2
        ===============
        Status=Up/Down
        |/ State=Normal/Leaving/Joining/Moving
        --  Address    Load      Tokens  Owns (effective)  Host ID                              Rack
        UN  127.0.0.3  30.48 KB  256    47.9%            36c9ff40-f58f-4063-8f67-e16823538d8e  r1
        UN  127.0.0.4  30.48 KB  256    47.3%            06e17cc1-c1e0-40e9-a94f-fa14f0068d40  r1
    then
     ccm add -b -i 127.0.0.5 -j 7500 -d dc2 node5
        Datacenter: dc1
        ===============
        Status=Up/Down
        |/ State=Normal/Leaving/Joining/Moving
        --  Address    Load      Tokens  Owns (effective)  Host ID                              Rack
        UN  127.0.0.1  30.49 KB  1      25.3%            86785293-bf78-4e1c-957a-341481c06e2e  r1
        UN  127.0.0.2  30.49 KB  1      50.0%            ded34d71-f986-43ef-985d-c387c5a5d43b  r1
        UN  127.0.0.3  30.49 KB  1      50.0%            3fe1e07a-c9ca-422f-9b99-6baf40ee2f08  r1
        UN  127.0.0.4  30.49 KB  1      25.0%            b1fd0bdf-3f80-4988-b833-354cd945c95d  r1
        Datacenter: dc2
        ===============
        Status=Up/Down
        |/ State=Normal/Leaving/Joining/Moving
        --  Address    Load      Tokens  Owns (effective)  Host ID                              Rack
        UN  127.0.0.5  9.35 KB    1      49.7%            92d8dd52-5043-4dc0-8df7-a232c07dc537  r1

wishlist: "ccm alllogs"

i would love to have a way to just display all the logs from all running nodes at once. it would probably work best if each log line was prefixed with the name of the node where it came from. i picture it looking like this:

node3: INFO [GossipStage:1] 2011-09-07 16:03:15,300 Gossiper.java (line 681) InetAddress /127.0.0.4 is now UP
node4: INFO [CompactionExecutor:1] 2011-09-07 16:03:15,968 CompactionManager.java (line 608) Compacted to /home/paul/.ccm/2434/node4/data/system/Migrations-tmp-g-9-Data.db.  49,091 to 48,899 (~99% of original) bytes for 1 keys.  Time: 67ms.
node4: INFO [FlushWriter:1] 2011-09-07 16:03:15,970 Memtable.java (line 254) Completed flushing /home/paul/.ccm/2434/node4/data/system/Migrations-g-10-Data.db (7042 bytes)
node4: INFO [CompactionExecutor:3] 2011-09-07 16:03:15,971 CompactionManager.java (line 608) Compacted to /home/paul/.ccm/2434/node4/data/system/Schema-tmp-g-9-Data.db.  21,191 to 20,864 (~98% of original) bytes for 8 keys.  Time: 53ms.
node4: INFO [FlushWriter:1] 2011-09-07 16:03:15,971 Memtable.java (line 237) Writing Memtable-Schema@616432710(3065/3831 serialized/live bytes, 4 ops)
node2: INFO [GossipStage:1] 2011-09-07 16:03:15,978 Gossiper.java (line 681) InetAddress /127.0.0.4 is now UP
node4: INFO [FlushWriter:1] 2011-09-07 16:03:15,979 Memtable.java (line 254) Completed flushing /home/paul/.ccm/2434/node4/data/system/Schema-g-10-Data.db (3215 bytes)
node1: INFO [GossipStage:1] 2011-09-07 16:03:15,980 Gossiper.java (line 681) InetAddress /127.0.0.4 is now UP

i guess the easiest way might be to add some stuff to each node's log4j-server config, so that they all also log to the same file? or maybe just a dumb timestamp parser that could merge-sort all the logs together before displaying.

populate should create balanced ring

Currently, running ccm populate -n 3 does not create a balanced ring. No initial_token is set for any nodes, so they end up picking their own at startup. There is a method in cluster.py for generating a balanced ring, but running a grep on the codebase shows that it is never used.

I propose having something like this in Cluster.populate:

if tokens is None:
    tokens = Cluster.balanced_tokens(node_count)

Windows setup

It was quite clearly mentioned that it doesn't work for windows.
I am wondering if any one is working to make it available for windows as well.Will be happy to contribute!!

while trying to start

I am getting
WindowsError: [Error 193] %1 is not a valid Win32 application

Any help how to resolve this would be helpful.
env: windows 7 64bit machine

Recalculate max heap size per node

Now that JNA and mlockall is on by default in 2.1, I think we should do some automatic recalculation of max per-node heap sizes (based on how many was asked for in populate()) so we're not overcommitted on memory.

It used to be easy for me to use ccm in 4 node configurations on my 8G laptop, but now the default C* heap allocation pushes me into swap without hand editing the cassandra-env per node.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.