hbase v0.0.1 HBase.Client
Provides a wrapper for accessing HBase via the thrift protocol
Currently only supports get and mget
Summary
Functions
Get all columns from a single row.
Accpets the pid returned from start_link
, the table name and row name.
Returns a tuple containing the row name as the first element and a map containing the columns and volumes as the second element.
Usage:
HBase.Client.get(pid, "table", "a:1")
> {"a:1", %{"col1" => "val1", "col2" => "val2}}
Get all columns from a multiple rows.
Accpets the pid returned from start_link
, the table name and a list of row names.
Returns a list containing tuples containing the row name as the first element and a map containing the columns and volumes as the second element.
Usage:
HBase.Client.mget(pid, "table", ["a:1", "a:2")
> [{"a:1", %{"col1" => "val1", "col2" => "val2}}, {"a:2", %{"col1" => "val1", "col2" => "val2}}]
Initializes the GenServer. Accepts a host and port as arguments
Returns {:ok, pid}
Usage:
{:ok, pid} = HBase.client.start_link("0.0.0.0", 9090)
Functions
Get all columns from a single row.
Accpets the pid returned from start_link
, the table name and row name.
Returns a tuple containing the row name as the first element and a map containing the columns and volumes as the second element.
Usage:
HBase.Client.get(pid, "table", "a:1")
> {"a:1", %{"col1" => "val1", "col2" => "val2}}
Get all columns from a multiple rows.
Accpets the pid returned from start_link
, the table name and a list of row names.
Returns a list containing tuples containing the row name as the first element and a map containing the columns and volumes as the second element.
Usage:
HBase.Client.mget(pid, "table", ["a:1", "a:2")
> [{"a:1", %{"col1" => "val1", "col2" => "val2}}, {"a:2", %{"col1" => "val1", "col2" => "val2}}]