Skip to content

Instantly share code, notes, and snippets.

@abramsm abramsm/gist:8980751
Last active Aug 29, 2015

Embed
What would you like to do?
Log-Synth Hydra processing Example
// -Dpagedb.kvstore.type=1
// -Deps.gz.type=3
// -Deps.cache.pages=100000
// -Xmx2G
{
"type":"map",
taskthreads:2,
"source":{
"type":"mesh2",
"hash":true,
"mesh":{"files":["log-synth/sample*"]},
"format":{
"type":"column",
"columns":["QUERY_TIME", "UID", "IP", "TERMS"],
"tokens":{"group":['"']}
}
},
"map":{
"filterOut":{"op":"chain", failStop:false, "filter":[
{"op":"field", "from":"UID", "filter":{"op":"trim"}},
{"op":"field", "from":"IP", "filter":{"op":"trim"}},
{"op":"field", "from":"TERMS", "filter":{"op":"trim"}},
{"op":"field", "from":"QUERY_TIME", filter:{op:"chain", filter:[
{op:"split", split:"."},
{op:"index", index:1},
]}},
{"op":"debug"},
]},
},
"output":{
"type":"tree",
"stats":"false",
"root":{"path":"TREE"},
"paths":{
"TREE":[
{"type":"const", "value":"root", "data":{
"topterms":{"type":"key.top","key":"TERMS","size":1000},
"topuids":{"type":"key.top", "key":"UID", "size":1000},
"topip":{"type":"key.top", "key":"IP", "size":1000},
"uidcount":{"type":"count", "ver":"hllp", "key":"UID", "p":14, "sp":25},
"ipcount":{"type":"count", "ver":"hllp", "key":"IP", "p":14, "sp":25},
"termcount":{"type":"count", "ver":"hllp", "key":"TERMS", "p":14, "sp":25},
timeDigest:{type:"tdigest", key:"QUERY_TIME", compression:100},
}},
{"type":"branch", "list":[
[
{"type":"const", "value":"all"},
],
[
{"type":"const", "value":"bytime"},
{"type":"value", "key":"QUERY_TIME"},
{"type":"value", "key":"TERMS"},
],
[
{"type":"const", "value":"byip"},
{"type":"value", "key":"IP", data:{
"uidcount":{"type":"count", "ver":"hllp", "key":"UID", "p":14, "sp":25},
}},
{"type":"value", "key":"UID"},
]
]},
],
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.