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

  • 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.

主站蜘蛛池模板: 邹城市| 汕头市| 广饶县| 万宁市| 修水县| 遵义县| 新巴尔虎左旗| 祁门县| 桑日县| 阜新市| 拜城县| 禹州市| 洛浦县| 万宁市| 轮台县| 肃宁县| 七台河市| 江陵县| 德保县| 巴中市| 太和县| 宝山区| 巴林右旗| 峡江县| 永城市| 应城市| 兴国县| 磴口县| 新竹市| 休宁县| 肃北| 元江| 彝良县| 北碚区| 东台市| 伊金霍洛旗| 松江区| 遵义市| 海伦市| 屯昌县| 武安市|