Rob, Thanks, it was a simple mistake on my end.
On Mon, Dec 2, 2013 at 4:48 AM, Rob Vesse <[email protected]> wrote: > Kaushik > > This looks like a general Java reflection error and not necessarily > anything specific to Giraph. > > You haven't shown your code but from the stack trace I would guess that > either you don't have a public constructor or you have one but it is > expecting arguments. For Giraph (or any Java code) to be able to > instantiate a new instance of a class in this way there needs to be a > public constructor with no parameters available in the class. > > Rob > > From: Kaushik Patnaik <[email protected]> > Reply-To: <[email protected]> > Date: Sunday, 1 December 2013 23:25 > To: <[email protected]> > Subject: Unable to instantiate AdjacencyListTextVertexInputFormat > > Hi, > > I am trying to run a triangle counting computation which I have written and > have setup an input file in the adjacencylist format as > > 1 1 2 0.3 3 0.1 > > 2 1 2 0.7 6 0.9 > > ..... > > and provide the following command to run giraph > > $HADOOP_HOME/bin/hadoop jar > $GIRAPH_HOME/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-0.20.203.0-jar-with-dependencies.jar > org.apache.giraph.GiraphRunner org.apache.giraph.examples.TriangleCounting > -vif org.apache.giraph.io.formats.AdjacencyListTextVertexInputFormat -vip > /user/hduser1/input/{myfile} -vof > org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op > /user/hduser1/output/{myfile} -w 1 > > However I receive the following error (bold part) - > > 2013-12-01 18:11:41,926 INFO org.apache.hadoop.util.NativeCodeLoader: Loaded > the native-hadoop library > 2013-12-01 18:11:42,141 WARN > org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Source name ugi already > exists! > 2013-12-01 18:11:42,373 INFO org.apache.giraph.graph.GraphTaskManager: setup: > Log level remains at info > 2013-12-01 18:11:42,488 INFO org.apache.hadoop.mapred.TaskLogsTruncater: > Initializing logs' truncater with mapRetainSize=-1 and reduceRetainSize=-1 > 2013-12-01 18:11:42,527 INFO org.apache.hadoop.io.nativeio.NativeIO: > Initialized cache for UID to User mapping with a cache timeout of 14400 > seconds. > 2013-12-01 18:11:42,527 INFO org.apache.hadoop.io.nativeio.NativeIO: Got > UserName hduser1 for UID 1002 from the native implementation > 2013-12-01 18:11:42,532 WARN org.apache.hadoop.mapred.Child: Error running > child > java.lang.IllegalStateException: run: Caught an unrecoverable exception > newInstance: *Couldn't instantiate > org.apache.giraph.io.formats.AdjacencyListTextVertexInputFormat* > at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:101) > at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:763) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:369) > at org.apache.hadoop.mapred.Child$4.run(Child.java:259) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:415) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059) > at org.apache.hadoop.mapred.Child.main(Child.java:253) > Caused by: java.lang.IllegalStateException: newInstance: Couldn't instantiate > org.apache.giraph.io.formats.AdjacencyListTextVertexInputFormat > at > org.apache.giraph.utils.ReflectionUtils.newInstance(ReflectionUtils.java:105) > at > org.apache.giraph.conf.ImmutableClassesGiraphConfiguration.createVertexInputFormat(ImmutableClassesGiraphConfiguration.java:237) > at > org.apache.giraph.conf.ImmutableClassesGiraphConfiguration.createWrappedVertexInputFormat(ImmutableClassesGiraphConfiguration.java:248) > at > org.apache.giraph.graph.GraphTaskManager.checkInput(GraphTaskManager.java:170) > at > org.apache.giraph.graph.GraphTaskManager.setup(GraphTaskManager.java:193) > at org.apache.giraph.graph.GraphMapper.setup(GraphMapper.java:59) > at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:89) > ... 7 more > Caused by: java.lang.InstantiationException > at > sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48) > at java.lang.reflect.Constructor.newInstance(Constructor.java:526) > at java.lang.Class.newInstance(Class.java:374) > at > org.apache.giraph.utils.ReflectionUtils.newInstance(ReflectionUtils.java:103) > ... 13 more > 2013-12-01 18:11:42,540 INFO org.apache.hadoop.mapred.Task: Runnning cleanup > for the task > >
