|
Bryan Baugher
2013-02-20, 22:05
Ted Yu
2013-02-20, 23:32
Viral Bajaria
2013-02-20, 23:42
Ted Yu
2013-02-21, 00:29
Bryan Baugher
2013-02-21, 01:58
Ted Yu
2013-02-21, 02:48
Bryan Baugher
2013-02-21, 03:46
Ted Yu
2013-02-21, 04:16
Bryan Baugher
2013-02-21, 04:38
lars hofhansl
2013-02-21, 04:54
Bryan Baugher
2013-02-21, 05:09
Ted Yu
2013-02-21, 05:13
lars hofhansl
2013-02-21, 06:13
Bryan Baugher
2013-02-21, 13:06
Ted Yu
2013-02-21, 18:27
|
-
Custom HBase Filter : Error in readFieldsBryan Baugher 2013-02-20, 22:05
Hi everyone,
I am trying to write my own custom Filter but I have been having issues. When there is only 1 region in my table the scan works as expected but when there is more, it attempts to create a new version of my filter and deserialize the information again but the data seems to be gone. I am running HBase 0.92.1-cdh4.1.1. 2013-02-20 15:39:53,220 DEBUG com.cerner.kepler.filters.RowRangeFilter: Reading fields 2013-02-20 15:40:08,612 WARN org.apache.hadoop.hbase.util.Sleeper: We slept 15346ms instead of 3000ms, this is likely due to a long garbage collecting pause and it's usually bad, see http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired 2013-02-20 15:40:09,142 ERROR org.apache.hadoop.hbase.io.HbaseObjectWritable: Error in readFields java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) at java.io.DataInputStream.readFully(DataInputStream.java:178) at java.io.DataInputStream.readFully(DataInputStream.java:152) at com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) at org.apache.hadoop.hbase.client.Scan.readFields(Scan.java:548) at org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:652) at org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) at org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) at org.apache.hadoop.hbase.ipc.HBaseServer$Connection.readAndProcess(HBaseServer.java:1183) at org.apache.hadoop.hbase.ipc.HBaseServer$Listener.doRead(HBaseServer.java:719) at org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.doRunLoop(HBaseServer.java:511) at org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.run(HBaseServer.java:486) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) 2013-02-20 15:40:17,498 WARN org.apache.hadoop.ipc.HBaseServer: Unable to read call parameters for client *** java.io.IOException: Error in readFields at org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:655) at org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) at org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) at org.apache.hadoop.hbase.ipc.HBaseServer$Connection.readAndProcess(HBaseServer.java:1183) at org.apache.hadoop.hbase.ipc.HBaseServer$Listener.doRead(HBaseServer.java:719) at org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.doRunLoop(HBaseServer.java:511) at org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.run(HBaseServer.java:486) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) at java.io.DataInputStream.readFully(DataInputStream.java:178) at java.io.DataInputStream.readFully(DataInputStream.java:152) at com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) at org.apache.hadoop.hbase.client.Scan.readFields(Scan.java:548) at org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:652) ... 9 more -Bryan
-
Re: Custom HBase Filter : Error in readFieldsTed Yu 2013-02-20, 23:32
If you show us the code for RowRangeFilter, that would help us troubleshoot.
Cheers On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I am trying to write my own custom Filter but I have been having issues. > When there is only 1 region in my table the scan works as expected but when > there is more, it attempts to create a new version of my filter and > deserialize the information again but the data seems to be gone. I am > running HBase 0.92.1-cdh4.1.1. > > 2013-02-20 15:39:53,220 DEBUG com.cerner.kepler.filters.RowRangeFilter: > Reading fields > 2013-02-20 15:40:08,612 WARN org.apache.hadoop.hbase.util.Sleeper: We slept > 15346ms instead of 3000ms, this is likely due to a long garbage collecting > pause and it's usually bad, see > http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired > 2013-02-20 15:40:09,142 ERROR > org.apache.hadoop.hbase.io.HbaseObjectWritable: Error in readFields > java.lang.ArrayIndexOutOfBoundsException > at java.lang.System.arraycopy(Native Method) > at java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) > at java.io.DataInputStream.readFully(DataInputStream.java:178) > at java.io.DataInputStream.readFully(DataInputStream.java:152) > at > > com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) > at org.apache.hadoop.hbase.client.Scan.readFields(Scan.java:548) > at > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:652) > at > org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) > at > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) > at > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.readAndProcess(HBaseServer.java:1183) > at > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener.doRead(HBaseServer.java:719) > at > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.doRunLoop(HBaseServer.java:511) > at > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.run(HBaseServer.java:486) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > 2013-02-20 15:40:17,498 WARN org.apache.hadoop.ipc.HBaseServer: Unable to > read call parameters for client *** > java.io.IOException: Error in readFields > at > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:655) > at > org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) > at > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) > at > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.readAndProcess(HBaseServer.java:1183) > at > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener.doRead(HBaseServer.java:719) > at > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.doRunLoop(HBaseServer.java:511) > at > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.run(HBaseServer.java:486) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > Caused by: java.lang.ArrayIndexOutOfBoundsException > at java.lang.System.arraycopy(Native Method) > at java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) > at java.io.DataInputStream.readFully(DataInputStream.java:178) > at java.io.DataInputStream.readFully(DataInputStream.java:152) > at > > com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) > at org.apache.hadoop.hbase.client.Scan.readFields(Scan.java:548)
-
Re: Custom HBase Filter : Error in readFieldsViral Bajaria 2013-02-20, 23:42
Also the readFields is your implementation of how to read the byte array
transferred from the client. So I think there has to be some issue in how you write the byte array to the network and what you are reading out of that i.e. the size of arrays might not be identical. But as Ted mentioned, looking at the code will help troubleshoot it better. On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > If you show us the code for RowRangeFilter, that would help us > troubleshoot. > > Cheers > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > > I am trying to write my own custom Filter but I have been having issues. > > When there is only 1 region in my table the scan works as expected but > when > > there is more, it attempts to create a new version of my filter and > > deserialize the information again but the data seems to be gone. I am > > running HBase 0.92.1-cdh4.1.1. > > > > 2013-02-20 15:39:53,220 DEBUG com.cerner.kepler.filters.RowRangeFilter: > > Reading fields > > 2013-02-20 15:40:08,612 WARN org.apache.hadoop.hbase.util.Sleeper: We > slept > > 15346ms instead of 3000ms, this is likely due to a long garbage > collecting > > pause and it's usually bad, see > > http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired > > 2013-02-20 15:40:09,142 ERROR > > org.apache.hadoop.hbase.io.HbaseObjectWritable: Error in readFields > > java.lang.ArrayIndexOutOfBoundsException > > at java.lang.System.arraycopy(Native Method) > > at > java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) > > at java.io.DataInputStream.readFully(DataInputStream.java:178) > > at java.io.DataInputStream.readFully(DataInputStream.java:152) > > at > > > > > com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) > > at org.apache.hadoop.hbase.client.Scan.readFields(Scan.java:548) > > at > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:652) > > at > > org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) > > at > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) > > at > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.readAndProcess(HBaseServer.java:1183) > > at > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener.doRead(HBaseServer.java:719) > > at > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.doRunLoop(HBaseServer.java:511) > > at > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.run(HBaseServer.java:486) > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > at java.lang.Thread.run(Thread.java:662) > > 2013-02-20 15:40:17,498 WARN org.apache.hadoop.ipc.HBaseServer: Unable to > > read call parameters for client *** > > java.io.IOException: Error in readFields > > at > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:655) > > at > > org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) > > at > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) > > at > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.readAndProcess(HBaseServer.java:1183) > > at > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener.doRead(HBaseServer.java:719) > > at > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.doRunLoop(HBaseServer.java:511) > > at > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.run(HBaseServer.java:486) > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > at > > > >
-
Re: Custom HBase Filter : Error in readFieldsTed Yu 2013-02-21, 00:29
Bryan:
Looks like you may have missed adding unit test for your filter. Unit test should have caught this situation much earlier. Cheers On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria <[EMAIL PROTECTED]>wrote: > Also the readFields is your implementation of how to read the byte array > transferred from the client. So I think there has to be some issue in how > you write the byte array to the network and what you are reading out of > that i.e. the size of arrays might not be identical. > > But as Ted mentioned, looking at the code will help troubleshoot it better. > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > If you show us the code for RowRangeFilter, that would help us > > troubleshoot. > > > > Cheers > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > > > > > Hi everyone, > > > > > > I am trying to write my own custom Filter but I have been having > issues. > > > When there is only 1 region in my table the scan works as expected but > > when > > > there is more, it attempts to create a new version of my filter and > > > deserialize the information again but the data seems to be gone. I am > > > running HBase 0.92.1-cdh4.1.1. > > > > > > 2013-02-20 15:39:53,220 DEBUG com.cerner.kepler.filters.RowRangeFilter: > > > Reading fields > > > 2013-02-20 15:40:08,612 WARN org.apache.hadoop.hbase.util.Sleeper: We > > slept > > > 15346ms instead of 3000ms, this is likely due to a long garbage > > collecting > > > pause and it's usually bad, see > > > http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired > > > 2013-02-20 15:40:09,142 ERROR > > > org.apache.hadoop.hbase.io.HbaseObjectWritable: Error in readFields > > > java.lang.ArrayIndexOutOfBoundsException > > > at java.lang.System.arraycopy(Native Method) > > > at > > java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) > > > at java.io.DataInputStream.readFully(DataInputStream.java:178) > > > at java.io.DataInputStream.readFully(DataInputStream.java:152) > > > at > > > > > > > > > com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) > > > at > org.apache.hadoop.hbase.client.Scan.readFields(Scan.java:548) > > > at > > > > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:652) > > > at > > > org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) > > > at > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) > > > at > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.readAndProcess(HBaseServer.java:1183) > > > at > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener.doRead(HBaseServer.java:719) > > > at > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.doRunLoop(HBaseServer.java:511) > > > at > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.run(HBaseServer.java:486) > > > at > > > > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > > at > > > > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > > at java.lang.Thread.run(Thread.java:662) > > > 2013-02-20 15:40:17,498 WARN org.apache.hadoop.ipc.HBaseServer: Unable > to > > > read call parameters for client *** > > > java.io.IOException: Error in readFields > > > at > > > > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:655) > > > at > > > org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) > > > at > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) > > > at > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.readAndProcess(HBaseServer.java:1183) > > > at
-
Re: Custom HBase Filter : Error in readFieldsBryan Baugher 2013-02-21, 01:58
Here[1] is the code for the filter.
-Bryan [1] - http://pastebin.com/5Qjas88z > Bryan: > Looks like you may have missed adding unit test for your filter. > > Unit test should have caught this situation much earlier. > > Cheers > > On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria <[EMAIL PROTECTED] >wrote: > > > Also the readFields is your implementation of how to read the byte array > > transferred from the client. So I think there has to be some issue in how > > you write the byte array to the network and what you are reading out of > > that i.e. the size of arrays might not be identical. > > > > But as Ted mentioned, looking at the code will help troubleshoot it better. > > > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > > > If you show us the code for RowRangeFilter, that would help us > > > troubleshoot. > > > > > > Cheers > > > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > > > > > > > Hi everyone, > > > > > > > > I am trying to write my own custom Filter but I have been having > > issues. > > > > When there is only 1 region in my table the scan works as expected but > > > when > > > > there is more, it attempts to create a new version of my filter and > > > > deserialize the information again but the data seems to be gone. I am > > > > running HBase 0.92.1-cdh4.1.1. > > > > > > > > 2013-02-20 15:39:53,220 DEBUG com.cerner.kepler.filters.RowRangeFilter: > > > > Reading fields > > > > 2013-02-20 15:40:08,612 WARN org.apache.hadoop.hbase.util.Sleeper: We > > > slept > > > > 15346ms instead of 3000ms, this is likely due to a long garbage > > > collecting > > > > pause and it's usually bad, see > > > > http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired > > > > 2013-02-20 15:40:09,142 ERROR > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable: Error in readFields > > > > java.lang.ArrayIndexOutOfBoundsException > > > > at java.lang.System.arraycopy(Native Method) > > > > at > > > java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) > > > > at java.io.DataInputStream.readFully(DataInputStream.java:178) > > > > at java.io.DataInputStream.readFully(DataInputStream.java:152) > > > > at > > > > > > > > > > > > > com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) > > > > at > > org.apache.hadoop.hbase.client.Scan.readFields(Scan.java:548) > > > > at > > > > > > > > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:652) > > > > at > > > > org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) > > > > at > > > > > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) > > > > at > > > > > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.readAndProcess(HBaseServer.java:1183) > > > > at > > > > > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener.doRead(HBaseServer.java:719) > > > > at > > > > > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.doRunLoop(HBaseServer.java:511) > > > > at > > > > > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.run(HBaseServer.java:486) > > > > at > > > > > > > > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > > > at > > > > > > > > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > > > at java.lang.Thread.run(Thread.java:662) > > > > 2013-02-20 15:40:17,498 WARN org.apache.hadoop.ipc.HBaseServer: Unable > > to > > > > read call parameters for client *** > > > > java.io.IOException: Error in readFields > > > > at > > > > > > > > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:655) > > > > at > > > > org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) org.apache.hadoop.hbase.ipc.HBaseServer$Connection.readAndProcess(HBaseServer.java:1183) org.apache.hadoop.hbase.ipc.HBaseServer$Listener.doRead(HBaseServer.java:719) org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.doRunLoop(HBaseServer.java:511) org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.run(HBaseServer.java:486) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.io.DataInputStream.readFully(DataInputStream.java:178) java.io.DataInputStream.readFully(DataInputStream.java:152) com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:652)
-
Re: Custom HBase Filter : Error in readFieldsTed Yu 2013-02-21, 02:48
Can you use code similar to the following for serialization ?
public void readFields(DataInput in) throws IOException { this.prefix = Bytes.readByteArray(in); } See src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java Thanks On Wed, Feb 20, 2013 at 5:58 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > Here[1] is the code for the filter. > > -Bryan > > [1] - http://pastebin.com/5Qjas88z > > > Bryan: > > Looks like you may have missed adding unit test for your filter. > > > > Unit test should have caught this situation much earlier. > > > > Cheers > > > > On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria <[EMAIL PROTECTED] > >wrote: > > > > > Also the readFields is your implementation of how to read the byte > array > > > transferred from the client. So I think there has to be some issue in > how > > > you write the byte array to the network and what you are reading out of > > > that i.e. the size of arrays might not be identical. > > > > > > But as Ted mentioned, looking at the code will help troubleshoot it > better. > > > > > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > > > > > If you show us the code for RowRangeFilter, that would help us > > > > troubleshoot. > > > > > > > > Cheers > > > > > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher <[EMAIL PROTECTED]> > wrote: > > > > > > > > > Hi everyone, > > > > > > > > > > I am trying to write my own custom Filter but I have been having > > > issues. > > > > > When there is only 1 region in my table the scan works as expected > but > > > > when > > > > > there is more, it attempts to create a new version of my filter and > > > > > deserialize the information again but the data seems to be gone. I > am > > > > > running HBase 0.92.1-cdh4.1.1. > > > > > > > > > > 2013-02-20 15:39:53,220 DEBUG > com.cerner.kepler.filters.RowRangeFilter: > > > > > Reading fields > > > > > 2013-02-20 15:40:08,612 WARN org.apache.hadoop.hbase.util.Sleeper: > We > > > > slept > > > > > 15346ms instead of 3000ms, this is likely due to a long garbage > > > > collecting > > > > > pause and it's usually bad, see > > > > > http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired > > > > > 2013-02-20 15:40:09,142 ERROR > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable: Error in readFields > > > > > java.lang.ArrayIndexOutOfBoundsException > > > > > at java.lang.System.arraycopy(Native Method) > > > > > at > > > > java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) > > > > > at > java.io.DataInputStream.readFully(DataInputStream.java:178) > > > > > at > java.io.DataInputStream.readFully(DataInputStream.java:152) > > > > > at > > > > > > > > > > > > > > > > > > > com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) > > > > > at > > > org.apache.hadoop.hbase.client.Scan.readFields(Scan.java:548) > > > > > at > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:652) > > > > > at > > > > > > org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) > > > > > at > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) > > > > > at > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.readAndProcess(HBaseServer.java:1183) > > > > > at > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener.doRead(HBaseServer.java:719) > > > > > at > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.doRunLoop(HBaseServer.java:511) > > > > > at > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Listener$Reader.run(HBaseServer.java:486) > > > > > at > > > > > > > > > > > > > > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-
Re: Custom HBase Filter : Error in readFieldsBryan Baugher 2013-02-21, 03:46
I updated my code to use the Bytes class for serialization and added more
log messages. I see this[1] now. It is able to create the filter the first time but when it gets to the second region (on the same region server) it attempts to create the filter again but the data read in from readFields seems corrupted. [1] - http://pastebin.com/TqNsUVSk On Wed, Feb 20, 2013 at 8:48 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > Can you use code similar to the following for serialization ? > public void readFields(DataInput in) throws IOException { > this.prefix = Bytes.readByteArray(in); > } > > See src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java > > Thanks > > On Wed, Feb 20, 2013 at 5:58 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > > > Here[1] is the code for the filter. > > > > -Bryan > > > > [1] - http://pastebin.com/5Qjas88z > > > > > Bryan: > > > Looks like you may have missed adding unit test for your filter. > > > > > > Unit test should have caught this situation much earlier. > > > > > > Cheers > > > > > > On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria < > [EMAIL PROTECTED] > > >wrote: > > > > > > > Also the readFields is your implementation of how to read the byte > > array > > > > transferred from the client. So I think there has to be some issue in > > how > > > > you write the byte array to the network and what you are reading out > of > > > > that i.e. the size of arrays might not be identical. > > > > > > > > But as Ted mentioned, looking at the code will help troubleshoot it > > better. > > > > > > > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > > > > > > > If you show us the code for RowRangeFilter, that would help us > > > > > troubleshoot. > > > > > > > > > > Cheers > > > > > > > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher <[EMAIL PROTECTED]> > > wrote: > > > > > > > > > > > Hi everyone, > > > > > > > > > > > > I am trying to write my own custom Filter but I have been having > > > > issues. > > > > > > When there is only 1 region in my table the scan works as > expected > > but > > > > > when > > > > > > there is more, it attempts to create a new version of my filter > and > > > > > > deserialize the information again but the data seems to be gone. > I > > am > > > > > > running HBase 0.92.1-cdh4.1.1. > > > > > > > > > > > > 2013-02-20 15:39:53,220 DEBUG > > com.cerner.kepler.filters.RowRangeFilter: > > > > > > Reading fields > > > > > > 2013-02-20 15:40:08,612 WARN > org.apache.hadoop.hbase.util.Sleeper: > > We > > > > > slept > > > > > > 15346ms instead of 3000ms, this is likely due to a long garbage > > > > > collecting > > > > > > pause and it's usually bad, see > > > > > > http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired > > > > > > 2013-02-20 15:40:09,142 ERROR > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable: Error in > readFields > > > > > > java.lang.ArrayIndexOutOfBoundsException > > > > > > at java.lang.System.arraycopy(Native Method) > > > > > > at > > > > > java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) > > > > > > at > > java.io.DataInputStream.readFully(DataInputStream.java:178) > > > > > > at > > java.io.DataInputStream.readFully(DataInputStream.java:152) > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) > > > > > > at > > > > org.apache.hadoop.hbase.client.Scan.readFields(Scan.java:548) > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:652) > > > > > > at > > > > > > > > org.apache.hadoop.hbase.ipc.Invocation.readFields(Invocation.java:125) > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Connection.processData(HBaseServer.java:1254) > > > > > > at > > > > > > > > > > > > -Bryan
-
Re: Custom HBase Filter : Error in readFieldsTed Yu 2013-02-21, 04:16
Can you show us your updated code ?
Thanks On Wed, Feb 20, 2013 at 7:46 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > I updated my code to use the Bytes class for serialization and added more > log messages. I see this[1] now. It is able to create the filter the first > time but when it gets to the second region (on the same region server) it > attempts to create the filter again but the data read in from readFields > seems corrupted. > > [1] - http://pastebin.com/TqNsUVSk > > > On Wed, Feb 20, 2013 at 8:48 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > Can you use code similar to the following for serialization ? > > public void readFields(DataInput in) throws IOException { > > this.prefix = Bytes.readByteArray(in); > > } > > > > See src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java > > > > Thanks > > > > On Wed, Feb 20, 2013 at 5:58 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > > > > > Here[1] is the code for the filter. > > > > > > -Bryan > > > > > > [1] - http://pastebin.com/5Qjas88z > > > > > > > Bryan: > > > > Looks like you may have missed adding unit test for your filter. > > > > > > > > Unit test should have caught this situation much earlier. > > > > > > > > Cheers > > > > > > > > On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria < > > [EMAIL PROTECTED] > > > >wrote: > > > > > > > > > Also the readFields is your implementation of how to read the byte > > > array > > > > > transferred from the client. So I think there has to be some issue > in > > > how > > > > > you write the byte array to the network and what you are reading > out > > of > > > > > that i.e. the size of arrays might not be identical. > > > > > > > > > > But as Ted mentioned, looking at the code will help troubleshoot it > > > better. > > > > > > > > > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > If you show us the code for RowRangeFilter, that would help us > > > > > > troubleshoot. > > > > > > > > > > > > Cheers > > > > > > > > > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher <[EMAIL PROTECTED] > > > > > wrote: > > > > > > > > > > > > > Hi everyone, > > > > > > > > > > > > > > I am trying to write my own custom Filter but I have been > having > > > > > issues. > > > > > > > When there is only 1 region in my table the scan works as > > expected > > > but > > > > > > when > > > > > > > there is more, it attempts to create a new version of my filter > > and > > > > > > > deserialize the information again but the data seems to be > gone. > > I > > > am > > > > > > > running HBase 0.92.1-cdh4.1.1. > > > > > > > > > > > > > > 2013-02-20 15:39:53,220 DEBUG > > > com.cerner.kepler.filters.RowRangeFilter: > > > > > > > Reading fields > > > > > > > 2013-02-20 15:40:08,612 WARN > > org.apache.hadoop.hbase.util.Sleeper: > > > We > > > > > > slept > > > > > > > 15346ms instead of 3000ms, this is likely due to a long garbage > > > > > > collecting > > > > > > > pause and it's usually bad, see > > > > > > > http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired > > > > > > > 2013-02-20 15:40:09,142 ERROR > > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable: Error in > > readFields > > > > > > > java.lang.ArrayIndexOutOfBoundsException > > > > > > > at java.lang.System.arraycopy(Native Method) > > > > > > > at > > > > > > java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) > > > > > > > at > > > java.io.DataInputStream.readFully(DataInputStream.java:178) > > > > > > > at > > > java.io.DataInputStream.readFully(DataInputStream.java:152) > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) > > > > > > > at > > > > > org.apache.hadoop.hbase.client.Scan.readFields(Scan.java:548) > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:652)
-
Re: Custom HBase Filter : Error in readFieldsBryan Baugher 2013-02-21, 04:38
Sure, http://pastebin.com/jeXUqhsP
On Wed, Feb 20, 2013 at 10:16 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > Can you show us your updated code ? > > Thanks > > On Wed, Feb 20, 2013 at 7:46 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > > > I updated my code to use the Bytes class for serialization and added more > > log messages. I see this[1] now. It is able to create the filter the > first > > time but when it gets to the second region (on the same region server) it > > attempts to create the filter again but the data read in from readFields > > seems corrupted. > > > > [1] - http://pastebin.com/TqNsUVSk > > > > > > On Wed, Feb 20, 2013 at 8:48 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > > > Can you use code similar to the following for serialization ? > > > public void readFields(DataInput in) throws IOException { > > > this.prefix = Bytes.readByteArray(in); > > > } > > > > > > See src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java > > > > > > Thanks > > > > > > On Wed, Feb 20, 2013 at 5:58 PM, Bryan Baugher <[EMAIL PROTECTED]> > wrote: > > > > > > > Here[1] is the code for the filter. > > > > > > > > -Bryan > > > > > > > > [1] - http://pastebin.com/5Qjas88z > > > > > > > > > Bryan: > > > > > Looks like you may have missed adding unit test for your filter. > > > > > > > > > > Unit test should have caught this situation much earlier. > > > > > > > > > > Cheers > > > > > > > > > > On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria < > > > [EMAIL PROTECTED] > > > > >wrote: > > > > > > > > > > > Also the readFields is your implementation of how to read the > byte > > > > array > > > > > > transferred from the client. So I think there has to be some > issue > > in > > > > how > > > > > > you write the byte array to the network and what you are reading > > out > > > of > > > > > > that i.e. the size of arrays might not be identical. > > > > > > > > > > > > But as Ted mentioned, looking at the code will help troubleshoot > it > > > > better. > > > > > > > > > > > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> > > wrote: > > > > > > > > > > > > > If you show us the code for RowRangeFilter, that would help us > > > > > > > troubleshoot. > > > > > > > > > > > > > > Cheers > > > > > > > > > > > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher < > [EMAIL PROTECTED] > > > > > > > wrote: > > > > > > > > > > > > > > > Hi everyone, > > > > > > > > > > > > > > > > I am trying to write my own custom Filter but I have been > > having > > > > > > issues. > > > > > > > > When there is only 1 region in my table the scan works as > > > expected > > > > but > > > > > > > when > > > > > > > > there is more, it attempts to create a new version of my > filter > > > and > > > > > > > > deserialize the information again but the data seems to be > > gone. > > > I > > > > am > > > > > > > > running HBase 0.92.1-cdh4.1.1. > > > > > > > > > > > > > > > > 2013-02-20 15:39:53,220 DEBUG > > > > com.cerner.kepler.filters.RowRangeFilter: > > > > > > > > Reading fields > > > > > > > > 2013-02-20 15:40:08,612 WARN > > > org.apache.hadoop.hbase.util.Sleeper: > > > > We > > > > > > > slept > > > > > > > > 15346ms instead of 3000ms, this is likely due to a long > garbage > > > > > > > collecting > > > > > > > > pause and it's usually bad, see > > > > > > > > > http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired > > > > > > > > 2013-02-20 15:40:09,142 ERROR > > > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable: Error in > > > readFields > > > > > > > > java.lang.ArrayIndexOutOfBoundsException > > > > > > > > at java.lang.System.arraycopy(Native Method) > > > > > > > > at > > > > > > > > java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) > > > > > > > > at > > > > java.io.DataInputStream.readFully(DataInputStream.java:178) > > > > > > > > at > > > > java.io.DataInputStream.readFully(DataInputStream.java:152) > > > > > > > > at > > > > > > > > > > > > > -Bryan
-
Re: Custom HBase Filter : Error in readFieldslars hofhansl 2013-02-21, 04:54
You probably want your write() to be idempotent. Currently it will exhaust the iterator and not reset it.
(Just guessing, though) ________________________________ From: Bryan Baugher <[EMAIL PROTECTED]> To: user <[EMAIL PROTECTED]> Sent: Wednesday, February 20, 2013 7:46 PM Subject: Re: Custom HBase Filter : Error in readFields I updated my code to use the Bytes class for serialization and added more log messages. I see this[1] now. It is able to create the filter the first time but when it gets to the second region (on the same region server) it attempts to create the filter again but the data read in from readFields seems corrupted. [1] - http://pastebin.com/TqNsUVSk On Wed, Feb 20, 2013 at 8:48 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > Can you use code similar to the following for serialization ? > public void readFields(DataInput in) throws IOException { > this.prefix = Bytes.readByteArray(in); > } > > See src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java > > Thanks > > On Wed, Feb 20, 2013 at 5:58 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > > > Here[1] is the code for the filter. > > > > -Bryan > > > > [1] - http://pastebin.com/5Qjas88z > > > > > Bryan: > > > Looks like you may have missed adding unit test for your filter. > > > > > > Unit test should have caught this situation much earlier. > > > > > > Cheers > > > > > > On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria < > [EMAIL PROTECTED] > > >wrote: > > > > > > > Also the readFields is your implementation of how to read the byte > > array > > > > transferred from the client. So I think there has to be some issue in > > how > > > > you write the byte array to the network and what you are reading out > of > > > > that i.e. the size of arrays might not be identical. > > > > > > > > But as Ted mentioned, looking at the code will help troubleshoot it > > better. > > > > > > > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > > > > > > > If you show us the code for RowRangeFilter, that would help us > > > > > troubleshoot. > > > > > > > > > > Cheers > > > > > > > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher <[EMAIL PROTECTED]> > > wrote: > > > > > > > > > > > Hi everyone, > > > > > > > > > > > > I am trying to write my own custom Filter but I have been having > > > > issues. > > > > > > When there is only 1 region in my table the scan works as > expected > > but > > > > > when > > > > > > there is more, it attempts to create a new version of my filter > and > > > > > > deserialize the information again but the data seems to be gone. > I > > am > > > > > > running HBase 0.92.1-cdh4.1.1. > > > > > > > > > > > > 2013-02-20 15:39:53,220 DEBUG > > com.cerner.kepler.filters.RowRangeFilter: > > > > > > Reading fields > > > > > > 2013-02-20 15:40:08,612 WARN > org.apache.hadoop.hbase.util.Sleeper: > > We > > > > > slept > > > > > > 15346ms instead of 3000ms, this is likely due to a long garbage > > > > > collecting > > > > > > pause and it's usually bad, see > > > > > > http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired > > > > > > 2013-02-20 15:40:09,142 ERROR > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable: Error in > readFields > > > > > > java.lang.ArrayIndexOutOfBoundsException > > > > > > at java.lang.System.arraycopy(Native Method) > > > > > > at > > > > > java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) > > > > > > at > > java.io.DataInputStream.readFully(DataInputStream.java:178) > > > > > > at > > java.io.DataInputStream.readFully(DataInputStream.java:152) > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > com.cerner.kepler.filters.RowRangeFilter.readFields(RowRangeFilter.java:226) > > > > > > at > > > > org.apache.hadoop.hbase.client.Scan.readFields(Scan.java:548) > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:652) -Bryan
-
Re: Custom HBase Filter : Error in readFieldsBryan Baugher 2013-02-21, 05:09
Ugh, yes you are correct. This fixed my issue. Thank you all for your help.
On Wed, Feb 20, 2013 at 10:54 PM, lars hofhansl <[EMAIL PROTECTED]> wrote: > You probably want your write() to be idempotent. Currently it will exhaust > the iterator and not reset it. > (Just guessing, though) > > > > ________________________________ > From: Bryan Baugher <[EMAIL PROTECTED]> > To: user <[EMAIL PROTECTED]> > Sent: Wednesday, February 20, 2013 7:46 PM > Subject: Re: Custom HBase Filter : Error in readFields > > I updated my code to use the Bytes class for serialization and added more > log messages. I see this[1] now. It is able to create the filter the first > time but when it gets to the second region (on the same region server) it > attempts to create the filter again but the data read in from readFields > seems corrupted. > > [1] - http://pastebin.com/TqNsUVSk > > > On Wed, Feb 20, 2013 at 8:48 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > Can you use code similar to the following for serialization ? > > public void readFields(DataInput in) throws IOException { > > this.prefix = Bytes.readByteArray(in); > > } > > > > See src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java > > > > Thanks > > > > On Wed, Feb 20, 2013 at 5:58 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > > > > > Here[1] is the code for the filter. > > > > > > -Bryan > > > > > > [1] - http://pastebin.com/5Qjas88z > > > > > > > Bryan: > > > > Looks like you may have missed adding unit test for your filter. > > > > > > > > Unit test should have caught this situation much earlier. > > > > > > > > Cheers > > > > > > > > On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria < > > [EMAIL PROTECTED] > > > >wrote: > > > > > > > > > Also the readFields is your implementation of how to read the byte > > > array > > > > > transferred from the client. So I think there has to be some issue > in > > > how > > > > > you write the byte array to the network and what you are reading > out > > of > > > > > that i.e. the size of arrays might not be identical. > > > > > > > > > > But as Ted mentioned, looking at the code will help troubleshoot it > > > better. > > > > > > > > > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > If you show us the code for RowRangeFilter, that would help us > > > > > > troubleshoot. > > > > > > > > > > > > Cheers > > > > > > > > > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher <[EMAIL PROTECTED] > > > > > wrote: > > > > > > > > > > > > > Hi everyone, > > > > > > > > > > > > > > I am trying to write my own custom Filter but I have been > having > > > > > issues. > > > > > > > When there is only 1 region in my table the scan works as > > expected > > > but > > > > > > when > > > > > > > there is more, it attempts to create a new version of my filter > > and > > > > > > > deserialize the information again but the data seems to be > gone. > > I > > > am > > > > > > > running HBase 0.92.1-cdh4.1.1. > > > > > > > > > > > > > > 2013-02-20 15:39:53,220 DEBUG > > > com.cerner.kepler.filters.RowRangeFilter: > > > > > > > Reading fields > > > > > > > 2013-02-20 15:40:08,612 WARN > > org.apache.hadoop.hbase.util.Sleeper: > > > We > > > > > > slept > > > > > > > 15346ms instead of 3000ms, this is likely due to a long garbage > > > > > > collecting > > > > > > > pause and it's usually bad, see > > > > > > > http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired > > > > > > > 2013-02-20 15:40:09,142 ERROR > > > > > > > org.apache.hadoop.hbase.io.HbaseObjectWritable: Error in > > readFields > > > > > > > java.lang.ArrayIndexOutOfBoundsException > > > > > > > at java.lang.System.arraycopy(Native Method) > > > > > > > at > > > > > > java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:174) > > > > > > > at > > > java.io.DataInputStream.readFully(DataInputStream.java:178) > > > > > > > at > > > java.io.DataInputStream.readFully(DataInputStream.java:152) > > > > > > > at -Bryan
-
Re: Custom HBase Filter : Error in readFieldsTed Yu 2013-02-21, 05:13
Bryan:
Please add unit test for your filter. This would easily catch regression in case you modify the filter in future. You can refer to examples coming with 0.94 source: tyu$ find src/test -name 'Test*Filter*.java' src/test/java/org/apache/hadoop/hbase/client/TestTimestampsFilter.java src/test/java/org/apache/hadoop/hbase/filter/TestColumnCountGetFilter.java src/test/java/org/apache/hadoop/hbase/filter/TestColumnPaginationFilter.java src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java ... Cheers On Wed, Feb 20, 2013 at 9:09 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > Ugh, yes you are correct. This fixed my issue. Thank you all for your help. > > > On Wed, Feb 20, 2013 at 10:54 PM, lars hofhansl <[EMAIL PROTECTED]> wrote: > > > You probably want your write() to be idempotent. Currently it will > exhaust > > the iterator and not reset it. > > (Just guessing, though) > > > > > > > > ________________________________ > > From: Bryan Baugher <[EMAIL PROTECTED]> > > To: user <[EMAIL PROTECTED]> > > Sent: Wednesday, February 20, 2013 7:46 PM > > Subject: Re: Custom HBase Filter : Error in readFields > > > > I updated my code to use the Bytes class for serialization and added more > > log messages. I see this[1] now. It is able to create the filter the > first > > time but when it gets to the second region (on the same region server) it > > attempts to create the filter again but the data read in from readFields > > seems corrupted. > > > > [1] - http://pastebin.com/TqNsUVSk > > > > > > On Wed, Feb 20, 2013 at 8:48 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > > > Can you use code similar to the following for serialization ? > > > public void readFields(DataInput in) throws IOException { > > > this.prefix = Bytes.readByteArray(in); > > > } > > > > > > See src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java > > > > > > Thanks > > > > > > On Wed, Feb 20, 2013 at 5:58 PM, Bryan Baugher <[EMAIL PROTECTED]> > wrote: > > > > > > > Here[1] is the code for the filter. > > > > > > > > -Bryan > > > > > > > > [1] - http://pastebin.com/5Qjas88z > > > > > > > > > Bryan: > > > > > Looks like you may have missed adding unit test for your filter. > > > > > > > > > > Unit test should have caught this situation much earlier. > > > > > > > > > > Cheers > > > > > > > > > > On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria < > > > [EMAIL PROTECTED] > > > > >wrote: > > > > > > > > > > > Also the readFields is your implementation of how to read the > byte > > > > array > > > > > > transferred from the client. So I think there has to be some > issue > > in > > > > how > > > > > > you write the byte array to the network and what you are reading > > out > > > of > > > > > > that i.e. the size of arrays might not be identical. > > > > > > > > > > > > But as Ted mentioned, looking at the code will help troubleshoot > it > > > > better. > > > > > > > > > > > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> > > wrote: > > > > > > > > > > > > > If you show us the code for RowRangeFilter, that would help us > > > > > > > troubleshoot. > > > > > > > > > > > > > > Cheers > > > > > > > > > > > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher < > [EMAIL PROTECTED] > > > > > > > wrote: > > > > > > > > > > > > > > > Hi everyone, > > > > > > > > > > > > > > > > I am trying to write my own custom Filter but I have been > > having > > > > > > issues. > > > > > > > > When there is only 1 region in my table the scan works as > > > expected > > > > but > > > > > > > when > > > > > > > > there is more, it attempts to create a new version of my > filter > > > and > > > > > > > > deserialize the information again but the data seems to be > > gone. > > > I > > > > am > > > > > > > > running HBase 0.92.1-cdh4.1.1. > > > > > > > > > > > > > > > > 2013-02-20 15:39:53,220 DEBUG > > > > com.cerner.kepler.filters.RowRangeFilter: > > > > > > > > Reading fields > > > > > > > > 2013-02-20 15:40:08,612 WARN > > > org.apache.hadoop.hbase.util.Sleeper:
-
Re: Custom HBase Filter : Error in readFieldslars hofhansl 2013-02-21, 06:13
This is not really obvious. I think we might want to add something to the Javadoc to that extend.
Otherwise we'll see what you've seen, namely that it works fine when you test with a single region server, but not if the filter is serialized to multiple region servers. -- Lars ________________________________ From: Bryan Baugher <[EMAIL PROTECTED]> To: user <[EMAIL PROTECTED]>; lars hofhansl <[EMAIL PROTECTED]> Sent: Wednesday, February 20, 2013 9:09 PM Subject: Re: Custom HBase Filter : Error in readFields Ugh, yes you are correct. This fixed my issue. Thank you all for your help. On Wed, Feb 20, 2013 at 10:54 PM, lars hofhansl <[EMAIL PROTECTED]> wrote: > You probably want your write() to be idempotent. Currently it will exhaust > the iterator and not reset it. > (Just guessing, though) > > > > ________________________________ > From: Bryan Baugher <[EMAIL PROTECTED]> > To: user <[EMAIL PROTECTED]> > Sent: Wednesday, February 20, 2013 7:46 PM > Subject: Re: Custom HBase Filter : Error in readFields > > I updated my code to use the Bytes class for serialization and added more > log messages. I see this[1] now. It is able to create the filter the first > time but when it gets to the second region (on the same region server) it > attempts to create the filter again but the data read in from readFields > seems corrupted. > > [1] - http://pastebin.com/TqNsUVSk > > > On Wed, Feb 20, 2013 at 8:48 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > Can you use code similar to the following for serialization ? > > public void readFields(DataInput in) throws IOException { > > this.prefix = Bytes.readByteArray(in); > > } > > > > See src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java > > > > Thanks > > > > On Wed, Feb 20, 2013 at 5:58 PM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > > > > > Here[1] is the code for the filter. > > > > > > -Bryan > > > > > > [1] - http://pastebin.com/5Qjas88z > > > > > > > Bryan: > > > > Looks like you may have missed adding unit test for your filter. > > > > > > > > Unit test should have caught this situation much earlier. > > > > > > > > Cheers > > > > > > > > On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria < > > [EMAIL PROTECTED] > > > >wrote: > > > > > > > > > Also the readFields is your implementation of how to read the byte > > > array > > > > > transferred from the client. So I think there has to be some issue > in > > > how > > > > > you write the byte array to the network and what you are reading > out > > of > > > > > that i.e. the size of arrays might not be identical. > > > > > > > > > > But as Ted mentioned, looking at the code will help troubleshoot it > > > better. > > > > > > > > > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > If you show us the code for RowRangeFilter, that would help us > > > > > > troubleshoot. > > > > > > > > > > > > Cheers > > > > > > > > > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher <[EMAIL PROTECTED] > > > > > wrote: > > > > > > > > > > > > > Hi everyone, > > > > > > > > > > > > > > I am trying to write my own custom Filter but I have been > having > > > > > issues. > > > > > > > When there is only 1 region in my table the scan works as > > expected > > > but > > > > > > when > > > > > > > there is more, it attempts to create a new version of my filter > > and > > > > > > > deserialize the information again but the data seems to be > gone. > > I > > > am > > > > > > > running HBase 0.92.1-cdh4.1.1. > > > > > > > > > > > > > > 2013-02-20 15:39:53,220 DEBUG > > > com.cerner.kepler.filters.RowRangeFilter: > > > > > > > Reading fields > > > > > > > 2013-02-20 15:40:08,612 WARN > > org.apache.hadoop.hbase.util.Sleeper: > > > We > > > > > > slept > > > > > > > 15346ms instead of 3000ms, this is likely due to a long garbage > > > > > > collecting > > > > > > > pause and it's usually bad, see > > > > > > > http://hbase.apache.org/book.html#trouble.rs.runtime.zkexpired > > > > > > > 2013-02-20 15:40:09,142 ERROR -Bryan
-
Re: Custom HBase Filter : Error in readFieldsBryan Baugher 2013-02-21, 13:06
Logged this issue[1] to have the change made.
[1] - https://issues.apache.org/jira/browse/HBASE-7894 On Thu, Feb 21, 2013 at 12:13 AM, lars hofhansl <[EMAIL PROTECTED]> wrote: > This is not really obvious. I think we might want to add something to the > Javadoc to that extend. > > Otherwise we'll see what you've seen, namely that it works fine when you > test with a single region server, but not if the filter is serialized to > multiple region servers. > > -- Lars > > > > ________________________________ > From: Bryan Baugher <[EMAIL PROTECTED]> > To: user <[EMAIL PROTECTED]>; lars hofhansl <[EMAIL PROTECTED]> > Sent: Wednesday, February 20, 2013 9:09 PM > Subject: Re: Custom HBase Filter : Error in readFields > > Ugh, yes you are correct. This fixed my issue. Thank you all for your help. > > > On Wed, Feb 20, 2013 at 10:54 PM, lars hofhansl <[EMAIL PROTECTED]> wrote: > > > You probably want your write() to be idempotent. Currently it will > exhaust > > the iterator and not reset it. > > (Just guessing, though) > > > > > > > > ________________________________ > > From: Bryan Baugher <[EMAIL PROTECTED]> > > To: user <[EMAIL PROTECTED]> > > Sent: Wednesday, February 20, 2013 7:46 PM > > Subject: Re: Custom HBase Filter : Error in readFields > > > > I updated my code to use the Bytes class for serialization and added more > > log messages. I see this[1] now. It is able to create the filter the > first > > time but when it gets to the second region (on the same region server) it > > attempts to create the filter again but the data read in from readFields > > seems corrupted. > > > > [1] - http://pastebin.com/TqNsUVSk > > > > > > On Wed, Feb 20, 2013 at 8:48 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > > > Can you use code similar to the following for serialization ? > > > public void readFields(DataInput in) throws IOException { > > > this.prefix = Bytes.readByteArray(in); > > > } > > > > > > See src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java > > > > > > Thanks > > > > > > On Wed, Feb 20, 2013 at 5:58 PM, Bryan Baugher <[EMAIL PROTECTED]> > wrote: > > > > > > > Here[1] is the code for the filter. > > > > > > > > -Bryan > > > > > > > > [1] - http://pastebin.com/5Qjas88z > > > > > > > > > Bryan: > > > > > Looks like you may have missed adding unit test for your filter. > > > > > > > > > > Unit test should have caught this situation much earlier. > > > > > > > > > > Cheers > > > > > > > > > > On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria < > > > [EMAIL PROTECTED] > > > > >wrote: > > > > > > > > > > > Also the readFields is your implementation of how to read the > byte > > > > array > > > > > > transferred from the client. So I think there has to be some > issue > > in > > > > how > > > > > > you write the byte array to the network and what you are reading > > out > > > of > > > > > > that i.e. the size of arrays might not be identical. > > > > > > > > > > > > But as Ted mentioned, looking at the code will help troubleshoot > it > > > > better. > > > > > > > > > > > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> > > wrote: > > > > > > > > > > > > > If you show us the code for RowRangeFilter, that would help us > > > > > > > troubleshoot. > > > > > > > > > > > > > > Cheers > > > > > > > > > > > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher < > [EMAIL PROTECTED] > > > > > > > wrote: > > > > > > > > > > > > > > > Hi everyone, > > > > > > > > > > > > > > > > I am trying to write my own custom Filter but I have been > > having > > > > > > issues. > > > > > > > > When there is only 1 region in my table the scan works as > > > expected > > > > but > > > > > > > when > > > > > > > > there is more, it attempts to create a new version of my > filter > > > and > > > > > > > > deserialize the information again but the data seems to be > > gone. > > > I > > > > am > > > > > > > > running HBase 0.92.1-cdh4.1.1. > > > > > > > > > > > > > > > > 2013-02-20 15:39:53,220 DEBUG > > > > com.cerner.kepler.filters.RowRangeFilter: -Bryan
-
Re: Custom HBase Filter : Error in readFieldsTed Yu 2013-02-21, 18:27
Bryan:
Just want to confirm. Your fix (resetting) is put into the following method: /** * Filters that are purely stateless and do nothing in their reset() methods can inherit * this null/empty implementation. * * @inheritDoc */ @Override public void reset() { Thanks On Thu, Feb 21, 2013 at 5:06 AM, Bryan Baugher <[EMAIL PROTECTED]> wrote: > Logged this issue[1] to have the change made. > > [1] - https://issues.apache.org/jira/browse/HBASE-7894 > > > On Thu, Feb 21, 2013 at 12:13 AM, lars hofhansl <[EMAIL PROTECTED]> wrote: > > > This is not really obvious. I think we might want to add something to the > > Javadoc to that extend. > > > > Otherwise we'll see what you've seen, namely that it works fine when you > > test with a single region server, but not if the filter is serialized to > > multiple region servers. > > > > -- Lars > > > > > > > > ________________________________ > > From: Bryan Baugher <[EMAIL PROTECTED]> > > To: user <[EMAIL PROTECTED]>; lars hofhansl <[EMAIL PROTECTED]> > > Sent: Wednesday, February 20, 2013 9:09 PM > > Subject: Re: Custom HBase Filter : Error in readFields > > > > Ugh, yes you are correct. This fixed my issue. Thank you all for your > help. > > > > > > On Wed, Feb 20, 2013 at 10:54 PM, lars hofhansl <[EMAIL PROTECTED]> > wrote: > > > > > You probably want your write() to be idempotent. Currently it will > > exhaust > > > the iterator and not reset it. > > > (Just guessing, though) > > > > > > > > > > > > ________________________________ > > > From: Bryan Baugher <[EMAIL PROTECTED]> > > > To: user <[EMAIL PROTECTED]> > > > Sent: Wednesday, February 20, 2013 7:46 PM > > > Subject: Re: Custom HBase Filter : Error in readFields > > > > > > I updated my code to use the Bytes class for serialization and added > more > > > log messages. I see this[1] now. It is able to create the filter the > > first > > > time but when it gets to the second region (on the same region server) > it > > > attempts to create the filter again but the data read in from > readFields > > > seems corrupted. > > > > > > [1] - http://pastebin.com/TqNsUVSk > > > > > > > > > On Wed, Feb 20, 2013 at 8:48 PM, Ted Yu <[EMAIL PROTECTED]> wrote: > > > > > > > Can you use code similar to the following for serialization ? > > > > public void readFields(DataInput in) throws IOException { > > > > this.prefix = Bytes.readByteArray(in); > > > > } > > > > > > > > See src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java > > > > > > > > Thanks > > > > > > > > On Wed, Feb 20, 2013 at 5:58 PM, Bryan Baugher <[EMAIL PROTECTED]> > > wrote: > > > > > > > > > Here[1] is the code for the filter. > > > > > > > > > > -Bryan > > > > > > > > > > [1] - http://pastebin.com/5Qjas88z > > > > > > > > > > > Bryan: > > > > > > Looks like you may have missed adding unit test for your filter. > > > > > > > > > > > > Unit test should have caught this situation much earlier. > > > > > > > > > > > > Cheers > > > > > > > > > > > > On Wed, Feb 20, 2013 at 3:42 PM, Viral Bajaria < > > > > [EMAIL PROTECTED] > > > > > >wrote: > > > > > > > > > > > > > Also the readFields is your implementation of how to read the > > byte > > > > > array > > > > > > > transferred from the client. So I think there has to be some > > issue > > > in > > > > > how > > > > > > > you write the byte array to the network and what you are > reading > > > out > > > > of > > > > > > > that i.e. the size of arrays might not be identical. > > > > > > > > > > > > > > But as Ted mentioned, looking at the code will help > troubleshoot > > it > > > > > better. > > > > > > > > > > > > > > On Wed, Feb 20, 2013 at 3:32 PM, Ted Yu <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > > > > > > > If you show us the code for RowRangeFilter, that would help > us > > > > > > > > troubleshoot. > > > > > > > > > > > > > > > > Cheers > > > > > > > > > > > > > > > > On Wed, Feb 20, 2013 at 2:05 PM, Bryan Baugher < > > [EMAIL PROTECTED] > > > > > > > > > wrote: > > > > > > > > |