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() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Context context)
Request the implementing class to (re)configure itself.
|
List<Event> |
getEvents(javax.servlet.http.HttpServletRequest request)
Takes an HttpServletRequest and returns a list of Flume
Events.
|
public static final String MAX_BLOB_LENGTH_KEY
public static final int MAX_BLOB_LENGTH_DEFAULT
public void configure(Context context)
ConfigurableRequest 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 Configurablepublic List<Event> getEvents(javax.servlet.http.HttpServletRequest request) throws Exception
HTTPSourceHandlergetEvents in interface HTTPSourceHandlerrequest - 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-2022 Apache Software Foundation. All Rights Reserved.