Metadata Extraction Policies

A metadata extraction policy defines a set of actions performed when the Cloudera Navigator Metadata Server extracts a class of entities. The following actions are supported:
  • Adding custom metadata such as tags and properties.
  • Sending a message to a JMS message queue. The JSON format message contains the metadata of the entity to which the policy applies and the message text specified in the policy:
    {"entity":entity_properties, "userMessage":"some message text"}
For each action, certain properties support specifying a value using a policy expression.

Viewing Policies

Required Role:

  1. Start and log into the Cloudera Navigator data management component UI.
  2. Click the Policies tab.
  3. In the left pane, click a policy.

Creating Policies

Required Role:

  1. Start and log into the Cloudera Navigator data management component UI.
  2. Depending on the starting point, do one of the following:
    Action Procedure
    Policies page
    1. Click the Policies tab.
    2. Click Create a New Policy.
    Search results page
    1. Select Actions > Create a policy.
  3. Enter a name for the policy.
  4. Check the Enable Policy checkbox.
  5. Specify the search query that defines the class of entities to which the policy applies. If you arrive at the Policies page by clicking a search result, the query property is populated with the query that generated the result. To display a list of entities that satisfy a search query, click the Search Results link.
  6. Specify an optional description for the policy.
  7. If policy expressions are enabled and you choose to use policy expressions in properties that support expressions, specify required imports in the Import Statements field. For example, if your policy expression uses policy enums, for example: entity.get(FSEntityProperties.ORIGINAL_NAME, Object.class) your import would be: import com.cloudera.nav.hdfs.model.FSEntityProperties. If your expression uses another library, such as Date, add the required import for that library.
  8. Choose the schedule for applying the policy:
    • On Data Change - when the entities matching the search string change.
    • Immediate - when the policy is created.
    • Once - at the time specified in the Start Time field.
    • Recurring - at recurring times specified by the Start and End Time fields at the interval specified in the Interval field.
    For the Once and Recurring fields, specify dates and times as follows:
    • Date - Click the down arrow to display a calendar and select a date, or click a field and click the spinner arrows or up and down arrow keys.
    • Time - Click the hour, minute, and AM/PM fields and click the spinner arrows or up and down arrow keys to specify the value.
    • Move between fields using the right and left arrow keys.
  9. Check the checkboxes next to the desired actions and follow the appropriate procedure:
    Action Procedure
    Assign Metadata
    1. Specify the custom metadata. Optionally check the Expression checkbox and specify a policy expression for the indicated fields.
    Send Notification to JMS
    1. If not already configured, configure a JMS server and queue.
    2. Specify the queue name and message. Optionally check the Expression checkbox and specify a policy expression for the message.
  10. Click Save.

Cloning and Editing a Policy

Required Role:

  1. Start and log into the Cloudera Navigator data management component UI.
  2. Click the Policies tab.
  3. In the left pane, click a policy.
  4. Click Clone Policy or Edit Policy.
  5. Edit the policy name, search query, or policy actions.
  6. Click Save.

Deleting Policies

Required Role:

  1. Start and log into the Cloudera Navigator data management component UI.
  2. Click the Policies tab.
  3. In the left pane, click a policy.
  4. Click Delete and click OK to confirm.