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 019 package org.apache.hadoop.yarn.api.records; 020 021 import java.io.DataInput; 022 import java.io.DataOutput; 023 import java.io.IOException; 024 025 import org.apache.hadoop.classification.InterfaceAudience.Private; 026 import org.apache.hadoop.classification.InterfaceAudience.Public; 027 import org.apache.hadoop.classification.InterfaceStability.Stable; 028 import org.apache.hadoop.classification.InterfaceStability.Unstable; 029 030 /** 031 * Contains various scheduling metrics to be reported by UI and CLI. 032 */ 033 @Public 034 @Stable 035 public interface ApplicationResourceUsageReport { 036 @Public 037 @Stable 038 int getNumUsedContainers(); 039 040 @Private 041 @Unstable 042 void setNumUsedContainers(int num_containers); 043 044 @Public 045 @Stable 046 int getNumReservedContainers(); 047 048 @Private 049 @Unstable 050 void setNumReservedContainers(int num_reserved_containers); 051 052 @Public 053 @Stable 054 Resource getUsedResources(); 055 056 @Private 057 @Unstable 058 void setUsedResources(Resource resources); 059 060 @Public 061 @Stable 062 Resource getReservedResources(); 063 064 @Private 065 @Unstable 066 void setReservedResources(Resource reserved_resources); 067 068 @Public 069 @Stable 070 Resource getNeededResources(); 071 072 @Private 073 @Unstable 074 void setNeededResources(Resource needed_resources); 075 }