public class ConfigBuilder extends Object
DrillConfig for use in tests. Use this when a config
is needed by itself, separate from an embedded Drillbit.| Modifier and Type | Field and Description |
|---|---|
protected Properties |
configProps |
protected String |
configResource |
protected CaseInsensitiveMap<OptionDefinition> |
definitions |
| Constructor and Description |
|---|
ConfigBuilder() |
| Modifier and Type | Method and Description |
|---|---|
DrillConfig |
build() |
ConfigBuilder |
configProps(DrillConfig drillConfig) |
ConfigBuilder |
configProps(Properties configProps)
Use the given configuration properties as overrides.
|
CaseInsensitiveMap<OptionDefinition> |
getDefinitions() |
boolean |
hasResource() |
ConfigBuilder |
put(String key,
Object value)
Add an additional boot-time property for the embedded Drillbit.
|
ConfigBuilder |
putDefinition(OptionDefinition definition) |
ConfigBuilder |
resource(String configResource)
Use the given configuration file, stored as a resource, to initialize
the Drill config.
|
protected String configResource
protected final Properties configProps
protected final CaseInsensitiveMap<OptionDefinition> definitions
public ConfigBuilder configProps(Properties configProps)
configProps - a collection of config propertiesput(String, Object)public ConfigBuilder configProps(DrillConfig drillConfig)
public ConfigBuilder resource(String configResource)
drill.exec.sys.store.provider.local.write : false,
drill.exec.http.enabled : false
It may be more convenient to add your settings to the default
config settings with put(String, Object).configResource - path to the file that contains the
config file to be readput(String, Object)public ConfigBuilder put(String key, Object value)
key - config property namevalue - property valuepublic ConfigBuilder putDefinition(OptionDefinition definition)
public CaseInsensitiveMap<OptionDefinition> getDefinitions()
public DrillConfig build()
public boolean hasResource()
Copyright © 2021 The Apache Software Foundation. All rights reserved.