publicstaticclassWordWithCount{ public String word; publiclong count;
publicWordWithCount(){}
publicWordWithCount(String word, long count){ this.word = word; this.count = count; }
@Override public String toString(){ return word + ":" + count; } }
运行示例
首先将flink运行起来,在docker-compose.yml所在目录下执行
1 2 3 4 5
$ docker-compose up -d $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES dc54c9cf6304 flink "/docker-entrypoint.…" 3 days ago Up 4 seconds 6121-6123/tcp, 8081/tcp flink_taskmanager_1 2eab6b0fd0f1 flink "/docker-entrypoint.…" 3 days ago Up 3 seconds 6123/tcp, 0.0.0.0:8081->8081/tcp flink_jobmanager_1