`
bit1129
  • 浏览: 1051523 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
Spark Streaming UI这块是本篇额外的内容,与主题无关,只是把它记录下来 Spark Streaming UI上一组统计数字的含义   Streaming Started at: 1433563238275(Spark Streaming开始运行的时间) Time since start: 3 minutes 51 seconds(Spark Streaming已经运行了多长时间) Network receivers: 2(Receiver个数) Batch interval: 1 second(每个Batch的时间间隔,即接收多长时间 ...
  以如下代码为例(SocketInputDStream): Spark Streaming从Socket读取数据的代码是在SocketReceiver的receive方法中,撇开异常情况不谈(Receiver有重连机制,restart方法,默认情况下在Receiver挂了之后,间隔两秒钟重新建立Socket连接),读取到的数据通过调用store(textRead)方法进行存储。数据的流转需要关注如下几个问题: 1. 数据存储到什么位置了 2. 数据存储的结构如何? 3. 数据什么时候被读取 4. 读取到的数据(batch interval)如何转换为RDD   1. Soc ...
在分析源代码之前,首先对Standalone Cluster Mode的资源调度有一个基本的认识: 首先,运行一个Application需要Driver进程和一组Executor进程。在Standalone Cluster Mode下,Driver和Executor都是在Master的监护下给Worker发消息创建(Driver进程和Executor进程都需要分配内存和CPU,这就需要Master进行资源的调度)。 另外,在为Application的Executor进程s分配CPU内核时,需要考虑CPU内核是尽可能的分散到所有的Worker上分配,还是尽可能在尽量少的Worker上分配,这 ...
1. aggregateByKey的运行机制   /** * Aggregate the values of each key, using given combine functions and a neutral "zero value". * This function can return a different result type, U, than the type of the values in this RDD, * V. Thus, we need one operation for merging a V into a ...
1. combineByKey函数的运行机制   RDD提供了很多针对元素类型为(K,V)的API,这些API封装在PairRDDFunctions类中,通过Scala隐式转换使用。这些API实现上是借助于combineByKey实现的。combineByKey函数本身也是RDD开放给Spark开发人员使用的API之一   首先看一下combineByKey的方法说明:   /** * Generic function to combine the elements for each key using a custom set of aggregation * f ...
1. 不解压的前提下,列出jar包中包含的内容,比如class等   jar tf jar文件路径    

【Java命令三】jps

    博客分类:
  • Java
jps很简单,用于显示当前运行的Java进程,也可以连接到远程服务器去查看   [hadoop@hadoop bin]$ jps -help usage: jps [-help] jps [-q] [-mlvV] [<hostid>] Definitions: <hostid>: <hostname>[:<port>]   用法举例: 1. jps [hadoop@hadoop bin]$ jps 3489 Jps 1819 Master 1988 Worker    2. jp ...
   1. 只有Map任务的Map Reduce Job File System Counters FILE: Number of bytes read=3629530 FILE: Number of bytes written=98312 FILE: Number of read operations=0 FILE: Number of large read operations=0 FILE: Number of write operations=0 HDFS: Number of bytes read=8570654 HDFS: Num ...
#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version ...
1. mahout seqdirectory   $ mahout seqdirectory --input (-i) input Path to job input directory(原始文本文件). --output (-o) output The directory pathname for output.(<Text,Text>Sequence File) -ow     功能: 将原始文本数据集转换为< Text, Text > S ...
1.Mahout环境搭建  1.下载Mahout http://mirror.bit.edu.cn/apache/mahout/0.10.0/mahout-distribution-0.10.0.tar.gz    2.解压Mahout  3. 配置环境变量 vim /etc/profile export HADOOP_HOME=/home/hadoop/software/hadoop-2.5.2 export PATH=$HADOOP_HOME/bin:$PATH export MAHOUT_HOME=/home/hadoop/software/mahout-di ...
1. hadoop-daemon.sh 1.1 启动HDFS ./hadoop-daemon.sh start namenode ./hadoop-daemon.sh start datanode  通过这种逐步启动的方式,比start-all.sh方式少了一个SecondaryNameNode进程,这不影响Hadoop的使用,其实在 Hadoop2.0中,SecondaryNameNode的功能被NameNode HA(Standby NameNode取代)可以通过查看日志/home/hadoop/software/hadoop-2.5.2/logs/hadoop-hadoop-d ...
1. 网站日志实时分析工具 GoAccess http://www.vpsee.com/2014/02/a-real-time-web-log-analyzer-goaccess/ 2. 通过日志监控并收集 Java 应用程序性能数据(Perf4J) http://www.ibm.com/developerworks/cn/java/j-lo-logforperf/ 3.log.io 和其他的监控工具一样,log.io 也采用服务器-客户端的模式。log.io 由两部分组成:server 和 harvester, server 运行在机器 A(服务器)上监视和纪录其他机器发来的日志 ...
在Spark Shell上,通过创建HiveContext可以直接进行Hive操作   1. 操作Hive中已存在的表   [hadoop@hadoop bin]$ ./spark-shell Spark assembly has been built with Hive, including Datanucleus jars on classpath Welcome to ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /___/ .__/\_, ...
spark-sql是Spark bin目录下的一个可执行脚本,它的目的是通过这个脚本执行Hive的命令,即原来通过 hive>输入的指令可以通过spark-sql>输入的指令来完成。 spark-sql可以使用内置的Hive metadata-store,也可以使用已经独立安装的Hive的metadata store   关于Hive build into Spark 1. Spark SQL can be built with or without Apache Hive, the Hadoop SQL engine. Spark SQL with Hive su ...
Global site tag (gtag.js) - Google Analytics