Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ public org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(
return client.getQueueInfo(queueName);
}

@Override
public org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(
String queueName, String subClusterId) throws YarnException, IOException {
return client.getQueueInfo(queueName, subClusterId);
}

@Override
public List<org.apache.hadoop.yarn.api.records.QueueInfo> getAllQueues()
throws YarnException, IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ public abstract class GetQueueInfoRequest {
return request;
}

@Public
@Stable
public static GetQueueInfoRequest newInstance(String queueName, boolean includeApplications,
boolean includeChildQueues, boolean recursive, String subClusterId) {
GetQueueInfoRequest request = Records.newRecord(GetQueueInfoRequest.class);
request.setQueueName(queueName);
request.setIncludeApplications(includeApplications);
request.setIncludeChildQueues(includeChildQueues);
request.setRecursive(recursive);
request.setSubClusterId(subClusterId);
return request;
}

/**
* Get the <em>queue name</em> for which to get queue information.
* @return <em>queue name</em> for which to get queue information
Expand Down Expand Up @@ -114,5 +127,21 @@ public abstract class GetQueueInfoRequest {
@Public
@Stable
public abstract void setRecursive(boolean recursive);

/**
* Get SubClusterId.
* @return SubClusterId.
*/
@Public
@Stable
public abstract String getSubClusterId();

/**
* Set SubClusterId.
* @param subClusterId SubClusterId.
*/
@Public
@Stable
public abstract void setSubClusterId(String subClusterId);
}

Original file line number Diff line number Diff line change
Expand Up @@ -340,4 +340,177 @@ public abstract void setQueueConfigurations(
@Unstable
public abstract void setIntraQueuePreemptionDisabled(
boolean intraQueuePreemptionDisabled);

/**
* Get Scheduler type.
*
* @return SchedulerType.
*/
@Public
@Stable
public abstract String getSchedulerType();

/**
* Set Scheduler type.
* @param schedulerType scheduler Type.
*/
@Private
@Unstable
public abstract void setSchedulerType(String schedulerType);

/**
* Get the minimum resource VCore.
* @return minimum resource VCore.
*/
@Public
@Stable
public abstract int getMinResourceVCore();

/**
* Set the minimum resource VCore.
* @param vCore minimum resource VCore.
*/
@Private
@Unstable
public abstract void setMinResourceVCore(int vCore);

/**
* Get the minimum resource Memory.
* @return minimum resource Memory.
*/
@Public
@Stable
public abstract long getMinResourceMemory();

/**
* Set the minimum resource Memory.
* @param memory minimum resource Memory.
*/
@Private
@Unstable
public abstract void setMinResourceMemory(long memory);

/**
* Get the maximum resource VCore.
* @return maximum resource VCore.
*/
@Public
@Stable
public abstract int getMaxResourceVCore();

/**
* Set the maximum resource Memory.
* @param vCore maximum resource VCore.
*/
@Private
@Unstable
public abstract void setMaxResourceVCore(int vCore);

/**
* Get the maximum resource Memory.
* @return maximum resource Memory.
*/
@Public
@Stable
public abstract long getMaxResourceMemory();

/**
* Set the maximum resource Memory.
* @param memory maximum resource Memory.
*/
@Private
@Unstable
public abstract void setMaxResourceMemory(long memory);

/**
* Get the reserved resource VCore.
* @return reserved resource VCore.
*/
@Public
@Stable
public abstract int getReservedResourceVCore();

/**
* Set the reserved resource VCore.
* @param vCore reserved resource VCore.
*/
@Private
@Unstable
public abstract void setReservedResourceVCore(int vCore);

/**
* Get the reserved resource Memory.
* @return reserved resource Memory.
*/
@Public
@Stable
public abstract long getReservedResourceMemory();

/**
* Set the reserved resource Memory.
* @param memory reserved resource Memory.
*/
@Private
@Unstable
public abstract void setReservedResourceMemory(long memory);

/**
* Get the SteadyFairShare VCore.
* @return SteadyFairShare VCore.
*/
@Public
@Stable
public abstract int getSteadyFairShareVCore();

/**
* Set the SteadyFairShare VCore.
* @param vCore SteadyFairShare VCore.
*/
@Private
@Unstable
public abstract void setSteadyFairShareVCore(int vCore);

/**
* Get the SteadyFairShare Memory.
* @return SteadyFairShare Memory.
*/
@Public
@Stable
public abstract long getSteadyFairShareMemory();

/**
* Set the SteadyFairShare Memory.
* @param memory SteadyFairShare Memory.
*/
@Private
@Unstable
public abstract void setSteadyFairShareMemory(long memory);

/**
* Get the SubClusterId.
* @return the SubClusterId.
*/
@Public
@Stable
public abstract String getSubClusterId();

/**
* Set the SubClusterId.
* @param subClusterId the SubClusterId.
*/
@Private
@Unstable
public abstract void setSubClusterId(String subClusterId);

/**
* Get the MaxRunningApp.
* @return The number of MaxRunningApp.
*/
@Public
@Stable
public abstract int getMaxRunningApp();

@Private
@Unstable
public abstract void setMaxRunningApp(int maxRunningApp);
}
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,17 @@ message QueueInfoProto {
optional float weight = 14;
optional string queuePath = 15;
optional int32 maxParallelApps = 16;
optional string schedulerType = 17;
optional int32 minResourceVCore = 18;
optional int64 minResourceMemory = 19;
optional int32 maxResourceVCore = 20;
optional int64 maxResourceMemory = 21;
optional int32 reservedResourceVCore = 22;
optional int64 reservedResourceMemory = 23;
optional int32 steadyFairShareVCore = 24;
optional int64 steadyFairShareMemory = 25;
optional string subClusterId = 26;
optional int32 maxRunningApp = 27;
}

message QueueConfigurationsProto {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ message GetQueueInfoRequestProto {
optional bool includeApplications = 2;
optional bool includeChildQueues = 3;
optional bool recursive = 4;
optional string subClusterId = 5;
}

message GetQueueInfoResponseProto {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,28 @@ public abstract Token getRMDelegationToken(Text renewer)
* @throws YarnException
* in case of errors or if YARN rejects the request due to
* access-control restrictions.
* @throws IOException
* @throws IOException I/O exception has occurred.
*/
public abstract QueueInfo getQueueInfo(String queueName) throws YarnException,
IOException;

/**
* <p>
* Get information ({@link QueueInfo}) about a given <em>queue</em>.
* </p>
*
* @param queueName
* Name of the queue whose information is needed.
* @param subClusterId sub-cluster Id.
* @return queue information.
* @throws YarnException
* in case of errors or if YARN rejects the request due to
* access-control restrictions.
* @throws IOException I/O exception has occurred.
*/
public abstract QueueInfo getQueueInfo(String queueName, String subClusterId)
throws YarnException, IOException;

/**
* <p>
* Get information ({@link QueueInfo}) about all queues, recursively if there
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,18 @@ public Token getRMDelegationToken(Text renewer)
return request;
}

private GetQueueInfoRequest getQueueInfoRequest(
String queueName, String subClusterId, boolean includeApplications,
boolean includeChildQueues, boolean recursive) {
GetQueueInfoRequest request = Records.newRecord(GetQueueInfoRequest.class);
request.setQueueName(queueName);
request.setSubClusterId(subClusterId);
request.setIncludeApplications(includeApplications);
request.setIncludeChildQueues(includeChildQueues);
request.setRecursive(recursive);
return request;
}

@Override
public QueueInfo getQueueInfo(String queueName) throws YarnException,
IOException {
Expand All @@ -744,6 +756,15 @@ public QueueInfo getQueueInfo(String queueName) throws YarnException,
return rmClient.getQueueInfo(request).getQueueInfo();
}

@Override
public QueueInfo getQueueInfo(String queueName,
String subClusterId) throws YarnException, IOException {
GetQueueInfoRequest request =
getQueueInfoRequest(queueName, subClusterId, true, false, false);
Records.newRecord(GetQueueInfoRequest.class);
return rmClient.getQueueInfo(request).getQueueInfo();
}

@Override
public List<QueueUserACLInfo> getQueueAclsInfo() throws YarnException,
IOException {
Expand Down
Loading