accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Medinets <>
Subject Re: Inconsistent Naming in IteratorSetting class.
Date Mon, 19 Mar 2012 01:55:06 GMT
In the getOptions (another generically-named method!) in
SetIterCommand, I see this code:

    aggTypeOpt = new Option("agg", "aggregator", false, "an aggregating type");
    regexTypeOpt = new Option("regex", "regular-expression", false, "a
regex matching type");
    versionTypeOpt = new Option("vers", "version", false, "a versioning type");
    reqvisTypeOpt = new Option("reqvis", "require-visibility", false,
"a type that omits entries with empty visibilities");
    ageoffTypeOpt = new Option("ageoff", "ageoff", false, "an aging off type");

It is not clear to me that the command-line option names (like 'agg')
are the same values used in the IteratorSetting class. The
IteratorSetting seems to hold generic map (which makes sense to
provide flexibility).

Let me elaborate via code:

1 IteratorSetting iteratorSetting = new IteratorSetting(1, AgeCombiner.class);
2 iteratorSetting.setName("ageCombiner");
3 Combiner.setColumns(iteratorSetting, Collections.singletonList(new
4 connector.tableOperations().attachIterator(tableName, iteratorSetting);

Leaving aside the need to call a static class to see the column list,
how do I set the iterator type?

I want to create an example for each kind of iterator - in code (i.e.,
not through the command line).

On Sun, Mar 18, 2012 at 9:22 PM, Josh Elser <> wrote:
> On 03/18/2012 06:25 PM, David Medinets wrote:
>> A Property object used to hold key-value information used to modify
>> the behavior of an Interator. However, these are the methods
>> available:
>>   getProperties
>>   setProperties
>>   hasProperties
>>   addOption
>>   removeOption
>>   addOptions
>>   clearOptions
>> Is there a reason why the same concept as two names? I'd like to
>> settle on one name and standardise.
>> Could we change the names to be something like
>> getInteratorSettingProperties? I know that some people are annoyed by
>> longer method names, but when searching through a code base, have
>> unique names is handy. Searching for a generically named method - such
>> as getProperties, returns a lot of false positives.
>> Is there a list (or example) of supported properties? For example, I
>> see the following options when I type 'help setiter'. How are these
>> options defined in code?
> Take a look at
> core/org/apache/accumulo/core/util/shell/commands/ The
> options are defined for each command.
>>   -ageoff,--ageoff                 an aging off type
>>   -agg,--aggregator                an aggregating type
>>   -majc,--major-compaction         applied at major compaction
>>   -minc,--minor-compaction         applied at minor compaction
>>   -regex,--regular-expression      a regex matching type
>>   -reqvis,--require-visibility     a type that omits entries with
>> empty visibilities
>>   -scan,--scan-time                applied at scan time
>>   -vers,--version                  a versioning type

View raw message