Chapter9-厦门大学-林子雨-大数据技术原理与应用-第九章-图计算(2016年5月4日版本)讲义.ppt
文本预览下载声明
Hama (单机)安装步骤如下: (1)安装好合适版本的JDK和Hadoop (2)从官网下载Hama安装文件,比如Hama 0.7.0版本 (3)下载文件后,运用下面命令 sudo tar -zxf ~/下载/hama-dist-0.7.0.tar.gz -C /usr/local 解压至 /usr/local/hama ,再运用下面命令 sudo mv ./hama-0.7.0/ ./hama 修改目录名称方便使用 (4)进入hama中的conf文件夹,修改hama-env.sh文件,在其中加入java的home路径,即加入: export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 9.8.2 安装Hama的基本过程 (5)修改?hama-site.xml文件,这是hama配置的核心文件,具体内容如下: 9.8.2 安装Hama的基本过程 configuration property namebsp.master.address/name valuelocal/value descriptionThe address of the bsp master server. Either the literal string local or a host:port for distributed mode /description /property property name/name valuelocal/value description The name of the default file system. Either the literal string local or a host:port for HDFS. /description /property 9.8.2 安装Hama的基本过程 property namehama.zookeeper.quorum/name valuelocalhost/value descriptionComma separated list of servers in the ZooKeeper Quorum. For example, ,,. By default this is set to localhost for local and pseudo-distributed modes of operation. For a fully-distributed setup, this should be set to a full list of ZooKeeper quorum servers. If HAMA_MANAGES_ZK is set in hama-env.sh this is the list of servers which we will start/stop zookeeper on. /description /property /configuration ? 9.8.3 运行Hama实例PageRank (1)生成 randomgraph,运行如下命令: ./bin/hama jar hama-examples-0.7.0.jar gen fastgen -v 100 -e 10 -o randomgraph -t 2 生成的文件位于 /usr/local/hama 下的 randomgraph。它表示100个节点,1000条边的数据,存储在两个文件中(part-00000,part-00001)。 9.8.3 运行Hama实例PageRank (2)执行pagerank ./bin/hama jar hama-examples-0.7.0.jar pagerank -i randomgraph -o pagerankresult -t 4 运行结果保存在pagerankresult文件中 单机模式下,数据读取都是在本地文件系统,不需要读取HDFS中的文件。 本章小结 本章内容介绍了图计算框架Pregel的相关知识。传统的图计算解决方案无法解决大型的图计算问题,包括Pregel在内的各种图计算框架脱颖而出。 Pregel并没有采用远程数据读取或者共享内存的方式,而是采用了纯消息传递模型,来实现不同顶点之间的信息交换。Pregel的计算过程是由一系列被称为“超步”的迭代
显示全部