官术网_书友最值得收藏!

  • Learning Apache Apex
  • Thomas Weise Munagala V. Ramanath David Yan Kenneth Knowles
  • 157字
  • 2021-07-02 22:38:37

JSON

Another way of assembling applications without writing Java code is through JSON.

This format can be created manually, but it could also be used to generate the DAG from a different frontend, like a visual tool. Here is the word count written in JSON:

{ 
"displayName": "WordCountJSON",
"operators": [
{ "name": "input", ... }, { "name": "parse", ... },
{
"name": "count",
"class": "com.datatorrent.lib.algo.UniqueCounter",
"properties": { "com.datatorrent.lib.algo.UniqueCounter": { "cumulative":
false } }
},
{ "name": "console", ... } ],
"streams": [
{ "name": "lines",
"sinks": [ { "operatorName": "parse", "portName": "input" } ],
"source": { "operatorName": "input", "portName": "output" }
},
{ "name": "words", ... },
{ "name": "counts", ... }
]
}

Just like applications that are written in Java, the JSON files will be included in the application package, along with the operator dependencies. Upon launch of the application, the Apex client will parse these files and translate them into a native DAG representation.

主站蜘蛛池模板: 玛纳斯县| 阳城县| 汶川县| 阿勒泰市| 贵德县| 黄平县| 察隅县| 香港 | 乌什县| 互助| 灵山县| 临泽县| 个旧市| 岳阳市| 垦利县| 囊谦县| 屯门区| 石棉县| 克东县| 江达县| 青田县| 楚雄市| 宁陕县| 威宁| 贵溪市| 灌云县| 同江市| 呈贡县| 文成县| 蒙阴县| 织金县| 和静县| 白朗县| 温州市| 汉沽区| 本溪市| 新泰市| 广宁县| 莱阳市| 临沭县| 桃江县|