方法1: 看日志。
方法2:
<property>
<name>mapred.child.java.opts</name>
<value>-Xmx1024m -Xdebug -Xrunjdwp:transport=dt_socket,address=8792,server=y,suspend=y</value>
</property>
<property>
<name>mapred.tasktracker.map.tasks.maximum</name>
<value>1</value>
</property>
<property>
<name>mapred.tasktracker.reduce.tasks.maximum</name>
<value>1</value>
</property>
GiraphX即使-w参数设为1, 仍然要运行两个map任务, 一个master,一个worker, worker负责注册和实际计算,master汇总数据。
修改后pagerank能够顺利运行,理论上说也应该能顺利调试,但是结果好像不行。 master 的map 任务和worker的map任务出现了Debug端口抢占现象。
方法3:
IsolationRunner
mapred-site.xml 增加:
<property>
<name>keep.failed.task.files</name>
<value>true</value>
</property>
<property>
<name>mapred.local.dir</name>
<value>/opt/hadoop-1.2.1/tmp/mapred</value>
</property>
到此目录:
/opt/hadoop-1.2.1/tmp/mapred/taskTracker/liuqiang2/jobcache/job_201603171716_0003/attempt_201603171716_0003_m_000001_0/work
执行:
[liuqiang2@mu02 work]$ hadoop org.apache.hadoop.mapred.IsolationRunner ../job.xml
Exception in thread "main" java.lang.NullPointerException
at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.ifExists(LocalDirAllocator.java:508)
at org.apache.hadoop.fs.LocalDirAllocator.ifExists(LocalDirAllocator.java:216)
at org.apache.hadoop.mapred.IsolationRunner.run(IsolationRunner.java:195)
at org.apache.hadoop.mapred.IsolationRunner.main(IsolationRunner.java:238)
发现是LocalDirAllocator中出现问题,于是增加一行代码:
public boolean ifExists(String pathStr,Configuration conf) {
AllocatorPerContext context = obtainContext(contextCfgItemName);
try {
context.confChanged(conf);
} catch (IOException e) {
e.printStackTrace();
}
return context.ifExists(pathStr, conf);
}
然后执行,发现没有包含giraph相关jar包,修改hadoop 脚本中的classpath, 见http://blog.csdn.net/cloudeagle_bupt/article/details/50916686
然后可以执行:
[liuqiang2@mu02 work]$ pwd
/opt/hadoop-1.2.1/tmp/mapred/taskTracker/liuqiang2/jobcache/job_201603171947_0001/attempt_201603171947_0001_m_000001_0/work
[liuqiang2@mu02 work]$ hadoop org.apache.hadoop.mapred.IsolationRunner ../job.xml
结果:
[liuqiang2@mu02 work]$ hadoop org.apache.hadoop.mapred.IsolationRunner ../job.xml
Listening for transport dt_socket at address: 8792
16/03/17 20:40:19 WARN bsp.BspOutputFormat: getOutputCommitter: Returning ImmutableOutputCommiter (does nothing).
16/03/17 20:40:19 INFO util.ProcessTree: setsid exited with exit code 0
16/03/17 20:40:19 INFO mapred.Task: Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@13b3625
16/03/17 20:40:19 INFO mapred.MapTask: Processing split: 'org.apache.giraph.bsp.BspInputSplit, index=-1, num=-1
16/03/17 20:40:19 INFO graph.GraphTaskManager: setup: Log level remains at info
16/03/17 20:40:19 INFO zk.ZooKeeperManager: createCandidateStamp: Made the directory _bsp/_defaultZkManagerDir/job_201603171947_0001
16/03/17 20:40:19 INFO zk.ZooKeeperManager: createCandidateStamp: Made the directory _bsp/_defaultZkManagerDir/job_201603171947_0001/_zkServer
16/03/17 20:40:19 INFO zk.ZooKeeperManager: createCandidateStamp: Creating my filestamp _bsp/_defaultZkManagerDir/job_201603171947_0001/_task/mu02 1
16/03/17 20:40:19 INFO zk.ZooKeeperManager: getZooKeeperServerList: For task 1, got file 'zkServerList_mu02 0 ' (polling period is 3000)
16/03/17 20:40:19 INFO zk.ZooKeeperManager: getZooKeeperServerList: Found [mu02, 0] 2 hosts in filename 'zkServerList_mu02 0 '
16/03/17 20:40:19 INFO zk.ZooKeeperManager: onlineZooKeeperServers: Got [mu02] 1 hosts from 1 ready servers when 1 required (polling period is 3000) on attempt 0
16/03/17 20:40:19 INFO graph.GraphTaskManager: setup: Starting up BspServiceWorker...
16/03/17 20:40:19 INFO bsp.BspService: BspService: Path to create to halt is /_hadoopBsp/job_201603171947_0001/_haltComputation
16/03/17 20:40:19 INFO bsp.BspService: BspService: Connecting to ZooKeeper with job job_201603171947_0001, 1 on mu02:22181
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:host.name=mu02
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:java.version=1.7.0_79
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:java.home=/home/liuqiang2/jdk/jdk1.7.0_79/jre
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:java.class.path=/opt/hadoop-1.2.1/libexec/../conf:/home/liu ............ 一堆jar包
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/opt/hadoop-1.2.1/libexec/../lib/native/Linux-amd64-64
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:os.version=2.6.32-279.el6.x86_64
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:user.name=liuqiang2
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:user.home=/home/liuqiang2
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Client environment:user.dir=/opt/hadoop-1.2.1/tmp/mapred/taskTracker/liuqiang2/jobcache/job_201603171947_0001/attempt_201603171947_0001_m_000001_0/work
16/03/17 20:40:19 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=mu02:22181 sessionTimeout=60000 watcher=org.apache.giraph.worker.BspServiceWorker@623cc34d
16/03/17 20:40:19 INFO zookeeper.ClientCnxn: Opening socket connection to server mu02/192.168.0.100:22181. Will not attempt to authenticate using SASL (unknown error)
16/03/17 20:40:19 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
16/03/17 20:40:20 INFO zookeeper.ClientCnxn: Opening socket connection to server mu02/192.168.0.100:22181. Will not attempt to authenticate using SASL (unknown error)
16/03/17 20:40:21 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
16/03/17 20:40:22 INFO zookeeper.ClientCnxn: Opening socket connection to server mu02/192.168.0.100:22181. Will not attempt to authenticate using SASL (unknown error)
16/03/17 20:40:22 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
16/03/17 20:40:23 INFO zookeeper.ClientCnxn: Opening socket connection to server mu02/192.168.0.100:22181. Will not attempt to authenticate using SASL (unknown error)
16/03/17 20:40:23 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
16/03/17 20:40:24 INFO zookeeper.ClientCnxn: Opening socket connection to server mu02/192.168.0.100:22181. Will not attempt to authenticate using SASL (unknown error)
16/03/17 20:40:24 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
这里由于map任务作为子进程需要进行zookeeper通信,但是由于只是跑一个单任务,因此没法继续运行,但是单任务测试的目的已达到。
分享到:
相关推荐
Giraph 是 Google 于 2010 年发布的论文 Pregel: a system for large-scale graph processing 的开源实现。Giraph 是以 Hadoop 为基础开发的上层应用,其系统架构和计算模型与 Pregel 保持了一致。同时也在 Pregel ...
Large-Scale Graph Processing Using Apache Giraph
长颈鹿不可变的图数据结构 安装 npm install -S giraphbower install -S giraph用法 require ( 'giraph' ) ( ) . add ( 'a' , { my : 'data' } ) . add ( 'b' ) . add ( 'c' ) . connect ( 'a' , 'b' , 3 ) . ...
Practical Graph Analytics with Apache Giraph helps you build data mining and machine learning applications using the Apache Foundation's Giraph framework for graph processing. This is the same ...
giraph-ADS 在 Giraph 上实施设施位置在 FacilityLocationADSWeighted.java 的第 41 行中更改 $k$(用于底部 k)的值使用的命令: hadoop dfs -rmr output_weighted_london_20;mvn compile -e;time hadoop jar ...
giraph-设施位置 在 Apache Giraph 中实现设施定位算法
giraph:阿帕奇吉拉夫的镜子
哪些命令以Apache Giraph编码打开参数文件并从中读取?
PhalguniGiraphLearn Giraph 中的大人物,分享我的代码以进一步讨论和学习。 我正在做输入格式为的简单图遍历算法[{"id":0,"name":"father","value":0},[{"id":1,"name":"father","value":1},{"id" :3,"name":...
Apress源代码 该存储库随附Roman Shaposhnik,Claudio Martella和Dionysios Logothetis的 (Apress,2015年)。 使用绿色按钮将文件下载为zip格式,或使用Git将存储库克隆到您的计算机上。 发行版 ...
ca giraph.numComputeThreads=$N_THREADS -ca giraph.numInputThreads=$N_THREADS -ca giraph.numOutputThreads=$N_THREADS -ca giraph.oneToAllMsgSending=true -ca giraph.userPartitionCount=$N_PARTITIONS -ca
Hadoop 2.0 生态系统第二章 数据库及数据管理Giraph1
自述文件该存储库保存了社会网络分析半课程的第二项任务的实施,这是硕士课程的一部分。 雅典经济贸易大学的数据科学博士学位。作业概述原始分配说明本身在此存储库中不可用; 但是,这是代码功能的概述。...
这个 BPR 的实现是用 Java 编写的,并在 Apache Giraph 中实现,Apache Giraph 是一个构建在 Apache Hadoop 之上的可扩展图形处理框架。 ####输入 TXT 文件,其中每一行表示为idI idU 阳性, 其中 idI 标识一个...
DMID 在信息系统亚琛工业大学(RWTH Aachen University)主席的学士论文“ Pregel:重叠社区检测算法的并行实现”中,实现了针对giraph的重叠社区检测算法DMID的实现。 ## SETUP在下面,我们将描述如何在Ubuntu 64位...
Mogwai 尝试抽象与任何的兼容 Graph 数据库(即 TitanDB、Neo4J、OrientDB、FoundationDB、Apache 的 Giraph 等)的交互。 大多数文档。 欢迎提出意见、建议和拉取请求。 推特: 安装 $ npm install mogwai 请...
You will learn how to take advantage of Hadoop ecosystem projects including Hive, HBase, Pig, Mahout, Nutch, and Giraph and be introduced to deploying in cloud environments. Finally, you will be ...
Hadoop的2.0版本的yarn的框架介绍啊 Hadoop yarnYARN 本身框架的优势是... 对于支持多计算模型,目前 YARN 理论是可以支持更多的计算模型的,如: MAP-REDUCE、 MPI、 Giraph、 Spark 等。目前 MAP-REDUCE 是默认支持的