mirror of https://github.com/apache/druid.git
add docs
This commit is contained in:
parent
6d2747adcf
commit
5b166134fb
|
@ -40,6 +40,36 @@ See [Examples](Examples.html). This firehose creates a stream of random numbers.
|
||||||
|
|
||||||
This firehose ingests events from a define rabbit-mq queue.
|
This firehose ingests events from a define rabbit-mq queue.
|
||||||
|
|
||||||
|
#### LocalFirehose
|
||||||
|
|
||||||
|
This Firehose can be used to read the data from files on local disk.
|
||||||
|
It can be used for POCs to ingest data on disk.
|
||||||
|
A sample local firehose spec is shown below:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type" : "local",
|
||||||
|
"filter" : "*.csv",
|
||||||
|
"parser" : {
|
||||||
|
"timestampSpec": {
|
||||||
|
"column": "mytimestamp",
|
||||||
|
"format": "yyyy-MM-dd HH:mm:ss"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"format": "tsv",
|
||||||
|
"columns": [...],
|
||||||
|
"dimensions": [...]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|property|description|required?|
|
||||||
|
|--------|-----------|---------|
|
||||||
|
|type|This should be local|yes|
|
||||||
|
|filter|A wildcard filter for files. See [here](http://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/filefilter/WildcardFileFilter.html) for more information.|yes|
|
||||||
|
|data|A data spec similar to what is used for batch ingestion.|yes|
|
||||||
|
|
||||||
#### IngestSegmentFirehose
|
#### IngestSegmentFirehose
|
||||||
|
|
||||||
This Firehose can be used to read the data from existing druid segments.
|
This Firehose can be used to read the data from existing druid segments.
|
||||||
|
@ -63,11 +93,6 @@ A sample ingest firehose spec is shown below -
|
||||||
|metrics|The list of metrics to select. If left empty, no metrics are returned. If left null or not defined, all metrics are selected.|no|
|
|metrics|The list of metrics to select. If left empty, no metrics are returned. If left null or not defined, all metrics are selected.|no|
|
||||||
|filter| See [Filters](Filters.html)|yes|
|
|filter| See [Filters](Filters.html)|yes|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Parsing Data
|
Parsing Data
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ import io.druid.data.input.impl.FileIteratingFirehose;
|
||||||
import io.druid.data.input.impl.StringInputRowParser;
|
import io.druid.data.input.impl.StringInputRowParser;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.io.LineIterator;
|
import org.apache.commons.io.LineIterator;
|
||||||
import org.apache.commons.io.filefilter.RegexFileFilter;
|
|
||||||
import org.apache.commons.io.filefilter.TrueFileFilter;
|
import org.apache.commons.io.filefilter.TrueFileFilter;
|
||||||
|
import org.apache.commons.io.filefilter.WildcardFileFilter;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -82,7 +82,7 @@ public class LocalFirehoseFactory implements FirehoseFactory<StringInputRowParse
|
||||||
{
|
{
|
||||||
Collection<File> foundFiles = FileUtils.listFiles(
|
Collection<File> foundFiles = FileUtils.listFiles(
|
||||||
baseDir,
|
baseDir,
|
||||||
new RegexFileFilter(filter),
|
new WildcardFileFilter(filter),
|
||||||
TrueFileFilter.INSTANCE
|
TrueFileFilter.INSTANCE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue