Skip to content

Commit

Permalink
Merge branch 'master' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
xyu committed May 26, 2016
2 parents 7ec0805 + 0f513f8 commit 287c7fa
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 4 deletions.
8 changes: 7 additions & 1 deletion README.md
Expand Up @@ -21,7 +21,7 @@ Installation

To install Whatson run the Elasticsearch plugin installer on any node:

bin/plugin -install xyu/elasticsearch-whatson
bin/plugin -install xyu/elasticsearch-whatson/0.1.3

Access the plugin by going to the Whatson plugin site. (E.g. http://localhost:9200/_plugin/whatson/)

Expand All @@ -42,6 +42,8 @@ The nodes section will show a bar chart of available disk on each node. The bars
* **Yellow** — Disk used by Elasticsearch (some shards on node is in a relocating state)
* **Orange** — Disk used by Elasticsearch (some shards on node is in a recovery / initializing state)

The red line drawn across the graph shows the percentage of deleted docs on each node.

The indices section will show a bar chart showing size of each index in the cluster color coded by the state of the index (green / yellow / red). The primary size is shown in a darker shade as compared to the total index size.

Below each index shards contained within the index will be shown colored corresponding to the size of the primary shard. If any shard exists in an error state they will be colored as follows:
Expand All @@ -50,6 +52,8 @@ Below each index shards contained within the index will be shown colored corresp
* **Orange** — Some shards are in a recovery or initializing state
* **Red** — Some shards are unassigned

The red line drawn across the graph shows the percentage of deleted docs in each index.

To inspect the state of underlaying Lucene segments first select a index or shard within an index. Once selected something like the following will be shown.

![Segments Visualization](screenshot-segments.png "Segments Visualization")
Expand All @@ -61,6 +65,8 @@ Segments are drawn on a logarithmic scale based on the byte size of the segment
* **Blue** — Segments that have both been committed and are in the NRT IndexReader
* **Green** — Segments that have both been committed and are in the NRT IndexReader. In addition these immutable segments are identical to those on the primary shard instance which means they can be recovered from local disk upon a node restart.

The red line drawn across the graph shows the percentage of deleted docs within each segment.

Release Notes
-------------

Expand Down
21 changes: 18 additions & 3 deletions _site/assets/js/app.js
Expand Up @@ -218,6 +218,7 @@
_svg_height: 260,
_nodes: {},
_node_shards: {},
_relocating_shards: {},
_selected: null,
_hover: null,
_is_refreshing: false,
Expand Down Expand Up @@ -412,9 +413,10 @@
});
},

set_shards: function( node_shards ) {
set_shards: function( node_shards, relocating_shards ) {
var self = this;
self._node_shards = node_shards;
self._relocating_shards = relocating_shards;
self.render();
},

Expand Down Expand Up @@ -615,8 +617,11 @@
if ( self._node_shards[ d.id ].INITIALIZING.length > 0 ) {
tooltip += ', ' + self._node_shards[ d.id ].INITIALIZING.length + ' Initializing';
}
if ( self._relocating_shards[ d.id ] > 0 ) {
tooltip += ', ' + self._relocating_shards[ d.id ] + ' Relocating In';
}
if ( self._node_shards[ d.id ].RELOCATING.length > 0 ) {
tooltip += ', ' + self._node_shards[ d.id ].RELOCATING.length + ' Relocating Away';
tooltip += ', ' + self._node_shards[ d.id ].RELOCATING.length + ' Relocating Out';
}
}

Expand Down Expand Up @@ -1629,7 +1634,17 @@
} );
} );

nodes.set_shards( node_shards );
var relocating_shards = {};
_.each( node_shards, function( node ) {
_.each( node.RELOCATING, function( shard ) {
if ( relocating_shards[ shard.relocating_node ] )
relocating_shards[ shard.relocating_node ] += 1;
else
relocating_shards[ shard.relocating_node ] = 1;
} );
} );

nodes.set_shards( node_shards, relocating_shards );
}
};

Expand Down
80 changes: 80 additions & 0 deletions plugin-descriptor.properties
@@ -0,0 +1,80 @@
# Elasticsearch plugin descriptor file
# This file must exist as 'plugin-descriptor.properties' at
# the root directory of all plugins.
#
# A plugin can be 'site', 'jvm', or both.
#
### example site plugin for "foo":
#
# foo.zip <-- zip file for the plugin, with this structure:
# _site/ <-- the contents that will be served
# plugin-descriptor.properties <-- example contents below:
#
# site=true
# description=My cool plugin
# version=1.0
#
### example jvm plugin for "foo"
#
# foo.zip <-- zip file for the plugin, with this structure:
# <arbitrary name1>.jar <-- classes, resources, dependencies
# <arbitrary nameN>.jar <-- any number of jars
# plugin-descriptor.properties <-- example contents below:
#
# jvm=true
# classname=foo.bar.BazPlugin
# description=My cool plugin
# version=2.0.0-rc1
# elasticsearch.version=2.0
# java.version=1.7
#
### mandatory elements for all plugins:
#
# 'description': simple summary of the plugin
description=Elasticsearch Whatson
#
# 'version': plugin's version
version=0.1.3
#
# 'name': the plugin name
name=whatson

### mandatory elements for site plugins:
#
# 'site': set to true to indicate contents of the _site/
# directory in the root of the plugin should be served.
site=true
#
### mandatory elements for jvm plugins :
#
# 'jvm': true if the 'classname' class should be loaded
# from jar files in the root directory of the plugin.
# Note that only jar files in the root directory are
# added to the classpath for the plugin! If you need
# other resources, package them into a resources jar.
jvm=${elasticsearch.plugin.jvm}
#
# 'classname': the name of the class to load, fully-qualified.
classname=${elasticsearch.plugin.classname}
#
# 'java.version' version of java the code is built against
# use the system property java.specification.version
# version string must be a sequence of nonnegative decimal integers
# separated by "."'s and may have leading zeros
java.version=${maven.compiler.target}
#
# 'elasticsearch.version' version of elasticsearch compiled against
# You will have to release a new version of the plugin for each new
# elasticsearch release. This version is checked when the plugin
# is loaded so Elasticsearch will refuse to start in the presence of
# plugins with the incorrect elasticsearch.version.
elasticsearch.version=${elasticsearch.version}
#
### deprecated elements for jvm plugins :
#
# 'isolated': true if the plugin should have its own classloader.
# passing false is deprecated, and only intended to support plugins
# that have hard dependencies against each other. If this is
# not specified, then the plugin is isolated by default.
isolated=${elasticsearch.plugin.isolated}
#

0 comments on commit 287c7fa

Please sign in to comment.