Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

CDAP Metadata in Cloudera Navigator


 

Goals: 

  • CDAP contains multiple entities - for ex, Namespaces, Applications, Programs, Datasets. There could also be fine-grained entities such as Partitions in a PFS Dataset or the fields in a Table Dataset.
    Currently we don’t allow setting metadata for such fine-grained entities through Metadata API.

Checklist 

  • User stories documented (Gokul)
  • User stories reviewed (Nitin)
  • Design documented (Gokul)
  • Design reviewed (Andreas)
  • Feature merged (Gokul)
  • Examples and guides (Gokul)
  • Integration tests (Gokul) 
  • Documentation for feature (Gokul)
  • Blog post (Gokul)


User Stories:
 

  • The user can query/modify business metadata using the Metadata API that CDAP provides. But if the user is already using Navigator for this purpose, he should be able to continue to do so for CDAP entities as well.
      

  • The user should be able view the System Metadata in Navigator and should also be able to modify Business Metadata. Also, parts of System Metadata should be indexed (for example, name of the entity) and be query-able 
    and all of Business Metadata should be editable and query-able through Navigator.

  • The users should be able to seamlessly switch between Navigator and CDAP to manage business/custom metadata for CDAP entities

  • Advanced User Requirement: Pushing business metadata of CDAP entities to lower level systems - For example, if a CDAP Table dataset is marked as ‘sensitive’, this tag should be pushed to the corresponding HBase Table
    created by CDAP.
    But the question of what are the correct levels of abstractions - PFS => HDFS directories + HBase table. No entities in other systems (HDFS, HBase) for Namespace (/cdap/namespaces/myspace), Programs? 
    This is an advanced requirement (requires platform support to figure out sub-entities for CDAP entities) and is not dealt with below. 
     

Design:

Technical Constraints

 

Navigator, currently, pulls in data periodically from different Hadoop components - HDFS, Hive etc. It uses Solr for indexing. But Navigator does provide a simple Java Client to set and query metadata.
Though it is limited in its features, it can potentially be used to push custom metadata for entities to Navigator. But there few known and unknown issues:

 

 

 

  1. Pushing data seems straightforward using the Java client but subscribing to metadata changes in Navigator doesn’t seem straightforward
    Ramification: Users can’t edit business metadata for CDAP entities in Navigator and expect it to reflect in CDAP Metadata system
    Tradeoff: Navigator can only read CDAP metadata but can’t modify/write. Any modifications will not be reflected in CDAP Metadata Store.

  2. Creating brand new SourceType, EntityType(s) doesn’t seem possible using the Java Client SDK.
    Ramification: This is a big blocker if we want the Source Type CDAP at the same level as SourceType of HDFS, Hive, (HBase - missing), Oozie etc. There is a catch all SourceType called SDK but then again EntityTypes doesn’t seem to be flexible to allow new ones.
    Workaround: Have to check with Cloudera Navigator team to see what is feasible given our ideal data model. For ex, use SourceType.SDK.

  3. SystemMetadata => Technical Metadata - setting this through Java client seems to be not possible.
    Ramification: Java client can only alter custom metadata. This might be confusing for users as there is a clear one-to-one mapping between system : technical :: business : custom metadata.
    Tradeoff: Don’t push System metadata. Only publish business metadata. Or publish system metadata fields as ‘custom metadata’ in Navigator.

  4. UI Rendering for different Source/Entity combinations: If we do manage to setup custom CDAP SourceType, not quite sure how the UI rendering will work for the same. It is fairly simple for most of the SourceTypes (with special tags for say Hive Table schema) but have to confirm if there is support by default for other types.
    Ramification: Lose out on potentially enriched user experience

 

Architecture Design

 

There will be a system service to push our metadata changes to external metadata management system. This is an optional system service that can be enabled using cdap-site.xml and a pluggable external system can be chosen. For this work, the external system will be Navigator but in future we can support Apache Atlas. The system service will subscribe to Kafka topic to which metadata changes are published by the CDAP MetadataAdmin. These messages are then pushed to the external system - in case of Navigator we could use the Navigator SDK Java client. We will also have to use a system dataset to store the Kafka offset. Potential downside of this approach is that we will be consuming another valuable container resource in the cluster.
 

Additional Details:

Cloudera Navigator is a one shop stop for users of a CDH cluster to query/modify metadata information of various Hadoop entities. Navigator is also useful for Audits and Lineage but in this integration, we are simply focusing on Metadata part of it.
Here is a screenshot of how the metadata is displayed for a HDFS directory.

Screen Shot 2015-12-18 at 1.09.31 PM.jpg


As you can see, the Cloudera Navigator knows about each Source and Entity Type. In this case the SourceType is HDFS and Entity Type is Directory. Technical Metadata (analogous to System Metadata in CDAP parlance) varies for different Source/Entity combination.
Custom Metadata (analogous to Business Metadata in CDAP) allows users to set tags and Key-Value combinations as properties.

Custom Metadata is indexed for search and so is some of the Technical Metadata (not sure what fields are indexed and how they are indexed). So in the above scenario, one can query for ‘sensitive’ tag and they will get all entities that have that custom metadata tag set.


Screen Shot 2015-12-18 at 1.17.41 PM.jpg

  • No labels