-
Notifications
You must be signed in to change notification settings - Fork 1
/
morphline.conf
63 lines (46 loc) · 1.29 KB
/
morphline.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
morphlines : [
{
# Name used to identify a morphline. E.g. used if there are multiple
# morphlines in a morphline config file
id : morphline1
# Import all morphline commands in these java packages and their
# subpackages. Other commands that may be present on the classpath are
# not visible to this morphline.
importCommands : ["com.cloudera.**", "org.apache.solr.**"]
commands : [
{
# Parse input attachment and emit a record for each input line
readLine {
charset : UTF-8
}
}
{
grok {
dictionaryFiles : [src/test/resources/grok-dictionaries]
expressions : {
message : """%{POSINT:serial} %{DATA:message}"""
}
}
}
{
sanitizeUnknownSolrFields {
solrLocator : {
collection : gettingstarted
zkHost : "localhost:9983/solr"
}
}
}
# log the record at INFO level to SLF4J
{ logInfo { format : "output record: {}", args : ["@{}"] } }
# load the record into a Solr server or MapReduce Reducer
{
loadSolr {
solrLocator : {
collection : gettingstarted
zkHost : "localhost:9983/solr"
}
}
}
]
}
]