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

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

主站蜘蛛池模板: 喜德县| 临漳县| 遵化市| 巍山| 丽江市| 崇仁县| 芜湖市| 兰坪| 洪湖市| 子长县| 敦化市| 渝中区| 崇礼县| 安图县| 兰溪市| 萨嘎县| 临西县| 云霄县| 清新县| 柘城县| 册亨县| 阿城市| 休宁县| 淮滨县| 宁海县| 曲阜市| 日土县| 会宁县| 油尖旺区| 康保县| 壶关县| 兴义市| 怀化市| 胶南市| 怀来县| 甘肃省| 彰化县| 九寨沟县| 高州市| 桂东县| 灵石县|