Class NodesFromYamlStream

  • All Implemented Interfaces:
    com.google.common.base.Function<com.google.common.io.ByteSource,​com.google.common.cache.LoadingCache<String,​Node>>, Function<com.google.common.io.ByteSource,​com.google.common.cache.LoadingCache<String,​Node>>

    @Singleton
    public class NodesFromYamlStream
    extends Object
    implements com.google.common.base.Function<com.google.common.io.ByteSource,​com.google.common.cache.LoadingCache<String,​Node>>
    Parses the following syntax.
     nodes:
         - id: cluster-1:
           name: cluster-1
           description: xyz
           hostname: cluster-1.mydomain.com
           location_id: virginia
           os_arch: x86
           os_family: linux
           os_description: redhat
           os_version: 5.3
           group: hadoop
           tags:
               - vanilla
           username: kelvin
           credential: password_or_rsa
             or
           credential_url: password_or_rsa_file ex. resource:///id_rsa will get the classpath /id_rsa; file://path/to/id_rsa
           sudo_password: password
     
    • Constructor Detail

      • NodesFromYamlStream

        public NodesFromYamlStream()
    • Method Detail

      • apply

        public com.google.common.cache.LoadingCache<String,​Node> apply​(com.google.common.io.ByteSource source)
        Specified by:
        apply in interface com.google.common.base.Function<com.google.common.io.ByteSource,​com.google.common.cache.LoadingCache<String,​Node>>
        Specified by:
        apply in interface Function<com.google.common.io.ByteSource,​com.google.common.cache.LoadingCache<String,​Node>>