【问题标题】:Issue with Spark tutorialSpark教程的问题
【发布时间】:2016-11-14 15:14:22
【问题描述】:

【问题讨论】:

    标签: scala spark-streaming


    【解决方案1】:

    在您的终端上使用此命令。

    nc -lk 9999
    

    应该是这样的:

    # TERMINAL 1:
    # Running Netcat
    
    $ nc -lk 9999
    apache spark
    apache hadoop
    

    输出将是:

    -------------------------------------------
    Batch: 0
    -------------------------------------------
    +------+-----+
    | value|count|
    +------+-----+
    |apache|    1|
    | spark|    1|
    +------+-----+
    
    -------------------------------------------
    Batch: 1
    -------------------------------------------
    +------+-----+
    | value|count|
    +------+-----+
    |apache|    2|
    | spark|    1|
    |hadoop|    1|
    +------+-----+
    ...
    

    并相应地查看输出。

    这里有更好的记录:https://home.apache.org/~pwendell/spark-nightly/spark-branch-2.0-docs/latest/structured-streaming-programming-guide.html#quick-example

    【讨论】:

      猜你喜欢
      • 2015-11-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-10
      • 2011-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多