当前位置:网站首页>搭建map-reduce开发环境
搭建map-reduce开发环境
2022-07-17 00:12:00 【sun_xo】
## Launch IntelliJ
## create Java project - for example "wordcount"
select ‘Create New Project’
-> "Java project"
-> select 1.8 JDK in "Project SDK"
-> Next -> Next
-> enter "wordcount" in "Project name"
-> enter "~/work/wordcount" in "Project location"
-> Finish
## create Java Class
select File -> New -> "Java Class" -> enter "WordCount" -> Create
then a new file generated under src/
## add the Hadoop module dependencies
select File -> "Project Structure" -> Modules -> Dependencies
-> "+" -> "JARS or directories"
Browse to the Hadoop installation, select jar files under following directorys:
share/hadoop/common
share/hadoop/common/lib
share/hadoop/mapreduce
share/hadoop/yarn
## configure
select Run -> "Edit Configuration" -> Application -> "+"
-> enter "WordCount" in "Main class"
-> enter "input output" as input / output path in "Program arguments"
-> Apply -> OK
put the input text under "~/work/mapreduce/input"
## coding and run / debug
Note:
in IntelliJ, WordCount runs with Hadoop standalone mode
don't forget to delete "~/work/mapreduce/output" before running
## create a jar file
$ cd out/production/mapreduce
$ jar cvf ../../../wordcount.jar *.class
## run with Hadoop pseudo-distributed mode
$ hdfs dfs -rm -f -r output
$ hadoop jar wordcount.jar WordCount input output
$ hdfs dfs -cat output/*
reference: https://tokluo.wordpress.com/2016/01/31/using-intellij-to-write-your-application/
边栏推荐
- Détection de bord de deuxième ordre laplacien de guassian Gaussian laplacien Operator
- YYDS!阿里技术官最新总结的分布式核心技术笔记已上线,堪称福音
- Fairness in Semi-supervised Learning: Unlabeled Data Help to Reduce Discrimination
- Hands on deep learning -- multi layer perceptron (MLP)
- 05 design of street lamp control fault detection system based on ZigBee
- 指針常量與常量指針愛恨情仇
- [go language] detailed explanation of dynamic library and static library
- Leveraging Semi-Supervised Learning for Fairness using Neural Networks
- Using XOR to exchange two variables is inefficient
- 数组定义格式
猜你喜欢

Recursive and recursive learning notes

05基于ZigBee的路灯灯控故障检测系统设计

Leveraging Semi-Supervised Learning for Fairness using Neural Networks

如何理解Volatile以及如何使用它

On the properties and methods of list < t >

频率派和贝叶斯派

GoogLeNet

VGG (Visual Geometry Group)

Powerful chart component library scottplot
![[MySQL] windows install MySQL 5.7](/img/71/be5b0cc3e130c2b9f3884d90b9cd39.jpg)
[MySQL] windows install MySQL 5.7
随机推荐
数组定义格式
03 design of urban road dedusting and cooling system based on ZigBee
Mxnet network model (IV) Gan neural network
Analysis of IGBT direct short circuit process
The differences and usage of cookies, localstorage and sessionstorage
Mxnet network model of show me the code (III)
[vernacular analog 1] PN junction and diode
Mxnet network model (V) conditional Gan neural network
Fisher线性判别分析Fisher Linear Distrimination
二階邊緣檢測 - Laplacian of Guassian 高斯拉普拉斯算子
PCA主成分分析(降维)过程推导
【文献阅读】TENET: A Framework for Modeling Tensor Dataflow Based on Relation-centric Notation
利用因果线性模型监测不公平A Causal Linear Model to Quantify Edge Unfairness for Unfair Edge Prioritization
Hands on deep learning -- from full connection layer to convolution layer
动手学深度学习--多层感知机篇(MLP)
ROC 曲线讲解 (Receiver Operarating Curve)
Yolov5训练建议
Second order edge detection Laplacian of Guassian Gaussian Laplacian operator
switch详解
【pycharm】Cannot find reference ‘XXX‘ in ‘__ init__. Py 'solution