cassandra - Hadoop jar submission error java.lang.InstantiationException -


i'm trying run jar on hadoop filesystem getting exception see image

exception stacktrace

my code running if run eclipse.

here runner main class

    public class readcassandra extends configured implements tool{          public static void main(string args[]){             try{                 /*toolrunner.run(new configuration(),new readcassandra(), args);                 system.exit(0);*/                  string keyspace ="read_log";                 string clg ="readvalidpost";                 string rowkey="117761667160131";                 list<bytebuffer> cn = new arraylist<bytebuffer>();                 list<string> cl = new arraylist<string>();                 cl.addall(myhector.getcolumn(rowkey));                 (string string : cl) {                     bytebuffer bf = bytebufferutil.bytes(string);                     cn.add(bf);                 }                 configuration conf = new configuration();                 job job = new job(conf,"mejfsd");                 //job.setjarbyclass(readcassandra.class);                  job.setinputformatclass(abstractcolumnfamilyinputformat.class);                 job.setoutputformatclass(textoutputformat.class);                  job.setoutputkeyclass(text.class);                 job.setoutputvalueclass(text.class);                  job.setmapperclass(mymapper.class);                 job.setreducerclass(myreducer.class);                  confighelper.setinputrpcport(job.getconfiguration(), "9160");                 confighelper.setinputinitialaddress(job.getconfiguration(), "127.0.0.1");                 confighelper.setinputpartitioner(job.getconfiguration(), "org.apache.cassandra.dht.murmur3partitioner");                 confighelper.setinputcolumnfamily(job.getconfiguration(), keyspace, clg);                  slicepredicate predicate = new slicepredicate().setcolumn_names(cn);                 confighelper.setinputslicepredicate(job.getconfiguration(), predicate);                  filesystem.get(job.getconfiguration()).delete(new path("output"), true);                 fileoutputformat.setoutputpath(job, new path("output"));                 job.waitforcompletion(true);              }catch(exception e){                 e.printstacktrace();             }         }          public int run(string[] arg0) throws exception {               return (1);         }       } 

i'm running using command

hadoop jar /home/winoria/documents/jarfiles/readcas.jar readcassandra 

you setting input format class abstract class:

 job.setinputformatclass(abstractcolumnfamilyinputformat.class); 

you need set instantiate-able. don't know cassandra-hadoop integration , makes sense in case. make sure not abstract class.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -