Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Search::Elasticsearch:UserrContrlbutedsPerlhDocumentati_90::Direct::Cluster(3)

NAME
       Search::Elasticsearch::Client::0_90::Direct::Cluster - A	client for
       running cluster-level requests

VERSION
       version 5.02

DESCRIPTION
       This module provides methods to make cluster-level requests, such as
       getting and setting cluster-level settings, manually rerouting shards,
       and retrieving for monitoring purposes.

       It does Search::Elasticsearch::Role::Client::Direct.

METHODS
   "health()"
	   $response = $e->cluster->health( %qs_params )

       The "health()" method is	used to	retrieve information about the cluster
       health, returning "red",	"yellow" or "green" to indicate	the state of
       the cluster, indices or shards.

       Query string parameters:
	   "level",
	   "local",
	   "master_timeout",
	   "timeout",
	   "wait_for_active_shards",
	   "wait_for_nodes",
	   "wait_for_relocating_shards",
	   "wait_for_status"

       See the cluster health docs
       <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-
       health.html> for	more information.

   "pending_tasks()"
	   $response = $e->cluster->pending_tasks();

       Returns a list of cluster-level tasks still pending on the master node.

       Query string parameters:
	   "local",
	   "master_timeout"

       See the pending tasks docs
       <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-
       pending.html> for more information.

   "node_info()"
	   $response = $e->cluster->node_info(
	       node_id => $node_id | \@node_ids	      #	optional
	   );

       The "node_info()" method	returns	static information about the nodes in
       the cluster, such as the	configured maximum number of file handles, the
       maximum configured heap size or the threadpool settings.

       Query string parameters:
	   "all",
	   "clear",
	   "http",
	   "jvm",
	   "network",
	   "os",
	   "plugin",
	   "process",
	   "settings",
	   "thread_pool",
	   "timeout",
	   "transport"

       See the node_info docs
       <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-
       nodes-info.html>	for more information.

   "node_stats()"
	   $response = $e->cluster->node_stats(
	       node_id => $node_id | \@node_ids	      #	optional
	   );

       The "node_stats()" method returns statistics about the nodes in the
       cluster,	such as	the number of currently	open file handles, the current
       heap memory usage or the	current	number of threads in use.

       Stats can be returned for all nodes, or limited to particular nodes
       with the	"node_id" parameter.  The indices_stats	information can	also
       be retrieved on a per-node basis	with the "node_stats()"	method:

	   $response = $e->cluster->node_stats(
	       node_id => 'node_1',
	       indices => 1,
	       metric  => 'docs'
	   );

       Query string parameters:
	   "all",
	   "clear",
	   "fields",
	   "fs",
	   "http",
	   "indices",
	   "jvm",
	   "network",
	   "os",
	   "process",
	   "thread_pool",
	   "transport"

       See the node_stats docs
       <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-
       nodes-stats.html> for more information.

   "hot_threads()"
	   $response = $e->cluster->hot_threads(
	       node_id => $node_id | \@node_ids	      #	optional
	   )

       The "hot_threads()" method is a useful tool for diagnosing busy nodes.
       It takes	a snapshot of which threads are	consuming the most CPU.

       Query string parameters:
	   "interval",
	   "snapshots",
	   "threads",
	   "type"

       See the hot_threads docs
       <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-
       nodes-hot-threads.html> for more	information.

   "get_settings()"
	   $response = $e->cluster->get_settings()

       The "get_settings()" method is used to retrieve cluster-wide settings
       that have been set with the "put_settings()" method.

       See the cluster settings	docs
       <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-
       update-settings.html> for more information.

   "put_settings()"
	   $response = $e->cluster->put_settings( %settings );

       The "put_settings()" method is used to set cluster-wide settings,
       either transiently (which don't survive restarts) or permanently	(which
       do survive restarts).

       For instance:

	   $response = $e->cluster->put_settings(
	       body => {
		   transient =>	{ "discovery.zen.minimum_master_nodes" => 5 }
	       }
	   );

       See the cluster settings	docs
       <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-
       update-settings.html>
	for more information.

   "state()"
	   $response = $e->cluster->state();

       The "state()" method returns the	current	cluster	state from the master
       node, or	from the responding node if "local" is set to "true".

       Query string parameters:
	   "filter_blocks",
	   "filter_index_templates",
	   "filter_indices",
	   "filter_metadata",
	   "filter_nodes",
	   "filter_routing_table",
	   "local",
	   "master_timeout"

       See the cluster state docs
       <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-
       state.html> for more information.

   "reroute()"
	   $e->cluster->reroute(
	       body => { commands }    # required
	   );

       The "reroute()" method is used to manually reallocate shards from one
       node to another.	 The "body" should contain the "commands" indicating
       which changes should be made. For instance:

	   $e->cluster->reroute(
	       body => {
		   commands => [
		       { move => {
			   index     =>	'test',
			   shard     =>	0,
			   from_node =>	'node_1',
			   to_node   =>	'node_2
		       }},
		       { allocate => {
			   index     =>	'test',
			   shard     =>	1,
			   node	     =>	'node_3'
		       }}
		   ]
	       }
	   );

       Query string parameters:
	   "dry_run",
	   "filter_metadata"

       See the reroute docs
       <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-
       reroute.html> for more information.

   "shutdown()"
	   $e->cluster->shutdown(
	       node_id => $node_id | \@node_ids	   # optional
	   );

       The "shutdown()"	method is used to shutdown one or more nodes, or the
       whole cluster.

       Query string parameters:
	   "delay",
	   "exit"

       See the shutdown	docs
       <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-
       nodes-shutdown.html> for	more information.

AUTHOR
       Clinton Gormley <drtech@cpan.org>

COPYRIGHT AND LICENSE
       This software is	Copyright (c) 2017 by Elasticsearch BV.

       This is free software, licensed under:

	 The Apache License, Version 2.0, January 2004

perl v5.24.1	       Search::Elasticsearch::Client::0_90::Direct::Cluster(3)

NAME | VERSION | DESCRIPTION | METHODS | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Search::Elasticsearch::Client::0_90::Direct::Cluster&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help