2025-07-09 12:48:05 +08:00
|
|
|
{ getPackage, lib, ... }:
|
|
|
|
{
|
|
|
|
name = "hbase-standalone";
|
2022-03-29 01:49:17 +05:30
|
|
|
|
2025-07-09 12:48:05 +08:00
|
|
|
meta = with lib.maintainers; {
|
|
|
|
maintainers = [ illustris ];
|
|
|
|
};
|
2022-03-29 01:49:17 +05:30
|
|
|
|
2025-07-09 12:48:05 +08:00
|
|
|
nodes.hbase =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
let
|
|
|
|
package = getPackage pkgs;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
services.hbase-standalone = {
|
|
|
|
enable = true;
|
|
|
|
inherit package;
|
|
|
|
# Needed for standalone mode in hbase 2+
|
|
|
|
# This setting and standalone mode are not suitable for production
|
|
|
|
settings."hbase.unsafe.stream.capability.enforce" = "false";
|
|
|
|
};
|
|
|
|
environment.systemPackages = [
|
|
|
|
package
|
|
|
|
];
|
2022-03-29 01:49:17 +05:30
|
|
|
};
|
|
|
|
|
2025-07-09 12:48:05 +08:00
|
|
|
testScript = ''
|
|
|
|
start_all()
|
|
|
|
hbase.wait_for_unit("hbase.service")
|
|
|
|
hbase.wait_until_succeeds("echo \"create 't1','f1'\" | sudo -u hbase hbase shell -n")
|
|
|
|
assert "NAME => 'f1'" in hbase.succeed("echo \"describe 't1'\" | sudo -u hbase hbase shell -n")
|
|
|
|
'';
|
|
|
|
}
|