hadoop SchedulingResponse 源码
haddop SchedulingResponse 代码
文件路径:/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/api/SchedulingResponse.java
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.constraint.api;
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.api.records.SchedulingRequest;
/**
* This class encapsulates the response received from the ResourceScheduler's
* attemptAllocateOnNode method.
*/
public class SchedulingResponse {
private final boolean isSuccess;
private final ApplicationId applicationId;
private final SchedulingRequest schedulingRequest;
/**
* Create a SchedulingResponse.
* @param isSuccess did scheduler accept.
* @param applicationId Application Id.
* @param schedulingRequest Scheduling Request.
*/
public SchedulingResponse(boolean isSuccess, ApplicationId applicationId,
SchedulingRequest schedulingRequest) {
this.isSuccess = isSuccess;
this.applicationId = applicationId;
this.schedulingRequest = schedulingRequest;
}
/**
* Returns true if Scheduler was able to accept and commit this request.
* @return isSuccessful.
*/
public boolean isSuccess() {
return this.isSuccess;
}
/**
* Get Application Id.
* @return Application Id.
*/
public ApplicationId getApplicationId() {
return this.applicationId;
}
/**
* Get Scheduling Request.
* @return Scheduling Request.
*/
public SchedulingRequest getSchedulingRequest() {
return this.schedulingRequest;
}
}
相关信息
相关文章
hadoop ConstraintPlacementAlgorithm 源码
hadoop ConstraintPlacementAlgorithmInput 源码
hadoop ConstraintPlacementAlgorithmOutput 源码
hadoop ConstraintPlacementAlgorithmOutputCollector 源码
hadoop PlacedSchedulingRequest 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony