YARN-756. Remnants from moving Preemption* records to yarn.api where they really belong. Contributed by Jian He.
svn merge --ignore-ancestry -c 1489614 ../../trunk/ git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1489616 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a912bcad0c
commit
0b97dc1cd3
|
@ -31,19 +31,19 @@ import org.apache.hadoop.yarn.api.records.NodeReport;
|
|||
import org.apache.hadoop.yarn.api.records.PreemptionMessage;
|
||||
import org.apache.hadoop.yarn.api.records.Resource;
|
||||
import org.apache.hadoop.yarn.api.records.Token;
|
||||
import org.apache.hadoop.yarn.api.records.impl.PreemptionMessagePBImpl;
|
||||
import org.apache.hadoop.yarn.api.records.impl.pb.ContainerPBImpl;
|
||||
import org.apache.hadoop.yarn.api.records.impl.pb.ContainerStatusPBImpl;
|
||||
import org.apache.hadoop.yarn.api.records.impl.pb.NodeReportPBImpl;
|
||||
import org.apache.hadoop.yarn.api.records.impl.pb.PreemptionMessagePBImpl;
|
||||
import org.apache.hadoop.yarn.api.records.impl.pb.ResourcePBImpl;
|
||||
import org.apache.hadoop.yarn.api.records.impl.pb.TokenPBImpl;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.NodeReportProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionMessageProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionMessageProto;
|
||||
|
||||
|
||||
public class AllocateResponsePBImpl extends AllocateResponse {
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.hadoop.classification.InterfaceAudience.Public;
|
|||
import org.apache.hadoop.classification.InterfaceStability.Evolving;
|
||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.PreemptionResourceRequest;
|
||||
import org.apache.hadoop.yarn.util.Records;
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,14 +15,13 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.hadoop.yarn.api.protocolrecords;
|
||||
package org.apache.hadoop.yarn.api.records;
|
||||
|
||||
import org.apache.hadoop.classification.InterfaceAudience.Public;
|
||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||
import org.apache.hadoop.classification.InterfaceStability.Evolving;
|
||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionContract;
|
||||
import org.apache.hadoop.yarn.api.records.ResourceRequest;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
|
||||
|
||||
/**
|
||||
* Description of resources requested back by the cluster.
|
|
@ -15,14 +15,13 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.hadoop.yarn.api.records.impl;
|
||||
package org.apache.hadoop.yarn.api.records.impl.pb;
|
||||
|
||||
import org.apache.hadoop.yarn.api.records.ContainerId;
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionContainer;
|
||||
import org.apache.hadoop.yarn.api.records.impl.pb.ContainerIdPBImpl;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionContainerProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionContainerProtoOrBuilder;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProtoOrBuilder;
|
||||
|
||||
public class PreemptionContainerPBImpl extends PreemptionContainer {
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.hadoop.yarn.api.records.impl;
|
||||
package org.apache.hadoop.yarn.api.records.impl.pb;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
|
@ -23,14 +23,13 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.PreemptionResourceRequest;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.PreemptionResourceRequestPBImpl;
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionContainer;
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionContract;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionContainerProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionContractProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionContractProtoOrBuilder;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionResourceRequestProto;
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionResourceRequest;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContractProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContractProtoOrBuilder;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionResourceRequestProto;
|
||||
|
||||
public class PreemptionContractPBImpl extends PreemptionContract {
|
||||
|
|
@ -15,15 +15,15 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.hadoop.yarn.api.records.impl;
|
||||
package org.apache.hadoop.yarn.api.records.impl.pb;
|
||||
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionContract;
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionMessage;
|
||||
import org.apache.hadoop.yarn.api.records.StrictPreemptionContract;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionContractProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionMessageProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionMessageProtoOrBuilder;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.StrictPreemptionContractProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContractProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionMessageProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionMessageProtoOrBuilder;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProto;
|
||||
|
||||
public class PreemptionMessagePBImpl extends PreemptionMessage {
|
||||
|
|
@ -15,14 +15,13 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
||||
package org.apache.hadoop.yarn.api.records.impl.pb;
|
||||
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.PreemptionResourceRequest;
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionResourceRequest;
|
||||
import org.apache.hadoop.yarn.api.records.ResourceRequest;
|
||||
import org.apache.hadoop.yarn.api.records.impl.pb.ResourceRequestPBImpl;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionResourceRequestProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionResourceRequestProtoOrBuilder;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.ResourceRequestProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionResourceRequestProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionResourceRequestProtoOrBuilder;
|
||||
|
||||
public class PreemptionResourceRequestPBImpl implements PreemptionResourceRequest {
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.hadoop.yarn.api.records.impl;
|
||||
package org.apache.hadoop.yarn.api.records.impl.pb;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
@ -24,9 +24,9 @@ import java.util.Set;
|
|||
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionContainer;
|
||||
import org.apache.hadoop.yarn.api.records.StrictPreemptionContract;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.PreemptionContainerProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.StrictPreemptionContractProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.StrictPreemptionContractProtoOrBuilder;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProto;
|
||||
import org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProtoOrBuilder;
|
||||
|
||||
public class StrictPreemptionContractPBImpl extends StrictPreemptionContract {
|
||||
|
|
@ -207,6 +207,28 @@ message ResourceRequestProto {
|
|||
optional bool relax_locality = 5 [default = true];
|
||||
}
|
||||
|
||||
message PreemptionMessageProto {
|
||||
optional StrictPreemptionContractProto strictContract = 1;
|
||||
optional PreemptionContractProto contract = 2;
|
||||
}
|
||||
|
||||
message StrictPreemptionContractProto {
|
||||
repeated PreemptionContainerProto container = 1;
|
||||
}
|
||||
|
||||
message PreemptionContractProto {
|
||||
repeated PreemptionResourceRequestProto resource = 1;
|
||||
repeated PreemptionContainerProto container = 2;
|
||||
}
|
||||
|
||||
message PreemptionContainerProto {
|
||||
optional ContainerIdProto id = 1;
|
||||
}
|
||||
|
||||
message PreemptionResourceRequestProto {
|
||||
optional ResourceRequestProto resource = 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
////// From client_RM_Protocol /////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -70,28 +70,6 @@ message AllocateResponseProto {
|
|||
repeated hadoop.common.TokenProto nm_tokens = 9;
|
||||
}
|
||||
|
||||
message PreemptionMessageProto {
|
||||
optional StrictPreemptionContractProto strictContract = 1;
|
||||
optional PreemptionContractProto contract = 2;
|
||||
}
|
||||
|
||||
message StrictPreemptionContractProto {
|
||||
repeated PreemptionContainerProto container = 1;
|
||||
}
|
||||
|
||||
message PreemptionContractProto {
|
||||
repeated PreemptionResourceRequestProto resource = 1;
|
||||
repeated PreemptionContainerProto container = 2;
|
||||
}
|
||||
|
||||
message PreemptionContainerProto {
|
||||
optional ContainerIdProto id = 1;
|
||||
}
|
||||
|
||||
message PreemptionResourceRequestProto {
|
||||
optional ResourceRequestProto resource = 1;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
/////// client_RM_Protocol ///////////////////////////
|
||||
//////////////////////////////////////////////////////
|
||||
|
|
|
@ -41,7 +41,6 @@ import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
|
|||
import org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponse;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.PreemptionResourceRequest;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse;
|
||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||
|
@ -51,6 +50,7 @@ import org.apache.hadoop.yarn.api.records.NodeReport;
|
|||
import org.apache.hadoop.yarn.api.records.PreemptionContainer;
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionContract;
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionMessage;
|
||||
import org.apache.hadoop.yarn.api.records.PreemptionResourceRequest;
|
||||
import org.apache.hadoop.yarn.api.records.Resource;
|
||||
import org.apache.hadoop.yarn.api.records.ResourceRequest;
|
||||
import org.apache.hadoop.yarn.api.records.StrictPreemptionContract;
|
||||
|
|
Loading…
Reference in New Issue