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 OS name to _nodes and _cluster/nodes #11807

Closed
wants to merge 2 commits into from
Closed

Conversation

bleskes
Copy link
Contributor

@bleskes bleskes commented Jun 22, 2015

we currently don't expose this.

This adds the following to the OS section of _nodes:

"os": {
     "name": "Mac OS X",
     ...
 }

and the following to the OS section of _cluster/stats:

 "os": {
    ...
    "names": [
       {
          "name": "Mac OS X",
           "count": 1
       }
     ],
     ...
 },

we currently don't expose this.

This adds the following to the OS section of `_nodes`:

```
"os": {
     "name": "Mac OS X",
     ...
 }
 ```

 and the following to the OS section of `_cluster/stats`:

 ```
      "os": {
         ...
          "names": [
             {
                "name": "Mac OS X",
                "count": 1
             }
          ],
          ...
       },
 ```
@bleskes bleskes added >feature v2.0.0-beta1 review :Data Management/Stats Statistics tracking and retrieval APIs labels Jun 22, 2015
@@ -339,6 +344,11 @@ public void readFrom(StreamInput in) throws IOException {
availableProcessors = in.readVInt();
availableMemory = in.readLong();
int size = in.readVInt();
names = new ObjectIntHashMap<>(size);
for (; size > 0; size--) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we have a simple for loop here starting from 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh man, you insult the C++'er in me :p . will change.

@s1monw
Copy link
Contributor

s1monw commented Jun 22, 2015

left some comments

@bleskes
Copy link
Contributor Author

bleskes commented Jun 22, 2015

@s1monw pushed another commit

@s1monw
Copy link
Contributor

s1monw commented Jun 22, 2015

LGTM

@bleskes bleskes closed this in 1df2d30 Jun 22, 2015
@kevinkluge kevinkluge removed the review label Jun 22, 2015
@bleskes bleskes deleted the os_name branch June 22, 2015 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Stats Statistics tracking and retrieval APIs >feature v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants