Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add show servers to query language #1906

Merged
merged 2 commits into from
Mar 11, 2015
Merged

Add show servers to query language #1906

merged 2 commits into from
Mar 11, 2015

Conversation

corylanou
Copy link
Contributor

Currently lists only data nodes, with the id/url:

> SHOW SERVERS
name    tags    id      url
----    ----    --      ---
                1       http://Corys-MacBook-Pro.local:8086

Questions:

  1. Should this include brokers as well?
  2. Original issue stated wanting to show IP and hostname. If we want that, we'll have to change the way we start up the servers to capture IP address when starting.
  3. We don't currently store any heartbeat information on data nodes
  4. Do we want to return the current index of each data node?
  5. Do we want to support any where clauses to show server?
  6. Should it be SHOW DATANODES and SHOW BROKERS vs. SHOW SERVERS?

Addresses #1469

@pauldix
Copy link
Member

pauldix commented Mar 10, 2015

  1. Should this include brokers as well?

Yes, it should actually have an extra column that is something like "role" which has data, broker, or both

  1. Original issue stated wanting to show IP and hostname. If we want that, we'll have to change the way we start up the servers to capture IP address when starting.

I guess it should just have whatever the connect URL is.

  1. We don't currently store any heartbeat information on data nodes

We should keep an in memory map of all heartbeat information. All brokers and data nodes should be heartbeating through raft on a regular basis. The data node heartbeats should include which shards they have and what the last written raft index is for each of those shards.

  1. Do we want to return the current index of each data node?

The index only has meaning on a per topic basis. I think we may want to expand this functionality to show the detailed information of each data node, which would include what topics it has, what raft index each one is at, and what it knows about the cluster (other data nodes, brokers, etc)

  1. Do we want to support any where clauses to show server?

No, just maybe a SHOW SERVER <id>

  1. Should it be SHOW DATANODES and SHOW BROKERS vs. SHOW SERVERS?

I think SHOW SERVERS is probably good.

@otoolep
Copy link
Contributor

otoolep commented Mar 11, 2015

I think SHOW SERVERS output should just be limited to the giving back the ID, host, etc i.e. the identifier of each server in the cluster. This seems to make most sense when we're also going to implement SHOW STATS [ON <server>] and possibly something like SHOW DIAGS [ON <server>]. Whatever server identifies are returned by SHOW SERVERS are then fed into the other commands.

If this is not the case, we need clearer requirements for each of there commands, since there is overlap in how they are currently spec'ed out. See: #1470

@otoolep
Copy link
Contributor

otoolep commented Mar 11, 2015

@corylanou -- happy to work together on this, so we can come up with something consistent and comprehensive.

@corylanou
Copy link
Contributor Author

@otoolep I agree, if we are doing show stats, then this should be a more simplistic response that gets you into a more in depth response.

Does it make sense to merge this as is and let you pick it up on your branch with a rebase? Seems like the two issues are pretty closely related.

@otoolep
Copy link
Contributor

otoolep commented Mar 11, 2015

Thanks @corylanou -- if you merge, I can develop further. +1 from me once the changelog is updated.

corylanou added a commit that referenced this pull request Mar 11, 2015
Add show servers to query language
@corylanou corylanou merged commit 982e59a into master Mar 11, 2015
@corylanou corylanou deleted the show-servers branch March 11, 2015 16:38
corylanou added a commit that referenced this pull request Mar 11, 2015
@corylanou corylanou self-assigned this Mar 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants