When/if you do the speed comparison would you mind sharing the results?
-----Original Message-----
From: BlackJack76 [mailto:[email protected]]
Sent: Monday, May 12, 2014 5:22 PM
To: [email protected]
Subject: Re: Delete All Data In Table
Josh,
Thanks for the tip! I was able to delete the data and keep the splits using
the following code:
String dataTableName = "dataTable";
String iteratorName = "devNull";
if(conn.tableOperations().exists(dataTableName))
{
IteratorSetting setting = new IteratorSetting(25, iteratorName,
DevNull.class);
EnumSet<IteratorScope> scopes = EnumSet.noneOf(IteratorScope.class);
scopes.add(IteratorScope.minc);
scopes.add(IteratorScope.majc);
scopes.add(IteratorScope.scan);
conn.tableOperations().attachIterator(dataTableName, setting, scopes);
conn.tableOperations().compact(dataTableName, null, null, true, true);
conn.tableOperations().removeIterator(dataTableName, iteratorName,
scopes);
}
I haven't tested out the speed yet to see how it compares to BatchDeleter but
it definitely works. Thanks for your help!
--
View this message in context:
http://apache-accumulo.1065345.n5.nabble.com/Delete-All-Data-In-Table-tp9748p9774.html
Sent from the Users mailing list archive at Nabble.com.