addthis/hydra — pull request #70 by tea-dragon (2014-04-14 02:14:30+00:00)
Title: support simple usages of typesafe-config job conf

Supports basic usage of typesafe-config syntax for job configs. It is simple in the sense that config files
are parsed as stand alone files without any inheritance or merging or integration of fancier features like
replacing job param or macro syntax with built-in hocon substitution. Also, I did not alter the 'validate job'
function to preprocess first (although that would be simple to hack, it would be cleaner with a job-level
property for type ala. map/hoover/etc but not in the config itself). The way it works is also pretty straight
forward:

1. parse file with typesafe
2. render config resultant config object to a json string
3. give json string to normal task runner

For a small sample of the additional syntax it allows (hocon is pretty much a superset of malJson):
```
type=map

source.type=empty
source.maxPackets=100000

map {
fields=[]
filterOut.op=map
filterOut.fields=[
{ from=counter, filter { op=count, format="0000000" } }
{ from=DATE_YMD, filter { op=time-range
offsetDays=-1
now=true
format=YYMMdd }}
]
}

output.type=tree
output {
root.path=TREE
paths.TREE=[
{ type=const, value=empty }
]
}
```

versus the original version:
```
{
type : "map",
source : {
type : "empty",
maxPackets : 100000,
},
map : {
fields : [],
filterOut :
{op:"map", fields:[
{from:"counter", filter: {op:"count", format:"0000000"}},
{from: "DATE_YMD", filter: {op: "time-range", offsetDays:-1, now:true, format:"YYMMdd"}},
]},
},
output : {
type:"tree",
root:{path:"TREE"},
paths:{
TREE:[
{type:"const", value:"empty"},
]
},
}
}
```