Driven User Guide
version 1.1.1Comprehending Cascading apps with Annotations
Annotations are a form of metadata and are often used to provide data about the application that is not part of the application itself.
As an example, your Cascading application is represented as an operation DAG, where flows contain taps, filters, and functions. You can expose the details of these operations by assigning annotations.
Figure 1: In this example, the annotation displays the Function type within the wc flow
Note
|
Use Cascading 2.6 to assign annotations to Cascading functions and taps. Also, refer to the Cascading 2.6 API Reference for package cascading.management.annotation details. |
Driven will render all the application meta-data associated with the annotations. However, for privacy and compliance reasons, you may want to set restrictions on the visibility to control whether a certain Property is visible to a certain audience. This becomes an important feature if you want to restrict visibility to some metadata attributes that may violate privacy or governance guidelines in a shared, multi-tenant cluster.
In this code example, the visibility rule is applied for users based on their identity in Driven. In this case, the visilbility rule is set to PUBLIC:
@Property(name = "scrubTextConvert", visibility = Visibility.PUBLIC) @PropertyDescription("my_property_description") ... @Property(name = "scrubText", visibility = Visibility.PUBLIC) @PropertyDescription("my_property_description") ...
Driven maps the visibility levels listed in the table below to the configured sessions definitions in the driven.properties file for displaying the metadata attributes.
Property (user session) | PUBLIC | PROTECTED | PRIVATE |
---|---|---|---|
PUBLIC |
X |
X |
X |
PROTECTED |
X |
X |
|
PRIVATE |
X |
As previously mentioned, on-premise configuration of the visibility access control is based on your governance guidelines in a shared multi-tenant cluster. The example below illustrates a typical use of the visibility levels.
PUBLIC |
Allow metadata attributes to be observed anonymously, by default. |
PROTECTED |
Allow metadata attributes to be viewed by members of a Team. |
PRIVATE |
Allow metadata attributes to be viewed by members of a Team. This level is also used when the user is assigned as admin or leader of a Team, whereby the the visibility is restricted by role. |