杂乱无章的记录

import matplotlib.pyplor as plt    

plt.plot(x, y, label='First Line')     划线

plt.xlabel('Plot Number')    设置X轴名称

plt.title('Interesting Graph\nCheck it out')   设置表头

plt.legend()   调整显示位置

plt.show()    显示

 

import matplotlib.pyplot as plt
# -*- coding: utf-8 -*-        
import ch
ch.set_ch()    #matplotlib图标正常显示中文配置        
plt.bar([1,3,5,7,9],[5,2,7,8,2], label=u'条形①', color='b')    #b为bule蓝色
plt.bar([2,4,6,8,10],[8,6,2,5,6], label=u'条形②', color='g')    #g为green绿色
plt.legend()
plt.xlabel(u'条形的横坐标')
plt.ylabel(u'条形的纵坐标')
plt.title(u'条形图展示小例子')
plt.show()

bin/hdfs namenode -format

sbin/start-dfs.sh

 

 


http://localhost:50070

初始化HDFS系统 bin/hdfs namenode -format

sbin/start-dfs.sh

# 在hdfs的根目录下建立了一个test目录 bin/hdfs dfs -mkdir /test # 查看HDFS根目录下的目录结构 bin/hdfs dfs -ls /


# 上传 bin/hdfs dfs -put /home/hadoop/haha.txt /test/ # 查看 bin/hdfs dfs -ls /test/
运行wordcount demo
# 将运行结果保存在/test/out目录下 bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.4.jar wordcount /test/haha.txt /test/out # 查看/test/out目录下的文件 bin/hdfs dfs -ls /test/out 可以得到结果,并保存在part-r-00000中。 # 查看part-r-00000中的运行结果 bin/hadoop fs -cat /test/out/part-r-00000

 

posted @ 2018-03-17 15:56  暮雪超霸  阅读(131)  评论(0编辑  收藏  举报