Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo >> mail # dev >> setiter returns error, but custom iterator runs via scanner client?


Copy link to this message
-
Re: setiter returns error, but custom iterator runs via scanner client?
David,

If you want to use the `setiter` command, have your
SortedKeyValueIterator implementation also implement
o.a.a.c.i.OptionDescriber.

This will force you to implement a method which describes any
configurable options on your SKVI, describeOptions(), in addition to
configuring your SKVI with provided a Map<String,String> of options,
validateOptions(Map<String,String>).

I believe `setiter` is telling you about `config` as you could manually
set the your SKVI at a given scope (scan, minc, majc) without the
automatic configuration that the OptionDescriber implementation provides
you with the `setiter` command.

- Josh

On 02/27/2013 07:50 PM, David Arsenault wrote:
> Hi there. Hoping to get some pointers on what might be the issue with
> setiter here ...
>
> I've got a custom iterator built and working fine. The jar is in the
> lib/ext directory and is happy when called from a scanner client.
>
> However, when I attempt to attach the iterator to a table via the
> shell bad voodoo happens.
>
> somebody@accumulo1 INtable> setiter -t INtable -scan -p 5 -n OptsIter
> -class org.foo.TableOptionsIterator
>
> 2013-02-27 19:30:00,974 [shell.Shell] ERROR:
> org.apache.accumulo.core.util.shell.ShellCommandException: Command
> could not be initialized (Unable to load org.foo.TableOptionsIterator
> as type org.apache.accumulo.core.iterators.OptionDescriber; configure
> with 'config' instead).
>
> My class implements SortedKeyValueIterator<Key,Value>.
>
> I've searched extensively and covered the manual end-to-end with no
> luck. Any hints would be much appreciated and save me more time and
> pain.
>
> Thank you.
> David
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB