blob: f5a97baedc58265e53a9e8921244cb3a422d0b14 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_292) on Tue Jun 15 06:09:34 GMT 2021 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PlacementConstraints (Apache Hadoop YARN API 3.3.1 API)</title>
<meta name="date" content="2021-06-15">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PlacementConstraints (Apache Hadoop YARN API 3.3.1 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PlacementConstraints.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.Visitor.html" title="interface in org.apache.hadoop.yarn.api.resource"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.PlacementTargets.html" title="class in org.apache.hadoop.yarn.api.resource"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/hadoop/yarn/api/resource/PlacementConstraints.html" target="_top">Frames</a></li>
<li><a href="PlacementConstraints.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.hadoop.yarn.api.resource</div>
<h2 title="Class PlacementConstraints" class="title">Class PlacementConstraints</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.hadoop.yarn.api.resource.PlacementConstraints</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>@InterfaceAudience.Public
@InterfaceStability.Unstable
public final class <span class="typeNameLabel">PlacementConstraints</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">This class contains various static methods for the applications to create
placement constraints (see also <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.html" title="class in org.apache.hadoop.yarn.api.resource"><code>PlacementConstraint</code></a>).</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.PlacementTargets.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraints.PlacementTargets</a></span></code>
<div class="block">Class with static methods for constructing target expressions to be used in
placement constraints.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#NODE">NODE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#NODE_PARTITION">NODE_PARTITION</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#RACK">RACK</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.And.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.And</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#and-org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint...-">and</a></span>(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>...&nbsp;children)</code>
<div class="block">A conjunction of constraints.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#build-org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint-">build</a></span>(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;constraintExpr)</code>
<div class="block">Creates a <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.html" title="class in org.apache.hadoop.yarn.api.resource"><code>PlacementConstraint</code></a> given a constraint expression.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#cardinality-java.lang.String-int-int-java.lang.String...-">cardinality</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
int&nbsp;minCardinality,
int&nbsp;maxCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</code>
<div class="block">Creates a constraint that restricts the number of allocations within a
given scope (e.g., node or rack).</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#cardinality-java.lang.String-java.lang.String-int-int-java.lang.String...-">cardinality</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;namespace,
int&nbsp;minCardinality,
int&nbsp;maxCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</code>
<div class="block">Similar to <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#cardinality-java.lang.String-int-int-java.lang.String...-"><code>cardinality(String, int, int, String...)</code></a>, but let you
attach a namespace to the given allocation tags.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.DelayedOr.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.DelayedOr</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#delayedOr-org.apache.hadoop.yarn.api.resource.PlacementConstraint.TimedPlacementConstraint...-">delayedOr</a></span>(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TimedPlacementConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TimedPlacementConstraint</a>...&nbsp;children)</code>
<div class="block">Creates a composite constraint that includes a list of timed placement
constraints.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#maxCardinality-java.lang.String-int-java.lang.String...-">maxCardinality</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
int&nbsp;maxCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</code>
<div class="block">Similar to <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#cardinality-java.lang.String-int-int-java.lang.String...-"><code>cardinality(String, int, int, String...)</code></a>, but
determines only the maximum cardinality (the minimum cardinality is 0).</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#maxCardinality-java.lang.String-java.lang.String-int-java.lang.String...-">maxCardinality</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;tagNamespace,
int&nbsp;maxCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</code>
<div class="block">Similar to <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#maxCardinality-java.lang.String-int-java.lang.String...-"><code>maxCardinality(String, int, String...)</code></a>, but let you
specify a namespace for the tags, see supported namespaces in
<a href="../../../../../../org/apache/hadoop/yarn/api/records/AllocationTagNamespaceType.html" title="enum in org.apache.hadoop.yarn.api.records"><code>AllocationTagNamespaceType</code></a>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#minCardinality-java.lang.String-int-java.lang.String...-">minCardinality</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
int&nbsp;minCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</code>
<div class="block">Similar to <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#cardinality-java.lang.String-int-int-java.lang.String...-"><code>cardinality(String, int, int, String...)</code></a>, but
determines only the minimum cardinality (the maximum cardinality is
unbound).</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#minCardinality-java.lang.String-java.lang.String-int-java.lang.String...-">minCardinality</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;namespace,
int&nbsp;minCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</code>
<div class="block">Similar to <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#minCardinality-java.lang.String-int-java.lang.String...-"><code>minCardinality(String, int, String...)</code></a>, but let you
attach a namespace to the allocation tags.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.Or.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.Or</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#or-org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint...-">or</a></span>(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>...&nbsp;children)</code>
<div class="block">A disjunction of constraints.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#targetCardinality-java.lang.String-int-int-org.apache.hadoop.yarn.api.resource.PlacementConstraint.TargetExpression...-">targetCardinality</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
int&nbsp;minCardinality,
int&nbsp;maxCardinality,
<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TargetExpression.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TargetExpression</a>...&nbsp;targetExpressions)</code>
<div class="block">This constraint generalizes the cardinality and target constraints.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#targetIn-java.lang.String-org.apache.hadoop.yarn.api.resource.PlacementConstraint.TargetExpression...-">targetIn</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TargetExpression.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TargetExpression</a>...&nbsp;targetExpressions)</code>
<div class="block">Creates a constraint that requires allocations to be placed on nodes that
satisfy all target expressions within the given scope (e.g., node or rack).</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#targetNodeAttribute-java.lang.String-org.apache.hadoop.yarn.api.records.NodeAttributeOpCode-org.apache.hadoop.yarn.api.resource.PlacementConstraint.TargetExpression...-">targetNodeAttribute</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="../../../../../../org/apache/hadoop/yarn/api/records/NodeAttributeOpCode.html" title="enum in org.apache.hadoop.yarn.api.records">NodeAttributeOpCode</a>&nbsp;opCode,
<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TargetExpression.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TargetExpression</a>...&nbsp;targetExpressions)</code>
<div class="block">Creates a constraint that requires allocations to be placed on nodes that
belong to a scope (e.g., node or rack) that satisfy any of the
target expressions based on node attribute op code.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#targetNotIn-java.lang.String-org.apache.hadoop.yarn.api.resource.PlacementConstraint.TargetExpression...-">targetNotIn</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TargetExpression.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TargetExpression</a>...&nbsp;targetExpressions)</code>
<div class="block">Creates a constraint that requires allocations to be placed on nodes that
belong to a scope (e.g., node or rack) that does not satisfy any of the
target expressions.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TimedPlacementConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TimedPlacementConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#timedClockConstraint-org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint-long-java.util.concurrent.TimeUnit-">timedClockConstraint</a></span>(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;constraint,
long&nbsp;delay,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;timeUnit)</code>
<div class="block">Creates a placement constraint that has to be satisfied within a time
window.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TimedPlacementConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TimedPlacementConstraint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#timedOpportunitiesConstraint-org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint-long-">timedOpportunitiesConstraint</a></span>(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;constraint,
long&nbsp;delay)</code>
<div class="block">Creates a placement constraint that has to be satisfied within a number of
placement opportunities (invocations of the scheduler).</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="NODE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NODE</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> NODE</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.yarn.api.resource.PlacementConstraints.NODE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="RACK">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RACK</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> RACK</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.yarn.api.resource.PlacementConstraints.RACK">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="NODE_PARTITION">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>NODE_PARTITION</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> NODE_PARTITION</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.yarn.api.resource.PlacementConstraints.NODE_PARTITION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="targetIn-java.lang.String-org.apache.hadoop.yarn.api.resource.PlacementConstraint.TargetExpression...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>targetIn</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;targetIn(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TargetExpression.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TargetExpression</a>...&nbsp;targetExpressions)</pre>
<div class="block">Creates a constraint that requires allocations to be placed on nodes that
satisfy all target expressions within the given scope (e.g., node or rack).
For example, <code>targetIn(RACK, allocationTag("hbase-m"))</code>, allows
allocations on nodes that belong to a rack that has at least one tag with
value "hbase-m".</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - the scope within which the target expressions should be
satisfied</dd>
<dd><code>targetExpressions</code> - the expressions that need to be satisfied within
the scope</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="targetNotIn-java.lang.String-org.apache.hadoop.yarn.api.resource.PlacementConstraint.TargetExpression...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>targetNotIn</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;targetNotIn(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TargetExpression.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TargetExpression</a>...&nbsp;targetExpressions)</pre>
<div class="block">Creates a constraint that requires allocations to be placed on nodes that
belong to a scope (e.g., node or rack) that does not satisfy any of the
target expressions.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - the scope within which the target expressions should not be
true</dd>
<dd><code>targetExpressions</code> - the expressions that need to not be true within
the scope</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="targetNodeAttribute-java.lang.String-org.apache.hadoop.yarn.api.records.NodeAttributeOpCode-org.apache.hadoop.yarn.api.resource.PlacementConstraint.TargetExpression...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>targetNodeAttribute</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;targetNodeAttribute(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="../../../../../../org/apache/hadoop/yarn/api/records/NodeAttributeOpCode.html" title="enum in org.apache.hadoop.yarn.api.records">NodeAttributeOpCode</a>&nbsp;opCode,
<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TargetExpression.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TargetExpression</a>...&nbsp;targetExpressions)</pre>
<div class="block">Creates a constraint that requires allocations to be placed on nodes that
belong to a scope (e.g., node or rack) that satisfy any of the
target expressions based on node attribute op code.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - the scope within which the target expressions should not be
true</dd>
<dd><code>opCode</code> - Node Attribute code which could be equals, not equals.</dd>
<dd><code>targetExpressions</code> - the expressions that need to not be true within
the scope</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="cardinality-java.lang.String-int-int-java.lang.String...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cardinality</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;cardinality(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
int&nbsp;minCardinality,
int&nbsp;maxCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</pre>
<div class="block">Creates a constraint that restricts the number of allocations within a
given scope (e.g., node or rack).
For example, <code>cardinality(NODE, 3, 10, "zk")</code> is satisfied on nodes
where there are no less than 3 allocations with tag "zk" and no more than
10.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - the scope of the constraint</dd>
<dd><code>minCardinality</code> - determines the minimum number of allocations within
the scope</dd>
<dd><code>maxCardinality</code> - determines the maximum number of allocations within
the scope</dd>
<dd><code>allocationTags</code> - the constraint targets allocations with these tags</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="cardinality-java.lang.String-java.lang.String-int-int-java.lang.String...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cardinality</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;cardinality(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;namespace,
int&nbsp;minCardinality,
int&nbsp;maxCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</pre>
<div class="block">Similar to <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#cardinality-java.lang.String-int-int-java.lang.String...-"><code>cardinality(String, int, int, String...)</code></a>, but let you
attach a namespace to the given allocation tags.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - the scope of the constraint</dd>
<dd><code>namespace</code> - the namespace of the allocation tags</dd>
<dd><code>minCardinality</code> - determines the minimum number of allocations within
the scope</dd>
<dd><code>maxCardinality</code> - determines the maximum number of allocations within
the scope</dd>
<dd><code>allocationTags</code> - allocation tags</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="minCardinality-java.lang.String-int-java.lang.String...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>minCardinality</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;minCardinality(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
int&nbsp;minCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</pre>
<div class="block">Similar to <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#cardinality-java.lang.String-int-int-java.lang.String...-"><code>cardinality(String, int, int, String...)</code></a>, but
determines only the minimum cardinality (the maximum cardinality is
unbound).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - the scope of the constraint</dd>
<dd><code>minCardinality</code> - determines the minimum number of allocations within
the scope</dd>
<dd><code>allocationTags</code> - the constraint targets allocations with these tags</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="minCardinality-java.lang.String-java.lang.String-int-java.lang.String...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>minCardinality</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;minCardinality(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;namespace,
int&nbsp;minCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</pre>
<div class="block">Similar to <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#minCardinality-java.lang.String-int-java.lang.String...-"><code>minCardinality(String, int, String...)</code></a>, but let you
attach a namespace to the allocation tags.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - the scope of the constraint</dd>
<dd><code>namespace</code> - the namespace of these tags</dd>
<dd><code>minCardinality</code> - determines the minimum number of allocations within
the scope</dd>
<dd><code>allocationTags</code> - the constraint targets allocations with these tags</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="maxCardinality-java.lang.String-int-java.lang.String...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxCardinality</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;maxCardinality(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
int&nbsp;maxCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</pre>
<div class="block">Similar to <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#cardinality-java.lang.String-int-int-java.lang.String...-"><code>cardinality(String, int, int, String...)</code></a>, but
determines only the maximum cardinality (the minimum cardinality is 0).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - the scope of the constraint</dd>
<dd><code>maxCardinality</code> - determines the maximum number of allocations within
the scope</dd>
<dd><code>allocationTags</code> - the constraint targets allocations with these tags</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="maxCardinality-java.lang.String-java.lang.String-int-java.lang.String...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxCardinality</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;maxCardinality(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;tagNamespace,
int&nbsp;maxCardinality,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;allocationTags)</pre>
<div class="block">Similar to <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.html#maxCardinality-java.lang.String-int-java.lang.String...-"><code>maxCardinality(String, int, String...)</code></a>, but let you
specify a namespace for the tags, see supported namespaces in
<a href="../../../../../../org/apache/hadoop/yarn/api/records/AllocationTagNamespaceType.html" title="enum in org.apache.hadoop.yarn.api.records"><code>AllocationTagNamespaceType</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - the scope of the constraint</dd>
<dd><code>tagNamespace</code> - the namespace of these tags</dd>
<dd><code>maxCardinality</code> - determines the maximum number of allocations within
the scope</dd>
<dd><code>allocationTags</code> - allocation tags</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="targetCardinality-java.lang.String-int-int-org.apache.hadoop.yarn.api.resource.PlacementConstraint.TargetExpression...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>targetCardinality</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;targetCardinality(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scope,
int&nbsp;minCardinality,
int&nbsp;maxCardinality,
<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TargetExpression.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TargetExpression</a>...&nbsp;targetExpressions)</pre>
<div class="block">This constraint generalizes the cardinality and target constraints.
Consider a set of nodes N that belongs to the scope specified in the
constraint. If the target expressions are satisfied at least minCardinality
times and at most maxCardinality times in the node set N, then the
constraint is satisfied.
For example, <code>targetCardinality(RACK, 2, 10, allocationTag("zk"))</code>,
requires an allocation to be placed within a rack that has at least 2 and
at most 10 other allocations with tag "zk".</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - the scope of the constraint</dd>
<dd><code>minCardinality</code> - the minimum number of times the target expressions
have to be satisfied with the given scope</dd>
<dd><code>maxCardinality</code> - the maximum number of times the target expressions
have to be satisfied with the given scope</dd>
<dd><code>targetExpressions</code> - the target expressions</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="and-org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>and</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.And.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.And</a>&nbsp;and(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>...&nbsp;children)</pre>
<div class="block">A conjunction of constraints.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>children</code> - the children constraints that should all be satisfied</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="or-org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>or</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.Or.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.Or</a>&nbsp;or(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>...&nbsp;children)</pre>
<div class="block">A disjunction of constraints.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>children</code> - the children constraints, one of which should be satisfied</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting placement constraint</dd>
</dl>
</li>
</ul>
<a name="delayedOr-org.apache.hadoop.yarn.api.resource.PlacementConstraint.TimedPlacementConstraint...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>delayedOr</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.DelayedOr.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.DelayedOr</a>&nbsp;delayedOr(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TimedPlacementConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TimedPlacementConstraint</a>...&nbsp;children)</pre>
<div class="block">Creates a composite constraint that includes a list of timed placement
constraints. The scheduler should try to satisfy first the first timed
child constraint within the specified time window. If this is not possible,
it should attempt to satisfy the second, and so on.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>children</code> - the timed children constraints</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting composite constraint</dd>
</dl>
</li>
</ul>
<a name="timedClockConstraint-org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint-long-java.util.concurrent.TimeUnit-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>timedClockConstraint</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TimedPlacementConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TimedPlacementConstraint</a>&nbsp;timedClockConstraint(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;constraint,
long&nbsp;delay,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;timeUnit)</pre>
<div class="block">Creates a placement constraint that has to be satisfied within a time
window.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>constraint</code> - the placement constraint</dd>
<dd><code>delay</code> - the length of the time window within which the constraint has
to be satisfied</dd>
<dd><code>timeUnit</code> - the unit of time of the time window</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting timed placement constraint</dd>
</dl>
</li>
</ul>
<a name="timedOpportunitiesConstraint-org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>timedOpportunitiesConstraint</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.TimedPlacementConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.TimedPlacementConstraint</a>&nbsp;timedOpportunitiesConstraint(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;constraint,
long&nbsp;delay)</pre>
<div class="block">Creates a placement constraint that has to be satisfied within a number of
placement opportunities (invocations of the scheduler).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>constraint</code> - the placement constraint</dd>
<dd><code>delay</code> - the number of scheduling opportunities within which the
constraint has to be satisfied</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting timed placement constraint</dd>
</dl>
</li>
</ul>
<a name="build-org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>build</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint</a>&nbsp;build(<a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.AbstractConstraint.html" title="class in org.apache.hadoop.yarn.api.resource">PlacementConstraint.AbstractConstraint</a>&nbsp;constraintExpr)</pre>
<div class="block">Creates a <a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.html" title="class in org.apache.hadoop.yarn.api.resource"><code>PlacementConstraint</code></a> given a constraint expression.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>constraintExpr</code> - the constraint expression</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the placement constraint</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PlacementConstraints.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraint.Visitor.html" title="interface in org.apache.hadoop.yarn.api.resource"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/hadoop/yarn/api/resource/PlacementConstraints.PlacementTargets.html" title="class in org.apache.hadoop.yarn.api.resource"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/hadoop/yarn/api/resource/PlacementConstraints.html" target="_top">Frames</a></li>
<li><a href="PlacementConstraints.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2021 <a href="https://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>