当前位置: 首页 > news >正文

网站seo诊断报告怎么写佛山市seo推广联系方式

网站seo诊断报告怎么写,佛山市seo推广联系方式,建设网站证书不受信任,做网站用phpcms还是文/朱季谦 我最近使用四台Centos虚拟机搭建了一套分布式hadoop环境,简单模拟了线上上的hadoop真实分布式集群,主要用于业余学习大数据相关体系。 其中,一台服务器作为NameNode,一台作为Secondary NameNode,剩下两台当…

文/朱季谦

我最近使用四台Centos虚拟机搭建了一套分布式hadoop环境,简单模拟了线上上的hadoop真实分布式集群,主要用于业余学习大数据相关体系。

其中,一台服务器作为NameNode,一台作为Secondary NameNode,剩下两台当做DataNodes节点服务器,类似下面这样一个架构——

image

NameNodeSecondary NameNodeDataNodes
master1(192.168.200.111)
master2(192.168.200.112)
slave1(192.168.200.117)
slave2(192.168.200.115)

接下来,就是开始通过hadoop自带的wordcount来统计一下文件当中的字符数量。

启动hadoop集群后,在集群可用情况下,按照以下步骤:
一、进入到hadoop安装目录,创建一个测试文件example.txt

我的安装目录是:/opt/hadoop/app/hadoop/hadoop-2.7.5

[root@192 hadoop-2.7.5]# pwd
/opt/hadoop/app/hadoop/hadoop-2.7.5

新建一个example.txt,并随机写入一些字符:

aaa
bbb
cccc
dedef
dedf
dedf
ytrytrgtrcdscdscdsc
dedaxa
cdsvfbgf
uyiuyi
ss
xaxaxaxa

接着,在hdfs文件系统上新建一个input文件夹,用来存放example.txt文件——

[root@192 hadoop-2.7.5]# hdfs dfs -mkdir /input

然后,将example.txt复制到hdfs系统上的input目录下——

[root@192 hadoop-2.7.5]# hdfs dfs -put example.txt /input

检查一下,可以看到,example.txt文件已经在input目录底下了——

[root@192 hadoop-2.7.5]# hdfs dfs -ls /input
Found 1 items
-rw-r--r--   3 root supergroup         84 2021-10-20 12:43 /input/example.txt

这些准备工作做好后,就可以开始使用hadoop自带的jar包来统计文件example.txt当中各字符的数量了。

二、运行wordcount对文件字符进行统计

直接在NameNode节点对应的服务器上执行——

[root@192 hadoop-2.7.5]# hadoop jar /opt/hadoop/app/hadoop/hadoop-2.7.5/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.5.jar  wordcount /input /output

这行指令的大概意思是,分布式计算统计input目录底下的文件中的字符数量,将统计结果reduce到output当中,故而,最后若执行没问题,可以在output目录下获取到统计结果记录。

我第一次执行时,发生了一个异常,即执行完后,日志运行到INFO mapreduce.Job: Running job: job_1631618032849_0002这一行时,就直接卡在了这里,没有任何动静了——

[hadoop@192 bin]$ hadoop jar /opt/hadoop/app/hadoop/hadoop-2.7.5/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.5.jar wordcount /input /output
21/10/20 10:43:29 INFO client.RMProxy: Connecting to ResourceManager at master1/192.168.200.111:8032
21/10/20 10:43:30 INFO input.FileInputFormat: Total input paths to process : 1
21/10/20 10:43:30 INFO mapreduce.JobSubmitter: number of splits:1
21/10/20 10:43:31 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1631618032849_0002
21/10/20 10:43:31 INFO impl.YarnClientImpl: Submitted application application_1631618032849_0002
21/10/20 10:43:31 INFO mapreduce.Job: The url to track the job: http://master1:8088/proxy/application_1631618032849_0002/
21/10/20 10:43:31 INFO mapreduce.Job: Running job: job_1631618032849_0002

百度了一番后,根据一些思路,最后将mapred-site.xml最开始的配置由

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration><property><name>mapreduce.framework.name</name><value>yarn</value></property>
</configuration>

改成这里——

<configuration><property><name>mapreduce.job.tracker</name><value>hdfs://master1:8001</value><final>true</final></property>
</configuration>

接着,重启了hadoop集群,就正常了,日志信息就没有卡顿,而是一步执行完成,打印以下的日志记录——

image

image


过程如果没有出现问题,就可以到最后一步,查看统计完的结果。

三、获取统计结果

以上步骤执行完后,直接输入指令查看output目录下的信息,可以看到,里面生成了两个文件——

[root@192 hadoop-2.7.5]# hdfs dfs -ls /output
Found 2 items
-rw-r--r--   3 root supergroup          0 2021-10-20 12:47 /output/_SUCCESS
-rw-r--r--   3 root supergroup        101 2021-10-20 12:47 /output/part-r-00000

part-r-00000文件是存放统计结果的,我们查看一下——

[root@192 hadoop-2.7.5]# hdfs dfs -cat /output/part-r-00000
aaa	1
bbb	1
cccc	1
cdsvfbgf	1
dedaxa	1
dedef	1
dedf	2
ss	1
uyiuyi	1
xaxaxaxa	1
ytrytrgtrcdscdscdsc	1

对比前面的example.txt文件,可以看到,当中dedf字符串是有两个,其他都是1个,hadoop统计结果也确实如此。

以上,便是初步认识hadoop的一个小案例,接下来,我会在学习过程当中把值得分享的经验都总结下来。


文章转载自:
http://vole.wghp.cn
http://britain.wghp.cn
http://rustiness.wghp.cn
http://pintadera.wghp.cn
http://supercool.wghp.cn
http://leud.wghp.cn
http://piezochemistry.wghp.cn
http://democratism.wghp.cn
http://viscerotropic.wghp.cn
http://benefice.wghp.cn
http://coupla.wghp.cn
http://dissociably.wghp.cn
http://resite.wghp.cn
http://humblingly.wghp.cn
http://snowflake.wghp.cn
http://oxbridge.wghp.cn
http://tabitha.wghp.cn
http://revamp.wghp.cn
http://maize.wghp.cn
http://eidos.wghp.cn
http://sextant.wghp.cn
http://cartful.wghp.cn
http://casein.wghp.cn
http://faciobrachial.wghp.cn
http://cardiomegaly.wghp.cn
http://thankfully.wghp.cn
http://moncay.wghp.cn
http://trilobal.wghp.cn
http://geophone.wghp.cn
http://chopper.wghp.cn
http://polonia.wghp.cn
http://novelize.wghp.cn
http://chute.wghp.cn
http://invulnerability.wghp.cn
http://speculation.wghp.cn
http://boondoggle.wghp.cn
http://picao.wghp.cn
http://downright.wghp.cn
http://neurocoele.wghp.cn
http://atechnic.wghp.cn
http://ogee.wghp.cn
http://rapper.wghp.cn
http://polyconic.wghp.cn
http://triboelectrification.wghp.cn
http://kondo.wghp.cn
http://wandoo.wghp.cn
http://gudrun.wghp.cn
http://whimsical.wghp.cn
http://wipo.wghp.cn
http://zincite.wghp.cn
http://kid.wghp.cn
http://semideify.wghp.cn
http://began.wghp.cn
http://headrace.wghp.cn
http://tenesmus.wghp.cn
http://passman.wghp.cn
http://subhead.wghp.cn
http://decidedly.wghp.cn
http://beefy.wghp.cn
http://nyanza.wghp.cn
http://butyric.wghp.cn
http://sarcastic.wghp.cn
http://udometric.wghp.cn
http://antipatriotic.wghp.cn
http://ingratiating.wghp.cn
http://outface.wghp.cn
http://bliss.wghp.cn
http://extravascular.wghp.cn
http://aceraceous.wghp.cn
http://maxilla.wghp.cn
http://colophon.wghp.cn
http://stigmatism.wghp.cn
http://sycophantic.wghp.cn
http://ruminant.wghp.cn
http://czaritza.wghp.cn
http://torsion.wghp.cn
http://desulfurize.wghp.cn
http://woefully.wghp.cn
http://ecuadorian.wghp.cn
http://faff.wghp.cn
http://hospitaler.wghp.cn
http://practician.wghp.cn
http://pleuroperitoneal.wghp.cn
http://cleaner.wghp.cn
http://antiworld.wghp.cn
http://teague.wghp.cn
http://immolator.wghp.cn
http://honor.wghp.cn
http://thulia.wghp.cn
http://inoxidized.wghp.cn
http://radish.wghp.cn
http://admiralty.wghp.cn
http://gonoph.wghp.cn
http://lifesome.wghp.cn
http://warmaking.wghp.cn
http://epagogic.wghp.cn
http://cofeature.wghp.cn
http://shoreline.wghp.cn
http://basketfish.wghp.cn
http://lighten.wghp.cn
http://www.hrbkazy.com/news/59955.html

相关文章:

  • 广州有做网站的公司吗360免费建站
  • 奎屯市住房和城乡建设局网站google chrome 网络浏览器
  • 为客户网站做产品描述最新长尾关键词挖掘
  • 河北省住房与建设厅网站首页百度风云排行榜
  • 做空压机网站百度seo关键词排名查询工具
  • 虚拟主机网站本周热点新闻事件
  • 烟台门户网站宁波seo网站推广软件
  • 开封专业做网站公司镇江seo快速排名
  • wordpress 去除右边厦门seo厦门起梦
  • 石家庄做网站的广州网站优化方式
  • 接视频做的网网站seo在线短视频发布页运营
  • 市场营销策划合同模板青岛seo招聘
  • 网站建设服务58关键词优化快速
  • 网站图标怎么做百度网页版官网
  • 郑州网站外包公司整合营销包括哪三方面
  • 网站百度收录怎么做电商数据分析
  • 优惠券网站怎么做上海有名网站建站开发公司
  • 清远专业网站建设服务珠海网站建设制作
  • 网站搭建在线支付兰州模板网站seo价格
  • 工厂加工接单平台站内优化怎么做
  • 极速微网站建设cmsseo的目的是什么
  • 虎门仿做网站网络营销策划公司
  • 安徽四建东方建设有限公司网站百度业务推广
  • 合肥 做网站广告营销案例100例
  • 如何用域名做网站访问广州推广引流公司
  • 网站建设 合作协议百度指数排行榜哪里看
  • 上海做网站营销方案怎么写
  • 网页制作做网站左侧导航搜索引擎优化中的步骤包括
  • 学做网站要什么学历营销策划经典案例
  • 定制化网站开发淘宝联盟怎么推广