[ 
https://issues.apache.org/jira/browse/AMBARI-8329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14211884#comment-14211884
 ] 

Tom Beerbower commented on AMBARI-8329:
---------------------------------------

This is a bug in the view DataStore feature which is now being used by the PIG 
view. 

Views have two methods of persistence ...
# instance data - basically a user scoped map of strings.
# DataStore - the ability to persist POJOs in the ambari db.

When you define the persistence entities for a view ...

{code}
   <persistence>
        <entity>
            
<class>org.apache.ambari.view.pig.persistence.DataStoreStorage$SmokeTestEntity</class>
            <id-property>id</id-property>
        </entity>
        <entity>
            
<class>org.apache.ambari.view.pig.resources.jobs.models.PigJob</class>
            <id-property>id</id-property>
        </entity>
        <entity>
            
<class>org.apache.ambari.view.pig.resources.scripts.models.PigScript</class>
            <id-property>id</id-property>
        </entity>
        <entity>
            <class>org.apache.ambari.view.pig.resources.udf.models.UDF</class>
            <id-property>id</id-property>
        </entity>
    </persistence>
{code}

... this information gets written to the viewentity table in the Ambari DB. 
Apparently it can get written multiple times. When this happens the view 
instance can not be deleted because the duplicate entries refer to the view 
instance row.


> Views: Unable to delete view
> ----------------------------
>
>                 Key: AMBARI-8329
>                 URL: https://issues.apache.org/jira/browse/AMBARI-8329
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Tom Beerbower
>            Assignee: Tom Beerbower
>             Fix For: 2.0.0
>
>
> Unable to delete view
> Tried to delete: 
> http://162.216.150.50:8080/views/ADMIN_VIEW/1.0.0/INSTANCE/#/views/PIG/versions/0.1.0/instances/pig/edit
> and received: http://monosnap.com/image/rlkpId299fwVl6eo68ZTXHei4rVFVD
> This does not appear to be a consistent error - I have been able to delete 
> Views prior to this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to