private void handlePrepareStallMessage(PrepareStallMessage prepareStallMessage)
     throws HyracksDataException {
   FeedConnectionId connectionId = prepareStallMessage.getConnectionId();
   int computePartitionsRetainLimit = prepareStallMessage.getComputePartitionsRetainLimit();
   FeedRuntimeManager runtimeManager =
       feedManager.getFeedConnectionManager().getFeedRuntimeManager(connectionId);
   Set<FeedRuntimeId> feedRuntimes = runtimeManager.getFeedRuntimes();
   for (FeedRuntimeId runtimeId : feedRuntimes) {
     FeedRuntime runtime = runtimeManager.getFeedRuntime(runtimeId);
     switch (runtimeId.getFeedRuntimeType()) {
       case COMPUTE:
         Mode requiredMode =
             runtimeId.getPartition() <= computePartitionsRetainLimit ? Mode.STALL : Mode.END;
         runtime.setMode(requiredMode);
         break;
       default:
         runtime.setMode(Mode.STALL);
         break;
     }
   }
 }