Possible to poll JobTracker for information from any language?

2012-03-28 Thread Ryan Cole
Hello,

I'm interested in writing a library, to be used with Node.js, that can ask
the JobTracker for information about jobs. I see that this is possible
using the Java API, with the JobClient interface [1]. I also saw that on
the wiki, it mentions that clients can poll the JobTracker for information,
but does not go into detail [2]. Is it possible to get information about
jobs from the JobTracker using C, or C++, or Thrift, or something else?

Thanks,
Ryan


1.
http://hadoop.apache.org/common/docs/r1.0.1/mapred_tutorial.html#Job+Submission+and+Monitoring
2. http://wiki.apache.org/hadoop/JobTracker


Can't construct instance of class org.apache.hadoop.conf.Configuration

2012-04-30 Thread Ryan Cole
Hello,

I'm trying to run an application, written in C++, that uses libhdfs. I have
compiled the code and get an error when I attempt to run the application.
The error that I am getting is as follows: "Can't construct instance of
class org.apache.hadoop.conf.Configuration".

Initially, I was receiving an error saying that CLASSPATH was not set. That
was easy, so I set CLASSPATH to include the following three directories, in
this order:


   1. $HADOOP_HOME
   2. $HADOOP_HOME/lib
   3. $HADOOP_HOME/conf

The CLASSPATH not set error went away, and now I receive the error about
the Configuration class. I'm assuming that I do not have something on the
path that I need to, but everything I have read says to simply include
these three directories.

Does anybody have any idea what I might be missing? Full exception pasted
below.

Thanks,
Ryan

Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/hadoop/conf/Configuration
> Caused by: java.lang.ClassNotFoundException:
> org.apache.hadoop.conf.Configuration
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
> Can't construct instance of class org.apache.hadoop.conf.Configuration
> node: /home/ryan/.node-gyp/0.7.8/src/node_object_wrap.h:61: void
> node::ObjectWrap::Wrap(v8::Handle): Assertion
> `handle_.IsEmpty()' failed.
> Aborted (core dumped)


Re: Can't construct instance of class org.apache.hadoop.conf.Configuration

2012-04-30 Thread Ryan Cole
Brock,

Ah, thanks. I did not realize that you could do that. That sets the correct
CLASSPATH! Thanks.

Ryan

On Mon, Apr 30, 2012 at 10:22 AM, Brock Noland  wrote:

> Hi,
>
> I would try this:
>
> export CLASSPATH=$(hadoop classpath)
>
> Brock
>
> On Mon, Apr 30, 2012 at 10:15 AM, Ryan Cole  wrote:
> > Hello,
> >
> > I'm trying to run an application, written in C++, that uses libhdfs. I
> have
> > compiled the code and get an error when I attempt to run the application.
> > The error that I am getting is as follows: "Can't construct instance of
> > class org.apache.hadoop.conf.Configuration".
> >
> > Initially, I was receiving an error saying that CLASSPATH was not set.
> That
> > was easy, so I set CLASSPATH to include the following three directories,
> in
> > this order:
> >
> >
> >   1. $HADOOP_HOME
> >   2. $HADOOP_HOME/lib
> >   3. $HADOOP_HOME/conf
> >
> > The CLASSPATH not set error went away, and now I receive the error about
> > the Configuration class. I'm assuming that I do not have something on the
> > path that I need to, but everything I have read says to simply include
> > these three directories.
> >
> > Does anybody have any idea what I might be missing? Full exception pasted
> > below.
> >
> > Thanks,
> > Ryan
> >
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> >> org/apache/hadoop/conf/Configuration
> >> Caused by: java.lang.ClassNotFoundException:
> >> org.apache.hadoop.conf.Configuration
> >> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> >> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> >> at java.security.AccessController.doPrivileged(Native Method)
> >> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
> >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
> >> Can't construct instance of class org.apache.hadoop.conf.Configuration
> >> node: /home/ryan/.node-gyp/0.7.8/src/node_object_wrap.h:61: void
> >> node::ObjectWrap::Wrap(v8::Handle): Assertion
> >> `handle_.IsEmpty()' failed.
> >> Aborted (core dumped)
>
>
>
> --
> Apache MRUnit - Unit testing MapReduce -
> http://incubator.apache.org/mrunit/
>