目录 步骤 一.准备本地文件以作测试 二.通过 --master启动本地模式 三.开发scala单词统计代码 步骤 一.准备本地文件以作测试 在第一台机器执行 mkdir -p /export/servers/sparkdatas cd /export/servers/sparkdatas/ vim wordcount.txt hello me hello you hello her 二.通过 --master启动本地模式 cd /export/servers/spark-2.2.0-bin-2
Ubuntu14.04 给定一个文本,统计其中单词出现的次数 方法1 # solution 1 grep与awk配合使用,写成一个sh脚本 fre.sh sh fre.sh wordfretest.txt #! /bin/bash# solution 1 ] then echo "Usage:$0 args error" exit fi ] then echo "analyse the first file $1" fi #get the first file fi
继上次的Spark-shell脚本源码分析,还剩下后面半段.由于上次涉及了不少shell的基本内容,因此就把trap和stty放在这篇来讲述. 上篇回顾:Spark源码分析之Spark Shell(上) function main() { if $cygwin; then # Workaround for issue involving JLine and Cygwin # (see http://sourceforge.net/p/jline/bugs/40/). # If you're us