@ -1,14 +1,10 @@
{ config , lib , pkgs , . . . }:
{ config , options , lib , pkgs , . . . }:
with lib ;
let
cfg = config . services . hbase ;
defaultConfig = {
" h b a s e . r o o t d i r " = " f i l e : / / ${ cfg . dataDir } / h b a s e " ;
" h b a s e . z o o k e e p e r . p r o p e r t y . d a t a D i r " = " ${ cfg . dataDir } / z o o k e e p e r " ;
} ;
opt = options . services . hbase ;
buildProperty = configAttr :
( builtins . concatStringsSep " \n "
@ -23,7 +19,7 @@ let
configFile = pkgs . writeText " h b a s e - s i t e . x m l "
'' < c o n f i g u r a t i o n >
$ { buildProperty ( defaultConfig // cfg . settings ) }
$ { buildProperty ( opt . settings . default // cfg . settings ) }
< /configuration >
'' ;
@ -96,7 +92,16 @@ in {
settings = mkOption {
type = with lib . types ; attrsOf ( oneOf [ str int bool ] ) ;
default = defaultConfig ;
default = {
" h b a s e . r o o t d i r " = " f i l e : / / ${ cfg . dataDir } / h b a s e " ;
" h b a s e . z o o k e e p e r . p r o p e r t y . d a t a D i r " = " ${ cfg . dataDir } / z o o k e e p e r " ;
} ;
defaultText = literalExpression ''
{
" h b a s e . r o o t d i r " = " f i l e : / / ' ' ${ config . ${ opt . dataDir } } / h b a s e " ;
" h b a s e . z o o k e e p e r . p r o p e r t y . d a t a D i r " = " ' ' ${ config . ${ opt . dataDir } } / z o o k e e p e r " ;
}
'' ;
description = ''
configurations in hbase-site . xml , see < link xlink:href= " h t t p s : / / g i t h u b . c o m / a p a c h e / h b a s e / b l o b / m a s t e r / h b a s e - s e r v e r / s r c / t e s t / r e s o u r c e s / h b a s e - s i t e . x m l " / > for details .
'' ;