Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoSource = Source{}
Functions ¶
This section is empty.
Types ¶
type ConfSourcer ¶
type ConfSourcer interface { Conf SourceGet(key string) (value string, src Source) Source() string }
func ConfFromJar ¶
func ConfFromJar(jar string, file string) (ConfSourcer, error)
func ConfsFromJar ¶
func ConfsFromJar(jar string, files ...string) ([]ConfSourcer, error)
type ConfWithDefault ¶
type ConfWithDefault struct { Conf ConfSourcer Default ConfSourcer }
func (*ConfWithDefault) Get ¶
func (cwd *ConfWithDefault) Get(key string) (value string)
func (*ConfWithDefault) Keys ¶
func (cwd *ConfWithDefault) Keys() []string
func (*ConfWithDefault) Set ¶
func (cwd *ConfWithDefault) Set(key, value string) (oldval string)
func (*ConfWithDefault) Source ¶
func (cwd *ConfWithDefault) Source() string
type Configuration ¶
type Configuration struct { XMLName xml.Name `xml:"configuration"` Property []*Property `xml:"property"` }
func NewConfigurationFromByte ¶
func NewConfigurationFromByte(b []byte) (*Configuration, error)
func NewConfigurationFromFile ¶
func NewConfigurationFromFile(path string) (*Configuration, error)
func NewConfigurationFromString ¶
func NewConfigurationFromString(txt string) (*Configuration, error)
func (*Configuration) Bytes ¶
func (c *Configuration) Bytes() []byte
func (*Configuration) Get ¶
func (c *Configuration) Get(key string) string
func (*Configuration) Set ¶
func (c *Configuration) Set(key, val string) (oldval string)
func (*Configuration) String ¶
func (c *Configuration) String() string
type Env ¶
an evironment variable is a line of the form export FOO_OPT="-a -b -c" in a bash environment file.
func NewEnvFromFile ¶
type FileConfiguration ¶
type FileConfiguration struct { *Configuration Path string // contains filtered or unexported fields }
func NewFileConfiguration ¶
func NewFileConfiguration(path string) (*FileConfiguration, error)
func (*FileConfiguration) Keys ¶
func (fc *FileConfiguration) Keys() []string
func (*FileConfiguration) Save ¶
func (fc *FileConfiguration) Save() error
func (*FileConfiguration) Set ¶
func (fc *FileConfiguration) Set(key, val string) (oldval string)
func (*FileConfiguration) Source ¶
func (fc *FileConfiguration) Source() string
type GeneratedConf ¶
type GeneratedConf struct { *Configuration ConfSource Source }
func NewGeneratedConf ¶
func NewGeneratedConf(source Source, conf *Configuration) *GeneratedConf
func NewGeneratedConfFromBytes ¶
func NewGeneratedConfFromBytes(source Source, b []byte) (*GeneratedConf, error)
func NewGeneratedConfFromString ¶
func NewGeneratedConfFromString(source Source, s string) (*GeneratedConf, error)
func (*GeneratedConf) Keys ¶
func (gc *GeneratedConf) Keys() []string
func (*GeneratedConf) Source ¶
func (gc *GeneratedConf) Source() string
type HadoopConf ¶
type HadoopConf struct { CoreSite *ConfWithDefault HdfsSite *ConfWithDefault MapredSite *ConfWithDefault YarnSite *ConfWithDefault // contains filtered or unexported fields }
func FromConf ¶
func FromConf(coreSite *ConfWithDefault, hdfsSite *ConfWithDefault, mapredSite *ConfWithDefault, yarnSite *ConfWithDefault) *HadoopConf
func New ¶
func New(basedir string, defaultConf *HadoopDefaultConf) (conf *HadoopConf, err error)
func (*HadoopConf) Save ¶
func (c *HadoopConf) Save() error
func (HadoopConf) SetIfExist ¶
func (msc HadoopConf) SetIfExist(key, value string) (oldval string, src ConfSourcer)
type HadoopDefaultConf ¶
type HadoopDefaultConf struct { CoreSite ConfSourcer HdfsSite ConfSourcer MapredSite ConfSourcer YarnSite ConfSourcer }
func Jars ¶
func Jars(basedir string) (*HadoopDefaultConf, error)
type Source ¶
type Source struct { Source string SourceType SourceType }
Click to show internal directories.
Click to hide internal directories.