@@ -401,8 +401,7 @@ private EvalResult(List<TaskAssignmentResult> assignmentResults, TaskAssignmentR
401401 private final ResAllocsEvaluater resAllocsEvaluator ;
402402 private final TaskTracker taskTracker ;
403403 private volatile boolean usingSchedulingService = false ;
404- private final IllegalStateException usingSchedSvcExcetption =
405- new IllegalStateException ("Invalid call when using task scheduling service" );
404+ private final String usingSchedSvcMesg = "Invalid call when using task scheduling service" ;
406405
407406 private TaskScheduler (Builder builder ) {
408407 if (builder .leaseRejectAction ==null )
@@ -600,7 +599,7 @@ public SchedulingResult scheduleOnce(
600599 List <? extends TaskRequest > requests ,
601600 List <VirtualMachineLease > newLeases ) throws IllegalStateException {
602601 if (usingSchedulingService )
603- throw usingSchedSvcExcetption ;
602+ throw new IllegalStateException ( usingSchedSvcMesg ) ;
604603 final Iterator <? extends TaskRequest > iterator =
605604 requests != null ?
606605 requests .iterator () :
@@ -801,7 +800,7 @@ public EvalResult call() throws Exception {
801800 */
802801 public Map <String , Map <VMResource , Double []>> getResourceStatus () throws IllegalStateException {
803802 if (usingSchedulingService )
804- throw usingSchedSvcExcetption ;
803+ throw new IllegalStateException ( usingSchedSvcMesg ) ;
805804 return getResourceStatusIntl ();
806805 }
807806
@@ -826,7 +825,7 @@ public Map<String, Map<VMResource, Double[]>> getResourceStatus() throws Illegal
826825 */
827826 public List <VirtualMachineCurrentState > getVmCurrentStates () throws IllegalStateException {
828827 if (usingSchedulingService )
829- throw usingSchedSvcExcetption ;
828+ throw new IllegalStateException ( usingSchedSvcMesg ) ;
830829 return getVmCurrentStatesIntl ();
831830 }
832831
@@ -942,7 +941,7 @@ public void expireAllLeases() throws IllegalStateException {
942941 */
943942 public Action2 <TaskRequest , String > getTaskAssigner () throws IllegalStateException {
944943 if (usingSchedulingService )
945- throw usingSchedSvcExcetption ;
944+ throw new IllegalStateException ( usingSchedSvcMesg ) ;
946945 return getTaskAssignerIntl ();
947946 }
948947
0 commit comments