ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower" <tbeerbo...@hortonworks.com>
Subject Re: Review Request 25364: Views: Make view extraction a background task.
Date Fri, 05 Sep 2014 00:21:28 GMT


> On Sept. 4, 2014, 11:33 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java, line
1388
> > <https://reviews.apache.org/r/25364/diff/1/?file=679078#file679078line1388>
> >
> >     Are there other code blocks that require setting the view status to ERROR?

Good question.  Possibly... There is one other try-catch in readViewArchive around createViewInstanceDefinition(viewConfig,
viewDefinition, instanceConfig).  Currently we allow the view to deploy if there are bad instances.
 Most likely this means that an instance was misconfigured but the view is otherwise okay.
 Thinking about it now, we should probably abort the deploy for that view and put it in ERROR
state.  What do you think?


- Tom


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


On Sept. 4, 2014, 11:09 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25364/
> -----------------------------------------------------------
> 
> (Updated Sept. 4, 2014, 11:09 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Nate Cole.
> 
> 
> Bugs: AMBARI-7158
>     https://issues.apache.org/jira/browse/AMBARI-7158
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The first time that a view is deployed, the contents of the archive are extracted to
the file system.
> 
> Currently view extraction can slow the initial startup of Ambari significantly.
> 
> It would be ideal if we could start the view extraction process as background tasks while
Ambari startup is allowed to proceed. This means that an API user may be able to make requests
for view APIs before the view has finished deploying. We could add a state field to view with
the following possible values ...
> 
>     PENDING - the view archive has been discovered but the extraction process has not
yet started.
>     INSTALLING - the view archive is being extracted.
>     INSTALLED - the view archive is fully extracted and the view is ready to use.
> 
> Until a view is fully installed the API user will not see instances for that view.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java 955bf0a

>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
d13785f 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java 998d2c1

>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 36c9081

>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
243c98c 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
a092735 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java
f9719e6 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java dea9b3b

>   ambari-views/src/main/java/org/apache/ambari/view/ViewDefinition.java b8e7444 
> 
> Diff: https://reviews.apache.org/r/25364/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.
> 
> Added new unit tests.  All existing tests pass ...
> 
> Results :
> 
> Tests run: 1960, Failures: 0, Errors: 0, Skipped: 15
> 
> ...
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 40:30.421s
> [INFO] Finished at: Thu Sep 04 15:36:03 EDT 2014
> [INFO] Final Memory: 45M/416M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message