Pelops- 40 connections per node?

11 views
Skip to first unread message

TechGeeky

unread,
May 1, 2013, 2:52:14 PM5/1/13
to sca...@googlegroups.com
By default Pelops will have 20 connections per node-

I was thinking to modify that to 40 connections per node. So how can I do that in Pelops? Currently, I am creating pool like this-


private void createPool() {
Pelops.addPool(getPoolName(), getCluster(), getKeyspace());

}

/**
* Gets the cluster information
* @return
*/
private Cluster getCluster() {

Config casconf = new Config(ModelConstants.CASSANDRA_PORT, true, 0); 

Cluster cluster= new Cluster(nodes, casconf, ModelConstants.NODE_DISCOVERY);

return cluster; 
}

/**
* Get the keyspace name
* @return
*/
public String getKeyspace() {
return keyspace;
}

/**
* Get the pool name
* @return
*/
public String getPoolName() {
return poolName;
}


Can anyone provide an example for that? Thanks for the help.

Dan Washusen

unread,
May 2, 2013, 7:38:38 PM5/2/13
to sca...@googlegroups.com
Instead of using the static Pelops.addPool method create the instance of org.scale7.cassandra.pelops.pool.CommonsBackedPool yourself and provide an instance of org.scale7.cassandra.pelops.pool.CommonsBackedPool$Policy with the maxActivePerNode property set.

Cheers,
Dan


--
You received this message because you are subscribed to the Google Groups "Scale 7 - Libraries and systems for scalable computing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scale7+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Dan Washusen
Make big files fly!
Message has been deleted
Message has been deleted

TechGeeky

unread,
May 2, 2013, 9:43:41 PM5/2/13
to sca...@googlegroups.com
Hi Daniel,

Thanks for suggestion. I was trying something like this-


CommonsBackedPool.Policy pt = new Policy();
pt.setMaxActivePerNode(40);
OperandPolicy op = new OperandPolicy();
Pelops.addPool(getPoolName(), getCluster(), getKeyspace(), pt, op);
I was not sure whether I did the right thing above or not? Can you take a look and let me whether this right or not? Thanks for the help.
Reply all
Reply to author
Forward
0 new messages