Vikram: Once you have a unit test for RequestVO (in the context of your coprocessor), you should be able to step into readFields() using a debugger.
FYI On Wed, May 28, 2014 at 3:46 AM, Vikram Singh Chandel < [email protected]> wrote: > Hi > > Following is my VO class > > public class RequestVO implements Writable { > > private Text name; > > public RequestVO(Configuration conf) { > > } > > public void setName(Text name) { > this.name = name; > } > > public Text getName() { > return name; > } > > @Override > public void readFields(DataInput in) throws IOException { > > name.readFields(in); > > } > > @Override > public void write(DataOutput out) throws IOException { > > name.write(out); > } > > } > > even tried passing the Writable to my coprocessor and later type cast it to > get the value out of. > > > > On Wed, May 28, 2014 at 2:00 PM, Anoop John <[email protected]> wrote: > > > Reading the code fully I think we are handling the case of custom VO > > objects which are Writables. Just have to make sure correctly implement > > the write() and readFields() methods. > > > > > > Your VO class is having a constructor with one arg (with type > > org.apache.hadoop.conf.Configuration )?? I think might not be there. > > Add one and test and let us know the result. Good luck. > > > > > > -Anoop- > > > > On Tue, May 27, 2014 at 11:57 PM, Vikram Singh Chandel < > > [email protected]> wrote: > > > > > Hi Vladimir > > > No as of now i didn't have junit for it.will do it first thing in the > > > morning > > > > > > Anoop > > > > > > Thanks for the suggestions will look into that class and will get back > to > > > you. > > > Is passing Params to Coprocessor so complex i thought at least that > would > > > be easy out of all :D > > > > > > > > > On Tue, May 27, 2014 at 11:41 PM, Anoop John <[email protected]> > > > wrote: > > > > > > > I have not done doing some thing like this. But I think making the > VO > > > as > > > > writable is not enough. > > > > You have to add the new VO class entry into HbaseObjectWritable. > (Yes > > u > > > > have to touch the hbase code) > > > > You can see that all the Writable classes, which client send to > server, > > > is > > > > added into this class Maps. > > > > We have *CODE_TO_CLASS and **CLASS_TO_CODE Mappings here in > > > > *HbaseObjectWritable. > > > > Just try reading this class. > > > > > > > > -Anoop- > > > > > > > > On Tue, May 27, 2014 at 11:23 PM, Vladimir Rodionov < > > > > [email protected] > > > > > wrote: > > > > > > > > > Make sure that your Writable implementation code is correct. Do you > > > have > > > > > any unit tests for your Writable implementation? > > > > > > > > > > Best regards, > > > > > Vladimir Rodionov > > > > > Principal Platform Engineer > > > > > Carrier IQ, www.carrieriq.com > > > > > e-mail: [email protected] > > > > > > > > > > ________________________________________ > > > > > From: Vikram Singh Chandel [[email protected]] > > > > > Sent: Tuesday, May 27, 2014 10:46 AM > > > > > To: [email protected] > > > > > Subject: Re: How to pass a POJO as a parameter to Coprocessor > Getting > > > > > Exception Error in Read Fields > > > > > > > > > > Hi Ted > > > > > > > > > > Yes you were right > > > > > The CDH version is 4.5 and HBase version is 0.94.6 > > > > > > > > > > Tom > > > > > > > > > > full stack trace of log as (displayed on console) is > > > > > > > > > > at > > > > > java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252) > > > > > at java.util.concurrent.FutureTask.get(FutureTask.java:111) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processExecs(HConnectionManager.java:1501) > > > > > at > > > > > > > org.apache.hadoop.hbase.client.HTable.coprocessorExec(HTable.java:1294) > > > > > at > > > > > > > org.apache.hadoop.hbase.client.HTable.coprocessorExec(HTable.java:1274) > > > > > * at com.thomsonreuters.hbase.**ScanAllEnpoint.main(* > > > > > *ScanAllEnpoint.java:30) -- Client class (calling CoProcessorExec > > > method > > > > > here)* > > > > > > > > > > > > > > > > > > > > Tue May 27 12:04:05 UTC 2014, > > > > > org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@1c459fc2, > > > > > java.io.IOException: > > > > > IPC server unable to read call parameters: Error in readFields > > > > > > > > > > > > > > > *This repeats for 10 Times* > > > > > > > > > > > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.client.ServerCallable.withRetries(ServerCallable.java:186) > > > > > at > > > > > > > > > org.apache.hadoop.hbase.ipc.ExecRPCInvoker.invoke(ExecRPCInvoker.java:79) > > > > > at com.sun.proxy.$Proxy8.getResults(Unknown Source) > > > > > * at com.thomsonreuters.hbase.**ScanAllEnpoint$1.call(* > > > > > *ScanAllEnpoint.java:35) -- Client Class* > > > > > * at com.thomsonreuters.hbase.**ScanAllEnpoint$1.call(* > > > > > *ScanAllEnpoint.java:1) -- Client Class* > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$4.call(HConnectionManager.java:1489) > > > > > at > > > > > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > > > > > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > > > > > 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:722) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, May 27, 2014 at 10:45 PM, Tom Brown <[email protected]> > > > > wrote: > > > > > > > > > > > Sorry, accidentally hit send... I meant to suggest this: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://stackoverflow.com/questions/20257356/hbase-client-scan-could-not-initialize-org-apache-hadoop-hbase-util-classes/ > > > > > > > > > > > > --Tom > > > > > > > > > > > > > > > > > > On Tue, May 27, 2014 at 11:14 AM, Tom Brown < > [email protected]> > > > > > wrote: > > > > > > > > > > > > > Can you check your server logs for a full stack trace? This > > sounds > > > > like > > > > > > it > > > > > > > could be similar to this: > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, May 27, 2014 at 10:15 AM, Ted Yu <[email protected]> > > > > wrote: > > > > > > > > > > > > > >> Can you confirm the version of HBase ? > > > > > > >> > > > > > > >> To my knowledge, cdh5 is based on 0.96 > > > > > > >> > > > > > > >> Cheers > > > > > > >> > > > > > > >> > > > > > > >> On Tue, May 27, 2014 at 1:36 AM, Vikram Singh Chandel < > > > > > > >> [email protected]> wrote: > > > > > > >> > > > > > > >> > Hi > > > > > > >> > > > > > > > >> > I am trying to pass a POJO (RequestVO say) having a single > > > member > > > > > > >> variable > > > > > > >> > i.e > > > > > > >> > *Text Name; *to coprocessorExec method. > > > > > > >> > > > > > > > >> > This VO implements writable > > > > > > >> > > > > > > > >> > But getting following exception > > > > > > >> > > > > > > > >> > org.apache.hadoop.hbase.client.RetriesExhaustedException: > > Failed > > > > > after > > > > > > >> > attempts=10, > > > > > > >> > > > > > > > >> > *exceptions:* > > > > > > >> > Tue May 27 13:42:41 IST 2014, > > > > > > >> > *org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@1506a1e, > > > > > > >> > java.io.IOException: IPC server unable to read call > > parameters: > > > > > Error > > > > > > in > > > > > > >> > readFields * > > > > > > >> > > > > > > > >> > *HBase v :* 0.94.6 Cloudera (CDH 5 Distribution) > > > > > > >> > *Hadoop :* 2.2.0 > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > >> > -- > > > > > > >> > *Regards* > > > > > > >> > > > > > > > >> > *VIKRAM SINGH CHANDEL* > > > > > > >> > > > > > > > >> > Please do not print this email unless it is absolutely > > > > > > necessary,Reduce. > > > > > > >> > Reuse. Recycle. Save our planet. > > > > > > >> > > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > *Regards* > > > > > > > > > > *VIKRAM SINGH CHANDEL* > > > > > > > > > > Please do not print this email unless it is absolutely > > > necessary,Reduce. > > > > > Reuse. Recycle. Save our planet. > > > > > > > > > > Confidentiality Notice: The information contained in this message, > > > > > including any attachments hereto, may be confidential and is > intended > > > to > > > > be > > > > > read only by the individual or entity to whom this message is > > > addressed. > > > > If > > > > > the reader of this message is not the intended recipient or an > agent > > or > > > > > designee of the intended recipient, please note that any review, > use, > > > > > disclosure or distribution of this message or its attachments, in > any > > > > form, > > > > > is strictly prohibited. If you have received this message in > error, > > > > please > > > > > immediately notify the sender and/or [email protected] > > > > > delete or destroy any copy of this message and its attachments. > > > > > > > > > > > > > > > > > > > > > -- > > > *Regards* > > > > > > *VIKRAM SINGH CHANDEL* > > > > > > Please do not print this email unless it is absolutely > necessary,Reduce. > > > Reuse. Recycle. Save our planet. > > > > > > > > > -- > *Regards* > > *VIKRAM SINGH CHANDEL* > > Please do not print this email unless it is absolutely necessary,Reduce. > Reuse. Recycle. Save our planet. >
