Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-5257

Ambari Views : Persistence

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.5.1
    • None
    • None

    Description

      View Persistence

      1. Save view and view instance resources to Ambari DB.
        Same as any other resource (Cluster, Service, Blueprint, etc.). Will use established JPA patterns to persist resources to Ambari DB.
      2. Allow views to store application data in Ambari DB.
      • Option 1: Application data map.
        Allow application code to store key / value pairs for a view instance. These are different than view instance properties in that they may change (updated during the life of the view instance). We may limit the type to String or String and Numeric (future expansion to allow Serializable types?)
      • Option 2 : Data Store
        The view context will expose a data store object with the following interface (subject to change) …
      public interface DataStore {
      
        void persist(java.lang.Object resource);
      
        void remove(java.lang.Object resource);
      
        <T> T find(java.lang.Class<T> clazz, java.lang.Object primaryKey);
      
        void refresh(java.lang.Object resource);
      }
      

      This will allow a view to persist any Java Bean as application data.

      Issues:

      • Uses org.eclipse.persistence.dynamic classes so it further ties us to EclipseLink.
      • How do we identify primary key fields? JPA annotation?

      Attachments

        Issue Links

          Activity

            People

              tbeerbower Tom Beerbower
              tbeerbower Tom Beerbower
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: