Package com.odiago.flumebase.exec

Examples of com.odiago.flumebase.exec.ParsingEventWrapper.reset()


    //    + 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


    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

          try {
            FileSourceEvent event = new FileSourceEvent(line.getBytes());
            event.set(STREAM_NAME_ATTR, mStream.getName().getBytes());
            ParsingEventWrapper wrapper = new ParsingEventWrapper(mStream.getEventParser(),
                mFieldNames);
            wrapper.reset(event);

            if (timestampField == null) {
              event.setTimestamp(System.currentTimeMillis());
            } else {
              Timestamp timestamp = (Timestamp) wrapper.getField(timestampField);
View Full Code Here

        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
Copyright © 2018 www.massapi.com. 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.