jena and giraph as dependency in maven project

2014-07-23 Thread Carmen Manzulli
Hi experts,
i would like to know how could i inser giraph 1.1.0 as dependency in a
maven project which need also jena dependency...

thanks and regards,
Carmen.


RE: Setting variable value in Compute class and using it in the next superstep

2014-07-23 Thread Sardeshmukh, Vivek
Hello again,


As Tom and Matthew suggested I wrote my own custom vertex value class and input 
format class. I followed Matthew's example to create my own custom vertex class 
but now I'm getting the following error while running the program


java.lang.IllegalStateException: newInstance: Illegal access 
org.apache.giraph.examples.DeltaVertexWritable
at 
org.apache.giraph.utils.ReflectionUtils.newInstance(ReflectionUtils.java:84)
at 
org.apache.giraph.utils.WritableUtils.createWritable(WritableUtils.java:68)
at 
org.apache.giraph.factories.DefaultVertexValueFactory.newInstance(DefaultVertexValueFactory.java:48)
at 
org.apache.giraph.conf.ImmutableClassesGiraphConfiguration.createVertexValue(ImmutableClassesGiraphConfiguration.java:729)
at 
org.apache.giraph.utils.VertexIterator.resetEmptyVertex(VertexIterator.java:69)
at org.apache.giraph.utils.VertexIterator.init(VertexIterator.java:60)
at 
org.apache.giraph.comm.requests.SendWorkerVerticesRequest.doRequest(SendWorkerVerticesRequest.java:108)
at 
org.apache.giraph.comm.netty.NettyWorkerClientRequestProcessor.doRequest(NettyWorkerClientRequestProcessor.java:466)
at 
org.apache.giraph.comm.netty.NettyWorkerClientRequestProcessor.flush(NettyWorkerClientRequestProcessor.java:412)
at 
org.apache.giraph.worker.InputSplitsCallable.call(InputSplitsCallable.java:241)
at 
org.apache.giraph.worker.InputSplitsCallable.call(InputSplitsCallable.java:60)
at 
org.apache.giraph.utils.LogStacktraceCallable.call(LogStacktraceCallable.java:51)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)





Here is my DeltaVertexWritable class - 
https://gist.github.com/sar-vivek/df09cca17cc3f6b5ac60


I tried digging a bit but I couldn't get any success [at the first place I even 
didn't understand the error message!]



Thank you.

Vivek

From: Sardeshmukh, Vivek vivek-sardeshm...@uiowa.edu
Sent: Monday, July 21, 2014 6:06 PM
To: user@giraph.apache.org
Subject: RE: Setting variable value in Compute class and using it in the next 
superstep


Thank you Matthew. Now writing a custom vertex class and input format seems 
doable! Thank you.



--
Vivek

From: Matthew Saltz sal...@gmail.com
Sent: Monday, July 21, 2014 5:50 PM
To: user@giraph.apache.org
Subject: Re: Setting variable value in Compute class and using it in the next 
superstep

Yeah, that's true. Sorry I forgot that part. Luckily, it isn't too tricky 
either, depending on the input format of your graph. Here's another 
examplehttps://gist.github.com/saltzm/ab7172c57dec927061be to get you 
started, for a very simple input format for edges with no values. I basically 
took the code straight from 
herehttp://giraph.apache.org/apidocs/org/apache/giraph/io/formats/LongLongNullTextInputFormat.html
 and modified where I needed to it to return the InputFormat that I needed for 
my code. You'll probably be better off digging through some of the already 
implemented InputFormat classes that come with Giraph to do something similar, 
since I'm guessing your input files will be different than mine. Take a look at 
the subclasses of 
TextVertexInputFormathttp://giraph.apache.org/apidocs/org/apache/giraph/io/formats/TextVertexInputFormat.html,
 since they deal with a lot of common input format styles, and see if you can 
modify their code to work with your custom vertex data format. Now, the example 
I give you is also easy because I just use the default constructor of the 
class, but if you need to load additional data from the file into your vertex 
data and the default constructor isn't appropriate, you may have to do some 
extra parsing and legwork for that.

Best of luck,
Matthew



On Tue, Jul 22, 2014 at 12:28 AM, Sardeshmukh, Vivek 
vivek-sardeshm...@uiowa.edumailto:vivek-sardeshm...@uiowa.edu wrote:

Thank you Matthew for the example link. It is helpful. I'll give it a shot.


If I have a custom vertex class isn't it necessary to change the 
VertexInputFormat class too? Since this class loads the data into the vertex 
and if vertex has a custom value field then it doesn't know how to load the 
input. Am I right?


Vivek

From: Schweiger, Tom thschwei...@ebay.commailto:thschwei...@ebay.com
Sent: Monday, July 21, 2014 5:16 PM
To: user@giraph.apache.orgmailto:user@giraph.apache.org
Subject: RE: Setting variable value in Compute class and using it in the next 
superstep


For more than one flag, a custom class is necessary (unless you're able to, 
say, toggle the sign bit to get double usage out or a value).

I've started a private thread with Vivek to get a better understanding of what 
he was trying to solve.

And you are also correct that there isn't much to 

Zookeeper server null error when running giraph

2014-07-23 Thread Jing Fan
Hi,

When I run giraph, I always have following error message and the task will
fail

14/07/23 23:10:21 INFO zookeeper.ClientCnxn: Opening socket connection
to server localhost/127.0.0.1:22181. Will not attempt to authenticate
using SASL (unknown error)
14/07/23 23:10:21 WARN zookeeper.ClientCnxn: Session 0x1476505b6cd0009
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)


Does anyone know the reason and how to solve it?


Thanks!


Re: Zookeeper server null error when running giraph

2014-07-23 Thread Jing Fan
Hi Vivek,

Giraph comes wtih Zookeeper itself so I didn't install it separately. I run
the same program several times. Sometimes it can succeed but most of the
time it will come with the Zookeeper null error.

Thanks.


On Wed, Jul 23, 2014 at 4:35 PM, Sardeshmukh, Vivek 
vivek-sardeshm...@uiowa.edu wrote:

  Hi Jing,


  Did you install Zookeeper? Is it running? If yes, then on which port?
 I'm not sure whether it is necessary to install Zookeeper separately
 but it's not that complicated to install so installed it and I didn't had
 any problem.


  To install zookeeper :

 wget --no-check-certificate
 http://apache.mesi.com.ar/zookeeper/zookeeper-3.4.5/zookeeper-3.4.5.tar.gz


  tar zxvf zookeeper-3.4.5.tar.gz

 cd zookeeper-3.4.5

 mv conf/zoo_sample.cfg conf/zoo.cfg

 sudo bin/zkServer.sh start


  And when running a giraph job specify the zookeeper port-
 -Dgiraph.zkList=hostname where u installed zookeeper:2181



 Vivek
   --
 *From:* Jing Fan fanjin...@gmail.com
 *Sent:* Wednesday, July 23, 2014 4:14 PM
 *To:* user@giraph.apache.org
 *Subject:* Zookeeper server null error when running giraph

  Hi,

  When I run giraph, I always have following error message and the task
 will fail

  14/07/23 23:10:21 INFO zookeeper.ClientCnxn: Opening socket connection to 
 server localhost/127.0.0.1:22181. Will not attempt to authenticate using SASL 
 (unknown error)
 14/07/23 23:10:21 WARN zookeeper.ClientCnxn: Session 0x1476505b6cd0009 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)


 Does anyone know the reason and how to solve it?


 Thanks!