|
|
-
Problem with using iterators to access table
Jonathan Hsu 2012-06-27, 17:03
I'm trying to use iterators to access a table that I created. When I run a MockInstance, the iterators work perfectly, but they don't work when I try to use them on an actual table. Also, if I don't add the iterators, the scanner works fine as well. I wrote both iterators, but the error doesn't seem to be with my iterators, because I also attempted the same thing with one of accumulo's iterators, and got the same result. I know that the table is created correctly (by checking the accumulo shell).
Here is my code :
/* created the table first */
Scanner scann = conn.createScanner(table, new Authorizations()); scann.setRange(new Range("term1"));
IteratorSetting cfg = new IteratorSetting(10, MyIterator1.class, properties); scann.addScanIterator(cfg);
IteratorSetting cfg2 = new IteratorSetting(11, MyIterator2.class, properties); scann.addScanIterator(cfg2);
I'm getting this error :
Exception in thread "main" java.lang.RuntimeException: org.apache.accumulo.core.client.impl.AccumuloServerException: Error on server127.0.0.1:9997 at org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIterator.java:186) at com.bah.applefox.test.plugins.fulltextindex.DebugTest.main(DebugTest.java:151)
Caused by: org.apache.accumulo.core.client.impl.AccumuloServerException: Error on server 127.0.0.1:9997 at org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:302) at org.apache.accumulo.core.client.impl.ScannerIterator$Reader.run(ScannerIterator.java:94) at org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIterator.java:176) ... 1 more
Caused by: org.apache.thrift.TApplicationException: Internal error processing startScan at org.apache.thrift.TApplicationException.read(TApplicationException.java:108) at org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Client.recv_startScan(TabletClientService.java:184) at org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Client.startScan(TabletClientService.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.accumulo.cloudtrace.instrument.thrift.TraceWrap$2.invoke(TraceWrap.java:84) at $Proxy2.startScan(Unknown Source) at org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:415) at org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:295) ... 3 more Thanks for your time,
Jonathan Hsu
-
Re: Problem with using iterators to access table
Jim Klucar 2012-06-27, 17:16
My first thought would be that you didn't deploy your iterator jar to the accumulo lib/ext directory. That wouldn't be causing the "built-in" iterators to produce an error also. Unfortunately this error message isn't very informative because all the client knows is that a Thrift service call somehow failed. The error message you want to look at will be in the tserver_<hostname>.log file (or .debug.log file) on the tserver. This is in $ACCUMULO_HOME/logs by default.
On Wed, Jun 27, 2012 at 1:03 PM, Jonathan Hsu <[EMAIL PROTECTED]> wrote: > I'm trying to use iterators to access a table that I created. When I run a > MockInstance, the iterators work perfectly, but they don't work when I try > to use them on an actual table. Also, if I don't add the iterators, the > scanner works fine as well. I wrote both iterators, but the error doesn't > seem to be with my iterators, because I also attempted the same thing with > one of accumulo's iterators, and got the same result. I know that the table > is created correctly (by checking the accumulo shell). > > Here is my code : > > /* created the table first */ > > Scanner scann = conn.createScanner(table, new Authorizations()); > scann.setRange(new Range("term1")); > > IteratorSetting cfg = new IteratorSetting(10, MyIterator1.class, > properties); > scann.addScanIterator(cfg); > > IteratorSetting cfg2 = new IteratorSetting(11, MyIterator2.class, > properties); > scann.addScanIterator(cfg2); > > > > I'm getting this error : > > Exception in thread "main" java.lang.RuntimeException: > org.apache.accumulo.core.client.impl.AccumuloServerException: Error on > server127.0.0.1:9997 > at > org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIterator.java:186) > at > com.bah.applefox.test.plugins.fulltextindex.DebugTest.main(DebugTest.java:151) > > Caused by: org.apache.accumulo.core.client.impl.AccumuloServerException: > Error on server 127.0.0.1:9997 > at > org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:302) > at > org.apache.accumulo.core.client.impl.ScannerIterator$Reader.run(ScannerIterator.java:94) > at > org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIterator.java:176) > ... 1 more > > Caused by: org.apache.thrift.TApplicationException: Internal error > processing startScan > at > org.apache.thrift.TApplicationException.read(TApplicationException.java:108) > at > org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Client.recv_startScan(TabletClientService.java:184) > at > org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Client.startScan(TabletClientService.java:157) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.accumulo.cloudtrace.instrument.thrift.TraceWrap$2.invoke(TraceWrap.java:84) > at $Proxy2.startScan(Unknown Source) > at > org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:415) > at > org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:295) > ... 3 more > > > Thanks for your time, > > Jonathan Hsu
-
RE: Problem with using iterators to access table
Bob.Thorman@... 2012-06-27, 17:46
I've seen similar exceptions with the iterators I've written and it turned out to be invalid visibility labeling encountered by the scanner. See JIRA tickets ACCUMULO-651 and/or ACCUMULO-360.
-----Original Message----- From: Jim Klucar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2012 12:17 To: [EMAIL PROTECTED] Subject: Re: Problem with using iterators to access table
My first thought would be that you didn't deploy your iterator jar to the accumulo lib/ext directory. That wouldn't be causing the "built-in" iterators to produce an error also. Unfortunately this error message isn't very informative because all the client knows is that a Thrift service call somehow failed. The error message you want to look at will be in the tserver_<hostname>.log file (or .debug.log file) on the tserver. This is in $ACCUMULO_HOME/logs by default.
On Wed, Jun 27, 2012 at 1:03 PM, Jonathan Hsu <[EMAIL PROTECTED]> wrote: > I'm trying to use iterators to access a table that I created. When I > run a MockInstance, the iterators work perfectly, but they don't work > when I try to use them on an actual table. Also, if I don't add the > iterators, the scanner works fine as well. I wrote both iterators, > but the error doesn't seem to be with my iterators, because I also > attempted the same thing with one of accumulo's iterators, and got the > same result. I know that the table is created correctly (by checking the accumulo shell). > > Here is my code : > > /* created the table first */ > > Scanner scann = conn.createScanner(table, new Authorizations()); > scann.setRange(new Range("term1")); > > IteratorSetting cfg = new IteratorSetting(10, MyIterator1.class, > properties); scann.addScanIterator(cfg); > > IteratorSetting cfg2 = new IteratorSetting(11, MyIterator2.class, > properties); scann.addScanIterator(cfg2); > > > > I'm getting this error : > > Exception in thread "main" java.lang.RuntimeException: > org.apache.accumulo.core.client.impl.AccumuloServerException: Error on > server127.0.0.1:9997 > at > org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIt > erator.java:186) > at > com.bah.applefox.test.plugins.fulltextindex.DebugTest.main(DebugTest.j > ava:151) > > Caused by: org.apache.accumulo.core.client.impl.AccumuloServerException: > Error on server 127.0.0.1:9997 > at > org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner. > java:302) > at > org.apache.accumulo.core.client.impl.ScannerIterator$Reader.run(Scanne > rIterator.java:94) > at > org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIt > erator.java:176) > ... 1 more > > Caused by: org.apache.thrift.TApplicationException: Internal error > processing startScan at > org.apache.thrift.TApplicationException.read(TApplicationException.jav > a:108) > at > org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Clien > t.recv_startScan(TabletClientService.java:184) > at > org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Clien > t.startScan(TabletClientService.java:157) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j > ava:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess > orImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.accumulo.cloudtrace.instrument.thrift.TraceWrap$2.invoke(Tr > aceWrap.java:84) > at $Proxy2.startScan(Unknown Source) > at > org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner. > java:415) > at > org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner. > java:295) > ... 3 more > > > Thanks for your time, > > Jonathan Hsu
-
Re: Problem with using iterators to access table
Keith Turner 2012-06-27, 18:12
Any time there is an unexpected exception on the server side when scanning you will see the "Error on server xxx" exception. Then you have to go look in the tablet server logs like Jim said to see what the actual exception was. The reason no information about the server error is propagated to the client side is to avoid unintentional information leakage.
On Wed, Jun 27, 2012 at 1:46 PM, <[EMAIL PROTECTED]> wrote: > I've seen similar exceptions with the iterators I've written and it turned out to be invalid visibility labeling encountered by the scanner. See JIRA tickets ACCUMULO-651 and/or ACCUMULO-360. > > -----Original Message----- > From: Jim Klucar [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 27, 2012 12:17 > To: [EMAIL PROTECTED] > Subject: Re: Problem with using iterators to access table > > My first thought would be that you didn't deploy your iterator jar to the accumulo lib/ext directory. That wouldn't be causing the "built-in" iterators to produce an error also. Unfortunately this error message isn't very informative because all the client knows is that a Thrift service call somehow failed. The error message you want to look at will be in the tserver_<hostname>.log file (or .debug.log > file) on the tserver. This is in $ACCUMULO_HOME/logs by default. > > On Wed, Jun 27, 2012 at 1:03 PM, Jonathan Hsu <[EMAIL PROTECTED]> wrote: >> I'm trying to use iterators to access a table that I created. When I >> run a MockInstance, the iterators work perfectly, but they don't work >> when I try to use them on an actual table. Also, if I don't add the >> iterators, the scanner works fine as well. I wrote both iterators, >> but the error doesn't seem to be with my iterators, because I also >> attempted the same thing with one of accumulo's iterators, and got the >> same result. I know that the table is created correctly (by checking the accumulo shell). >> >> Here is my code : >> >> /* created the table first */ >> >> Scanner scann = conn.createScanner(table, new Authorizations()); >> scann.setRange(new Range("term1")); >> >> IteratorSetting cfg = new IteratorSetting(10, MyIterator1.class, >> properties); scann.addScanIterator(cfg); >> >> IteratorSetting cfg2 = new IteratorSetting(11, MyIterator2.class, >> properties); scann.addScanIterator(cfg2); >> >> >> >> I'm getting this error : >> >> Exception in thread "main" java.lang.RuntimeException: >> org.apache.accumulo.core.client.impl.AccumuloServerException: Error on >> server127.0.0.1:9997 >> at >> org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIt >> erator.java:186) >> at >> com.bah.applefox.test.plugins.fulltextindex.DebugTest.main(DebugTest.j >> ava:151) >> >> Caused by: org.apache.accumulo.core.client.impl.AccumuloServerException: >> Error on server 127.0.0.1:9997 >> at >> org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner. >> java:302) >> at >> org.apache.accumulo.core.client.impl.ScannerIterator$Reader.run(Scanne >> rIterator.java:94) >> at >> org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIt >> erator.java:176) >> ... 1 more >> >> Caused by: org.apache.thrift.TApplicationException: Internal error >> processing startScan at >> org.apache.thrift.TApplicationException.read(TApplicationException.jav >> a:108) >> at >> org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Clien >> t.recv_startScan(TabletClientService.java:184) >> at >> org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Clien >> t.startScan(TabletClientService.java:157) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j >> ava:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess >> orImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.apache.accumulo.cloudtrace.instrument.thrift.TraceWrap$2.invoke(Tr >> aceWrap.java:84) >> at $Proxy2.startScan(Unknown Source)
-
Re: Problem with using iterators to access table
Jonathan Hsu 2012-06-27, 19:48
Thanks for your quick reply.
I didn't deploy my iterator jar to the directory, so I did that and tried to run it again. I looked in the .debug.log file, and now I'm getting NoClassDefFoundErrors for classes that are not in the same package. For example, I imported and am using the imported Jama Matrix class, and it threw a ClassNotFoundException on that class. Am I missing something important with regard to importing external classes?
Thanks again,
Jonathan Hsu On Wed, Jun 27, 2012 at 1:16 PM, Jim Klucar <[EMAIL PROTECTED]> wrote:
> My first thought would be that you didn't deploy your iterator jar to > the accumulo lib/ext directory. That wouldn't be causing the > "built-in" iterators to produce an error also. Unfortunately this > error message isn't very informative because all the client knows is > that a Thrift service call somehow failed. The error message you want > to look at will be in the tserver_<hostname>.log file (or .debug.log > file) on the tserver. This is in $ACCUMULO_HOME/logs by default. > > On Wed, Jun 27, 2012 at 1:03 PM, Jonathan Hsu <[EMAIL PROTECTED]> > wrote: > > I'm trying to use iterators to access a table that I created. When I > run a > > MockInstance, the iterators work perfectly, but they don't work when I > try > > to use them on an actual table. Also, if I don't add the iterators, the > > scanner works fine as well. I wrote both iterators, but the error > doesn't > > seem to be with my iterators, because I also attempted the same thing > with > > one of accumulo's iterators, and got the same result. I know that the > table > > is created correctly (by checking the accumulo shell). > > > > Here is my code : > > > > /* created the table first */ > > > > Scanner scann = conn.createScanner(table, new Authorizations()); > > scann.setRange(new Range("term1")); > > > > IteratorSetting cfg = new IteratorSetting(10, MyIterator1.class, > > properties); > > scann.addScanIterator(cfg); > > > > IteratorSetting cfg2 = new IteratorSetting(11, MyIterator2.class, > > properties); > > scann.addScanIterator(cfg2); > > > > > > > > I'm getting this error : > > > > Exception in thread "main" java.lang.RuntimeException: > > org.apache.accumulo.core.client.impl.AccumuloServerException: Error on > > server127.0.0.1:9997 > > at > > > org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIterator.java:186) > > at > > > com.bah.applefox.test.plugins.fulltextindex.DebugTest.main(DebugTest.java:151) > > > > Caused by: org.apache.accumulo.core.client.impl.AccumuloServerException: > > Error on server 127.0.0.1:9997 > > at > > > org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:302) > > at > > > org.apache.accumulo.core.client.impl.ScannerIterator$Reader.run(ScannerIterator.java:94) > > at > > > org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIterator.java:176) > > ... 1 more > > > > Caused by: org.apache.thrift.TApplicationException: Internal error > > processing startScan > > at > > > org.apache.thrift.TApplicationException.read(TApplicationException.java:108) > > at > > > org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Client.recv_startScan(TabletClientService.java:184) > > at > > > org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Client.startScan(TabletClientService.java:157) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > > at > > > org.apache.accumulo.cloudtrace.instrument.thrift.TraceWrap$2.invoke(TraceWrap.java:84) > > at $Proxy2.startScan(Unknown Source) > > at > > > org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:415) > > at > > > org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:295) > > ... 3 more
- Jonathan Hsu
-
Re: Problem with using iterators to access table
Jim Klucar 2012-06-27, 19:55
Jonathan,
You have to deploy all the dependencies of your iterator into the lib/ext also, except whatever is on the Accumulo classpath (accumulo, hadoop, zookeeper, etc). I seem to remember that the mega-jar with all dependencies built into one file doesn't work. The classloader won't search the lib path inside the jar for other jars and load them.
What's going on here is that the tserver process has a separate classloader for jars in lib/ext. When it detects a change in the directory, it dynamically reloads all the jars in the directory. This is how "user" jars can get incorporated into the tablet server iterator stack without restarting the tservers.
On Wed, Jun 27, 2012 at 3:48 PM, Jonathan Hsu <[EMAIL PROTECTED]> wrote: > Thanks for your quick reply. > > I didn't deploy my iterator jar to the directory, so I did that and tried to > run it again. I looked in the .debug.log file, and now I'm getting > NoClassDefFoundErrors for classes that are not in the same package. For > example, I imported and am using the imported Jama Matrix class, and it > threw a ClassNotFoundException on that class. Am I missing something > important with regard to importing external classes? > > Thanks again, > > Jonathan Hsu > > > On Wed, Jun 27, 2012 at 1:16 PM, Jim Klucar <[EMAIL PROTECTED]> wrote: >> >> My first thought would be that you didn't deploy your iterator jar to >> the accumulo lib/ext directory. That wouldn't be causing the >> "built-in" iterators to produce an error also. Unfortunately this >> error message isn't very informative because all the client knows is >> that a Thrift service call somehow failed. The error message you want >> to look at will be in the tserver_<hostname>.log file (or .debug.log >> file) on the tserver. This is in $ACCUMULO_HOME/logs by default. >> >> On Wed, Jun 27, 2012 at 1:03 PM, Jonathan Hsu <[EMAIL PROTECTED]> >> wrote: >> > I'm trying to use iterators to access a table that I created. When I >> > run a >> > MockInstance, the iterators work perfectly, but they don't work when I >> > try >> > to use them on an actual table. Also, if I don't add the iterators, the >> > scanner works fine as well. I wrote both iterators, but the error >> > doesn't >> > seem to be with my iterators, because I also attempted the same thing >> > with >> > one of accumulo's iterators, and got the same result. I know that the >> > table >> > is created correctly (by checking the accumulo shell). >> > >> > Here is my code : >> > >> > /* created the table first */ >> > >> > Scanner scann = conn.createScanner(table, new Authorizations()); >> > scann.setRange(new Range("term1")); >> > >> > IteratorSetting cfg = new IteratorSetting(10, MyIterator1.class, >> > properties); >> > scann.addScanIterator(cfg); >> > >> > IteratorSetting cfg2 = new IteratorSetting(11, MyIterator2.class, >> > properties); >> > scann.addScanIterator(cfg2); >> > >> > >> > >> > I'm getting this error : >> > >> > Exception in thread "main" java.lang.RuntimeException: >> > org.apache.accumulo.core.client.impl.AccumuloServerException: Error on >> > server127.0.0.1:9997 >> > at >> > >> > org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIterator.java:186) >> > at >> > >> > com.bah.applefox.test.plugins.fulltextindex.DebugTest.main(DebugTest.java:151) >> > >> > Caused by: org.apache.accumulo.core.client.impl.AccumuloServerException: >> > Error on server 127.0.0.1:9997 >> > at >> > >> > org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:302) >> > at >> > >> > org.apache.accumulo.core.client.impl.ScannerIterator$Reader.run(ScannerIterator.java:94) >> > at >> > >> > org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIterator.java:176) >> > ... 1 more >> > >> > Caused by: org.apache.thrift.TApplicationException: Internal error >> > processing startScan >> > at >> > >> > org.apache.thrift.TApplicationException.read(TApplicationException.java:108) >> > at >> > >> > org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Client.recv_startScan(TabletClientService.java:184)
-
Re: Problem with using iterators to access table
Jonathan Hsu 2012-06-27, 20:18
Hey Jim,
I got it to work. I had to download the individual jar files for the external classes that I was using, and it works now.
Thanks so much for your help!
Jonathan Hsu
On Wed, Jun 27, 2012 at 3:55 PM, Jim Klucar <[EMAIL PROTECTED]> wrote:
> Jonathan, > > You have to deploy all the dependencies of your iterator into the > lib/ext also, except whatever is on the Accumulo classpath (accumulo, > hadoop, zookeeper, etc). I seem to remember that the mega-jar with > all dependencies built into one file doesn't work. The classloader > won't search the lib path inside the jar for other jars and load them. > > What's going on here is that the tserver process has a separate > classloader for jars in lib/ext. When it detects a change in the > directory, it dynamically reloads all the jars in the directory. This > is how "user" jars can get incorporated into the tablet server > iterator stack without restarting the tservers. > > On Wed, Jun 27, 2012 at 3:48 PM, Jonathan Hsu <[EMAIL PROTECTED]> > wrote: > > Thanks for your quick reply. > > > > I didn't deploy my iterator jar to the directory, so I did that and > tried to > > run it again. I looked in the .debug.log file, and now I'm getting > > NoClassDefFoundErrors for classes that are not in the same package. For > > example, I imported and am using the imported Jama Matrix class, and it > > threw a ClassNotFoundException on that class. Am I missing something > > important with regard to importing external classes? > > > > Thanks again, > > > > Jonathan Hsu > > > > > > On Wed, Jun 27, 2012 at 1:16 PM, Jim Klucar <[EMAIL PROTECTED]> wrote: > >> > >> My first thought would be that you didn't deploy your iterator jar to > >> the accumulo lib/ext directory. That wouldn't be causing the > >> "built-in" iterators to produce an error also. Unfortunately this > >> error message isn't very informative because all the client knows is > >> that a Thrift service call somehow failed. The error message you want > >> to look at will be in the tserver_<hostname>.log file (or .debug.log > >> file) on the tserver. This is in $ACCUMULO_HOME/logs by default. > >> > >> On Wed, Jun 27, 2012 at 1:03 PM, Jonathan Hsu <[EMAIL PROTECTED]> > >> wrote: > >> > I'm trying to use iterators to access a table that I created. When I > >> > run a > >> > MockInstance, the iterators work perfectly, but they don't work when I > >> > try > >> > to use them on an actual table. Also, if I don't add the iterators, > the > >> > scanner works fine as well. I wrote both iterators, but the error > >> > doesn't > >> > seem to be with my iterators, because I also attempted the same thing > >> > with > >> > one of accumulo's iterators, and got the same result. I know that the > >> > table > >> > is created correctly (by checking the accumulo shell). > >> > > >> > Here is my code : > >> > > >> > /* created the table first */ > >> > > >> > Scanner scann = conn.createScanner(table, new Authorizations()); > >> > scann.setRange(new Range("term1")); > >> > > >> > IteratorSetting cfg = new IteratorSetting(10, MyIterator1.class, > >> > properties); > >> > scann.addScanIterator(cfg); > >> > > >> > IteratorSetting cfg2 = new IteratorSetting(11, MyIterator2.class, > >> > properties); > >> > scann.addScanIterator(cfg2); > >> > > >> > > >> > > >> > I'm getting this error : > >> > > >> > Exception in thread "main" java.lang.RuntimeException: > >> > org.apache.accumulo.core.client.impl.AccumuloServerException: Error on > >> > server127.0.0.1:9997 > >> > at > >> > > >> > > org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIterator.java:186) > >> > at > >> > > >> > > com.bah.applefox.test.plugins.fulltextindex.DebugTest.main(DebugTest.java:151) > >> > > >> > Caused by: > org.apache.accumulo.core.client.impl.AccumuloServerException: > >> > Error on server 127.0.0.1:9997 > >> > at > >> > > >> > > org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:302) > >> > at > >> > > >> > > org.apache.accumulo.core.client.impl.ScannerIterator$Reader.run(ScannerIterator.java:94)
- Jonathan Hsu
|
|