`
文章列表
hdfs   HA  实验 hdfs 第一次 机器准备 ,机器配合 hostname,ip       作为namenode 的机器 到其他的机器要有 ssh 权限 1、 start zk cluster 主 :      2、 ./hdfs journalnode  这个会启动所有配置的 journalnode ,执行机 要有到 其他 机器的 ssh 的权限      用于存放 namenode 的 内容 3、hdfs zkfc -formatZK   4、hdfs namenode -format 主  start main namenode  ser ...
filecopy #!/bin/bash if [ $# -lt 2 ]; then     echo "error.. need args"     exit 1 fi host=$1 filefullpath=$2 var=${host//,/ }    #这里是将var中的,替换为空格  for element in $var   do      echo scp $filefullpath   192.168.0.$element://$filefullpath    scp $filefullpath   192.168.0.$element: ...
ssh 免密码 不工作的问题 别人不能自动登录进来,先检查 ,自己能不能登录自己 一般可能是  文件权限的问题    64  ssh-keygen  -t  rsa    65  ls    66  cat authorized_keys    67  ssh-keygen -t rsa -P '' -f id_rsa    68  cat id_rsa.pub >> authorized_keys    69  ssh localhost    70  chown admin: /home/admin/.ssh    71  chown admin: /home/admin ...
docker config ip   with pipework 想搭个实验集群,又没有机器, vm 太重 ,用了 docker .需要给机器 加入固定ip docker run -t -i --net=none   --name m1  centos:v2 pipework docker0  m1  172.17.2.1/16@255.255.0.0 如果: docker: Error response from daemon: Conflict. The name "/m1" is already in use by container cd6594028 ...
/** Summary of the functionality in the property graph */ class Graph[VD, ED] {   // Information about the Graph ===================================================================   val numEdges: Long   val numVertices: Long   val inDegrees: VertexRDD[Int]   val outDegrees: VertexRDD[Int]   val degr ...
以后 为了操作的便利性, 把逻辑都包装成  udf ,udaf .   写一个  包装接口, 对一份数据的操作  , 直接 在 repl   给 hdfs 加上 meta  desc 在 repl  直接   写  sql .   出来的结果,直接拿 save .   可以积累 业务逻辑。 重用 import org.apache.spark.sql.{Row, SparkSession} import org.apache.spark.sql.expressions.{MutableAggregationBuffer, UserDefinedAggregateFunctio ...
数据挖掘中,基本所有算法需求数据都是    二维 double    1  如果是 二变量    一个变 0   一个 变 1 2  其他的 以 index: dimentionvalue  来编码,  每个维度中,每种value用 用一个维度表示     //将train_cat_rdd中的(特征ID:特征)去重,并进行编号 var oheMap = train_cat_rdd.flatMap(x => x).distinct().zipWithIndex().collectAsMap() //oheMap: scala.collection.Map ...
      spark streaming 在 start 之后 ,我想改变计算规则,系统报告不能修改. 异常如下   Exception in thread "Thread-14" java.lang.IllegalStateException: Adding new inputs, transformations, and output operations after starting a context is not supported at org.a ...

ggplot2 setup

    博客分类:
  • R
also installing the dependencies ‘stringi’, ‘magrittr’, ‘colorspace’, ‘Rcpp’, ‘stringr’, ‘RColorBrewer’, ‘dichromat’, ‘munsell’, ‘labeling’, ‘digest’, ‘gtable’, ‘plyr’, ‘reshape2’, ‘scales’

install R

    博客分类:
  • R
    发现 R 3.0.2 不支持  ggplot2 ,  ubuntu 默认的有时  3.0.2 ,  只能下载 src  编译   参考网址:http://blog.itpub.net/21711990/viewspace-1114418/ http://blog.sina.com.cn/s/blog_8353c4e90102vp1j.html    
   dataframe         scala> teenagersDF res14: org.apache.spark.sql.DataFrame = [name: string, age: bigint]     scala> teenagersDF. !=                        flatMap             repartition             ##                        foreach             rollup                  +         ...
RDD   -》 DF   有两种方式 一、   一、Inferring the Schema Using Reflection   将 RDD[t]   转为一个 object ,然后 to df   val peopleDF = spark.sparkContext .textFile("examples/src/main/resources/people.txt") .map(_.split(",")) .map(attributes => Person(attributes(0), attributes ...

Spark 都干啥

1. 腾讯 广点通是最早使用Spark的应用之一。腾讯大数据精准推荐借助Spark快速迭代的优势,围绕“数据+算法+系统”这套技术方案,实现了在“数据实时采集、算法实时训练、系统实时预测”的全流程实时并行高维算法,最终成 ...
结论  我还是学学   yarn-server     单个作业 yarn-clinet 的吧     交互     之前的mr 模型   1\ client 会执行inputformat 的getsplit ,write 成文件,然后提交job 包含资源(jar ,conf,..) 2\ yarn 的RM 接手,分配AM 3\ AM 接受,找RM 要资源 找NODENAMAGER 要 container 搞起。。。。。   spark 1.1 版本中    都是怎么样的   submit -->分析rdd -> 生成DAG--》 master 上运行-- ...
拷贝文档 备用理解   图2显示了Spark程序的运行场景。它由客户端启动,分两个阶段:第一阶段记录变换算子序列、增量构建DAG图;第二阶段由行动算子触 发,DAGScheduler把DAG图转化为作业及其任务集。Spark支持本地单节点运行(开发调试有用)或集群运行。对于后者,客户端运行于 master节点上,通过Cluster manager把划分好分区的任务集发送到集群的worker/slave节点上执行。   Spark 传统上与Mesos“焦不离孟”,也可支持Amazon EC2和YARN。底层任务调度器的基类是个trait,它的不同实现可以混入实际的执行。例如,在Meso ...
Global site tag (gtag.js) - Google Analytics