blob: 217071c3b6ada01d32a75b4e0a0d8a53f93e2f88 [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:01:44 GMT 2021 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CreateFlag (Apache Hadoop Common 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="CreateFlag (Apache Hadoop Common 3.3.1 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":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/CreateFlag.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/fs/ContentSummary.Builder.html" title="class in org.apache.hadoop.fs"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/hadoop/fs/DelegationTokenRenewer.Renewable.html" title="interface in org.apache.hadoop.fs"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/hadoop/fs/CreateFlag.html" target="_top">Frames</a></li>
<li><a href="CreateFlag.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>Nested&nbsp;|&nbsp;</li>
<li><a href="#enum.constant.summary">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#enum.constant.detail">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&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.fs</div>
<h2 title="Enum CreateFlag" class="title">Enum CreateFlag</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><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">java.lang.Enum</a>&lt;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>&gt;</li>
<li>
<ul class="inheritance">
<li>org.apache.hadoop.fs.CreateFlag</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>@InterfaceAudience.Public
@InterfaceStability.Evolving
public enum <span class="typeNameLabel">CreateFlag</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a>&lt;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>&gt;</pre>
<div class="block">CreateFlag specifies the file create semantic. Users can combine flags like: <br>
<code>
EnumSet.of(CreateFlag.CREATE, CreateFlag.APPEND)
</code>
<p>
Use the CreateFlag as follows:
<ol>
<li> CREATE - to create a file if it does not exist,
else throw FileAlreadyExists.</li>
<li> APPEND - to append to a file if it exists,
else throw FileNotFoundException.</li>
<li> OVERWRITE - to truncate a file if it exists,
else throw FileNotFoundException.</li>
<li> CREATE|APPEND - to create a file if it does not exist,
else append to an existing file.</li>
<li> CREATE|OVERWRITE - to create a file if it does not exist,
else overwrite an existing file.</li>
<li> SYNC_BLOCK - to force closed blocks to the disk device.
In addition <a href="../../../../org/apache/hadoop/fs/Syncable.html#hsync--"><code>Syncable.hsync()</code></a> should be called after each write,
if true synchronous behavior is required.</li>
<li> LAZY_PERSIST - Create the block on transient storage (RAM) if
available.</li>
<li> APPEND_NEWBLOCK - Append data to a new block instead of end of the last
partial block.</li>
</ol>
Following combinations are not valid and will result in
<a href="../../../../org/apache/hadoop/HadoopIllegalArgumentException.html" title="class in org.apache.hadoop"><code>HadoopIllegalArgumentException</code></a>:
<ol>
<li> APPEND|OVERWRITE</li>
<li> CREATE|APPEND|OVERWRITE</li>
</ol></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="enum.constant.summary">
<!-- -->
</a>
<h3>Enum Constant Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Constant Summary table, listing enum constants, and an explanation">
<caption><span>Enum Constants</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Enum Constant and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#APPEND">APPEND</a></span></code>
<div class="block">Append to a file.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#CREATE">CREATE</a></span></code>
<div class="block">Create a file.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#IGNORE_CLIENT_LOCALITY">IGNORE_CLIENT_LOCALITY</a></span></code>
<div class="block">Advise that the first block replica NOT take into account DataNode
locality.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#LAZY_PERSIST">LAZY_PERSIST</a></span></code>
<div class="block">Create the block on transient storage (RAM) if available.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#NEW_BLOCK">NEW_BLOCK</a></span></code>
<div class="block">Append data to a new block instead of the end of the last partial block.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#NO_LOCAL_RACK">NO_LOCAL_RACK</a></span></code>
<div class="block">Advise that a block replica NOT be written to the local rack DataNode where
'local' means the same rack as the client is being run on.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#NO_LOCAL_WRITE">NO_LOCAL_WRITE</a></span></code>
<div class="block">Advise that a block replica NOT be written to the local DataNode where
'local' means the same host as the client is being run on.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#OVERWRITE">OVERWRITE</a></span></code>
<div class="block">Truncate/overwrite a file.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#SHOULD_REPLICATE">SHOULD_REPLICATE</a></span></code>
<div class="block">Enforce the file to be a replicated file, no matter what its parent
directory's replication or erasure coding policy is.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#SYNC_BLOCK">SYNC_BLOCK</a></span></code>
<div class="block">Force closed blocks to disk.</div>
</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 void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#validate-java.util.EnumSet-">validate</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</a>&lt;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>&gt;&nbsp;flag)</code>
<div class="block">Validate the CreateFlag and throw exception if it is invalid</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#validate-java.lang.Object-boolean-java.util.EnumSet-">validate</a></span>(<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>&nbsp;path,
boolean&nbsp;pathExists,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</a>&lt;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>&gt;&nbsp;flag)</code>
<div class="block">Validate the CreateFlag for create operation</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#validateForAppend-java.util.EnumSet-">validateForAppend</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</a>&lt;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>&gt;&nbsp;flag)</code>
<div class="block">Validate the CreateFlag for the append operation.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#valueOf-java.lang.String-">valueOf</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;name)</code>
<div class="block">Returns the enum constant of this type with the specified name.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/CreateFlag.html#values--">values</a></span>()</code>
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Enum">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.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/Enum.html?is-external=true#compareTo-E-" title="class or interface in java.lang">compareTo</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.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/Enum.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/Enum.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang">getDeclaringClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.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/Enum.html?is-external=true#name--" title="class or interface in java.lang">name</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#ordinal--" title="class or interface in java.lang">ordinal</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.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/Enum.html?is-external=true#valueOf-java.lang.Class-java.lang.String-" title="class or interface in java.lang">valueOf</a></code></li>
</ul>
<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#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#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#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">
<!-- ============ ENUM CONSTANT DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="enum.constant.detail">
<!-- -->
</a>
<h3>Enum Constant Detail</h3>
<a name="CREATE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CREATE</h4>
<pre>public static final&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a> CREATE</pre>
<div class="block">Create a file. See javadoc for more description
already exists</div>
</li>
</ul>
<a name="OVERWRITE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OVERWRITE</h4>
<pre>public static final&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a> OVERWRITE</pre>
<div class="block">Truncate/overwrite a file. Same as POSIX O_TRUNC. See javadoc for description.</div>
</li>
</ul>
<a name="APPEND">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>APPEND</h4>
<pre>public static final&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a> APPEND</pre>
<div class="block">Append to a file. See javadoc for more description.</div>
</li>
</ul>
<a name="SYNC_BLOCK">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SYNC_BLOCK</h4>
<pre>public static final&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a> SYNC_BLOCK</pre>
<div class="block">Force closed blocks to disk. Similar to POSIX O_SYNC. See javadoc for description.</div>
</li>
</ul>
<a name="LAZY_PERSIST">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LAZY_PERSIST</h4>
<pre>public static final&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a> LAZY_PERSIST</pre>
<div class="block">Create the block on transient storage (RAM) if available. If
transient storage is unavailable then the block will be created
on disk.
HDFS will make a best effort to lazily write these files to persistent
storage, however file contents may be lost at any time due to process/
node restarts, hence there is no guarantee of data durability.
This flag must only be used for intermediate data whose loss can be
tolerated by the application.</div>
</li>
</ul>
<a name="NEW_BLOCK">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NEW_BLOCK</h4>
<pre>public static final&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a> NEW_BLOCK</pre>
<div class="block">Append data to a new block instead of the end of the last partial block.
This is only useful for APPEND.</div>
</li>
</ul>
<a name="NO_LOCAL_WRITE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NO_LOCAL_WRITE</h4>
<pre>@InterfaceAudience.LimitedPrivate(value="HBase")
public static final&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a> NO_LOCAL_WRITE</pre>
<div class="block">Advise that a block replica NOT be written to the local DataNode where
'local' means the same host as the client is being run on.</div>
</li>
</ul>
<a name="SHOULD_REPLICATE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SHOULD_REPLICATE</h4>
<pre>public static final&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a> SHOULD_REPLICATE</pre>
<div class="block">Enforce the file to be a replicated file, no matter what its parent
directory's replication or erasure coding policy is.</div>
</li>
</ul>
<a name="IGNORE_CLIENT_LOCALITY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>IGNORE_CLIENT_LOCALITY</h4>
<pre>public static final&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a> IGNORE_CLIENT_LOCALITY</pre>
<div class="block">Advise that the first block replica NOT take into account DataNode
locality. The first block replica should be placed randomly within the
cluster. Subsequent block replicas should follow DataNode locality rules.</div>
</li>
</ul>
<a name="NO_LOCAL_RACK">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>NO_LOCAL_RACK</h4>
<pre>public static final&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a> NO_LOCAL_RACK</pre>
<div class="block">Advise that a block replica NOT be written to the local rack DataNode where
'local' means the same rack as the client is being run on.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="values--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>values</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>[]&nbsp;values()</pre>
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
<pre>
for (CreateFlag c : CreateFlag.values())
&nbsp; System.out.println(c);
</pre></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array containing the constants of this enum type, in the order they are declared</dd>
</dl>
</li>
</ul>
<a name="valueOf-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>valueOf</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>&nbsp;valueOf(<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;name)</pre>
<div class="block">Returns the enum constant of this type with the specified name.
The string must match <i>exactly</i> an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the enum constant to be returned.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the enum constant with the specified name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if this enum type has no constant with the specified name</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the argument is null</dd>
</dl>
</li>
</ul>
<a name="validate-java.util.EnumSet-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>validate</h4>
<pre>public static&nbsp;void&nbsp;validate(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</a>&lt;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>&gt;&nbsp;flag)</pre>
<div class="block">Validate the CreateFlag and throw exception if it is invalid</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>flag</code> - set of CreateFlag</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/hadoop/HadoopIllegalArgumentException.html" title="class in org.apache.hadoop">HadoopIllegalArgumentException</a></code> - if the CreateFlag is invalid</dd>
</dl>
</li>
</ul>
<a name="validate-java.lang.Object-boolean-java.util.EnumSet-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>validate</h4>
<pre>public static&nbsp;void&nbsp;validate(<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>&nbsp;path,
boolean&nbsp;pathExists,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</a>&lt;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>&gt;&nbsp;flag)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Validate the CreateFlag for create operation</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>path</code> - Object representing the path; usually String or <a href="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><code>Path</code></a></dd>
<dd><code>pathExists</code> - pass true if the path exists in the file system</dd>
<dd><code>flag</code> - set of CreateFlag</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd>
<dd><code><a href="../../../../org/apache/hadoop/HadoopIllegalArgumentException.html" title="class in org.apache.hadoop">HadoopIllegalArgumentException</a></code> - if the CreateFlag is invalid</dd>
</dl>
</li>
</ul>
<a name="validateForAppend-java.util.EnumSet-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>validateForAppend</h4>
<pre>public static&nbsp;void&nbsp;validateForAppend(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</a>&lt;<a href="../../../../org/apache/hadoop/fs/CreateFlag.html" title="enum in org.apache.hadoop.fs">CreateFlag</a>&gt;&nbsp;flag)</pre>
<div class="block">Validate the CreateFlag for the append operation. The flag must contain
APPEND, and cannot contain OVERWRITE.</div>
</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/CreateFlag.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/fs/ContentSummary.Builder.html" title="class in org.apache.hadoop.fs"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/hadoop/fs/DelegationTokenRenewer.Renewable.html" title="interface in org.apache.hadoop.fs"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/hadoop/fs/CreateFlag.html" target="_top">Frames</a></li>
<li><a href="CreateFlag.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>Nested&nbsp;|&nbsp;</li>
<li><a href="#enum.constant.summary">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#enum.constant.detail">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&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>