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 Plain View
Accumulo >> mail # dev >> Shell setiter/setscaniter commands


+
Jim Klucar 2011-11-08, 20:05
+
Eric Newton 2011-11-08, 20:11
+
Billie J Rinaldi 2011-11-10, 20:13
Copy link to this message
-
Re: Shell setiter/setscaniter commands
Billie,

Using Java reflection, you could determine what interfaces the iterator
implements, and if it implements OptionDescriber, prompt for the options.

At the very least, a better error message should be produced, currently it
just throws a ClassCastException

On Thu, Nov 10, 2011 at 3:13 PM, Billie J Rinaldi <[EMAIL PROTECTED]
> wrote:

> On Tuesday, November 8, 2011 3:05:03 PM, "Jim Klucar" <[EMAIL PROTECTED]>
> wrote:
> > Currently the
> > org.apache.accumulo.core.util.shell.commands.SetIterCommand
> > requires that the iterator implement the OptionDescriber interface
> > (line
> > 128). This prevents using some useful iterators at the shell, for
> > instance
> > the DebugIterator. A nice way to learn how iterators work is to set
> > this
> > iterator, use "debug on" at the shell and start scanning different
> > ways.
>
> Iterators can also be configured manually in the shell using the config
> command.
> For example, you could set the debug iterator as follows:
>
> config -t tablename -s
> table.iterator.scan.debug=100,org.apache.accumulo.core.iterators.DebugIterator
>
> You can also set options/parameters for iterators that require them with
> further config commands.
>
> The issue with allowing setiter to configure iterators that do not
> implement OptionDescriber is that there is no way for the shell (or the
> user) to know if the iterators require options or not.  It would have to
> configure them without options, then the user would have to look at the
> code or documentation to determine the required options and set those
> manually with config.
>
> We could consider requiring that iterators implement default parameters
> that would be used whenever parameters are not specified.  Then any
> iterator could be configured with setiter.  However, it can be confusing
> for users if the default parameters are not obvious -- I had one user
> expect that removing the maxVersions parameter for the VersioningIterator
> would stop it from restricting the number of versions, when in fact the
> default for maxVersions is 1.
>
> Billie
>
+
Billie J Rinaldi 2011-11-15, 16:03
+
Jim Klucar 2011-11-15, 16:13
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