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 <sdo...@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.guj...@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.

Reply via email to