Package com.odiago.flumebase.parser

Examples of com.odiago.flumebase.parser.FormatSpec


    streamBuilder.addField(new TypedField("a", leftType));
    streamBuilder.addField(new TypedField("b", rightType));
    for (String input : inputs) {
      streamBuilder.addEvent(input);
    }
    FormatSpec formatSpec = new FormatSpec();
    formatSpec.setFormat(FormatSpec.DEFAULT_FORMAT_NAME);
    formatSpec.setParam(DelimitedEventParser.DELIMITER_PARAM, delimStr);
    formatSpec.setParam(DelimitedEventParser.NULL_STR_PARAM, nullStr);
    streamBuilder.setFormat(formatSpec);
    StreamSymbol stream = streamBuilder.build();

    getSymbolTable().addSymbol(stream);
    getConf().set(SelectStmt.CLIENT_SELECT_TARGET_KEY, "testSelect");
View Full Code Here


    String sourceFilename = sourceFile.getAbsolutePath();

    StreamBuilder streamBuilder = new StreamBuilder("inputstream");

    streamBuilder.addField(new TypedField("a", Type.getPrimitive(Type.TypeName.INT)));
    streamBuilder.setFormat(new FormatSpec("delimited"));
    streamBuilder.setLocal(true);
    streamBuilder.setSourceType(StreamSourceType.Source);
    streamBuilder.setSource("tail(\"" + sourceFilename + "\")");
    StreamSymbol inputStream = streamBuilder.build();
View Full Code Here

          LOG.error("Cannot create stream for flow; object already exists at top level: "
              + mFlumeNodeName);
          mOwnsSymbol = false;
          ((LocalContext) getContext()).getFlowData().setStreamName(null);
        } else {
          FormatSpec formatSpec = new FormatSpec(FormatSpec.FORMAT_AVRO);
          formatSpec.setParam(AvroEventParser.SCHEMA_PARAM, mOutputSchema.toString());

          List<Type> outputTypes = new ArrayList<Type>();
          for (TypedField field : mFlumeInputFields) {
            outputTypes.add(field.getType());
          }
View Full Code Here

  }

  public StreamBuilder(String name) {
    mStreamName = name;
    mFields = new ArrayList<TypedField>();
    mFormatSpec = new FormatSpec();
    mSourceType = StreamSourceType.Memory;
    mSource = null;
    mIsLocal = false;
  }
View Full Code Here

TOP

Related Classes of com.odiago.flumebase.parser.FormatSpec

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.