From: <tho...@us...> - 2013-12-13 20:55:56
|
Revision: 7646 http://bigdata.svn.sourceforge.net/bigdata/?rev=7646&view=rev Author: thompsonbry Date: 2013-12-13 20:55:50 +0000 (Fri, 13 Dec 2013) Log Message: ----------- Added option to force a service into the error state. The service will then automatically attempt to recover from the error state. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HAStatusServletUtil.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HAStatusServletUtil.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HAStatusServletUtil.java 2013-12-13 20:40:29 UTC (rev 7645) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HAStatusServletUtil.java 2013-12-13 20:55:50 UTC (rev 7646) @@ -92,6 +92,18 @@ */ static final String REBUILD = "rebuild"; + /** + * Force this service into the error state. It will automatically attempt to + * recover from the error state. This basically "kicks" the service. + * + * @see QuorumService#enterErrorState() + * + * TODO Move this declaration to {@link StatusServlet} once we are done + * reconciling between the 1.2.x maintenance branch and the READ_CACHE + * branch. + */ + static final String ERROR = "error"; + final private IIndexManager indexManager; public HAStatusServletUtil(final IIndexManager indexManager) { @@ -586,6 +598,23 @@ } } + + if (quorumService != null) { + + /* + * Force the service into the "ERROR" state. It will automatically + * attempt to recover. + */ + + final String val = req.getParameter(HAStatusServletUtil.ERROR); + + if (val != null) { + + quorumService.enterErrorState(); + + } + + } /* * Display the NSS port, host, and leader/follower/not-joined This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |