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 # user >> making Scanner iterate through different version of cell


+
Sami Omer 2012-10-18, 17:25
+
Bob.Thorman@... 2012-10-18, 17:35
+
William Slacum 2012-10-18, 17:43
Copy link to this message
-
Re: making Scanner iterate through different version of cell
Here's some Java code to do just that:

    public void removeVersioningIterator(String tableName) throws
            TableNotFoundException, CBSecurityException, CBException {
        Iterable<Map.Entry<String, String>> properties connector.tableOperations().getProperties(tableName);
        List<String> versioningIteratorPropertyNames = Arrays.asList(
                "table.iterator.majc.vers",
                "table.iterator.majc.vers.opt.maxVersions",
                "table.iterator.minc.vers",
                "table.iterator.minc.vers.opt.maxVersions",
                "table.iterator.scan.vers",
                "table.iterator.scan.vers.opt.maxVersions"
        );
        for (String propertyName : versioningIteratorPropertyNames) {
            for (Map.Entry<String, String> tableProperty : properties) {
                if (tableProperty.getKey().equals(propertyName)) {
                    connector.tableOperations().removeProperty(tableName,
propertyName);
                    break;
                }
            }
        }
    }
On Thu, Oct 18, 2012 at 1:43 PM, William Slacum <
[EMAIL PROTECTED]> wrote:

> I think you'll probably have to have modify the table configuration since
> the VersioningIterator is applied by default at level 20.
>
>
> On Thu, Oct 18, 2012 at 10:35 AM, <[EMAIL PROTECTED]> wrote:
>
>> You can use the VersioningIterator within your scanner  and specify the
>> number of versions (i.e. timestamps) you want.  Or you can use the
>> TimeStampFilter and specify the time range for the rows you want.   Or use
>> no iterators at all and let the scanner give you ALL rows.  ****
>>
>> ** **
>>
>> *From:* Sami Omer [mailto:[EMAIL PROTECTED]]
>> *Sent:* Thursday, October 18, 2012 12:25
>> *To:* [EMAIL PROTECTED]
>> *Subject:* making Scanner iterate through different version of cell****
>>
>> ** **
>>
>> Hello everyone,****
>>
>> ** **
>>
>> Is there a way to programmatically iterate through the different version
>> of a cell (cells that have identical row id, column family, and column
>> qualifier but different timestamps) in Accumulo 1.3.6?****
>>
>> ** **
>>
>> I was looking over the documentation and saw that those settings can be
>> applied per table through the command line, but is it doable via the API?
>> ****
>>
>> ** **
>>
>> Thank you.****
>>
>
>
--
John Stoneham
[EMAIL PROTECTED]
+
Billie Rinaldi 2012-10-18, 19:03
+
John Stoneham 2012-10-18, 19:32
+
Eric Newton 2012-10-18, 17:38
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