Elastex v0.2.0 Elastex.Cluster
Follows the Elasticsearch Cluster API.
Summary
Functions
Extends the url of cluster builder
Retrieves specific wide cluster settings
Gets a very simple status on the health of the cluster
Gets a very simple status on the health of the cluster using on or more indicies
Retrieves current hot threads on all nodes in the cluster
Retrieves current hot threads on each node in the cluster
Retrieves information of all the nodes in the cluster
Retrieves information of specific nodes in the cluster
Retrieves information of specific nodes and info in the cluster
Retrieve stats of all nodes in the cluster
Retrieve nodes stats of specific nodes
Retrieve nodes stats of specific nodes and stats
Adds params to document builder
Retrieves pending tasks from a cluster wide perspective
Executes a reroute allocation command including specific commands
Gets comprehensive state information of the whole cluster
Gets comprehensive state information of the whole cluster using metrics
Gets comprehensive state information of the whole cluster using metrics
Retrieves statistics from a cluster wide perspective
Updates specific wide cluster settings
Functions
Specs
extend_url(%Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: term, options: term, params: term, type: term, url: term}, [String.t]) :: %Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: term, options: term, params: term, type: term, url: String.t}
Extends the url of cluster builder
Examples
iex> builder = %Elastex.Builder{url: "twitter"}
iex> Elastex.Cluster.extend_url(builder, ["tweet"])
%Elastex.Builder {
url: "twitter/tweet"
}
Specs
get_settings :: %Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: :get, options: term, params: term, type: term, url: String.t}
Retrieves specific wide cluster settings
Examples
iex> Elastex.Cluster.get_settings()
%Elastex.Builder {
url: "_cluster/pending_tasks",
method: :get
}
Specs
health :: %Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: :get, options: term, params: term, type: term, url: String.t}
Gets a very simple status on the health of the cluster.
Examples
iex> Elastex.Cluster.health()
%Elastex.Builder {
url: "_cluster/health",
method: :get,
}
Specs
Gets a very simple status on the health of the cluster using on or more indicies
Examples
iex> Elastex.Cluster.health("twitter")
%Elastex.Builder {
url: "_cluster/health/twitter",
method: :get,
}
Specs
node_hot_threads :: %Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: :get, options: term, params: term, type: term, url: String.t}
Retrieves current hot threads on all nodes in the cluster.
Examples
iex> Elastex.Cluster.node_hot_threads()
%Elastex.Builder {
url: "_nodes/hot_threads",
method: :get
}
Specs
Retrieves current hot threads on each node in the cluster.
Examples
iex> Elastex.Cluster.node_hot_threads("nodeId1,nodeId2")
%Elastex.Builder {
url: "_nodes/hot_threads/process",
method: :get
}
Specs
node_info :: %Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: :get, options: term, params: term, type: term, url: String.t}
Retrieves information of all the nodes in the cluster
Examples
iex> Elastex.Cluster.node_info()
%Elastex.Builder {
url: "_node",
method: :get
}
Specs
Retrieves information of specific nodes in the cluster
Examples
iex> Elastex.Cluster.node_info("nodeId1,nodeId2")
%Elastex.Builder {
url: "_node/nodeId1,nodeId2",
method: :get
}
Specs
Retrieves information of specific nodes and info in the cluster
Examples
iex> Elastex.Cluster.node_info("nodeId1,nodeId2", "process")
%Elastex.Builder {
url: "_node/nodeId1,nodeId2/process",
method: :get
}
Specs
node_stats :: %Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: :get, options: term, params: term, type: term, url: String.t}
Retrieve stats of all nodes in the cluster
Examples
iex> Elastex.Cluster.node_stats()
%Elastex.Builder {
url: "_node/stats",
method: :get
}
Specs
Retrieve nodes stats of specific nodes
Examples
iex> Elastex.Cluster.node_stats("nodeId1,nodeId2")
%Elastex.Builder {
url: "_node/nodeId1,nodeId2/stats",
method: :get
}
Specs
Retrieve nodes stats of specific nodes and stats
Examples
iex> Elastex.Cluster.node_stats("nodeId1,nodeId2", "process")
%Elastex.Builder {
url: "_node/nodeId1,nodeId2/stats/process",
method: :get
}
Specs
params(%Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: term, options: term, params: term, type: term, url: term}, keyword(String.t)) :: %Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: term, options: term, params: keyword(String.t), type: term, url: term}
Adds params to document builder
Examples
iex> builder = %Elastex.Builder{}
iex> Elastex.Cluster.params(builder, [q: "user:mike"])
%Elastex.Builder {
params: [q: "user:mike"]
}
Specs
pending_tasks :: %Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: :get, options: term, params: term, type: term, url: String.t}
Retrieves pending tasks from a cluster wide perspective.
Examples
iex> Elastex.Cluster.pending_tasks()
%Elastex.Builder {
url: "_cluster/pending_tasks",
method: :get,
}
Specs
reroute(map) :: %Elastex.Builder{action: term, body: map, headers: term, id: term, index: term, method: :post, options: term, params: term, type: term, url: String.t}
Executes a reroute allocation command including specific commands.
Examples
iex> body = %{commands: [%{move: %{index: "twitter", shard: 0}}]}
iex> Elastex.Cluster.reroute(body)
%Elastex.Builder {
url: "_cluster/pending_tasks",
method: :get,
}
Specs
state :: %Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: :get, options: term, params: term, type: term, url: String.t}
Gets comprehensive state information of the whole cluster.
Examples
iex> Elastex.Cluster.state()
%Elastex.Builder {
url: "_cluster/state",
method: :get,
}
Specs
Gets comprehensive state information of the whole cluster using metrics.
Examples
iex> Elastex.Cluster.state("blocks")
%Elastex.Builder {
url: "_cluster/state/blocks",
method: :get,
}
Specs
Gets comprehensive state information of the whole cluster using metrics.
Examples
iex> Elastex.Cluster.state("metadata", "twitter")
%Elastex.Builder {
url: "_cluster/state/metadata/twitter",
method: :get,
}
Specs
stats :: %Elastex.Builder{action: term, body: term, headers: term, id: term, index: term, method: :get, options: term, params: term, type: term, url: String.t}
Retrieves statistics from a cluster wide perspective.
Examples
iex> Elastex.Cluster.stats()
%Elastex.Builder {
url: "_cluster/stats",
method: :get,
}
Specs
update_settings(map) :: %Elastex.Builder{action: term, body: map, headers: term, id: term, index: term, method: :put, options: term, params: term, type: term, url: String.t}
Updates specific wide cluster settings
Examples
iex> body = %{persistant: %{persistant: %{"discovery.zen.minimum_master_notes" => 2}}}
iex> Elastex.Cluster.update_settings(body)
%Elastex.Builder {
url: "_cluster/pending_tasks",
body: %{persistant: %{persistant: %{"discovery.zen.minimum_master_notes" => 2}}},
method: :get
}