Documentation ¶
Index ¶
- Constants
- func GetAllConfig(fileName string) (map[string]string, error)
- func GetCapacity() (global.NMCapacity, error)
- func GetConfDataFromFile(xmlfile string, key string) string
- func GetConfig(fileName string, keys []string) (map[string]string, error)
- func GetNodeManagerAddress(cacheAddress bool) string
- func GetNodeManagerWebAddress(cacheAddress bool) string
- func GetResourceManagerAddress(cacheAddress bool) string
- func GetXMLFullPath(filename string) string
- func SetAddDelConfig(fileName string, properties map[string]string, add, del bool) error
- func SetAddDelMultipleConfDataToFile(xmlfile string, properties map[string]string, add, del bool) error
- func SetCapacity(capacity global.NMCapacity) error
- func SetConfig(fileName string, properties map[string]string) error
- func SetMultipleConfDataToFile(xmlfile string, properties map[string]string) error
- type ConfData
- type PropertyData
Constants ¶
const ( // YarnSiteFile show nodemanager special config file YarnSiteFile = "yarn-site.xml" // HdfsSiteFILE show hdfs special config file HdfsSiteFILE = "hdfs-site.xml" // CoreSiteFile show nodemanager special config file CoreSiteFile = "core-site.xml" // YarnEnvFile show nodemanager special config file YarnEnvFile = "yarn-env.sh" )
Variables ¶
This section is empty.
Functions ¶
func GetAllConfig ¶
GetAllConfig get all properties from file
func GetConfDataFromFile ¶
GetConfDataFromFile get key value from file @xmlfile: yarn-site.xml, core-site.xml, hdfs-site.xml
func GetNodeManagerAddress ¶
GetNodeManagerAddress get nodemanager address - cacheAddress: get result from cache, no need to read file
func GetNodeManagerWebAddress ¶
GetNodeManagerWebAddress get nodemanager webapp address - cacheAddress: get result from cache, no need to read file
func GetResourceManagerAddress ¶
GetResourceManagerAddress get resource manager address - cacheAddress: get result from cache, no need to read file
func SetAddDelConfig ¶
SetAddDelConfig set properties for file, may add new or delete old
func SetAddDelMultipleConfDataToFile ¶
func SetAddDelMultipleConfDataToFile(xmlfile string, properties map[string]string, add, del bool) error
SetAddDelMultipleConfDataToFile set many properties to xml file, may add new key or delete old key
func SetCapacity ¶
func SetCapacity(capacity global.NMCapacity) error
SetCapacity set capacity value
Types ¶
type ConfData ¶
type ConfData struct { XMLName xml.Name `xml:"configuration"` Properties []PropertyData `xml:"property"` }
ConfData show whole xml properties
func LoadConfDataFromFile ¶
LoadConfDataFromFile load xmf struct from file
func LoadConfDataFromStream ¶
LoadConfDataFromStream load xml struct from io stream
func (*ConfData) SaveToStream ¶
SaveToStream restore io stream to file