Skip to content

Conversation

@yhwang
Copy link
Contributor

@yhwang yhwang commented Nov 30, 2017

Make CQL PoolingOptions be configurable by adding the following new
properties under storage.cql :

  • local-core-connection-per-host:
    The number of connections initially created and kept open to each host
    for local datacenter
  • local-max-connection-per-host:
    The maximum number of connections that can be created per host for
    local datacenter
  • local-max-request-per-connection:
    The maximum number of requests per connection for local datacenter
  • remote-core-connection-per-host:
    The number of connections initially created and kept open to each host
    for remote datacenter
  • remote-max-connection-per-host:
    The maximum number of connections that can be created per host for
    remote datacenter
  • remote-max-request-per-connection:
    The maximum number of requests per connection for remote datacenter

Ref: related issue #775

Signed-off-by: Yihong Wang yh.wang@ibm.com


Thank you for contributing to JanusGraph!

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there an issue associated with this PR? Is it referenced in the commit message?
  • Does your PR body contain #xyz where xyz is the issue number you are trying to resolve?
  • Has your PR been rebased against the latest commit within the target branch (typically master)?
  • Is your initial contribution a single, squashed commit?

For code changes:

  • Have you written and/or updated unit tests to verify your changes?

Note:

Please ensure that once the PR is submitted, you check Travis CI for build issues and submit an update to your PR as soon as possible.

@janusgraph-bot janusgraph-bot added the cla: yes This PR is compliant with the CLA label Nov 30, 2017
@yhwang yhwang force-pushed the add-cql-properties branch from 156b042 to c425332 Compare November 30, 2017 18:36
configuration.get(REMOTE_CORE_CONNECTIONS_PER_HOST))
.setConnectionsPerHost(
HostDistance.REMOTE,
configuration.get(LOCAL_MAX_CONNECTIONS_PER_HOST),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think REMOTE_CORE_CONNECTIONS_PER_HOST and LOCAL_MAX_CONNECTIONS_PER_HOST are switched.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. fixed. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robertdale Please review again.

@yhwang yhwang force-pushed the add-cql-properties branch 2 times, most recently from 09218e6 to f382c3f Compare November 30, 2017 22:00

ConfigOption<Integer> LOCAL_CORE_CONNECTIONS_PER_HOST = new ConfigOption<>(
CQL_NS,
"local-core-connection-per-host",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local-core-connections-per-host? same for the others

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@analytically I fixed and updated my branch.

Make CQL PoolingOptions be configurable by adding the following new
properties under `storage.cql` :
- local-core-connection-per-host:
  The number of connections initially created and kept open to each host
  for local datacenter
- local-max-connection-per-host:
  The maximum number of connections that can be created per host for
  local datacenter
- local-max-request-per-connection:
  The maximum number of requests per connection for local datacenter
- remote-core-connection-per-host:
  The number of connections initially created and kept open to each host
  for remote datacenter
- remote-max-connection-per-host:
  The maximum number of connections that can be created per host for
  remote datacenter
- remote-max-request-per-connection:
  The maximum number of requests per connection for remote datacenter

Ref: related issue JanusGraph#775

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
@yhwang yhwang force-pushed the add-cql-properties branch from f382c3f to b9a9f6d Compare December 4, 2017 17:41
@analytically analytically merged commit 73873fb into JanusGraph:master Dec 4, 2017
@yhwang yhwang deleted the add-cql-properties branch December 5, 2017 00:18
@robertdale robertdale added this to the Release v0.3.0 milestone Dec 6, 2017
bwatson-rti-org pushed a commit to bwatson-rti-org/janusgraph that referenced this pull request Mar 9, 2019
Add configuration props for CQL PoolingOptions
CQL_NS,
"local-core-connections-per-host",
"The number of connections initially created and kept open to each host for local datacenter",
ConfigOption.Type.FIXED,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason why this configuration is of type FIXED?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm asking because it does not seem clear to me why this could not be changed later on. Just asking to understand if there is some reason that I'm missing.

micpod pushed a commit to micpod/janusgraph that referenced this pull request Nov 5, 2019
Add configuration props for CQL PoolingOptions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This PR is compliant with the CLA kind/enhancement storage/cassandra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants