You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by Apache Wiki <wi...@apache.org> on 2009/07/08 08:43:20 UTC

[Cassandra Wiki] Update of "RunningCassandraInIDEA" by ChetanConikee

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The following page has been changed by ChetanConikee:
http://wiki.apache.org/cassandra/RunningCassandraInIDEA

The comment on the change is:
Added  Pre-Cursory Steps to Project Creation Process , Module Dependencies

------------------------------------------------------------------------------
  = Setup Cassandra =
  
+ 
+ Check out Cassandra from Subversion and create your new project.
+ 
+    1. Install jdk6 and Ant
+    2. Svn checkout https://svn.apache.org/repos/asf/incubator/cassandra/trunk cassandra-trunk
+    3. Ant (optional: ant test)
+ 
+    Step (3) is critical to execution as certain cli-classes are generated by ANTLR on running the build script
+ 
- Check out Cassandra from Subversion and create your new project. IDEA will generally set the project up properly for you (you'll need to add the lib folder to your project dependencies). 
+ IDEA will generally set the project up properly for you (you'll need to add the lib folder to your project dependencies). 
+ 
+ Open IDEA and Select "Create Project from existing sources" and select the cassandra-trunk folder created from the prior step i.e. svn checkout
+ 
+ attachment:CreateNewProject-1.png
+ 
+ attachment:CreateNewProject-2.png
+ 
+ attachment:CreateNewProject-3.png
+ 
+ attachment:project.png
  
  You will need to add the "conf" to your sources, so that log4j properties can be found. 
  
- Mine looks like this:
+ Right Click on Main Project "Cassandra-trunk" and select "Module Settings" and select "Dependencies" tab.
+ Click "Add" and Choose "Module Dependency" and add "Interface" project to the dependency list
+ Click "Add" again and choose "Single Entry Module Library" and add the conf folder containing log4j.properties file to the project path (ignore this step if the conf folder has been added to the project as a pre-cursory step)
  
- attachment:project.png
+ attachment:ModuleSettings.png
  
- = Create a Cassandra application =
+ = Create a Cassandra application's RUN configuration =
  
  Create a new application called cassandra
  
@@ -22, +43 @@

  
   * VM Parameters
  {{{
-  -Dcassandra -Dstorage-config=@@@-ea -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8888,suspend=n -Xms128M  -Xmx1G  -XX:SurvivorRatio=8  -XX:TargetSurvivorRatio=90  -XX:+AggressiveOpts  -XX:+UseParNewGC  -XX:+UseConcMarkSweepGC  -XX:CMSInitiatingOccupancyFraction=1  -XX:+CMSParallelRemarkEnabled -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote.port=8080 -Dcom.sun.management.jmxremote.ssl=false  -Dcom.sun.management.jmxremote.authenticate=false
+  -Dcassandra -Dstorage-config=@@@ -ea -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8888,suspend=n -Xms128M  -Xmx1G  -XX:SurvivorRatio=8  -XX:TargetSurvivorRatio=90  -XX:+AggressiveOpts  -XX:+UseParNewGC  -XX:+UseConcMarkSweepGC  -XX:CMSInitiatingOccupancyFraction=1  -XX:+CMSParallelRemarkEnabled -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote.port=8080 -Dcom.sun.management.jmxremote.ssl=false  -Dcom.sun.management.jmxremote.authenticate=false
  }}}
  
  Replace @@@ above with the path to your conf folder, eg mine is "/home/dehora/projects/asf/cassandra/trunk/conf". The flags above are taken from the cassandra shell script.  
@@ -36, +57 @@

  eg,
  
  {{{
- cassandra_home: /home/dehora/projects/asf/cassandra/trunk
+ CASSANDRA_HOME: /home/dehora/projects/asf/cassandra/trunk
  CASSANDRA_CONF: /home/dehora/projects/asf/cassandra/trunk/conf
  }}}
  
@@ -45, +66 @@

  Mine looks like this
  
  attachment:app.png
+ 
+ Review and Modify Storage-Conf.xml and log4j.properties accordingly, as in certain cases directory creation of /var/cassandra fails due to ACLs of execution context
+ 
+ Storage-Conf.xml
+ {{{
+     Directories: Specify where Cassandra should store different data on disk
+          Keep the data disks and the CommitLog disks separate for best performance
+     
+     <CommitLogDirectory>/var/cassandra/commitlog</CommitLogDirectory>
+     <DataFileDirectories>
+         <DataFileDirectory>/var/cassandra/data</DataFileDirectory>
+     </DataFileDirectories>
+     <CalloutLocation>/var/cassandra/callouts</CalloutLocation>
+     <BootstrapFileDirectory>/var/cassandra/bootstrap</BootstrapFileDirectory>
+     <StagingFileDirectory>/var/cassandra/staging</StagingFileDirectory>
+ 
+ }}}
+ 
+ appender in log4j.properties
+ {{{
+ 
+ log4j.appender.R.File=/var/cassandra/logs/system.log
+ 
+ }}}
+ 
  
  = Verify =