public class BlobHandler extends Object implements HTTPSourceHandler
Note that this approach is not suitable for very large objects because it buffers up the entire BLOB.
Example client usage:
curl --data-binary @sample-statuses-20120906-141433-medium.avro 'http://127.0.0.1:5140?resourceName=sample-statuses-20120906-141433-medium.avro' --header 'Content-Type:application/octet-stream' --verbose
Modifier and Type | Field and Description |
---|---|
static int |
MAX_BLOB_LENGTH_DEFAULT |
static String |
MAX_BLOB_LENGTH_KEY |
Constructor and Description |
---|
BlobHandler() |
public static final String MAX_BLOB_LENGTH_KEY
public static final int MAX_BLOB_LENGTH_DEFAULT
public void configure(Context context)
Configurable
Request the implementing class to (re)configure itself.
When configuration parameters are changed, they must be reflected by the component asap.
There are no thread safety guarantees on when configure might be called.
configure
in interface Configurable
public List<Event> getEvents(javax.servlet.http.HttpServletRequest request) throws Exception
HTTPSourceHandler
getEvents
in interface HTTPSourceHandler
request
- The request to be parsed into Flume events.HTTPBadRequestException
- If the was not parsed correctly into an
event because the request was not in the expected format.Exception
- If there was an unexpected error.Copyright © 2009-2016 Apache Software Foundation. All Rights Reserved.