...
- Select the VM
- Select menu Machine>Settings...
- Select tab Network
- Select Adapter 1
- Press Port Forwarding button
- Press Plus button to insert new rule: Name=Stargate, Host Port=60080, Guest Port=60080
- Press OK to close the rule window
- Press OK to Network window save the changes
Client DSL
Usage
For more details about client DSL usage please follow this page.
systemVersion() - Query Software Version.
- Request
- No request parameters.
- Response
- BasicResponse
- Example
HBase.session(session).systemVersion().now().string
clusterVersion() - Query Storage Cluster Version.
- Request
- No request parameters.
- Response
- BasicResponse
- Example
HBase.session(session).clusterVersion().now().string
status() - Query Storage Cluster Status.
- Request
- No request parameters.
- Response
- BasicResponse
- Example
HBase.session(session).status().now().string
table().list() - Query Table List.
- Request
- No request parameters.
- Response
- BasicResponse
- Example
HBase.session(session).table().list().now().string
table(String tableName).schema() - Query Table Schema.
- Request
- No request parameters.
- Response
- BasicResponse
- Example
HBase.session(session).table().schema().now().string
table(String tableName).create() - Create Table Schema.
- Request
- attribute(String name, Object value) - the table's attribute.
- family(String name) - starts family definition. Has sub requests:
- attribute(String name, Object value) - the family's attribute.
- endFamilyDef() - finishes family definition.
- Response
- EmptyResponse
- Example
HBase.session(session).table(tableName).create()
.attribute("tb_attr1", "value1")
.attribute("tb_attr2", "value2")
.family("family1")
.attribute("fm_attr1", "value3")
.attribute("fm_attr2", "value4")
.endFamilyDef()
.family("family2")
.family("family3")
.endFamilyDef()
.attribute("tb_attr3", "value5")
.now()
table(String tableName).update() - Update Table Schema.
- Request
- family(String name) - starts family definition. Has sub requests:
- attribute(String name, Object value) - the family's attribute.
- endFamilyDef() - finishes family definition.
- Response
- EmptyResponse
- Example
HBase.session(session).table(tableName).update()
.family("family1")
.attribute("fm_attr1", "new_value3")
.endFamilyDef()
.family("family4")
.attribute("fm_attr3", "value6")
.endFamilyDef()
.now()
table(String tableName).regions() - Query Table Metadata.
- Request
- No request parameters.
- Response
- BasicResponse
- Example
HBase.session(session).table(tableName).regions().now().string
table(String tableName).delete() - Delete Table.
- Request
- No request parameters.
- Response
- EmptyResponse
- Example
HBase.session(session).table(tableName).delete().now()
table(String tableName).row(String rowId).store() - Cell Store.
- Request
- column(String family, String qualifier, Object value, Long time) - the data to store; "qualifier" may be "null"; "time" is optional.
- Response
- EmptyResponse
- Example
HBase.session(session).table(tableName).row("row_id_1").store()
.column("family1", "col1", "col_value1")
.column("family1", "col2", "col_value2", 1234567890l)
.column("family2", null, "fam_value1")
.now()
HBase.session(session).table(tableName).row("row_id_2").store()
.column("family1", "row2_col1", "row2_col_value1")
.now()
table(String tableName).row(String rowId).query() - Cell or Row Query.
- rowId is optional. Querying with null or empty rowId will select all rows.
- Request
- column(String family, String qualifier) - the column to select; "qualifier" is optional.
- startTime(Long) - the lower bound for filtration by time.
- endTime(Long) - the upper bound for filtration by time.
- times(Long startTime, Long endTime) - the lower and upper bounds for filtration by time.
- numVersions(Long) - the maximum number of versions to return.
- Response
- BasicResponse
- Example
HBase.session(session).table(tableName).row("row_id_1")
.query()
.now().string
HBase.session(session).table(tableName).row().query().now().string
HBase.session(session).table(tableName).row().query()
.column("family1", "row2_col1")
.column("family2")
.times(0, Long.MAX_VALUE)
.numVersions(1)
.now().string
table(String tableName).row(String rowId).delete() - Row, Column, or Cell Delete.
- Request
- column(String family, String qualifier) - the column to delete; "qualifier" is optional.
- time(Long) - the upper bound for time filtration.
- Response
- EmptyResponse
- Example
HBase.session(session).table(tableName).row("row_id_1")
.delete()
.column("family1", "col1")
.now()
HBase.session(session).table(tableName).row("row_id_1")
.delete()
.column("family2")
.time(Long.MAX_VALUE)
.now()
table(String tableName).scanner().create() - Scanner Creation.
- Request
- startRow(String) - the lower bound for filtration by row id.
- endRow(String) - the upper bound for filtration by row id.
- rows(String startRow, String endRow) - the lower and upper bounds for filtration by row id.
- column(String family, String qualifier) - the column to select; "qualifier" is optional.
- batch(Integer) - the batch size.
- startTime(Long) - the lower bound for filtration by time.
- endTime(Long) - the upper bound for filtration by time.
- times(Long startTime, Long endTime) - the lower and upper bounds for filtration by time.
- filter(String) - the filter XML definition.
- maxVersions(Integer) - the the maximum number of versions to return.
- Response
- scannerId : String - the scanner ID of the created scanner. Consumes body.
- Example
HBase.session(session).table(tableName).scanner().create()
.column("family1", "col2")
.column("family2")
.startRow("row_id_1")
.endRow("row_id_2")
.batch(1)
.startTime(0)
.endTime(Long.MAX_VALUE)
.filter("")
.maxVersions(100)
.now()
table(String tableName).scanner(String scannerId).getNext() - Scanner Get Next.
- Request
- No request parameters.
- Response
- BasicResponse
- Example
HBase.session(session).table(tableName).scanner(scannerId).getNext().now().string
table(String tableName).scanner(String scannerId).delete() - Scanner Deletion.
- Request
- No request parameters.
- Response
- EmptyResponse
- Example
HBase.session(session).table(tableName).scanner(scannerId).delete().now()
Examples
This example illustrates sequence of all basic HBase operations:
...