java - How can I have 40 connections per node to Cassandra database using Pelops client? -


by default pelops have 20 connections per node-

i thinking modify have around 40 connections per node. how can in pelops? currently, creating pool this-

private void createpool() {     pelops.addpool(getpoolname(), getcluster(), getkeyspace());  }  /**  * gets 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;  }  /**  * keyspace name  *   * @return  */ public string getkeyspace() {     return keyspace; }  /**  * pool name  *   * @return  */ public string getpoolname() {     return poolname; } 

can provide example can modify hold 40 connection per node? help.

updated code:-

    commonsbackedpool.policy pt = new policy();     pt.setmaxactivepernode(40);      operandpolicy op = new operandpolicy();      pelops.addpool(getpoolname(), getcluster(), getkeyspace(), pt, op); 

i not sure whether did right thing above or not? let me know if looks right.

looking @ javadocs pelops use other pelops.addpool() method allows supply instance of commonsbackedpool.policy controls that.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -