-1

for my master thesis, I have to modify Cassandra (I want to make a distributed version where different clusters will send the modifications with some dependencies and stuff :) ). So, I am starting to finally understand the code and I think I know how to do it, but I have encountered a problem:

I have to run different instances of cassandra on my computer (so I would have like 3 terminals running cassandra on different addresses, and 3 others terminal open with cqlsh for each cassandra, and when I insert values in a table with one terminal cqlsh, it will only affect the corresponding cassandra cluster) . I have found different ways on internet to do it, but every times, you should duplicate the binaries (so the code in my case), and since I am working on it, I don't want to duplicate it, because every time I make a small modification, I should reduplicate everything (I guess I could use a git to easily push and pull the modification from the original folder, but I am sure that there should be an easier way, right? :) )

thank you in advance :)

PS: I use windows (I can switch to linux (virtual box) but I would like to continue to work on windows if possible) and cassandra 3.10

  • [Why is “Can someone help me?” not an actual question?](http://meta.stackoverflow.com/q/284236/18157) – Jim Garrison Feb 27 '17 at 17:41
  • to reformulate it more clearly: -is there a way to run different instances of cassandra from one source code? -is there a way to put system.out.println() in the code of cassandra an see the result in a terminal? – Vincent Dagnely Feb 27 '17 at 17:57
  • _"for my master thesis, I have to modify Cassandra "_ -- well then, you should have an intimate understanding of the Cassandra source code and how Cassandra operates. Are you expecting someone here to do the research YOU should be doing? Are you going to give co-authorship to anyone who answers? What would your advisor think about you asking random strangers on the Internet to do some of your work for you? – Jim Garrison Feb 27 '17 at 18:00
  • My thesis is about how to generate interactions between the clusters (to be more precise, it is about having explicit dependencies instead of the traditional causal consistency). I don't ask a solution about how to have different clusters of cassandra that interact between them, I just ask about how to have different clusters of cassandra totally isolated (like if I had different servers) and then I could start implementing by myself the interactions between them. – Vincent Dagnely Feb 27 '17 at 18:06
  • I just understand this was a link, thank you, I won't ask 2 questions in the same post anymore :) (but there are a lot of questions asked frequently, so I won't overload it by deleting this post and reposting 2 separate post?) – Vincent Dagnely Feb 27 '17 at 18:13

1 Answers1

2

take a look at cassandra ccm, it allows you to run multiple instances on the same physical machine. (used mostly for testing)

https://github.com/pcmanus/ccm

MeBigFatGuy
  • 28,272
  • 7
  • 61
  • 66
  • thank you a lot, I think it was exactly what I was looking for. Just a stupid question I am unable to solve: I use the option --instal-dir to use the source code that I am modifying, but it asks the path to the cassandra dir and I tried everything (the folder cassandra, the one above, the folder src, the folder java, the folder bin) but it never works. what should be the folder that I must use? – Vincent Dagnely Feb 27 '17 at 19:25
  • should just be the main directory (the git repo root), but it is --install-dir – MeBigFatGuy Feb 28 '17 at 21:13