public
Description: Cassandra is a distributed storage system for managing structured data while providing reliability at a massive scale
Homepage: http://code.google.com/p/the-cassandra-project/
Clone URL: git://github.com/tmm1/cassandra-mirror.git
Summary: Refactor the configuration components and update README.txt 
accordingly

Issue: None

Author: jeff.hammerbacher



git-svn-id: http://the-cassandra-project.googlecode.com/svn/trunk@31 
fb539927-1251-0410-86c0-f5eed957eeac
jeff.hammerbacher (author)
Thu Jul 17 00:29:27 -0700 2008
commit  13cb48ca50c76a4331d483136172ac8b70efd78d
tree    c24c84a4712110708ad6ddb059bd4aba42cef26f
parent  9437f49dab4010778e9c6939cc784b8f35156b22
...
2
3
4
5
 
6
7
8
9
10
11
12
13
14
15
 
 
 
 
 
 
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
 
 
 
50
51
52
53
54
55
56
 
 
 
 
57
58
 
 
59
60
61
...
65
66
67
68
69
 
 
 
70
...
2
3
4
 
5
6
7
8
9
10
11
 
 
 
 
12
13
14
15
16
17
18
19
20
21
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
24
25
26
27
28
29
30
 
 
 
31
32
33
34
35
 
36
37
38
39
40
...
44
45
46
 
 
47
48
49
50
0
@@ -2,60 +2,39 @@
0
 Cassandra README
0
 ================
0
 
0
-Cassandra is a P2P based distributed storage system
0
+Cassandra is a P2P based distributed storage system
0
 that provides structured storage.
0
 
0
 Cassandra is distributed under the Apache License, Version 2.0
0
 
0
 Installation
0
 ------------
0
-* Unpack the tar ball to the /var directory:
0
- cd /var; tar xvzf cassandra-<version>.tar.gz
0
-* Please use jdk 1.7; Cassandra will run with 1.6 but frequently core dumps on quad-core machines
0
-* Run "ant jar" in the /var/cassandra-<version> directory
0
+* Please use jdk 1.7; Cassandra will run with 1.6 but
0
+ frequently core dumps on quad-core machines
0
+* Unpack the tar ball:
0
+ tar xvzf cassandra-<version>.tar.gz
0
+* cd into the new cassandra-<version> directory
0
+* Run "ant jar"
0
 
0
 Congratulations, Cassandra is now installed.
0
 
0
 Setup
0
 ------
0
-* cd into the cassandra directory
0
- cd /var/cassandra-<version>
0
-* The default data directories are in /mnt/d1, mnt/d2, mnt/d3. The
0
- commitlog directory is /mnt/d4/commitlog. This is assumed in
0
- the conf file provided. If you dont care to change the conf do
0
- the following:
0
- mkdir -p /mnt/d1
0
- mkdir -p /mnt/d2/logs
0
- mkdir /mnt/d3
0
- mkdir /mnt/d4
0
-* Edit conf/storage-conf.xml and set meaningful values for the following:
0
-
0
- | XML Tag | Default | Comments
0
----------------------------------------------------------------------------------------
0
- 1 | ClusterName | CASSANDRA INSTANCE | Cluster name used for membership
0
- 2 | GangliaServer | GANGLIA.SERVER.NAME:PORT | Ganglis reporting, remove if unused
0
- 3 | ColumnFamily | SIMPLECOLUMNFAMILY | Sample simple column family, add/remove as needed
0
- 4 | ColumnFamily | SUPERCOLUMNFAMILY | Sample sure column family, add/remove as needed
0
- 5 | Seed | SEED.MACHINE.1 | Seed node from cluster, edit/remove as needed
0
- 6 | Seed | SEED.MACHINE.2 | Seed node from cluster, edit/remove as needed
0
-
0
-Optional setup:
0
-
0
- 7 | DataFileDirectory | /mnt/d1/data | Data directory, edit/reomve as needed
0
- 8 | DataFileDirectory | /mnt/d2/data | Data directory, edit/reomve as needed
0
- 9 | DataFileDirectory | /mnt/d3/data | Data directory, edit/reomve as needed
0
-10 | DataFileDirectory | /mnt/d3/bootstrap | Bootstrap directory
0
-11 | DataFileDirectory | /mnt/d3/staging | Staging directory
0
-12 | DataFileDirectory | /mnt/d4/commitlog | commitlog directory
0
+* Create the logging directory, set in conf/logging.props.
0
+ The default directory is /var/cassandra/logs
0
+* For information on the configuration parameters,
0
+ see http://code.google.com/p/the-cassandra-project/wiki/ConfReference
0
 
0
 
0
 Starting the server
0
 -------------------
0
-All you have to do is:
0
-cd /var/cassandra-<version>
0
-./bin/start-server &
0
+* cd into the cassandra-<version> directory
0
+* ensure you have write privileges on the data directories
0
+* start the server:
0
+ ./bin/start-server &
0
 
0
-To check if the server is started, there are 3 ways:
0
+Ensure the server is running
0
+----------------------------
0
 
0
 * Check if the process exists, e.g.:
0
   ps -ef | grep cassandra
0
@@ -65,6 +44,7 @@ To check if the server is started, there are 3 ways:
0
 
0
 Stopping the server
0
 -------------------
0
-cd /var/cassandra-<version>
0
-./bin/stop-server
0
+* cd into the cassandra-<version> directory
0
+* stop the server:
0
+ ./bin/stop-server
0
 
...
15
16
17
18
 
19
20
21
...
15
16
17
 
18
19
20
21
0
@@ -15,7 +15,7 @@ log4j.appender.R.DatePattern='.'yyyy-MM-dd-HH
0
 # Edit the next line to point to your logs directory.
0
 # The last part of the name is the log file name.
0
 #
0
-log4j.appender.R.File=/mnt/d2/logs/system.log
0
+log4j.appender.R.File=/var/cassandra/logs/system.log
0
 log4j.appender.R.layout=org.apache.log4j.SimpleLayout
0
 #
0
 #
...
1
2
 
3
4
5
6
 
7
8
9
10
11
12
13
14
 
 
15
16
17
18
19
20
21
22
 
23
24
25
 
 
26
27
28
...
1
 
2
3
4
5
 
6
7
8
9
10
11
12
 
 
13
14
15
16
17
18
19
 
 
 
20
21
 
 
22
23
24
25
26
0
@@ -1,28 +1,26 @@
0
 <Storage>
0
- <ClusterName>CLUSTER-NAME</ClusterName>
0
+ <ClusterName>Test</ClusterName>
0
    <RackAware>false</RackAware>
0
    <MulticastChannel>230.0.0.1</MulticastChannel>
0
    <ReplicationFactor>3</ReplicationFactor>
0
- <ZookeeperAddress>127.0.0.1:5001</ZookeeperAddress>
0
+ <ZookeeperAddress></ZookeeperAddress>
0
    <RpcTimeoutInMillis>5000</RpcTimeoutInMillis>
0
    <StoragePort>7000</StoragePort>
0
    <ControlPort>7001</ControlPort>
0
    <HttpPort>7002</HttpPort>
0
    <ThriftPort>9160</ThriftPort>
0
    <ColumnIndexSizeInKB>256</ColumnIndexSizeInKB>
0
- <MetadataDirectory>/mnt/d3/system</MetadataDirectory>
0
- <CommitLogDirectory>/mnt/d4/commitlog</CommitLogDirectory>
0
+ <MetadataDirectory>/var/cassandra/system</MetadataDirectory>
0
+ <CommitLogDirectory>/var/cassandra/commitlog</CommitLogDirectory>
0
    <CommitLogRotationThresholdInMB>128</CommitLogRotationThresholdInMB>
0
    <GangliaServers>
0
      <GangliaServer>127.0.0.1:12000</GangliaServer>
0
    </GangliaServers>
0
    <DataFileDirectories>
0
- <DataFileDirectory>/mnt/d1/data</DataFileDirectory>
0
- <DataFileDirectory>/mnt/d2/data</DataFileDirectory>
0
- <DataFileDirectory>/mnt/d3/data</DataFileDirectory>
0
+ <DataFileDirectory>/var/cassandra/data</DataFileDirectory>
0
    </DataFileDirectories>
0
- <BootstrapFileDirectory>/mnt/d3/bootstrap</BootstrapFileDirectory>
0
- <StagingFileDirectory>/mnt/d3/staging</StagingFileDirectory>
0
+ <BootstrapFileDirectory>/var/cassandra/bootstrap</BootstrapFileDirectory>
0
+ <StagingFileDirectory>/var/cassandra/staging</StagingFileDirectory>
0
    <CommitLogFastSync>false</CommitLogFastSync>
0
    <Tables>
0
       <Table Name = "Mytable">
...
39
40
41
42
 
43
44
45
...
61
62
63
64
 
65
66
67
...
158
159
160
161
162
163
164
165
166
167
168
 
 
169
170
171
...
175
176
177
178
 
179
180
181
...
190
191
192
193
 
194
195
196
...
202
203
204
205
 
206
207
208
209
 
210
211
212
...
214
215
216
217
 
218
219
220
...
226
227
228
229
 
230
231
232
...
39
40
41
 
42
43
44
45
...
61
62
63
 
64
65
66
67
...
158
159
160
 
 
 
 
 
 
 
 
161
162
163
164
165
...
169
170
171
 
172
173
174
175
...
184
185
186
 
187
188
189
190
...
196
197
198
 
199
200
201
202
 
203
204
205
206
...
208
209
210
 
211
212
213
214
...
220
221
222
 
223
224
225
226
0
@@ -39,7 +39,7 @@ public class DatabaseDescriptor
0
     private static int thriftPort_ = 9160;
0
     private static String clusterName_ = "Test";
0
     private static int replicationFactor_ = 3;
0
- private static long rpcTimeoutInMillis_ = 2000;
0
+ private static long rpcTimeoutInMillis_ = 5000;
0
     private static Set<String> seeds_ = new HashSet<String>();
0
     private static String multicastAddr_ = "230.0.0.1";
0
     private static String metadataDirectory_;
0
@@ -61,7 +61,7 @@ public class DatabaseDescriptor
0
     private static Map<String, String> cfToColumnTypeMap_ = new HashMap<String, String>();
0
     private static Map<String, String> cfToIndexPropertyMap_ = new HashMap<String, String>();
0
     /* if the size of columns or super-columns are more than this, indexing will kick in */
0
- private static int columnIndexSizeInKB_;
0
+ private static int columnIndexSizeInKB_ = 256;
0
     /* Size of touch key cache */
0
     private static int touchKeyCacheSize_ = 1024;
0
     /* Number of hours to keep a memtable in memory */
0
@@ -158,14 +158,8 @@ public class DatabaseDescriptor
0
 
0
         /* read the size at which we should do column indexes */
0
         String columnIndexSizeInKB = xmlUtils.getNodeValue(rootNode, "ColumnIndexSizeInKB");
0
- if(columnIndexSizeInKB == null)
0
- {
0
- columnIndexSizeInKB_ = 64;
0
- }
0
- else
0
- {
0
- columnIndexSizeInKB_ = Integer.parseInt(columnIndexSizeInKB);
0
- }
0
+ if(columnIndexSizeInKB != null)
0
+ columnIndexSizeInKB_ = Integer.parseInt(columnIndexSizeInKB);
0
 
0
         /* metadata directory */
0
         metadataDirectory_ = xmlUtils.getNodeValue(rootNode, "MetadataDirectory");
0
@@ -175,7 +169,7 @@ public class DatabaseDescriptor
0
         {
0
             if ( os.equals("Linux") )
0
             {
0
- metadataDirectory_ = "/var/storage/system";
0
+ metadataDirectory_ = "/var/cassandra/system";
0
             }
0
         }
0
 
0
@@ -190,7 +184,7 @@ public class DatabaseDescriptor
0
         {
0
             if ( os.equals("Linux") )
0
             {
0
- dataFileDirectories_ = new String[]{"/var/storage/data"};
0
+ dataFileDirectories_ = new String[]{"/var/cassandra/data"};
0
             }
0
         }
0
 
0
@@ -202,11 +196,11 @@ public class DatabaseDescriptor
0
         {
0
             if ( os.equals("Linux") )
0
             {
0
- bootstrapFileDirectory_ = "/var/storage/bootstrap";
0
+ bootstrapFileDirectory_ = "/var/cassandra/bootstrap";
0
             }
0
         }
0
 
0
- /* bootstrap file directory */
0
+ /* staging file directory */
0
         stagingFileDirectory_ = xmlUtils.getNodeValue(rootNode, "StagingFileDirectory");
0
         if ( stagingFileDirectory_ != null )
0
             FileUtils.createDirectory(stagingFileDirectory_);
0
@@ -214,7 +208,7 @@ public class DatabaseDescriptor
0
         {
0
             if ( os.equals("Linux") )
0
             {
0
- stagingFileDirectory_ = "/var/storage/staging";
0
+ stagingFileDirectory_ = "/var/cassandra/staging";
0
             }
0
         }
0
 
0
@@ -226,7 +220,7 @@ public class DatabaseDescriptor
0
         {
0
             if ( os.equals("Linux") )
0
             {
0
- logFileDirectory_ = "/var/storage/commitlog";
0
+ logFileDirectory_ = "/var/cassandra/commitlog";
0
             }
0
         }
0
 

Comments

    No one has commented yet.