Package com.odiago.flumebase.exec

Examples of com.odiago.flumebase.exec.EventWrapper


    //LOG.debug("Delivering to " + mContextSourceName + ": Input event in rtsqlsink: "
    //    + new String(e.getBody()));
    try {
      e.set(FlowElement.STREAM_NAME_ATTR, mStreamSymbol.getName().getBytes());
      EventWrapper wrapper = new ParsingEventWrapper(mStreamSymbol.getEventParser(),
          mFieldNames);
      wrapper.reset(e);
      mWriteContext.emit(wrapper);
    } catch (InterruptedException ie) {
      // TODO(aaron): When Flume's api lets us throw InterruptedException, do so directly.
      throw new IOException(ie);
    }
View Full Code Here


    symbols.addSymbol(new AssignedSymbol("x", Type.getPrimitive(Type.TypeName.INT), "x",
        IdentifierExpr.AccessType.FIELD));

    ArrayList<String> symbolNames = new ArrayList<String>();
    symbolNames.add("x");
    EventWrapper wrapper = new ParsingEventWrapper(new DelimitedEventParser(),
        symbolNames);
    wrapper.reset(new EventImpl("4".getBytes()));

    // This is expected to succeed.
    binExpr = new BinExpr(
        new IdentifierExpr("x"),
        BinOp.Times,
View Full Code Here

        // Iterate over all the input events, and wrap them in
        // a parsing EventWrapper; advance these to the output.
        while (iter.hasNext()) {
          Event rawEvent = iter.next();
          rawEvent.set(STREAM_NAME_ATTR, mStreamSymbol.getName().getBytes());
          EventWrapper wrapper = new ParsingEventWrapper(mStreamSymbol.getEventParser(),
              mFieldNames);
          wrapper.reset(rawEvent);
          context.emit(wrapper);
        }
      } catch (IOException ioe) {
        LOG.error("IOException emitting event: " + ioe);
      } catch (InterruptedException ie) {
View Full Code Here

TOP

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

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.