org.apache.storm.flux.parser

## Class FluxParser

- java.lang.Object
- - org.apache.storm.flux.parser.FluxParser

-     public class FluxParser
      extends Object

  Static utility methods for parsing flux YAML.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TopologyDef` | `parseFile(String inputFile, boolean dumpYaml, boolean processIncludes, Properties properties, boolean envSub)` Parse a flux topology definition.
    `static TopologyDef` | `parseInputStream(InputStream inputStream, boolean dumpYaml, boolean processIncludes, Properties properties, boolean envSub)` Parse a flux topology definition.
    `static Properties` | `parseProperties(String propertiesFile, boolean resource)` Parse filter properties file.
    `static TopologyDef` | `parseResource(String resource, boolean dumpYaml, boolean processIncludes, Properties properties, boolean envSub)` Parse a flux topology definition from a classpath resource..

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### parseFile

          public static TopologyDef parseFile(String inputFile,
                                              boolean dumpYaml,
                                              boolean processIncludes,
                                              Properties properties,
                                              boolean envSub)
                                       throws IOException

      Parse a flux topology definition.

      Parameters:
        `inputFile` - source YAML file
        `dumpYaml` - if true, dump the parsed YAML to stdout
        `processIncludes` - whether or not to process includes
        `properties` - properties file for variable substitution
        `envSub` - whether or not to perform environment variable substitution
      Returns:
        resulting topologuy definition
      Throws:
        `IOException` - if there is a problem reading file(s)

    - #### parseResource

          public static TopologyDef parseResource(String resource,
                                                  boolean dumpYaml,
                                                  boolean processIncludes,
                                                  Properties properties,
                                                  boolean envSub)
                                           throws IOException

      Parse a flux topology definition from a classpath resource..

      Parameters:
        `resource` - YAML resource
        `dumpYaml` - if true, dump the parsed YAML to stdout
        `processIncludes` - whether or not to process includes
        `properties` - properties file for variable substitution
        `envSub` - whether or not to perform environment variable substitution
      Returns:
        resulting topologuy definition
      Throws:
        `IOException` - if there is a problem reading file(s)

    - #### parseInputStream

          public static TopologyDef parseInputStream(InputStream inputStream,
                                                     boolean dumpYaml,
                                                     boolean processIncludes,
                                                     Properties properties,
                                                     boolean envSub)
                                              throws IOException

      Parse a flux topology definition.

      Parameters:
        `inputStream` - InputStream representation of YAML file
        `dumpYaml` - if true, dump the parsed YAML to stdout
        `processIncludes` - whether or not to process includes
        `properties` - properties file for variable substitution
        `envSub` - whether or not to perform environment variable substitution
      Returns:
        resulting topology definition
      Throws:
        `IOException` - if there is a problem reading file(s)

    - #### parseProperties

          public static Properties parseProperties(String propertiesFile,
                                                   boolean resource)
                                            throws IOException

      Parse filter properties file.

      Parameters:
        `propertiesFile` - properties file for variable substitution
        `resource` - whether or not to load properties file from classpath
      Returns:
        resulting filter properties
      Throws:
        `IOException` - if there is a problem reading file

Copyright © 2021 The Apache Software Foundation. All rights reserved.