incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sasha Dolgy <sdo...@gmail.com>
Subject Re: script to modify cassandra.yaml file
Date Mon, 21 Mar 2011 21:33:42 GMT
to elaborate:

our_temp_yaml=/tmp/$$.cassandra.yaml
cp cassandra.yaml $our_temp_yaml
for instance in $instances
  # do some more work to get the hostname from the instance
  sed  -i "s/^seeds:/seeds: \n - $hostname/" $our_temp_yaml
done

-- the above inserts a new line for each $hostname into the temporary yaml.

-sd

On Mon, Mar 21, 2011 at 9:14 AM, Sasha Dolgy <sdolgy@gmail.com> wrote:
> I use grep / awk / sed from within a bash script ... this works quite well.
> -sd
>
> On Mon, Mar 21, 2011 at 12:39 AM, Anurag Gujral <anurag.gujral@gmail.com> wrote:
>> Hi All,
>>           I want to modify the values in the cassandra.yaml which comes
with
>> the cassandra-0.7 package based on values of hostnames,
>> colo etc.
>> Does someone knows of some script which I can use which reads in default
>> cassandra.yaml and write outs new cassandra.yaml
>> with values based on number of nodes in the cluster ,hostname,colo name etc.

Mime
View raw message