We're updating the issue view to help you get more done. 

Docs don't describe how to delete a namespace

Description

The CLI has a command that deletes a namespace. However, we don't describe a RESTful API endpoint to do that, nor do we describe exactly what happens when that is done: especially with regard to handling the default namespace.

We do say, on http://docs-staging.cask.co/cdap/3.1.0-SNAPSHOT/en/developers-manual/building-blocks/namespaces.html?highlight=namespace (also in 3.0.0):

This needs to be updated.

Release Notes

None

Activity

Show:
Bhooshan Mogal
June 18, 2015, 8:09 PM

I think it was a deliberate decision to keep the delete API undocumented, since it is a dangerous API, quite like the v2 unrecoverable/reset API. However, I agree that the functionality is exposed in CLI as well as in the UI now. any thoughts on whether we should document it now?

Andreas Neumann
June 18, 2015, 8:57 PM

My 2 cents: This is not really a "hidden" feature. The CLI, for example, shows it in its suggestions:

I think it should be documented, and it should be made clear that this has to be done with caution.

Bhooshan Mogal
June 19, 2015, 9:29 PM

Here's is what I think should be documented.

We have two REST APIs:

Delete namespace

Deletes datasets, apps, metrics, streams, etc and the namespace itself at the end.
For default namespace, the first API only deletes the contents, but retains the namespace.

https://github.com/caskdata/cdap/blob/develop/cdap-app-fabric/src/main/java/co/cask/cdap/gateway/handlers/NamespaceHttpHandler.java#L165

Both CLI (delete namespace command) and UI (Admin -> Namespace -> Actions -> Delete) expose this functionality.

Delete all datasets in a namespace

Only deletes datasets
https://github.com/caskdata/cdap/blob/develop/cdap-app-fabric/src/main/java/co/cask/cdap/gateway/handlers/NamespaceHttpHandler.java#L190

CLI and UI do not expose this functionality. This is a utility API.

Both need to be executed with caution, so we have an extra check - the unrecoverable reset parameter enable.unrecoverable.reset must be set.

Let me know if you you think we should add any more information.

John Jackson
June 19, 2015, 9:38 PM

The requirement for enable.unrecoverable.reset to bet set to True also applies to both the CDAP CLI and the CDAP UI.

John Jackson
June 19, 2015, 11:37 PM
Fixed

Assignee

John Jackson

Reporter

John Jackson

Labels

Docs Impact

None

UX Impact

None

Components

Fix versions

Affects versions

Priority

Major
Configure