public class FetchAndReplaceTwitterProcessor extends Object implements StreamsProcessor
Modifier and Type | Field and Description |
---|---|
static int |
BACKOFF |
Constructor and Description |
---|
FetchAndReplaceTwitterProcessor() |
FetchAndReplaceTwitterProcessor(TwitterStreamConfiguration config) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp() |
protected Tweet |
fetch(Activity doc) |
protected void |
fetchAndReplace(Activity doc,
String originalId) |
String |
getId() |
protected Twitter |
getTwitterClient() |
void |
prepare(Object configurationObject) |
List<StreamsDatum> |
process(StreamsDatum entry) |
protected void |
replace(Activity doc,
Tweet tweet) |
public static final int BACKOFF
public FetchAndReplaceTwitterProcessor()
public FetchAndReplaceTwitterProcessor(TwitterStreamConfiguration config)
public String getId()
getId
in interface StreamsOperation
public List<StreamsDatum> process(StreamsDatum entry)
process
in interface StreamsProcessor
public void prepare(Object configurationObject)
prepare
in interface StreamsOperation
public void cleanUp()
cleanUp
in interface StreamsOperation
protected void fetchAndReplace(Activity doc, String originalId) throws IOException, ActivityConversionException
protected void replace(Activity doc, Tweet tweet) throws IOException, ActivityConversionException
protected Twitter getTwitterClient() throws InstantiationException
InstantiationException
Copyright © 2018 The Apache Software Foundation. All rights reserved.