Package com.odiago.flumebase.exec

Examples of com.odiago.flumebase.exec.Symbol


        mSubmitterSession.sendInfo(sb.toString());
      }
    } else if (node instanceof DescribeNode) {
      // Look up the referenced object in the symbol table and describe it immediately.
      DescribeNode describe = (DescribeNode) node;
      Symbol sym = mRootSymbolTable.resolve(describe.getIdentifier());
      mSubmitterSession.sendInfo(sym.toString());
    } else if (node instanceof DropNode) {
      // Perform the operation here.
      // Remove the objet from our symbol table.
      DropNode dropNode = (DropNode) node;
      String name = dropNode.getName();
      Symbol sym = mRootSymbolTable.resolve(name);
      if (null == sym) {
        // Shouldn't happen; the type checker already accepted this statement.
        throw new DAGOperatorException("No such object at top level: " + name);
      }
      EntityTarget targetType = dropNode.getType();
      // Perform the operation.
      mRootSymbolTable.remove(name);
      mSubmitterSession.sendInfo("DROP " + targetType.toString().toUpperCase());
    } else if (node instanceof NamedSourceNode) {
      NamedSourceNode namedInput = (NamedSourceNode) node;
      String streamName = namedInput.getStreamName();
      Symbol symbol = mRootSymbolTable.resolve(streamName).resolveAliases();
      if (null == symbol) {
        throw new DAGOperatorException("No symbol for stream: " + streamName);
      }

      if (!(symbol instanceof StreamSymbol)) {
        throw new DAGOperatorException("Identifier " + streamName + " has type: "
            + symbol.getType() + ", not STREAM.");
      }

      StreamSymbol streamSymbol = (StreamSymbol) symbol;

      switch (streamSymbol.getSourceType()) {
View Full Code Here

TOP

Related Classes of com.odiago.flumebase.exec.Symbol

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.