cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Cassandra Wiki] Update of "Windows Development" by PauloMotta
Date Fri, 31 Jul 2015 21:11:10 GMT
Dear Wiki user,

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

The "Windows Development" page has been changed by PauloMotta:

New page:
== Setting Up Environment ==

Open !PowerShell as administrator (“run as administrator” on right-click), and peform
the steps below:
  * Set the execution policy as remotesigned in order to install chocolatey:
    * `set-executionpolicy remotesigned`
  * Install chocolatey package manager
    * Install instructions available [[|here]]
  * Install the following packages with “chocolatey install <packageName>”
    * Mandatory packages (running, compiling and installing)
      * jdk7 and/or jdk8 (depending on C* version to develop)
      * ant
      * git
      * python2
      * easy.install
      * pip
    * Optional packages (productivity)
      * gnuwin
      * poshgit

== Running cassandra-dtests ==

  * Set $CASSANDRA_DIR environment variable (the environment variable will only be exported
during next terminal session)
    * `[Environment]::SetEnvironmentVariable("CASSANDRA_DIR", "c:\Users\<username>\<cassandra_dir>",
  * Download and install Microsoft Visual C++ Compiler for Python 2.7
    * Available on [[|this
  * Instal necessary python modules
    * `pip install blist git+
git+ cql decorator enum34 flaky futures nose nose-test-select
pycassa six thrift psutil`
    * Check for new

== Running CCM ==

   * You need to set the execution policy to unrestricted to run CCM on !PowerShell as administrator:
    * `set-executionpolicy unrestricted`
   * Add .PY extension to environment variable $PATHEXT, to allow ccm to be executed from
any location (run on !PowerShell as administrator):
    * `[Environment]::SetEnvironmentVariable("PATHEXT", "$env:PATHEXT;.PY", "MACHINE")`
   * Create a symbolinc link (as administrator) to make chocolatey ant work with ccm, since
ccm expects an ant.bat executable, while chocolatey creates and ant.exe file:
    * `cmd /c mklink C:\ProgramData\chocolatey\bin\ant.bat C:\ProgramData\chocolatey\bin\ant.exe`

== Script for switching JDKs ==

In a mixed JDK7/JDK8 the following PowerShell functions might be useful for switching jdks
(place them on `$ENV:HOME\Documents\WindowsPowerShell\profile.ps1`):

function updateJavaHome($newHome)
    [Environment]::SetEnvironmentVariable("JAVA_HOME", $env:JAVA_HOME, "Machine")

function updateRegistry($newVersion)
    Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\'
CurrentVersion $newVersion

function updatePath
    $PathWithoutJava=(($Env:Path).Split(";") | where {$_ -notmatch 'java'}) -join ";"

function java8
    updateJavaHome("C:\Program Files\Java\jdk1.8.0_51")

function java7
    updateJavaHome("C:\Program Files\Java\jdk1.7.0_76")

View raw message