Plugin class: com.gatehill.imposter.plugin.hbase.HBasePluginImpl
- Basic HBase mock implementation.
- Supports protobuf or JSON for wire transport.
- Dummy Scanner queries.
- Individual table row/record retrieval.
Read the Configuration section to understand how to configure Imposter.
Object | Type | Description |
---|---|---|
tableName |
String |
The name of the HBase table. |
responsePhase |
com.gatehill.imposter.plugin.hbase.model.ResponsePhase |
The type of response being served. |
scannerFilterPrefix |
String |
The prefix from the filter of the result scanner. |
recordInfo |
com.gatehill.imposter.plugin.hbase.model.RecordInfo |
Information about the requested record, if a single record is requested. |
Note: When using HBase Scanners, this plugin will return the 'server URL' in the Location
header of the scanner creation response. You might
want to consider setting the serverUrl
property explicitly to the publicly-accessible address of the mock server,
as described in the Usage section.
For working examples, see:
plugin/hbase/src/test/resources/config
Let's assume your configuration is in a folder named config
.
Docker example:
docker run -ti -p 8443:8443 \
-v $(pwd)/config:/opt/imposter/config \
outofcoffee/imposter-hbase \
--serverUrl http://localhost:8443
Standalone Java example:
java -jar distro/build/libs/imposter.jar \
--plugin com.gatehill.imposter.plugin.hbase.HBasePluginImpl \
--configDir ./config \
--serverUrl http://localhost:8443
This starts a mock server using the HBase plugin. Responses are served based on the configuration files
inside the config
folder.
Using the example above, you can connect an HBase client, such as
Apache RemoteHTable, to
http://localhost:8443/ to interact with the API. In this example,
you can interact with the exampleTable
table, as defined in hbase-plugin-config.json
and hbase-plugin-data.json
.