You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Stream Topology Definition DSL

EAGLE-98

 

init[storm](args)

// =====================================
"logStream" := stream from Seq(
    "55.3.244.1 GET /index.html 15824 0.043",
    "55.3.244.1 GET /index.html 15824 0.043",
    "55.3.244.1 GET /index.html 15824 0.043",
    "55.3.244.1 GET /index.html 15824 0.043",
    "55.3.244.1 GET /index.html 15824 0.043",
    "55.3.244.1 GET /index.html 15824 0.043"
  ) as ("line"->'string) parallism 10

"parserStream" := $"logStream" grok {
  pattern("line"->"(?<ip>\\d+\\.\\d+\\.\\d+\\.\\d+)\\s+(?<method>\\w+)\\s+(?<path>[\\w/\\.]+)\\s+(?<bytes>\\d+)\\s+(?<time>[\\d\\.]+)")
}

$"parserStream" > stdout parallism 1
// =====================================

submit

 

Dynamic Topology Management

Dynamic Topology Manager

  • No labels