Re: Review Request 58886: Smartsense view do not load and shows blank

2017-05-02 Thread Nitiraj Rathore


> On May 1, 2017, 6:59 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
> > Lines 186 (patched)
> > 
> >
> > Why does the cluster ID change?
> > If that's the root cause, we should fix that instead.
> 
> Nitiraj Rathore wrote:
> So I think if the cluster install fails because of some reason. A 
> reattempt from UI is done and at that time the cluster id is changed. But 
> this change is not propogated to ViewRegistry and it does not delete already 
> created auto view instances or changes their cluster id.
> Yes this solution is not elegant. Although this bug is rare but when it 
> comes it creates problems even in correcting the views from the UI. And so 
> the severity of the bug is high.
> I think a better solution would be to fire one event like 
> "ClusterDeleted" which will be picked up by ViewRegistry and it will delete 
> the views which were created for that cluster id.
> Auto instances will again get created with new cluster id. This solution 
> might take more time to implement as it touches more surface.
> We will log another bug for this change. But the current patch handles 
> the sitution and keeps ambari and views properly running.
> 
> Alejandro Fernandez wrote:
> I'm on the fence about adding code that works around an existing bug, 
> especially since the root-cause may lead to other areas that need similar 
> logic.
> Instead, I think it's better to reuse the existing cluster object 
> (especially if the name coincides with an entity that already exists).
> Furthermore, if a cluster is deleted, shouldn't the views have FKs to the 
> cluster_id so that you can't have orphan views?
> 
> Let's come up with a correct way of fixing this.

ok


- Nitiraj


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58886/#review173490
---


On May 2, 2017, 8:11 a.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58886/
> ---
> 
> (Updated May 2, 2017, 8:11 a.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav 
> Kulshreshtha, Rohit Choudhary, venkat sairam, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-20905
> https://issues.apache.org/jira/browse/AMBARI-20905
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If installation fails and is retried the cluster id changes but some view 
> instances keep older cluster ids which stop views from being displayed later 
> on.
> remove the view instances which contains invalid cluster id before creating 
> any autoview instance.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
>  061c7223d6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
>  b632c54043 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
> 24eceb21c6 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
>  25afe92ce4 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
>  8836af6ead 
>   
> ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
>  a3728d46b3 
> 
> 
> Diff: https://reviews.apache.org/r/58886/diff/2/
> 
> 
> Testing
> ---
> 
> updated testcases where ever needed. Manual testing also done.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 58886: Smartsense view do not load and shows blank

2017-05-02 Thread Alejandro Fernandez


> On May 1, 2017, 6:59 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
> > Lines 186 (patched)
> > 
> >
> > Why does the cluster ID change?
> > If that's the root cause, we should fix that instead.
> 
> Nitiraj Rathore wrote:
> So I think if the cluster install fails because of some reason. A 
> reattempt from UI is done and at that time the cluster id is changed. But 
> this change is not propogated to ViewRegistry and it does not delete already 
> created auto view instances or changes their cluster id.
> Yes this solution is not elegant. Although this bug is rare but when it 
> comes it creates problems even in correcting the views from the UI. And so 
> the severity of the bug is high.
> I think a better solution would be to fire one event like 
> "ClusterDeleted" which will be picked up by ViewRegistry and it will delete 
> the views which were created for that cluster id.
> Auto instances will again get created with new cluster id. This solution 
> might take more time to implement as it touches more surface.
> We will log another bug for this change. But the current patch handles 
> the sitution and keeps ambari and views properly running.

I'm on the fence about adding code that works around an existing bug, 
especially since the root-cause may lead to other areas that need similar logic.
Instead, I think it's better to reuse the existing cluster object (especially 
if the name coincides with an entity that already exists).
Furthermore, if a cluster is deleted, shouldn't the views have FKs to the 
cluster_id so that you can't have orphan views?

Let's come up with a correct way of fixing this.


- Alejandro


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58886/#review173490
---


On May 2, 2017, 8:11 a.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58886/
> ---
> 
> (Updated May 2, 2017, 8:11 a.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav 
> Kulshreshtha, Rohit Choudhary, venkat sairam, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-20905
> https://issues.apache.org/jira/browse/AMBARI-20905
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If installation fails and is retried the cluster id changes but some view 
> instances keep older cluster ids which stop views from being displayed later 
> on.
> remove the view instances which contains invalid cluster id before creating 
> any autoview instance.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
>  061c7223d6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
>  b632c54043 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
> 24eceb21c6 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
>  25afe92ce4 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
>  8836af6ead 
>   
> ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
>  a3728d46b3 
> 
> 
> Diff: https://reviews.apache.org/r/58886/diff/2/
> 
> 
> Testing
> ---
> 
> updated testcases where ever needed. Manual testing also done.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 58886: Smartsense view do not load and shows blank

2017-05-02 Thread DIPAYAN BHOWMICK

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58886/#review173574
---


Ship it!




Ship It!

- DIPAYAN BHOWMICK


On May 2, 2017, 8:11 a.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58886/
> ---
> 
> (Updated May 2, 2017, 8:11 a.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav 
> Kulshreshtha, Rohit Choudhary, venkat sairam, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-20905
> https://issues.apache.org/jira/browse/AMBARI-20905
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If installation fails and is retried the cluster id changes but some view 
> instances keep older cluster ids which stop views from being displayed later 
> on.
> remove the view instances which contains invalid cluster id before creating 
> any autoview instance.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
>  061c7223d6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
>  b632c54043 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
> 24eceb21c6 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
>  25afe92ce4 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
>  8836af6ead 
>   
> ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
>  a3728d46b3 
> 
> 
> Diff: https://reviews.apache.org/r/58886/diff/2/
> 
> 
> Testing
> ---
> 
> updated testcases where ever needed. Manual testing also done.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 58886: Smartsense view do not load and shows blank

2017-05-02 Thread Gaurav Nagar

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58886/#review173573
---


Ship it!




Ship It!

- Gaurav Nagar


On May 2, 2017, 8:11 a.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58886/
> ---
> 
> (Updated May 2, 2017, 8:11 a.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav 
> Kulshreshtha, Rohit Choudhary, venkat sairam, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-20905
> https://issues.apache.org/jira/browse/AMBARI-20905
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If installation fails and is retried the cluster id changes but some view 
> instances keep older cluster ids which stop views from being displayed later 
> on.
> remove the view instances which contains invalid cluster id before creating 
> any autoview instance.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
>  061c7223d6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
>  b632c54043 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
> 24eceb21c6 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
>  25afe92ce4 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
>  8836af6ead 
>   
> ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
>  a3728d46b3 
> 
> 
> Diff: https://reviews.apache.org/r/58886/diff/2/
> 
> 
> Testing
> ---
> 
> updated testcases where ever needed. Manual testing also done.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 58886: Smartsense view do not load and shows blank

2017-05-02 Thread Nitiraj Rathore

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58886/
---

(Updated May 2, 2017, 8:11 a.m.)


Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav Kulshreshtha, 
Rohit Choudhary, venkat sairam, and Ashwin Rajeev.


Changes
---

checking that the view should also be LOCAL_AMBARI view.


Bugs: AMBARI-20905
https://issues.apache.org/jira/browse/AMBARI-20905


Repository: ambari


Description
---

If installation fails and is retried the cluster id changes but some view 
instances keep older cluster ids which stop views from being displayed later on.
remove the view instances which contains invalid cluster id before creating any 
autoview instance.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
 061c7223d6 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
 b632c54043 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
24eceb21c6 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
 25afe92ce4 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
 8836af6ead 
  
ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 
a3728d46b3 


Diff: https://reviews.apache.org/r/58886/diff/2/

Changes: https://reviews.apache.org/r/58886/diff/1-2/


Testing
---

updated testcases where ever needed. Manual testing also done.


Thanks,

Nitiraj Rathore



Re: Review Request 58886: Smartsense view do not load and shows blank

2017-05-02 Thread Nitiraj Rathore


> On May 1, 2017, 7:13 p.m., Gaurav Nagar wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
> > Lines 1012 (patched)
> > 
> >
> > I think, this will be called for each auto instance.
> > Shouldn't we call this before installAutoInstance, so that it will 
> > execute only once.

Should not be a problem, as we are thinking of another better way for next 
release. If I take it out then the code will spread to multiple places.


> On May 1, 2017, 7:13 p.m., Gaurav Nagar wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
> > Lines 1050 (patched)
> > 
> >
> > You need to check if viewInstance's clusterType is LOCAL_AMBARI and 
> > Id's not contails in list.
> > Otherwise it will delete REMOTE_AMBARI configured instances.

Ok will do this check and update the patch.


- Nitiraj


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58886/#review173491
---


On May 1, 2017, 6:57 p.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58886/
> ---
> 
> (Updated May 1, 2017, 6:57 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav 
> Kulshreshtha, Rohit Choudhary, venkat sairam, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-20905
> https://issues.apache.org/jira/browse/AMBARI-20905
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If installation fails and is retried the cluster id changes but some view 
> instances keep older cluster ids which stop views from being displayed later 
> on.
> remove the view instances which contains invalid cluster id before creating 
> any autoview instance.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
>  061c7223d6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
>  b632c54043 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
> 24eceb21c6 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
>  25afe92ce4 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
>  8836af6ead 
>   
> ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
>  a3728d46b3 
> 
> 
> Diff: https://reviews.apache.org/r/58886/diff/1/
> 
> 
> Testing
> ---
> 
> updated testcases where ever needed. Manual testing also done.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 58886: Smartsense view do not load and shows blank

2017-05-02 Thread Nitiraj Rathore


> On May 1, 2017, 6:59 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
> > Lines 186 (patched)
> > 
> >
> > Why does the cluster ID change?
> > If that's the root cause, we should fix that instead.

So I think if the cluster install fails because of some reason. A reattempt 
from UI is done and at that time the cluster id is changed. But this change is 
not propogated to ViewRegistry and it does not delete already created auto view 
instances or changes their cluster id.
Yes this solution is not elegant. Although this bug is rare but when it comes 
it creates problems even in correcting the views from the UI. And so the 
severity of the bug is high.
I think a better solution would be to fire one event like "ClusterDeleted" 
which will be picked up by ViewRegistry and it will delete the views which were 
created for that cluster id.
Auto instances will again get created with new cluster id. This solution might 
take more time to implement as it touches more surface.
We will log another bug for this change. But the current patch handles the 
sitution and keeps ambari and views properly running.


- Nitiraj


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58886/#review173490
---


On May 1, 2017, 6:57 p.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58886/
> ---
> 
> (Updated May 1, 2017, 6:57 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav 
> Kulshreshtha, Rohit Choudhary, venkat sairam, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-20905
> https://issues.apache.org/jira/browse/AMBARI-20905
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If installation fails and is retried the cluster id changes but some view 
> instances keep older cluster ids which stop views from being displayed later 
> on.
> remove the view instances which contains invalid cluster id before creating 
> any autoview instance.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
>  061c7223d6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
>  b632c54043 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
> 24eceb21c6 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
>  25afe92ce4 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
>  8836af6ead 
>   
> ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
>  a3728d46b3 
> 
> 
> Diff: https://reviews.apache.org/r/58886/diff/1/
> 
> 
> Testing
> ---
> 
> updated testcases where ever needed. Manual testing also done.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 58886: Smartsense view do not load and shows blank

2017-05-01 Thread Gaurav Nagar

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58886/#review173491
---




ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
Lines 1012 (patched)


I think, this will be called for each auto instance.
Shouldn't we call this before installAutoInstance, so that it will execute 
only once.



ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
Lines 1050 (patched)


You need to check if viewInstance's clusterType is LOCAL_AMBARI and Id's 
not contails in list.
Otherwise it will delete REMOTE_AMBARI configured instances.


- Gaurav Nagar


On May 1, 2017, 6:57 p.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58886/
> ---
> 
> (Updated May 1, 2017, 6:57 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav 
> Kulshreshtha, Rohit Choudhary, venkat sairam, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-20905
> https://issues.apache.org/jira/browse/AMBARI-20905
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If installation fails and is retried the cluster id changes but some view 
> instances keep older cluster ids which stop views from being displayed later 
> on.
> remove the view instances which contains invalid cluster id before creating 
> any autoview instance.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
>  061c7223d6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
>  b632c54043 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
> 24eceb21c6 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
>  25afe92ce4 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
>  8836af6ead 
>   
> ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
>  a3728d46b3 
> 
> 
> Diff: https://reviews.apache.org/r/58886/diff/1/
> 
> 
> Testing
> ---
> 
> updated testcases where ever needed. Manual testing also done.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 58886: Smartsense view do not load and shows blank

2017-05-01 Thread Alejandro Fernandez

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58886/#review173490
---




ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
Lines 186 (patched)


Why does the cluster ID change?
If that's the root cause, we should fix that instead.


- Alejandro Fernandez


On May 1, 2017, 6:57 p.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58886/
> ---
> 
> (Updated May 1, 2017, 6:57 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav 
> Kulshreshtha, Rohit Choudhary, venkat sairam, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-20905
> https://issues.apache.org/jira/browse/AMBARI-20905
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If installation fails and is retried the cluster id changes but some view 
> instances keep older cluster ids which stop views from being displayed later 
> on.
> remove the view instances which contains invalid cluster id before creating 
> any autoview instance.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
>  061c7223d6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
>  b632c54043 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
> 24eceb21c6 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
>  25afe92ce4 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
>  8836af6ead 
>   
> ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
>  a3728d46b3 
> 
> 
> Diff: https://reviews.apache.org/r/58886/diff/1/
> 
> 
> Testing
> ---
> 
> updated testcases where ever needed. Manual testing also done.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Review Request 58886: Smartsense view do not load and shows blank

2017-05-01 Thread Nitiraj Rathore

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58886/
---

Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav Kulshreshtha, 
Rohit Choudhary, venkat sairam, and Ashwin Rajeev.


Bugs: AMBARI-20905
https://issues.apache.org/jira/browse/AMBARI-20905


Repository: ambari


Description
---

If installation fails and is retried the cluster id changes but some view 
instances keep older cluster ids which stop views from being displayed later on.
remove the view instances which contains invalid cluster id before creating any 
autoview instance.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java
 061c7223d6 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
 b632c54043 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
24eceb21c6 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
 25afe92ce4 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
 8836af6ead 
  
ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 
a3728d46b3 


Diff: https://reviews.apache.org/r/58886/diff/1/


Testing
---

updated testcases where ever needed. Manual testing also done.


Thanks,

Nitiraj Rathore