HDFS-14398. Update HAState.java to fix typos. Contributed by Nikhil Navadiya.

This commit is contained in:
Bharat Viswanadham 2019-06-18 21:58:37 -07:00
parent 2dfa932818
commit f9ee97de98
No known key found for this signature in database
GPG Key ID: 6A6F3FB121D2F77C

View File

@ -109,7 +109,7 @@ public abstract void enterState(final HAContext context)
* that are going on. It can also be used to check any preconditions * that are going on. It can also be used to check any preconditions
* for the state transition. * for the state transition.
* *
* This method should not make any destructuve changes to the state * This method should not make any destructive changes to the state
* (eg stopping threads) since {@link #prepareToEnterState(HAContext)} * (eg stopping threads) since {@link #prepareToEnterState(HAContext)}
* may subsequently cancel the state transition. * may subsequently cancel the state transition.
* @param context HA context * @param context HA context
@ -134,10 +134,10 @@ public abstract void exitState(final HAContext context)
* @throws ServiceFailedException on failure to transition to new state. * @throws ServiceFailedException on failure to transition to new state.
*/ */
public void setState(HAContext context, HAState s) throws ServiceFailedException { public void setState(HAContext context, HAState s) throws ServiceFailedException {
if (this == s) { // Aleady in the new state if (this == s) { // Already in the new state
return; return;
} }
throw new ServiceFailedException("Transtion from state " + this + " to " throw new ServiceFailedException("Transition from state " + this + " to "
+ s + " is not allowed."); + s + " is not allowed.");
} }