Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8708777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:13:00+00:00 2026-06-13T04:13:00+00:00

We have a process creatively named bootstrap that sets up our Cassandra clusters for

  • 0

We have a process creatively named “bootstrap” that sets up our Cassandra clusters for a given rev of software in an environment (Dev1, Dev2, QA, …, PROD). This bootstrap Creates/Updates keyspaces and column families as well as populating initial data in non-prod.

We are using Astyanax, but we could use Hector for bootstrapping.

Given that another team has decided that each environment will have its own datacenter names.
And Given that I want this to work in prod when we go from two to more datacenters.
And Given that we will be using PropertyFileSnitch:

How can I ask the Cassandra cluster for its layout? (Without shelling to nodetool ring)

Specifically, I need to know the names of the datacenters so I can Create or Update a keyspace with the correct settings for strategy options when using NetworkTopologyStrategy. We want 3 copies per datacenter. Some envs have one and several have two, eventually production will have more.

Is there CQL or a Thrift call that will give me info about the cluster layout?

I have looked though several TOCs in various doc sets, and googled a bit. I thought I would ask here before digging though the nodetool code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:13:01+00:00Added an answer on June 13, 2026 at 4:13 am

    I’m not sure how Hector or Astyanax expose this, but the basic Thrift method describeRing(keyspace) should give you what you’re looking for. Part of the information that it contains are EndpointDetails structs that look like this:

    endpoint_details=[EndpointDetails(datacenter='datacenter1', host='127.0.0.1', rack='rack1')]
    

    Along with the rest of the results from that method, you should be able to figure out tokens, DCs, racks, and so on, for each node in the cluster.

    Since you’re using a Java client, you could also use some of the JMX methods (which nodetool uses) to describe more select parts of the cluster. For example, you might look at the snitch mbean ("org.apache.cassandra.db:type=EndpointSnitchInfo"), specifically the getDatacenter(ip) and getRack(ip) methods.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Process objects that are monitored from two different views. A Windows.Forms.ListView (actually
I want to get specific counters for processes that I have process id's for.
I have a process intensive task that I would like to run in the
I have a process where an incoming user request to our system is being
I have a process that sends to printer a large amount of .doc files
I have a process that I am automating into a kind of GUI step
I seem to be having an issue with boost::interprocess::file_lock I have process 1 that
I have a process I run periodically on a background thread that receives changes
I have a process that keeps dying in the same place, and claims to
i have java process that sends emails for different email address and i am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.