You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Yusaku Sako (JIRA)" <ji...@apache.org> on 2014/03/31 22:21:16 UTC

[jira] [Updated] (AMBARI-5257) Ambari Views : Persistence

     [ https://issues.apache.org/jira/browse/AMBARI-5257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yusaku Sako updated AMBARI-5257:
--------------------------------

    Fix Version/s: 1.5.1

> Ambari Views : Persistence
> --------------------------
>
>                 Key: AMBARI-5257
>                 URL: https://issues.apache.org/jira/browse/AMBARI-5257
>             Project: Ambari
>          Issue Type: Task
>            Reporter: Tom Beerbower
>            Assignee: Tom Beerbower
>             Fix For: 1.5.1
>
>
> View Persistence
> # 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.
> # 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) …
> {code}
> 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);
> }
> {code}
> 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?



--
This message was sent by Atlassian JIRA
(v6.2#6252)