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.Stable; 023import org.apache.hadoop.yarn.api.ApplicationClientProtocol; 024import org.apache.hadoop.yarn.util.Records; 025 026/** 027 * <p>The request sent by clients to get <em>queue information</em> 028 * from the <code>ResourceManager</code>.</p> 029 * 030 * @see ApplicationClientProtocol#getQueueInfo(GetQueueInfoRequest) 031 */ 032@Public 033@Stable 034public abstract class GetQueueInfoRequest { 035 036 @Public 037 @Stable 038 public static GetQueueInfoRequest 039 newInstance(String queueName, boolean includeApplications, 040 boolean includeChildQueues, boolean recursive) { 041 GetQueueInfoRequest request = Records.newRecord(GetQueueInfoRequest.class); 042 request.setQueueName(queueName); 043 request.setIncludeApplications(includeApplications); 044 request.setIncludeChildQueues(includeChildQueues); 045 request.setRecursive(recursive); 046 return request; 047 } 048 049 /** 050 * Get the <em>queue name</em> for which to get queue information. 051 * @return <em>queue name</em> for which to get queue information 052 */ 053 @Public 054 @Stable 055 public abstract String getQueueName(); 056 057 /** 058 * Set the <em>queue name</em> for which to get queue information 059 * @param queueName <em>queue name</em> for which to get queue information 060 */ 061 @Public 062 @Stable 063 public abstract void setQueueName(String queueName); 064 065 /** 066 * Is information about <em>active applications<e/m> required? 067 * @return <code>true</code> if applications' information is to be included, 068 * else <code>false</code> 069 */ 070 @Public 071 @Stable 072 public abstract boolean getIncludeApplications(); 073 074 /** 075 * Should we get fetch information about <em>active applications</em>? 076 * @param includeApplications fetch information about <em>active 077 * applications</em>? 078 */ 079 @Public 080 @Stable 081 public abstract void setIncludeApplications(boolean includeApplications); 082 083 /** 084 * Is information about <em>child queues</em> required? 085 * @return <code>true</code> if information about child queues is required, 086 * else <code>false</code> 087 */ 088 @Public 089 @Stable 090 public abstract boolean getIncludeChildQueues(); 091 092 /** 093 * Should we fetch information about <em>child queues</em>? 094 * @param includeChildQueues fetch information about <em>child queues</em>? 095 */ 096 @Public 097 @Stable 098 public abstract void setIncludeChildQueues(boolean includeChildQueues); 099 100 /** 101 * Is information on the entire <em>child queue hierarchy</em> required? 102 * @return <code>true</code> if information about entire hierarchy is 103 * required, <code>false</code> otherwise 104 */ 105 @Public 106 @Stable 107 public abstract boolean getRecursive(); 108 109 /** 110 * Should we fetch information on the entire <em>child queue hierarchy</em>? 111 * @param recursive fetch information on the entire <em>child queue 112 * hierarchy</em>? 113 */ 114 @Public 115 @Stable 116 public abstract void setRecursive(boolean recursive); 117} 118