tl;dr You'd rather not.
Well, it may be possible, but given you've just started your journey to Spark's land the efforts would not pay off.
Windows has never been a developer-friendly OS to me and whenever I teach people Spark and they use Windows I just take it as granted that we'll have to go through the winutils.exe
setup but many times also how to work on command line.
Please install winutils.exe
as follows:
- Run
cmd
as administrator
- Download winutils.exe binary from https://github.com/steveloughran/winutils repository (use hadoop-2.7.1 for Spark 2)
- Save winutils.exe binary to a directory of your choice, e.g.
c:hadoopin
- Set HADOOP_HOME to reflect the directory with winutils.exe (without
bin
), e.g. set HADOOP_HOME=c:hadoop
- Set PATH environment variable to include
%HADOOP_HOME%in
- Create
c:mphive
directory
- Execute
winutils.exe chmod -R 777 mphive
- Open
spark-shell
and run spark.range(1).show
to see a one-row dataset.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…