com.cloudera.cdk.morphline.stdio
Class AbstractParser
java.lang.Object
com.cloudera.cdk.morphline.base.AbstractCommand
com.cloudera.cdk.morphline.stdio.AbstractParser
- All Implemented Interfaces:
- Command
public abstract class AbstractParser
- extends AbstractCommand
Base class for convenient implementation of morphline parsers.
Methods inherited from class com.cloudera.cdk.morphline.base.AbstractCommand |
buildCommand, buildCommandChain, doNotify, getChild, getConfig, getConfigs, getContext, getCounter, getHistogram, getMeter, getParent, getTimer, notify, process, validateArguments |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SUPPORTED_MIME_TYPES
public static final String SUPPORTED_MIME_TYPES
- See Also:
- Constant Field Values
AbstractParser
public AbstractParser(com.typesafe.config.Config config,
Command parent,
Command child,
MorphlineContext context)
addSupportedMimeType
protected void addSupportedMimeType(String mediaType)
doProcess
protected boolean doProcess(Record record)
- Overrides:
doProcess
in class AbstractCommand
doProcess
protected abstract boolean doProcess(Record record,
InputStream stream)
throws IOException
- Throws:
IOException
incrementNumRecords
protected void incrementNumRecords()
detectCharset
protected Charset detectCharset(Record record,
Charset charset)
removeAttachments
public static void removeAttachments(Record outputRecord)
Copyright © 2013 Cloudera. All rights reserved.