001/** 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019package org.apache.hadoop.yarn.api.protocolrecords; 020 021import org.apache.hadoop.classification.InterfaceAudience.Public; 022import org.apache.hadoop.classification.InterfaceStability.Unstable; 023import org.apache.hadoop.yarn.api.ApplicationClientProtocol; 024import org.apache.hadoop.yarn.api.records.Priority; 025import org.apache.hadoop.yarn.util.Records; 026 027/** 028 * <p> 029 * The response sent by the <code>ResourceManager</code> to the client on update 030 * the application priority. 031 * </p> 032 * <p> 033 * A response without exception means that the move has completed successfully. 034 * </p> 035 * 036 * @see ApplicationClientProtocol#updateApplicationPriority(UpdateApplicationPriorityRequest) 037 */ 038 039@Public 040@Unstable 041public abstract class UpdateApplicationPriorityResponse { 042 043 public static UpdateApplicationPriorityResponse newInstance( 044 Priority priority) { 045 UpdateApplicationPriorityResponse response = 046 Records.newRecord(UpdateApplicationPriorityResponse.class); 047 response.setApplicationPriority(priority); 048 return response; 049 } 050 051 /** 052 * Get the <code>Priority</code> of the application to be set. 053 * @return Updated <code>Priority</code> of the application. 054 */ 055 public abstract Priority getApplicationPriority(); 056 057 /** 058 * Set the <code>Priority</code> of the application. 059 * 060 * @param priority <code>Priority</code> of the application 061 */ 062 public abstract void setApplicationPriority(Priority priority); 063}