class LeafQueue extends AbstractCSQueue {

  @Override
  public void submitApplicationAttempt(FiCaSchedulerApp application,
      String userName) {
    // Careful! Locking order is important!
    try {
      writeLock.lock();

      // TODO, should use getUser, use this method just to avoid UT failure
      // which is caused by wrong invoking order, will fix UT separately
      User user = usersManager.getUserAndAddIfAbsent(userName);

      // Add the attempt to our data-structures
      addApplicationAttempt(application, user);
    } finally {
      writeLock.unlock();
    }

    // We don't want to update metrics for move app
    if (application.isPending()) {
      metrics.submitAppAttempt(userName);
    }

    getParent().submitApplicationAttempt(application, userName);
  }

  @SuppressWarnings({ "unchecked", "rawtypes" }) public  LeafQueue(CapacitySchedulerContext cs,
      String queueName, CSQueue parent, CSQueue old);
  public  LeafQueue(CapacitySchedulerContext cs,
      CapacitySchedulerConfiguration configuration,
      String queueName, CSQueue parent, CSQueue old);

}