zoukankan      html  css  js  c++  java
  • Ubuntu下flink的安装

    Ubuntu下flink的安装

    PreRequest: Java

    安装

    1. 下载软件包:
    wget https://mirror.bit.edu.cn/apache/flink/flink-1.10.0/flink-1.10.0-src.tgz
    
    1. 解压软件包
    tar xzf flin-*.tgz
    cd flink-1.10.0
    
    1. 启动 flink
    ./bin/start-cluster.sh
    

    验证:打开页面 localhost:8081

    或 查看日志

    tail log/flink-*-standlonession-*.log
    

    运行Demo

    1. 使用 netcat
    nc -l 9000
    
    1. 提交Flink程序
    ./bin/flink run examples/streaming/SocketWordCount.jar --port 9000
    

    测试

    nc -l 9000
    hello world flink
    flink is the best
    hello again
    

    查看输出:

    tail -f log/flink-*-taskexecutor-*out
    world 1
    flink 2
    is 1
    the 1
    best 1
    hello 2
    again 1
    
    1. 关闭cluster
    ./bin/stop-cluster.sh
    

    参考链接:官网教程

  • 相关阅读:
    CF733F
    P4826
    洛谷P2687 & P1108
    CF42A
    洛谷P1858
    CF1428C
    洛谷P4981
    树形DP
    背包六讲(也不知道为啥就是六个 $QwQ$)
    2020
  • 原文地址:https://www.cnblogs.com/Mr0wang/p/12748346.html
Copyright © 2011-2022 走看看