diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PriorityLabelsPerQueue.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PriorityLabelsPerQueue.java new file mode 100644 index 0000000..68ae381 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PriorityLabelsPerQueue.java @@ -0,0 +1,79 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.records; + +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Stable; +import org.apache.hadoop.classification.InterfaceStability.Unstable; +import org.apache.hadoop.yarn.util.Records; + +/** + *

PriorityLabelsPerQueue holds different types of priority labels in a queue.

+ * + *

It includes information such as: + *

+ *

+ * + */ +@Public +@Stable +public abstract class PriorityLabelsPerQueue { + + @Private + @Unstable + public static PriorityLabelsPerQueue newInstance(String maxPriorityLabel, + String defaultPriorityLabel) { + PriorityLabelsPerQueue perQueuePriorityLabels = Records + .newRecord(PriorityLabelsPerQueue.class); + perQueuePriorityLabels.setMaxPriorityLabel(maxPriorityLabel); + perQueuePriorityLabels.setDefaultPriorityLabel(defaultPriorityLabel); + return perQueuePriorityLabels; + } + + /** + * Get the max priority label of the queue. + * + * @return max priority label configured in the queue + */ + @Public + @Stable + public abstract String getMaxPriorityLabel(); + + @Private + @Unstable + public abstract void setMaxPriorityLabel(String maxPriorityLabel); + + /** + * Get the default priority label of the queue. + * + * @return default priority label configured in the queue + */ + @Public + @Stable + public abstract String getDefaultPriorityLabel(); + + @Private + @Unstable + public abstract void setDefaultPriorityLabel(String defaultPriorityLabel); + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/AddToClusterPriorityLabelsRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/AddToClusterPriorityLabelsRequest.java new file mode 100644 index 0000000..34431e4 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/AddToClusterPriorityLabelsRequest.java @@ -0,0 +1,45 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import java.util.Set; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.util.Records; + +@Public +@Evolving +public abstract class AddToClusterPriorityLabelsRequest { + public static AddToClusterPriorityLabelsRequest newInstance( + Set priorityLabels) { + AddToClusterPriorityLabelsRequest request = Records + .newRecord(AddToClusterPriorityLabelsRequest.class); + request.setPriorityLabels(priorityLabels); + return request; + } + + @Public + @Evolving + public abstract void setPriorityLabels(Set priorityLabels); + + @Public + @Evolving + public abstract Set getPriorityLabels(); +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/AddToClusterPriorityLabelsResponse.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/AddToClusterPriorityLabelsResponse.java new file mode 100644 index 0000000..1da313b --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/AddToClusterPriorityLabelsResponse.java @@ -0,0 +1,31 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.util.Records; + +@Public +@Evolving +public abstract class AddToClusterPriorityLabelsResponse { + public static AddToClusterPriorityLabelsResponse newInstance() { + return Records.newRecord(AddToClusterPriorityLabelsResponse.class); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetClusterPriorityLabelsRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetClusterPriorityLabelsRequest.java new file mode 100644 index 0000000..69029bd --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetClusterPriorityLabelsRequest.java @@ -0,0 +1,29 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import org.apache.hadoop.yarn.util.Records; + +public abstract class GetClusterPriorityLabelsRequest { + public static GetClusterPriorityLabelsRequest newInstance() { + GetClusterPriorityLabelsRequest request = + Records.newRecord(GetClusterPriorityLabelsRequest.class); + return request; + } +} \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetClusterPriorityLabelsResponse.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetClusterPriorityLabelsResponse.java new file mode 100644 index 0000000..80bd6b7 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetClusterPriorityLabelsResponse.java @@ -0,0 +1,42 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import java.util.Set; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.util.Records; + +public abstract class GetClusterPriorityLabelsResponse { + public static GetClusterPriorityLabelsResponse newInstance(Set priorityLabels) { + GetClusterPriorityLabelsResponse response = + Records.newRecord(GetClusterPriorityLabelsResponse.class); + response.setPriorityLabels(priorityLabels); + return response; + } + + @Public + @Evolving + public abstract void setPriorityLabels(Set priorityLabels); + + @Public + @Evolving + public abstract Set getPriorityLabels(); +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetPriorityLabelForQueueRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetPriorityLabelForQueueRequest.java new file mode 100644 index 0000000..4546fd4 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetPriorityLabelForQueueRequest.java @@ -0,0 +1,41 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.util.Records; + +public abstract class GetPriorityLabelForQueueRequest { + public static GetPriorityLabelForQueueRequest newInstance(String queueName, + String userName) { + GetPriorityLabelForQueueRequest request = + Records.newRecord(GetPriorityLabelForQueueRequest.class); + request.setQueueName(queueName); + return request; + } + + @Public + @Evolving + public abstract void setQueueName(String queueName); + + @Public + @Evolving + public abstract String getQueueName(); +} \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetPriorityLabelForQueueResponse.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetPriorityLabelForQueueResponse.java new file mode 100644 index 0000000..ab029d4 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/GetPriorityLabelForQueueResponse.java @@ -0,0 +1,43 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.api.records.PriorityLabelsPerQueue; +import org.apache.hadoop.yarn.util.Records; + +public abstract class GetPriorityLabelForQueueResponse { + public static GetPriorityLabelForQueueResponse newInstance( + PriorityLabelsPerQueue priorityLabelsPerQueue) { + GetPriorityLabelForQueueResponse response = Records + .newRecord(GetPriorityLabelForQueueResponse.class); + response.setPriorityLabelsPerQueue(priorityLabelsPerQueue); + return response; + } + + @Public + @Evolving + public abstract void setPriorityLabelsPerQueue( + PriorityLabelsPerQueue priorityLabelsPerQueue); + + @Public + @Evolving + public abstract PriorityLabelsPerQueue getPriorityLabelsPerQueue(); +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/RemoveFromClusterPriorityLabelsRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/RemoveFromClusterPriorityLabelsRequest.java new file mode 100644 index 0000000..c46404b --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/RemoveFromClusterPriorityLabelsRequest.java @@ -0,0 +1,46 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import java.util.Collection; +import java.util.Set; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.util.Records; + +@Public +@Evolving +public abstract class RemoveFromClusterPriorityLabelsRequest { + public static RemoveFromClusterPriorityLabelsRequest newInstance( + Set labels) { + RemoveFromClusterPriorityLabelsRequest request = + Records.newRecord(RemoveFromClusterPriorityLabelsRequest.class); + request.setPriorityLabels(labels); + return request; + } + + @Public + @Evolving + public abstract void setPriorityLabels(Set labels); + + @Public + @Evolving + public abstract Collection getPriorityLabels(); +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/RemoveFromClusterPriorityLabelsResponse.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/RemoveFromClusterPriorityLabelsResponse.java new file mode 100644 index 0000000..b5d0a20 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/RemoveFromClusterPriorityLabelsResponse.java @@ -0,0 +1,31 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.util.Records; + +@Public +@Evolving +public abstract class RemoveFromClusterPriorityLabelsResponse { + public static RemoveFromClusterPriorityLabelsResponse newInstance() { + return Records.newRecord(RemoveFromClusterPriorityLabelsResponse.class); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/ReplacePriorityLabelsOnQueueRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/ReplacePriorityLabelsOnQueueRequest.java new file mode 100644 index 0000000..5fc430d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/ReplacePriorityLabelsOnQueueRequest.java @@ -0,0 +1,46 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import java.util.Map; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.api.records.PriorityLabelsPerQueue; +import org.apache.hadoop.yarn.util.Records; + +@Public +@Evolving +public abstract class ReplacePriorityLabelsOnQueueRequest { + public static ReplacePriorityLabelsOnQueueRequest newInstance( + Map map) { + ReplacePriorityLabelsOnQueueRequest request = Records + .newRecord(ReplacePriorityLabelsOnQueueRequest.class); + request.setQueueToLabels(map); + return request; + } + + @Public + @Evolving + public abstract void setQueueToLabels(Map map); + + @Public + @Evolving + public abstract Map getQueueToLabels(); +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/ReplacePriorityLabelsOnQueueResponse.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/ReplacePriorityLabelsOnQueueResponse.java new file mode 100644 index 0000000..7335bd0 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/ReplacePriorityLabelsOnQueueResponse.java @@ -0,0 +1,31 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.util.Records; + +@Public +@Evolving +public abstract class ReplacePriorityLabelsOnQueueResponse { + public static ReplacePriorityLabelsOnQueueResponse newInstance() { + return Records.newRecord(ReplacePriorityLabelsOnQueueResponse.class); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetPriorityLabelForQueueRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetPriorityLabelForQueueRequest.java new file mode 100644 index 0000000..d369158 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetPriorityLabelForQueueRequest.java @@ -0,0 +1,54 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.api.records.PriorityLabelsPerQueue; +import org.apache.hadoop.yarn.util.Records; + +@Public +@Evolving +public abstract class SetPriorityLabelForQueueRequest { + public static SetPriorityLabelForQueueRequest newInstance(String queueName, + PriorityLabelsPerQueue priorityLabelsPerQueue) { + SetPriorityLabelForQueueRequest request = Records + .newRecord(SetPriorityLabelForQueueRequest.class); + request.setQueueName(queueName); + request.setPriorityLabelsPerQueue(priorityLabelsPerQueue); + return request; + } + + @Public + @Evolving + public abstract void setQueueName(String queueName); + + @Public + @Evolving + public abstract String getQueueName(); + + @Public + @Evolving + public abstract void setPriorityLabelsPerQueue( + PriorityLabelsPerQueue priorityLabelsPerQueue); + + @Public + @Evolving + public abstract PriorityLabelsPerQueue getPriorityLabelsPerQueue(); +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetPriorityLabelForQueueResponse.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetPriorityLabelForQueueResponse.java new file mode 100644 index 0000000..1e71065 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetPriorityLabelForQueueResponse.java @@ -0,0 +1,31 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.util.Records; + +@Public +@Evolving +public abstract class SetPriorityLabelForQueueResponse { + public static SetPriorityLabelForQueueResponse newInstance() { + return Records.newRecord(SetPriorityLabelForQueueResponse.class); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetQueueAclToPriorityLabelRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetQueueAclToPriorityLabelRequest.java new file mode 100644 index 0000000..c1a536d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetQueueAclToPriorityLabelRequest.java @@ -0,0 +1,63 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import java.util.Set; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.util.Records; + +@Public +@Evolving +public abstract class SetQueueAclToPriorityLabelRequest { + public static SetQueueAclToPriorityLabelRequest newInstance(String queueName, + String userName, Set userList) { + SetQueueAclToPriorityLabelRequest request = + Records.newRecord(SetQueueAclToPriorityLabelRequest.class); + request.setQueueName(queueName); + request.setPriorityLabelName(userName); + request.setQueuePriorityLabelACL(userList); + return request; + } + + @Public + @Evolving + public abstract void setQueueName(String queueName); + + @Public + @Evolving + public abstract String getQueueName(); + + @Public + @Evolving + public abstract void setPriorityLabelName(String userName); + + @Public + @Evolving + public abstract String getPriorityLabelName(); + + @Public + @Evolving + public abstract void setQueuePriorityLabelACL(Set userList); + + @Public + @Evolving + public abstract Set getQueuePriorityLabelACL(); +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetQueueAclToPriorityLabelResponse.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetQueueAclToPriorityLabelResponse.java new file mode 100644 index 0000000..0293c11 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SetQueueAclToPriorityLabelResponse.java @@ -0,0 +1,31 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords; + +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.yarn.util.Records; + +@Public +@Evolving +public abstract class SetQueueAclToPriorityLabelResponse { + public static SetQueueAclToPriorityLabelResponse newInstance() { + return Records.newRecord(SetQueueAclToPriorityLabelResponse.class); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/server/yarn_server_resourcemanager_service_protos.proto b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/server/yarn_server_resourcemanager_service_protos.proto index 900e349..c97013d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/server/yarn_server_resourcemanager_service_protos.proto +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/server/yarn_server_resourcemanager_service_protos.proto @@ -93,10 +93,63 @@ message ReplaceLabelsOnNodeRequestProto { repeated NodeIdToLabelsProto nodeToLabels = 1; } -message ReplaceLabelsOnNodeResponseProto { - +message ReplaceLabelsOnNodeResponseProto { } +message AddToClusterPriorityLabelsRequestProto { + repeated string priorityLabels = 1; +} + +message AddToClusterPriorityLabelsResponseProto { +} + +message SetPriorityLabelForQueueRequestProto { + optional string queueName = 1; + optional PriorityLabelsPerQueueProto priorityLabelsPerQueue = 2; +} + +message SetPriorityLabelForQueueResponseProto { +} + +message RemoveFromClusterPriorityLabelsRequestProto { + repeated string priorityLabels = 1; +} + +message RemoveFromClusterPriorityLabelsResponseProto { +} + +message ReplacePriorityLabelsOnQueueRequestProto { + repeated QueueToPriorityLabelsProto queueToPriorityLabels = 1; +} + +message ReplacePriorityLabelsOnQueueResponseProto { +} + +message GetPriorityLabelForQueueRequestProto { + optional string queueName = 1; +} + +message GetPriorityLabelForQueueResponseProto { + optional PriorityLabelsPerQueueProto priorityLabelsPerQueue = 1; +} + +message GetClusterPriorityLabelsRequestProto { +} + +message GetClusterPriorityLabelsResponseProto { + repeated string priorityLabels = 1; +} + +message SetQueueAclToPriorityLabelRequestProto { + optional string queueName = 1; + optional string priorityLabelName = 2; + repeated string queuePriorityLabelACL = 3; +} + +message SetQueueAclToPriorityLabelResponseProto { +} + + ////////////////////////////////////////////////////////////////// ///////////// RM Failover related records //////////////////////// ////////////////////////////////////////////////////////////////// diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_protos.proto b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_protos.proto index c4e756d..2ae0010 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_protos.proto +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_protos.proto @@ -238,6 +238,16 @@ message NodeIdToLabelsProto { repeated string nodeLabels = 2; } +message PriorityLabelsPerQueueProto { + optional string maxPriorityLabel = 1; + optional string defaultPriorityLabel = 2; +} + +message QueueToPriorityLabelsProto { + optional string queueName = 1; + optional PriorityLabelsPerQueueProto priorityLabelsPerQueue = 2; +} + //////////////////////////////////////////////////////////////////////// ////// From AM_RM_Protocol ///////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PriorityLabelsPerQueuePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PriorityLabelsPerQueuePBImpl.java new file mode 100644 index 0000000..045c1b2 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PriorityLabelsPerQueuePBImpl.java @@ -0,0 +1,81 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.records.impl.pb; + +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; +import org.apache.hadoop.yarn.api.records.PriorityLabelsPerQueue; +import org.apache.hadoop.yarn.proto.YarnProtos.PriorityLabelsPerQueueProto; +import org.apache.hadoop.yarn.proto.YarnProtos.PriorityLabelsPerQueueProtoOrBuilder; + + +@Private +@Unstable +public class PriorityLabelsPerQueuePBImpl extends PriorityLabelsPerQueue { + PriorityLabelsPerQueueProto proto = PriorityLabelsPerQueueProto + .getDefaultInstance(); + PriorityLabelsPerQueueProto.Builder builder = null; + boolean viaProto = false; + + public PriorityLabelsPerQueuePBImpl() { + builder = PriorityLabelsPerQueueProto.newBuilder(); + } + + public PriorityLabelsPerQueuePBImpl(PriorityLabelsPerQueueProto p) { + this.proto = p; + viaProto = true; + } + + public PriorityLabelsPerQueueProto getProto() { + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + private void maybeInitBuilder() { + if (viaProto || builder == null) { + builder = PriorityLabelsPerQueueProto.newBuilder(proto); + } + viaProto = false; + } + + @Override + public String getMaxPriorityLabel() { + PriorityLabelsPerQueueProtoOrBuilder p = viaProto ? proto : builder; + return (p.getMaxPriorityLabel()); + } + + @Override + public void setMaxPriorityLabel(String maxPriorityLabel) { + maybeInitBuilder(); + builder.setMaxPriorityLabel(maxPriorityLabel); + } + + @Override + public String getDefaultPriorityLabel() { + PriorityLabelsPerQueueProtoOrBuilder p = viaProto ? proto : builder; + return (p.getDefaultPriorityLabel()); + } + + @Override + public void setDefaultPriorityLabel(String defaultPriorityLabel) { + maybeInitBuilder(); + builder.setMaxPriorityLabel(defaultPriorityLabel); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/AddToClusterPriorityLabelsRequestPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/AddToClusterPriorityLabelsRequestPBImpl.java new file mode 100644 index 0000000..35ffa47 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/AddToClusterPriorityLabelsRequestPBImpl.java @@ -0,0 +1,117 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import java.util.HashSet; +import java.util.Set; + +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.AddToClusterPriorityLabelsRequestProto; +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.AddToClusterPriorityLabelsRequestProtoOrBuilder; +import org.apache.hadoop.yarn.server.api.protocolrecords.AddToClusterPriorityLabelsRequest; + +public class AddToClusterPriorityLabelsRequestPBImpl extends + AddToClusterPriorityLabelsRequest { + AddToClusterPriorityLabelsRequestProto proto = AddToClusterPriorityLabelsRequestProto + .getDefaultInstance(); + AddToClusterPriorityLabelsRequestProto.Builder builder = null; + boolean viaProto = false; + + private Set priorityLabels = null; + + public AddToClusterPriorityLabelsRequestPBImpl() { + this.builder = AddToClusterPriorityLabelsRequestProto.newBuilder(); + } + + public AddToClusterPriorityLabelsRequestPBImpl( + AddToClusterPriorityLabelsRequestProto proto) { + this.proto = proto; + viaProto = true; + } + + private void maybeInitBuilder() { + if (viaProto || builder == null) { + builder = AddToClusterPriorityLabelsRequestProto.newBuilder(proto); + } + viaProto = false; + } + + private void mergeLocalToProto() { + if (viaProto) + maybeInitBuilder(); + mergeLocalToBuilder(); + proto = builder.build(); + viaProto = true; + } + + private void mergeLocalToBuilder() { + if (this.priorityLabels != null && !this.priorityLabels.isEmpty()) { + builder.clearPriorityLabels(); + builder.addAllPriorityLabels(this.priorityLabels); + } + } + + public AddToClusterPriorityLabelsRequestProto getProto() { + mergeLocalToProto(); + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + @Override + public void setPriorityLabels(Set priorityLabels) { + maybeInitBuilder(); + if (priorityLabels == null || priorityLabels.isEmpty()) { + builder.clearPriorityLabels(); + ; + } + this.priorityLabels = priorityLabels; + } + + private void initPriorityLabel() { + if (this.priorityLabels != null) { + return; + } + AddToClusterPriorityLabelsRequestProtoOrBuilder p = viaProto ? proto + : builder; + this.priorityLabels = new HashSet(); + this.priorityLabels.addAll(p.getPriorityLabelsList()); + } + + @Override + public Set getPriorityLabels() { + initPriorityLabel(); + return this.priorityLabels; + } + + @Override + public int hashCode() { + assert false : "hashCode not designed"; + return 0; + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/AddToClusterPriorityLabelsResponsePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/AddToClusterPriorityLabelsResponsePBImpl.java new file mode 100644 index 0000000..04159f5 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/AddToClusterPriorityLabelsResponsePBImpl.java @@ -0,0 +1,69 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.AddToClusterPriorityLabelsResponseProto; +import org.apache.hadoop.yarn.server.api.protocolrecords.AddToClusterPriorityLabelsResponse; + +import com.google.protobuf.TextFormat; + +public class AddToClusterPriorityLabelsResponsePBImpl extends + AddToClusterPriorityLabelsResponse { + + AddToClusterPriorityLabelsResponseProto proto = AddToClusterPriorityLabelsResponseProto + .getDefaultInstance(); + AddToClusterPriorityLabelsResponseProto.Builder builder = null; + boolean viaProto = false; + + public AddToClusterPriorityLabelsResponsePBImpl() { + builder = AddToClusterPriorityLabelsResponseProto.newBuilder(); + } + + public AddToClusterPriorityLabelsResponsePBImpl( + AddToClusterPriorityLabelsResponseProto proto) { + this.proto = proto; + viaProto = true; + } + + public AddToClusterPriorityLabelsResponseProto getProto() { + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + @Override + public int hashCode() { + return getProto().hashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } + + @Override + public String toString() { + return TextFormat.shortDebugString(getProto()); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetClusterPriorityLabelsRequestPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetClusterPriorityLabelsRequestPBImpl.java new file mode 100644 index 0000000..5aabd42 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetClusterPriorityLabelsRequestPBImpl.java @@ -0,0 +1,67 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.GetClusterPriorityLabelsRequestProto; +import org.apache.hadoop.yarn.server.api.protocolrecords.GetClusterPriorityLabelsRequest; + +import com.google.protobuf.TextFormat; + +public class GetClusterPriorityLabelsRequestPBImpl extends GetClusterPriorityLabelsRequest { + + GetClusterPriorityLabelsRequestProto proto = GetClusterPriorityLabelsRequestProto + .getDefaultInstance(); + GetClusterPriorityLabelsRequestProto.Builder builder = null; + boolean viaProto = false; + + public GetClusterPriorityLabelsRequestPBImpl() { + builder = GetClusterPriorityLabelsRequestProto.newBuilder(); + } + + public GetClusterPriorityLabelsRequestPBImpl(GetClusterPriorityLabelsRequestProto proto) { + this.proto = proto; + viaProto = true; + } + + public GetClusterPriorityLabelsRequestProto getProto() { + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + @Override + public int hashCode() { + return getProto().hashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } + + @Override + public String toString() { + return TextFormat.shortDebugString(getProto()); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetClusterPriorityLabelsResponsePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetClusterPriorityLabelsResponsePBImpl.java new file mode 100644 index 0000000..b0c8072 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetClusterPriorityLabelsResponsePBImpl.java @@ -0,0 +1,116 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import java.util.HashSet; +import java.util.Set; + +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.GetClusterPriorityLabelsResponseProto; +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.GetClusterPriorityLabelsResponseProtoOrBuilder; +import org.apache.hadoop.yarn.server.api.protocolrecords.GetClusterPriorityLabelsResponse; + +public class GetClusterPriorityLabelsResponsePBImpl extends + GetClusterPriorityLabelsResponse { + GetClusterPriorityLabelsResponseProto proto = GetClusterPriorityLabelsResponseProto + .getDefaultInstance(); + GetClusterPriorityLabelsResponseProto.Builder builder = null; + boolean viaProto = false; + + private Set priorityLabels = null; + + public GetClusterPriorityLabelsResponsePBImpl() { + this.builder = GetClusterPriorityLabelsResponseProto.newBuilder(); + } + + public GetClusterPriorityLabelsResponsePBImpl( + GetClusterPriorityLabelsResponseProto proto) { + this.proto = proto; + viaProto = true; + } + + private void maybeInitBuilder() { + if (viaProto || builder == null) { + builder = GetClusterPriorityLabelsResponseProto.newBuilder(proto); + } + viaProto = false; + } + + private void mergeLocalToProto() { + if (viaProto) + maybeInitBuilder(); + mergeLocalToBuilder(); + proto = builder.build(); + viaProto = true; + } + + private void mergeLocalToBuilder() { + if (this.priorityLabels != null && !this.priorityLabels.isEmpty()) { + builder.clearPriorityLabels(); + builder.addAllPriorityLabels(this.priorityLabels); + } + } + + public GetClusterPriorityLabelsResponseProto getProto() { + mergeLocalToProto(); + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + @Override + public void setPriorityLabels(Set priorityLabels) { + maybeInitBuilder(); + if (priorityLabels == null || priorityLabels.isEmpty()) { + builder.clearPriorityLabels(); + } + this.priorityLabels = priorityLabels; + } + + private void initPriorityLabel() { + if (this.priorityLabels != null) { + return; + } + GetClusterPriorityLabelsResponseProtoOrBuilder p = viaProto ? proto + : builder; + this.priorityLabels = new HashSet(); + this.priorityLabels.addAll(p.getPriorityLabelsList()); + } + + @Override + public Set getPriorityLabels() { + initPriorityLabel(); + return this.priorityLabels; + } + + @Override + public int hashCode() { + assert false : "hashCode not designed"; + return 0; + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetPriorityLabelForQueueRequestPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetPriorityLabelForQueueRequestPBImpl.java new file mode 100644 index 0000000..dc4d8f7 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetPriorityLabelForQueueRequestPBImpl.java @@ -0,0 +1,97 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.GetPriorityLabelForQueueRequestProto; +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.GetPriorityLabelForQueueRequestProtoOrBuilder; +import org.apache.hadoop.yarn.server.api.protocolrecords.GetPriorityLabelForQueueRequest; + +import com.google.protobuf.TextFormat; + +public class GetPriorityLabelForQueueRequestPBImpl extends + GetPriorityLabelForQueueRequest { + + GetPriorityLabelForQueueRequestProto proto = GetPriorityLabelForQueueRequestProto + .getDefaultInstance(); + GetPriorityLabelForQueueRequestProto.Builder builder = null; + boolean viaProto = false; + + public GetPriorityLabelForQueueRequestPBImpl() { + builder = GetPriorityLabelForQueueRequestProto.newBuilder(); + } + + public GetPriorityLabelForQueueRequestPBImpl( + GetPriorityLabelForQueueRequestProto proto) { + this.proto = proto; + viaProto = true; + } + + public GetPriorityLabelForQueueRequestProto getProto() { + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + @Override + public int hashCode() { + return getProto().hashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } + + @Override + public String toString() { + return TextFormat.shortDebugString(getProto()); + } + + @Override + public void setQueueName(String queueName) { + maybeInitBuilder(); + if (queueName == null) { + builder.clearQueueName(); + return; + } + builder.setQueueName(queueName); + } + + @Override + public String getQueueName() { + GetPriorityLabelForQueueRequestProtoOrBuilder p = viaProto ? proto + : builder; + if (!p.hasQueueName()) { + return null; + } + return (p.getQueueName()); + } + + private void maybeInitBuilder() { + if (viaProto || builder == null) { + builder = GetPriorityLabelForQueueRequestProto.newBuilder(proto); + } + viaProto = false; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetPriorityLabelForQueueResponsePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetPriorityLabelForQueueResponsePBImpl.java new file mode 100644 index 0000000..e2b4779 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/GetPriorityLabelForQueueResponsePBImpl.java @@ -0,0 +1,128 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import org.apache.hadoop.yarn.api.records.PriorityLabelsPerQueue; +import org.apache.hadoop.yarn.api.records.impl.pb.PriorityLabelsPerQueuePBImpl; +import org.apache.hadoop.yarn.proto.YarnProtos.PriorityLabelsPerQueueProto; +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.GetPriorityLabelForQueueResponseProto; +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.GetPriorityLabelForQueueResponseProtoOrBuilder; +import org.apache.hadoop.yarn.server.api.protocolrecords.GetPriorityLabelForQueueResponse; + +public class GetPriorityLabelForQueueResponsePBImpl extends + GetPriorityLabelForQueueResponse { + GetPriorityLabelForQueueResponseProto proto = GetPriorityLabelForQueueResponseProto + .getDefaultInstance(); + GetPriorityLabelForQueueResponseProto.Builder builder = null; + boolean viaProto = false; + + private PriorityLabelsPerQueue priorityLabelsPerQueue = null; + + public GetPriorityLabelForQueueResponsePBImpl() { + this.builder = GetPriorityLabelForQueueResponseProto.newBuilder(); + } + + public GetPriorityLabelForQueueResponsePBImpl( + GetPriorityLabelForQueueResponseProto proto) { + this.proto = proto; + viaProto = true; + } + + private void maybeInitBuilder() { + if (viaProto || builder == null) { + builder = GetPriorityLabelForQueueResponseProto.newBuilder(proto); + } + viaProto = false; + } + + private void mergeLocalToProto() { + if (viaProto) + maybeInitBuilder(); + mergeLocalToBuilder(); + proto = builder.build(); + viaProto = true; + } + + private void mergeLocalToBuilder() { + if (this.priorityLabelsPerQueue != null) { + builder.clearPriorityLabelsPerQueue(); + builder + .setPriorityLabelsPerQueue(convertToProtoFormat(this.priorityLabelsPerQueue)); + } + } + + public GetPriorityLabelForQueueResponseProto getProto() { + mergeLocalToProto(); + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + private PriorityLabelsPerQueuePBImpl convertFromProtoFormat( + PriorityLabelsPerQueueProto p) { + return new PriorityLabelsPerQueuePBImpl(p); + } + + private PriorityLabelsPerQueueProto convertToProtoFormat( + PriorityLabelsPerQueue t) { + return ((PriorityLabelsPerQueuePBImpl) t).getProto(); + } + + @Override + public int hashCode() { + assert false : "hashCode not designed"; + return 0; + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } + + @Override + public void setPriorityLabelsPerQueue( + PriorityLabelsPerQueue priorityLabelsPerQueue) { + maybeInitBuilder(); + if (priorityLabelsPerQueue == null) { + builder.clearPriorityLabelsPerQueue(); + return; + } + this.priorityLabelsPerQueue = priorityLabelsPerQueue; + } + + @Override + public PriorityLabelsPerQueue getPriorityLabelsPerQueue() { + GetPriorityLabelForQueueResponseProtoOrBuilder p = viaProto ? proto + : builder; + if (this.priorityLabelsPerQueue != null) { + return this.priorityLabelsPerQueue; + } + if (!p.hasPriorityLabelsPerQueue()) { + return null; + } + this.priorityLabelsPerQueue = convertFromProtoFormat(p + .getPriorityLabelsPerQueue()); + return this.priorityLabelsPerQueue; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/RemoveFromClusterPriorityLabelsRequestPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/RemoveFromClusterPriorityLabelsRequestPBImpl.java new file mode 100644 index 0000000..0598134 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/RemoveFromClusterPriorityLabelsRequestPBImpl.java @@ -0,0 +1,115 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import java.util.HashSet; +import java.util.Set; + +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.RemoveFromClusterPriorityLabelsRequestProto; +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.RemoveFromClusterPriorityLabelsRequestProtoOrBuilder; +import org.apache.hadoop.yarn.server.api.protocolrecords.RemoveFromClusterPriorityLabelsRequest; + +public class RemoveFromClusterPriorityLabelsRequestPBImpl extends + RemoveFromClusterPriorityLabelsRequest { + Set priorityLabels; + RemoveFromClusterPriorityLabelsRequestProto proto = + RemoveFromClusterPriorityLabelsRequestProto.getDefaultInstance(); + RemoveFromClusterPriorityLabelsRequestProto.Builder builder = null; + boolean viaProto = false; + + public RemoveFromClusterPriorityLabelsRequestPBImpl() { + this.builder = RemoveFromClusterPriorityLabelsRequestProto.newBuilder(); + } + + public RemoveFromClusterPriorityLabelsRequestPBImpl( + RemoveFromClusterPriorityLabelsRequestProto proto) { + this.proto = proto; + viaProto = true; + } + + private void maybeInitBuilder() { + if (viaProto || builder == null) { + builder = RemoveFromClusterPriorityLabelsRequestProto.newBuilder(proto); + } + viaProto = false; + } + + private void mergeLocalToBuilder() { + if (this.priorityLabels != null && !this.priorityLabels.isEmpty()) { + builder.clearPriorityLabels(); + builder.addAllPriorityLabels(this.priorityLabels); + } + } + + private void mergeLocalToProto() { + if (viaProto) + maybeInitBuilder(); + mergeLocalToBuilder(); + proto = builder.build(); + viaProto = true; + } + + public RemoveFromClusterPriorityLabelsRequestProto getProto() { + mergeLocalToProto(); + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + private void initPriorityLabels() { + if (this.priorityLabels != null) { + return; + } + RemoveFromClusterPriorityLabelsRequestProtoOrBuilder p = + viaProto ? proto : builder; + this.priorityLabels = new HashSet(); + this.priorityLabels.addAll(p.getPriorityLabelsList()); + } + + @Override + public void setPriorityLabels(Set priorityLabels) { + maybeInitBuilder(); + if (priorityLabels == null || priorityLabels.isEmpty()) { + builder.clearPriorityLabels(); + } + this.priorityLabels = priorityLabels; + } + + @Override + public Set getPriorityLabels() { + initPriorityLabels(); + return this.priorityLabels; + } + + @Override + public int hashCode() { + assert false : "hashCode not designed"; + return 0; + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/RemoveFromClusterPriorityLabelsResponsePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/RemoveFromClusterPriorityLabelsResponsePBImpl.java new file mode 100644 index 0000000..f490a4d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/RemoveFromClusterPriorityLabelsResponsePBImpl.java @@ -0,0 +1,69 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.RemoveFromClusterPriorityLabelsResponseProto; +import org.apache.hadoop.yarn.server.api.protocolrecords.RemoveFromClusterPriorityLabelsResponse; + +import com.google.protobuf.TextFormat; + +public class RemoveFromClusterPriorityLabelsResponsePBImpl extends + RemoveFromClusterPriorityLabelsResponse { + + RemoveFromClusterPriorityLabelsResponseProto proto = + RemoveFromClusterPriorityLabelsResponseProto.getDefaultInstance(); + RemoveFromClusterPriorityLabelsResponseProto.Builder builder = null; + boolean viaProto = false; + + public RemoveFromClusterPriorityLabelsResponsePBImpl() { + builder = RemoveFromClusterPriorityLabelsResponseProto.newBuilder(); + } + + public RemoveFromClusterPriorityLabelsResponsePBImpl( + RemoveFromClusterPriorityLabelsResponseProto proto) { + this.proto = proto; + viaProto = true; + } + + public RemoveFromClusterPriorityLabelsResponseProto getProto() { + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + @Override + public int hashCode() { + return getProto().hashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } + + @Override + public String toString() { + return TextFormat.shortDebugString(getProto()); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/ReplacePriorityLabelsOnQueueRequestPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/ReplacePriorityLabelsOnQueueRequestPBImpl.java new file mode 100644 index 0000000..09fcf49 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/ReplacePriorityLabelsOnQueueRequestPBImpl.java @@ -0,0 +1,181 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.apache.hadoop.yarn.api.records.PriorityLabelsPerQueue; +import org.apache.hadoop.yarn.api.records.impl.pb.PriorityLabelsPerQueuePBImpl; +import org.apache.hadoop.yarn.proto.YarnProtos.PriorityLabelsPerQueueProto; +import org.apache.hadoop.yarn.proto.YarnProtos.QueueToPriorityLabelsProto; +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.ReplacePriorityLabelsOnQueueRequestProto; +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.ReplacePriorityLabelsOnQueueRequestProtoOrBuilder; +import org.apache.hadoop.yarn.server.api.protocolrecords.ReplacePriorityLabelsOnQueueRequest; + + +public class ReplacePriorityLabelsOnQueueRequestPBImpl extends + ReplacePriorityLabelsOnQueueRequest { + ReplacePriorityLabelsOnQueueRequestProto proto = ReplacePriorityLabelsOnQueueRequestProto + .getDefaultInstance(); + ReplacePriorityLabelsOnQueueRequestProto.Builder builder = null; + boolean viaProto = false; + + private Map queueNameToPriorityLabel; + + public ReplacePriorityLabelsOnQueueRequestPBImpl() { + this.builder = ReplacePriorityLabelsOnQueueRequestProto.newBuilder(); + } + + public ReplacePriorityLabelsOnQueueRequestPBImpl( + ReplacePriorityLabelsOnQueueRequestProto proto) { + this.proto = proto; + this.viaProto = true; + } + + private void initQueueToLabels() { + if (this.queueNameToPriorityLabel != null) { + return; + } + ReplacePriorityLabelsOnQueueRequestProtoOrBuilder p = viaProto ? proto + : builder; + List list = p.getQueueToPriorityLabelsList(); + this.queueNameToPriorityLabel = new HashMap(); + + for (QueueToPriorityLabelsProto c : list) { + this.queueNameToPriorityLabel.put(c.getQueueName(), + PriorityLabelsPerQueue.newInstance( + convertFromProtoFormat(c.getPriorityLabelsPerQueue()) + .getMaxPriorityLabel(), + convertFromProtoFormat(c.getPriorityLabelsPerQueue()) + .getDefaultPriorityLabel())); + } + } + + private void maybeInitBuilder() { + if (viaProto || builder == null) { + builder = ReplacePriorityLabelsOnQueueRequestProto.newBuilder(proto); + } + viaProto = false; + } + + private void addQueueToLabelsToProto() { + maybeInitBuilder(); + builder.clearQueueToPriorityLabels(); + if (queueNameToPriorityLabel == null) { + return; + } + + Iterable iterable = new Iterable() { + @Override + public Iterator iterator() { + return new Iterator() { + + Iterator> iter = queueNameToPriorityLabel + .entrySet().iterator(); + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + + @Override + public QueueToPriorityLabelsProto next() { + Entry now = iter.next(); + return QueueToPriorityLabelsProto + .newBuilder() + .setQueueName(now.getKey()) + .clearPriorityLabelsPerQueue() + .setPriorityLabelsPerQueue(convertToProtoFormat(now.getValue())) + .build(); + } + + @Override + public boolean hasNext() { + return iter.hasNext(); + } + }; + } + }; + builder.addAllQueueToPriorityLabels(iterable); + } + + private PriorityLabelsPerQueuePBImpl convertFromProtoFormat( + PriorityLabelsPerQueueProto p) { + return new PriorityLabelsPerQueuePBImpl(p); + } + + private PriorityLabelsPerQueueProto convertToProtoFormat( + PriorityLabelsPerQueue t) { + return ((PriorityLabelsPerQueuePBImpl) t).getProto(); + } + + private void mergeLocalToBuilder() { + if (this.queueNameToPriorityLabel != null) { + addQueueToLabelsToProto(); + } + } + + private void mergeLocalToProto() { + if (viaProto) + maybeInitBuilder(); + mergeLocalToBuilder(); + proto = builder.build(); + viaProto = true; + } + + public ReplacePriorityLabelsOnQueueRequestProto getProto() { + mergeLocalToProto(); + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + @Override + public Map getQueueToLabels() { + initQueueToLabels(); + return this.queueNameToPriorityLabel; + } + + @Override + public void setQueueToLabels(Map map) { + initQueueToLabels(); + queueNameToPriorityLabel.clear(); + queueNameToPriorityLabel.putAll(map); + } + + @Override + public int hashCode() { + assert false : "hashCode not designed"; + return 0; + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/ReplacePriorityLabelsOnQueueResponsePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/ReplacePriorityLabelsOnQueueResponsePBImpl.java new file mode 100644 index 0000000..abc930b --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/ReplacePriorityLabelsOnQueueResponsePBImpl.java @@ -0,0 +1,69 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.ReplacePriorityLabelsOnQueueResponseProto; +import org.apache.hadoop.yarn.server.api.protocolrecords.ReplacePriorityLabelsOnQueueResponse; + +import com.google.protobuf.TextFormat; + +public class ReplacePriorityLabelsOnQueueResponsePBImpl extends + ReplacePriorityLabelsOnQueueResponse { + + ReplacePriorityLabelsOnQueueResponseProto proto = ReplacePriorityLabelsOnQueueResponseProto + .getDefaultInstance(); + ReplacePriorityLabelsOnQueueResponseProto.Builder builder = null; + boolean viaProto = false; + + public ReplacePriorityLabelsOnQueueResponsePBImpl() { + builder = ReplacePriorityLabelsOnQueueResponseProto.newBuilder(); + } + + public ReplacePriorityLabelsOnQueueResponsePBImpl( + ReplacePriorityLabelsOnQueueResponseProto proto) { + this.proto = proto; + viaProto = true; + } + + public ReplacePriorityLabelsOnQueueResponseProto getProto() { + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + @Override + public int hashCode() { + return getProto().hashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } + + @Override + public String toString() { + return TextFormat.shortDebugString(getProto()); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetPriorityLabelForQueueRequestPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetPriorityLabelForQueueRequestPBImpl.java new file mode 100644 index 0000000..2020b51 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetPriorityLabelForQueueRequestPBImpl.java @@ -0,0 +1,147 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import org.apache.hadoop.yarn.api.records.PriorityLabelsPerQueue; +import org.apache.hadoop.yarn.api.records.impl.pb.PriorityLabelsPerQueuePBImpl; +import org.apache.hadoop.yarn.proto.YarnProtos.PriorityLabelsPerQueueProto; +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.SetPriorityLabelForQueueRequestProto; +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.SetPriorityLabelForQueueRequestProtoOrBuilder; +import org.apache.hadoop.yarn.server.api.protocolrecords.SetPriorityLabelForQueueRequest; + +public class SetPriorityLabelForQueueRequestPBImpl extends + SetPriorityLabelForQueueRequest { + private PriorityLabelsPerQueue priorityLabelsPerQueue = null; + SetPriorityLabelForQueueRequestProto proto = SetPriorityLabelForQueueRequestProto + .getDefaultInstance(); + SetPriorityLabelForQueueRequestProto.Builder builder = null; + boolean viaProto = false; + + public SetPriorityLabelForQueueRequestPBImpl() { + this.builder = SetPriorityLabelForQueueRequestProto.newBuilder(); + } + + public SetPriorityLabelForQueueRequestPBImpl( + SetPriorityLabelForQueueRequestProto proto) { + this.proto = proto; + viaProto = true; + } + + private void maybeInitBuilder() { + if (viaProto || builder == null) { + builder = SetPriorityLabelForQueueRequestProto.newBuilder(proto); + } + viaProto = false; + } + + private void mergeLocalToBuilder() { + if (this.priorityLabelsPerQueue != null) { + builder.clearPriorityLabelsPerQueue(); + builder + .setPriorityLabelsPerQueue(convertToProtoFormat(this.priorityLabelsPerQueue)); + } + } + + private void mergeLocalToProto() { + if (viaProto) + maybeInitBuilder(); + mergeLocalToBuilder(); + proto = builder.build(); + viaProto = true; + } + + public SetPriorityLabelForQueueRequestProto getProto() { + mergeLocalToProto(); + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + private PriorityLabelsPerQueuePBImpl convertFromProtoFormat( + PriorityLabelsPerQueueProto p) { + return new PriorityLabelsPerQueuePBImpl(p); + } + + private PriorityLabelsPerQueueProto convertToProtoFormat( + PriorityLabelsPerQueue t) { + return ((PriorityLabelsPerQueuePBImpl) t).getProto(); + } + + @Override + public int hashCode() { + assert false : "hashCode not designed"; + return 0; + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } + + @Override + public void setQueueName(String queueName) { + maybeInitBuilder(); + if (queueName == null) { + builder.clearQueueName(); + return; + } + builder.setQueueName(queueName); + } + + @Override + public String getQueueName() { + SetPriorityLabelForQueueRequestProtoOrBuilder p = viaProto ? proto + : builder; + if (!p.hasQueueName()) { + return null; + } + return (p.getQueueName()); + } + + @Override + public void setPriorityLabelsPerQueue( + PriorityLabelsPerQueue priorityLabelsPerQueue) { + maybeInitBuilder(); + if (priorityLabelsPerQueue == null) { + builder.clearPriorityLabelsPerQueue(); + return; + } + this.priorityLabelsPerQueue = priorityLabelsPerQueue; + } + + @Override + public PriorityLabelsPerQueue getPriorityLabelsPerQueue() { + SetPriorityLabelForQueueRequestProtoOrBuilder p = viaProto ? proto + : builder; + if (this.priorityLabelsPerQueue != null) { + return this.priorityLabelsPerQueue; + } + if (!p.hasPriorityLabelsPerQueue()) { + return null; + } + this.priorityLabelsPerQueue = convertFromProtoFormat(p + .getPriorityLabelsPerQueue()); + return this.priorityLabelsPerQueue; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetPriorityLabelForQueueResponsePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetPriorityLabelForQueueResponsePBImpl.java new file mode 100644 index 0000000..87d23b4 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetPriorityLabelForQueueResponsePBImpl.java @@ -0,0 +1,69 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.SetPriorityLabelForQueueResponseProto; +import org.apache.hadoop.yarn.server.api.protocolrecords.SetPriorityLabelForQueueResponse; + +import com.google.protobuf.TextFormat; + +public class SetPriorityLabelForQueueResponsePBImpl extends + SetPriorityLabelForQueueResponse { + + SetPriorityLabelForQueueResponseProto proto = SetPriorityLabelForQueueResponseProto + .getDefaultInstance(); + SetPriorityLabelForQueueResponseProto.Builder builder = null; + boolean viaProto = false; + + public SetPriorityLabelForQueueResponsePBImpl() { + builder = SetPriorityLabelForQueueResponseProto.newBuilder(); + } + + public SetPriorityLabelForQueueResponsePBImpl( + SetPriorityLabelForQueueResponseProto proto) { + this.proto = proto; + viaProto = true; + } + + public SetPriorityLabelForQueueResponseProto getProto() { + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + @Override + public int hashCode() { + return getProto().hashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } + + @Override + public String toString() { + return TextFormat.shortDebugString(getProto()); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetQueueAclToPriorityLabelRequestPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetQueueAclToPriorityLabelRequestPBImpl.java new file mode 100644 index 0000000..a59217b --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetQueueAclToPriorityLabelRequestPBImpl.java @@ -0,0 +1,126 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import java.util.Set; + +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.SetQueueAclToPriorityLabelRequestProto; +import org.apache.hadoop.yarn.server.api.protocolrecords.SetQueueAclToPriorityLabelRequest; + +public class SetQueueAclToPriorityLabelRequestPBImpl extends + SetQueueAclToPriorityLabelRequest { + SetQueueAclToPriorityLabelRequestProto proto = + SetQueueAclToPriorityLabelRequestProto.getDefaultInstance(); + SetQueueAclToPriorityLabelRequestProto.Builder builder = null; + boolean viaProto = false; + + Set userLists = null; + + public SetQueueAclToPriorityLabelRequestPBImpl() { + this.builder = SetQueueAclToPriorityLabelRequestProto.newBuilder(); + } + + public SetQueueAclToPriorityLabelRequestPBImpl( + SetQueueAclToPriorityLabelRequestProto proto) { + this.proto = proto; + viaProto = true; + } + + private void maybeInitBuilder() { + if (viaProto || builder == null) { + builder = SetQueueAclToPriorityLabelRequestProto.newBuilder(proto); + } + viaProto = false; + } + + private void mergeLocalToProto() { + if (viaProto) + maybeInitBuilder(); + mergeLocalToBuilder(); + proto = builder.build(); + viaProto = true; + } + + private void mergeLocalToBuilder() { + if (this.userLists != null && !this.userLists.isEmpty()) { + builder.clearQueuePriorityLabelACL(); + builder.addAllQueuePriorityLabelACL(this.userLists); + } + } + + public SetQueueAclToPriorityLabelRequestProto getProto() { + mergeLocalToProto(); + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + @Override + public int hashCode() { + assert false : "hashCode not designed"; + return 0; + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } + + @Override + public void setQueueName(String queueName) { + // TODO Auto-generated method stub + + } + + @Override + public String getQueueName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setPriorityLabelName(String userName) { + // TODO Auto-generated method stub + + } + + @Override + public String getPriorityLabelName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setQueuePriorityLabelACL(Set userList) { + // TODO Auto-generated method stub + + } + + @Override + public Set getQueuePriorityLabelACL() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetQueueAclToPriorityLabelResponsePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetQueueAclToPriorityLabelResponsePBImpl.java new file mode 100644 index 0000000..10b241e --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/SetQueueAclToPriorityLabelResponsePBImpl.java @@ -0,0 +1,69 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.api.protocolrecords.impl.pb; + +import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.SetQueueAclToPriorityLabelResponseProto; +import org.apache.hadoop.yarn.server.api.protocolrecords.SetQueueAclToPriorityLabelResponse; + +import com.google.protobuf.TextFormat; + +public class SetQueueAclToPriorityLabelResponsePBImpl extends + SetQueueAclToPriorityLabelResponse { + + SetQueueAclToPriorityLabelResponseProto proto = + SetQueueAclToPriorityLabelResponseProto.getDefaultInstance(); + SetQueueAclToPriorityLabelResponseProto.Builder builder = null; + boolean viaProto = false; + + public SetQueueAclToPriorityLabelResponsePBImpl() { + builder = SetQueueAclToPriorityLabelResponseProto.newBuilder(); + } + + public SetQueueAclToPriorityLabelResponsePBImpl( + SetQueueAclToPriorityLabelResponseProto proto) { + this.proto = proto; + viaProto = true; + } + + public SetQueueAclToPriorityLabelResponseProto getProto() { + proto = viaProto ? proto : builder.build(); + viaProto = true; + return proto; + } + + @Override + public int hashCode() { + return getProto().hashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == null) + return false; + if (other.getClass().isAssignableFrom(this.getClass())) { + return this.getProto().equals(this.getClass().cast(other).getProto()); + } + return false; + } + + @Override + public String toString() { + return TextFormat.shortDebugString(getProto()); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestPBImplRecords.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestPBImplRecords.java index b8f6e9c..82aa51f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestPBImplRecords.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestPBImplRecords.java @@ -224,6 +224,7 @@ public static void setup() throws Exception { generateByNewInstance(ReservationRequest.class); generateByNewInstance(ReservationRequests.class); generateByNewInstance(ReservationDefinition.class); + generateByNewInstance(PriorityLabelsPerQueue.class); } private class GetSetPair { @@ -1003,4 +1004,66 @@ public void testGetNodeToLabelsResponsePBImpl() throws Exception { validatePBImplRecord(GetNodesToLabelsResponsePBImpl.class, GetNodesToLabelsResponseProto.class); } + + @Test + public void testAddToClusterPriorityLabelsRequestPBImpl() throws Exception { + validatePBImplRecord(AddToClusterPriorityLabelsRequestPBImpl.class, + AddToClusterPriorityLabelsRequestProto.class); + } + + @Test + public void testAddToClusterPriorityLabelsResponsePBImpl() throws Exception { + validatePBImplRecord(AddToClusterPriorityLabelsResponsePBImpl.class, + AddToClusterPriorityLabelsResponseProto.class); + } + + @Test + public void testGetClusterPriorityLabelsRequestPBImpl() throws Exception { + validatePBImplRecord(GetClusterPriorityLabelsRequestPBImpl.class, + GetClusterPriorityLabelsRequestProto.class); + } + + @Test + public void testGetClusterPriorityLabelsResponsePBImpl() throws Exception { + validatePBImplRecord(GetClusterPriorityLabelsResponsePBImpl.class, + GetClusterPriorityLabelsResponseProto.class); + } + + @Test + public void testGetPriorityLabelForQueueRequestPBImpl() throws Exception { + validatePBImplRecord(GetPriorityLabelForQueueRequestPBImpl.class, + GetPriorityLabelForQueueRequestProto.class); + } + + @Test + public void testGetPriorityLabelForQueueResponsePBImpl() throws Exception { + validatePBImplRecord(GetPriorityLabelForQueueResponsePBImpl.class, + GetPriorityLabelForQueueResponseProto.class); + } + + @Test + public void testSetPriorityLabelForQueueRequestPBImpl() throws Exception { + validatePBImplRecord(SetPriorityLabelForQueueRequestPBImpl.class, + SetPriorityLabelForQueueRequestProto.class); + } + + @Test + public void testSetPriorityLabelForQueueResponsePBImpl() throws Exception { + validatePBImplRecord(SetPriorityLabelForQueueResponsePBImpl.class, + SetPriorityLabelForQueueResponseProto.class); + } + + @Test + public void testRemoveFromClusterPriorityLabelsRequestPBImpl() + throws Exception { + validatePBImplRecord(RemoveFromClusterPriorityLabelsRequestPBImpl.class, + RemoveFromClusterPriorityLabelsRequestProto.class); + } + + @Test + public void testRemoveFromClusterPriorityLabelsResponsePBImpl() + throws Exception { + validatePBImplRecord(RemoveFromClusterPriorityLabelsResponsePBImpl.class, + RemoveFromClusterPriorityLabelsResponseProto.class); + } } -- 1.9.4.msysgit.1