protected boolean shouldMove(final ILoadBalancerService loadBalancerService){
  if (loadBalancerService == null)   throw new IllegalArgumentException();
  final boolean highlyUtilizedService;
  try {
    final UUID serviceUUID=resourceManager.getDataServiceUUID();
    highlyUtilizedService=loadBalancerService.isHighlyUtilizedDataService(serviceUUID);
  }
 catch (  Exception ex) {
    log.warn("Could not determine if this data service is highly utilized");
    return false;
  }
  if (!highlyUtilizedService) {
    if (log.isInfoEnabled())     log.info("Service is not highly utilized.");
    return false;
  }
  final ResourceScores resourceScores=resourceManager.getResourceScores();
  final boolean shouldMove=(resourceScores.percentCPUTime >= resourceManager.movePercentCpuTimeThreshold) || (resourceScores.majorPageFaultsPerSec > 20) || (resourceScores.dataDirBytesFree < Bytes.gigabyte * 5)|| (resourceScores.dataDirBytesFree < Bytes.gigabyte * .5);
  return shouldMove;
}

protected boolean shouldMove ( final ILoadBalancerService loadBalancerService ) { if ( loadBalancerService == null ) throw new IllegalArgumentException ( ) ; final boolean highlyUtilizedService ; try { final UUID serviceUUID = resourceManager . getDataServiceUUID ( ) ; highlyUtilizedService = loadBalancerService . isHighlyUtilizedDataService ( serviceUUID ) ; } catch ( Exception ex ) { log . warn ( "Could not determine if this data service is highly utilized" ) ; return false ; } if ( ! highlyUtilizedService ) { if ( log . isInfoEnabled ( ) ) log . info ( "Service is not highly utilized." ) ; return false ; } final ResourceScores resourceScores = resourceManager . getResourceScores ( ) ; final boolean shouldMove = ( resourceScores . percentCPUTime >= resourceManager . movePercentCpuTimeThreshold ) || ( resourceScores . majorPageFaultsPerSec > 20 ) || ( resourceScores . dataDirBytesFree < Bytes . gigabyte * 5 ) || ( resourceScores . dataDirBytesFree < Bytes . gigabyte * .5 ) ; return shouldMove ; }
figure out if this data service is considered to be highly utilized , in which case the ds should shed some index partitions . < p > note : we consult the load balancer service on this since it is able to put the load of this service into perspective by also considering the load on the other services in the federation .
