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
+
John Stoneham 2012-10-18, 18:28
Copy link to this message
-
Re: making Scanner iterate through different version of cell
On Thu, Oct 18, 2012 at 11:28 AM, John Stoneham <[EMAIL PROTECTED]> wrote:

> 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;
>                 }
>             }
>         }
>     }
>

You should be able to accomplish the same thing with this in 1.4:
    conn.tableOperations().removeIterator(tableName, "vers",
EnumSet.allOf(IteratorScope.class));

Billie
+
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