props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,"org.apache.kafka.common.serialization.StringSerializer") props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG,"org.apache.kafka.common.serialization.StringSerializer")valproducer =newKafkaProducerString,String// Send some messageswhile(true) { (1to ...
创建文件夹:hadoop fs -mkdir /BD19 查看文件夹内容: hadoop fs -ls /BD19 上传数据:hadoop fs -put XXX.txt /BD19 大数据计算 计算pi 3.141592653…… hadoop jar /export/servers/hadoop-2.6.0-cdh5.14.0/share/hadoop/mapreduce/ hadoop-mapreduce-examples-2.6.0-cdh5.14.0.jar pi 10 100...
hadoop fs -put /etc/rc.d/init.d/functions wc-in hadoop jar /usr/local/hadoop/hadoop-examples-0.20.0-cdh3u5.jar wordcount wc-in wc-out 存储云:
为了便于系统测试,Hadoop提供了一个单词统计的应用程序算法样例,其位于Hadoop安装目录下${HADOOP_BASE}/share/hadoop/mapreduce/名称类似hadoop-examples-*.jar的文件中。除了单词统计,这个jar文件还包含了分布式运行的grep等功能的实现,这可以通过如下命令查看。 [hadoop@master ~]$ hadoop jar /usr/local/hadoop/shar...
创建文件夹:hadoop fs -mkdir /BD19 查看文件夹内容: hadoop fs -ls /BD19 上传数据:hadoop fs -put XXX.txt /BD19 大数据计算 计算pi 3.141592653…… hadoop jar /export/servers/hadoop-2.6.0-cdh5.14.0/share/hadoop/mapreduce/ hadoop-mapreduce-examples-2.6.0-cdh5.14.0.jar pi 10 100 背诵次数...