如何使用scala编写wordcount程序-创新互联

本篇内容介绍了“如何使用scala编写wordcount程序”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于成都做网站、成都网站建设、成都外贸网站建设、西和网络推广、微信小程序开发、西和网络营销、西和企业策划、西和品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们大的嘉奖;创新互联公司为所有大学生创业者提供西和建站搭建服务,24小时服务热线:18982081108,官方网址:www.cdcxhl.com

直接上程序吧
一、公共类

  1.   4.0.0

  2.   testScala

  3.   testScala

  4.   1.0

  5.   2008

  6.   

  7.     2.11.8

  8.     2.6.0-cdh6.7.0

  9.     2.2.1

  10.     5.1.25

  11.   

  12.   

  13.     

  14.       scala-tools.org

  15.       Scala-Tools Maven2 Repository

  16.       http://scala-tools.org/repo-releases

  17.     

  18.     

  19.       cloudera

  20.       cloudera

  21.       https://repository.cloudera.com/artifactory/cloudera-repos/

  22.     

  23.   

  24.   

  25.     

  26.       scala-tools.org

  27.       Scala-Tools Maven2 Repository

  28.       http://scala-tools.org/repo-releases

  29.     

  30.   

  31.   

  32.     

  33.       org.apache.spark

  34.       spark-core_2.11

  35.       ${spark.version}

  36.     

  37.     

  38.       org.scala-lang

  39.       scala-library

  40.       ${scala.version}

  41.     

  42.     

  43.       junit

  44.       junit

  45.       4.4

  46.       test

  47.     

  48.     

  49.       org.specs

  50.       specs

  51.       1.2.5

  52.       test

  53.     

  54.     

  55.       org.apache.hadoop

  56.       hadoop-client

  57.       ${hadoop.version}

  58.     

  59.     

  60.       mysql

  61.       mysql-connector-java

  62.       ${mysql.version}

  63.     

  64.   

  65.   

  66.     src/main/scala

  67.     src/test/scala

  68.     

  69.       

  70.         org.scala-tools

  71.         maven-scala-plugin

  72.         

  73.           

  74.             

  75.               compile

  76.               testCompile

  77.             

  78.           

  79.         

  80.         

  81.           ${scala.version}

  82.           

  83.             -target:jvm-1.5

  84.           

  85.         

  86.       

  87.       

  88.         org.apache.maven.plugins

  89.         maven-eclipse-plugin

  90.         

  91.           true

  92.           

  93.             ch.epfl.lamp.sdt.core.scalabuilder

  94.           

  95.           

  96.             ch.epfl.lamp.sdt.core.scalanature

  97.           

  98.           

  99.             org.eclipse.jdt.launching.JRE_CONTAINER

  100.             ch.epfl.lamp.sdt.launching.SCALA_CONTAINER

  101.           

  102.         

  103.       

  104.     

  105.   

  106.   

  107.     

  108.       

  109.         org.scala-tools

  110.         maven-scala-plugin

  111.         

  112.           ${scala.version}

  113.         

  114.       

  115.     

  116.   

六、测试数据
hdfs dfs -ls /ruozedata/scala
Found 3 items
-rw-r--r--   3 hadoop supergroup         24 2018-02-12 14:48 /ruozedata/scala/201802121449-1.txt
-rw-r--r--   3 hadoop supergroup         12 2018-02-12 14:48 /ruozedata/scala/201802121449-2.txt
-rw-r--r--   3 hadoop supergroup         12 2018-02-12 14:48 /ruozedata/scala/201802121449-3.txt
-----------------------------------------------------------------------------------------------------------
hdfs dfs -cat /ruozedata/scala/201802121449-1.txt
hello   world
hello   worls

hdfs dfs -cat /ruozedata/scala/201802121449-2.txt
hello   ruoze

hdfs dfs -cat /ruozedata/scala/201802121449-3.txt
ruoze   hello

七、测试结果
如何使用scala编写wordcount程序

“如何使用scala编写wordcount程序”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联-成都网站建设公司网站,小编将为大家输出更多高质量的实用文章!


本文名称:如何使用scala编写wordcount程序-创新互联
网站网址:http://pwwzsj.com/article/deices.html