How to remove all tables of accumulo or format hadoop files for accumulo

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to remove all tables of accumulo or format hadoop files for accumulo

Suresh Prajapati
Hello Team

I want to clear all records in accumulo for my local machine and want to
delete unused tables created while testing. I found delete table command
which can be used from accumulo shell however that will require much of
manual works for deleting large number of tables. I also tried instructions
<https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_installing_manually_book/content/format_and_start_hdfs.html>
to
format namenode of hadoop but that doesn't seems to work. My question is
how can I remove all tables and have fresh start with accumulo datastore?
Any suggestion is welcomed. Tons of thanks in advanced.

Thank You
Suresh Prajapati
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to remove all tables of accumulo or format hadoop files for accumulo

Dylan Hutchison-5
For deleting test tables, you may find the flag "-p" for the deletetable
shell command useful.  For example,

deletetable -f -p Test.*


will delete all tables that begin with the prefix "Test".  You could even
call this from a script if you want to automate it into your build.
Perhaps this would solve your problem without having to re-format HDFS.

On Fri, Apr 28, 2017 at 12:43 AM, Suresh Prajapati <
[hidden email]> wrote:

> Hello Team
>
> I want to clear all records in accumulo for my local machine and want to
> delete unused tables created while testing. I found delete table command
> which can be used from accumulo shell however that will require much of
> manual works for deleting large number of tables. I also tried instructions
> <https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/
> bk_installing_manually_book/content/format_and_start_hdfs.html>
> to
> format namenode of hadoop but that doesn't seems to work. My question is
> how can I remove all tables and have fresh start with accumulo datastore?
> Any suggestion is welcomed. Tons of thanks in advanced.
>
> Thank You
> Suresh Prajapati
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to remove all tables of accumulo or format hadoop files for accumulo

Josh Elser
In reply to this post by Suresh Prajapati
Suresh, you can "reinitialize" Accumulo by doing the following:

* Stop Accumulo
* Run `hdfs dfs -rm -R -skipTrash /apps/accumulo/data` (assuming you're
using HDP as you linked the HDP documentation).
* Re-run `accumulo init`
* Start Accumulo

If you are on HDP (notably, using Ambari), you likely need to provide
some extra arguments to ensure Accumulo is configured as Ambari expects.
You can find a write-up at [1]

However, like Dylan points out, you don't need to use the "heavy-hammer"
to delete all of HDFS. Just drop the Accumulo tables you don't want next
time.

[1]
https://community.hortonworks.com/articles/79327/re-initializing-apache-accumulo-under-hdp.html

Suresh Prajapati wrote:

> Hello Team
>
> I want to clear all records in accumulo for my local machine and want to
> delete unused tables created while testing. I found delete table command
> which can be used from accumulo shell however that will require much of
> manual works for deleting large number of tables. I also tried instructions
> <https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_installing_manually_book/content/format_and_start_hdfs.html>
> to
> format namenode of hadoop but that doesn't seems to work. My question is
> how can I remove all tables and have fresh start with accumulo datastore?
> Any suggestion is welcomed. Tons of thanks in advanced.
>
> Thank You
> Suresh Prajapati
>
Loading...