Table of Contents |
---|
...
- FileSetProperties.setUseExisting(true) (or DATA_USE_EXISTING / "data.use.existing") to reuse an existing location and Hive table. The dataset will assume that it does not own the existing data in that location and Hive table, and therefore, when you delete or truncate the dataset, the data will not be deleted.
- FileSetProperties.setPossessExisting(true) (or DATA_POSSESS_EXISTING / "data.possess.existing") to assume ownership an existing location and Hive table. The dataset will assume that it owns the existing data in that location and Hive table, and therefore, when you delete or truncate the dataset, all data will be deleted, including the previously existing data and Hive partitions.
...
Additionally you might want to enable CDAP authorization. For details on how to enable authorization in CDAP and manage privileges please refer to our documentation here: http://docs.cask.co/cdap/current/en/admin-manual/security/authorization.html?highlight=authorization
Note
...
Please note that this above cluster configuration is not a comprehensive guide for enabling authorization and/or impersonation on Hadoop cluster. You might need to add/remove configuration depending on your environment.
Operational APIs
Namespaces
Creating a Namespace
Code Block | ||
---|---|---|
| ||
create namespace testns principal rsinha/appimpmn18192-1000.dev.continuuity.net@CONTINUUITY.NET group-name deployers keytab-URI /etc/security/keytabs/rsinha.keytab |
...
Application Lifecycle
Loading
...
an artifacts:
Code Block | ||
---|---|---|
| ||
load artifact SportResults-4.1.0-SNAPSHOT.jar |
...
jar |
Creating application from an existing artifact:
Code Block | ||
---|---|---|
| ||
curl -v -X PUT http://hostname.net:11015/v3/namespaces/{namespace-id}/apps/{app-id} -d '{"artifact":{"name":"{artifact-name}","version":"{artifact-version}","scope":"USER"},"principal":"someuser/somehost.net@SOMEKDC.NET"}' -H "Authorization: Bearer your_access_token" |
Querying application detail for owner information:
Existing REST API. Please see: http://docs.cask.co/cdap/current/en/reference-manual/http-restful-api/lifecycle.html#details-of-a-deployed-application
Streams
Creating stream with an owner:
Code Block | ||
---|---|---|
| ||
curl -X PUT -v http://somehost.net:11015/v3/namespaces/{namespace-id}/streams/{stream-name} -d '{ "ttl": 1, "principal": "someuser/somehost.net@SOMEKDC.NET" }' -H "Authorization: Bearer your_access_token" |
Querying stream properties for owner information:
Existing REST API. Please see: http://docs.cask.co/cdap/current/en/reference-manual/http-restful-api/stream.html#getting-and-setting-stream-properties
Datasets
Creating dataset with owner:
Code Block | ||
---|---|---|
| ||
|
Querying dataset properties for owner information: