Page MenuHomec4science

WebHDFS.html
No OneTemporary

File Metadata

Created
Tue, Feb 25, 18:39

WebHDFS.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia at 2014-02-11 -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Apache Hadoop 2.3.0 - Hadoop Distributed File System-2.3.0 - WebHDFS REST API</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="Date-Revision-yyyymmdd" content="20140211" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body class="composite">
<div id="banner">
<a href="http://hadoop.apache.org/" id="bannerLeft">
<img src="http://hadoop.apache.org/images/hadoop-logo.jpg" alt="" />
</a>
<a href="http://www.apache.org/" id="bannerRight">
<img src="http://www.apache.org/images/asf_logo_wide.png" alt="" />
</a>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<a href="http://www.apache.org/" class="externalLink">Apache</a>
&gt;
<a href="http://hadoop.apache.org/" class="externalLink">Hadoop</a>
&gt;
<a href="../">Apache Hadoop Project Dist POM</a>
&gt;
Apache Hadoop 2.3.0
</div>
<div class="xright"> <a href="http://wiki.apache.org/hadoop" class="externalLink">Wiki</a>
|
<a href="https://svn.apache.org/repos/asf/hadoop/" class="externalLink">SVN</a>
|
<a href="http://hadoop.apache.org/" class="externalLink">Apache Hadoop</a>
&nbsp;| Last Published: 2014-02-11
&nbsp;| Version: 2.3.0
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>General</h5>
<ul>
<li class="none">
<a href="../../index.html">Overview</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/SingleCluster.html">Single Node Setup</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/ClusterSetup.html">Cluster Setup</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CommandsManual.html">Hadoop Commands Reference</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/FileSystemShell.html">File System Shell</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Compatibility.html">Hadoop Compatibility</a>
</li>
</ul>
<h5>Common</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CLIMiniCluster.html">CLI Mini Cluster</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/NativeLibraries.html">Native Libraries</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Superusers.html">Superusers</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/SecureMode.html">Secure Mode</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/ServiceLevelAuth.html">Service Level Authorization</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/HttpAuthentication.html">HTTP Authentication</a>
</li>
</ul>
<h5>HDFS</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html">HDFS User Guide</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithQJM.html">High Availability With QJM</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html">High Availability With NFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/Federation.html">Federation</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsSnapshots.html">HDFS Snapshots</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsDesign.html">HDFS Architecture</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsEditsViewer.html">Edits Viewer</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsImageViewer.html">Image Viewer</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html">Permissions and HDFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsQuotaAdminGuide.html">Quotas and HDFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/Hftp.html">HFTP</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/LibHdfs.html">C API libhdfs</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/WebHDFS.html">WebHDFS REST API</a>
</li>
<li class="none">
<a href="../../hadoop-hdfs-httpfs/index.html">HttpFS Gateway</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ShortCircuitLocalReads.html">Short Circuit Local Reads</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/CentralizedCacheManagement.html">Centralized Cache Management</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsNfsGateway.html">HDFS NFS Gateway</a>
</li>
</ul>
<h5>MapReduce</h5>
<ul>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduce_Compatibility_Hadoop1_Hadoop2.html">Compatibilty between Hadoop 1.x and Hadoop 2.x</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/EncryptedShuffle.html">Encrypted Shuffle</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/PluggableShuffleAndPluggableSort.html">Pluggable Shuffle/Sort</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/DistributedCacheDeploy.html">Distributed Cache Deploy</a>
</li>
</ul>
<h5>YARN</h5>
<ul>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YARN.html">YARN Architecture</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WritingYarnApplications.html">Writing YARN Applications</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/CapacityScheduler.html">Capacity Scheduler</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/FairScheduler.html">Fair Scheduler</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WebApplicationProxy.html">Web Application Proxy</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YarnCommands.html">YARN Commands</a>
</li>
<li class="none">
<a href="../../hadoop-sls/SchedulerLoadSimulator.html">Scheduler Load Simulator</a>
</li>
</ul>
<h5>YARN REST APIs</h5>
<ul>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WebServicesIntro.html">Introduction</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html">Resource Manager</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeManagerRest.html">Node Manager</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/MapredAppMasterRest.html">MR Application Master</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/HistoryServerRest.html">History Server</a>
</li>
</ul>
<h5>Auth</h5>
<ul>
<li class="none">
<a href="../../hadoop-auth/index.html">Overview</a>
</li>
<li class="none">
<a href="../../hadoop-auth/Examples.html">Examples</a>
</li>
<li class="none">
<a href="../../hadoop-auth/Configuration.html">Configuration</a>
</li>
<li class="none">
<a href="../../hadoop-auth/BuildingIt.html">Building</a>
</li>
</ul>
<h5>Reference</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/releasenotes.html">Release Notes</a>
</li>
<li class="none">
<a href="../../api/index.html">API docs</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CHANGES.txt">Common CHANGES.txt</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/CHANGES.txt">HDFS CHANGES.txt</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-mapreduce/CHANGES.txt">MapReduce CHANGES.txt</a>
</li>
</ul>
<h5>Configuration</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/core-default.xml">core-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/hdfs-default.xml">hdfs-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml">mapred-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-common/yarn-default.xml">yarn-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/DeprecatedProperties.html">Deprecated Properties</a>
</li>
</ul>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img alt="Built by Maven" src="./images/logos/maven-feather.png"/>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<!-- Licensed 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. See accompanying LICENSE file. --><div class="section">
<h2>WebHDFS REST API<a name="WebHDFS_REST_API"></a></h2>
<ul>
<li><a href="#WebHDFS_REST_API">WebHDFS REST API</a>
<ul>
<li><a href="#Document_Conventions">Document Conventions</a></li>
<li><a href="#Introduction">Introduction</a>
<ul>
<li><a href="#Operations">Operations</a></li>
<li><a href="#FileSystem_URIs_vs_HTTP_URLs">FileSystem URIs vs HTTP URLs</a></li>
<li><a href="#HDFS_Configuration_Options">HDFS Configuration Options</a></li></ul></li>
<li><a href="#Authentication">Authentication</a></li>
<li><a href="#Proxy_Users">Proxy Users</a></li>
<li><a href="#File_and_Directory_Operations">File and Directory Operations</a>
<ul>
<li><a href="#Create_and_Write_to_a_File">Create and Write to a File</a></li>
<li><a href="#Append_to_a_File">Append to a File</a></li>
<li><a href="#Concat_Files">Concat File(s)</a></li>
<li><a href="#Open_and_Read_a_File">Open and Read a File</a></li>
<li><a href="#Make_a_Directory">Make a Directory</a></li>
<li><a href="#Create_a_Symbolic_Link">Create a Symbolic Link</a></li>
<li><a href="#Rename_a_FileDirectory">Rename a File/Directory</a></li>
<li><a href="#Delete_a_FileDirectory">Delete a File/Directory</a></li>
<li><a href="#Status_of_a_FileDirectory">Status of a File/Directory</a></li>
<li><a href="#List_a_Directory">List a Directory</a></li></ul></li>
<li><a href="#Other_File_System_Operations">Other File System Operations</a>
<ul>
<li><a href="#Get_Content_Summary_of_a_Directory">Get Content Summary of a Directory</a></li>
<li><a href="#Get_File_Checksum">Get File Checksum</a></li>
<li><a href="#Get_Home_Directory">Get Home Directory</a></li>
<li><a href="#Set_Permission">Set Permission</a></li>
<li><a href="#Set_Owner">Set Owner</a></li>
<li><a href="#Set_Replication_Factor">Set Replication Factor</a></li>
<li><a href="#Set_Access_or_Modification_Time">Set Access or Modification Time</a></li></ul></li>
<li><a href="#Delegation_Token_Operations">Delegation Token Operations</a>
<ul>
<li><a href="#Get_Delegation_Token">Get Delegation Token</a></li>
<li><a href="#Get_Delegation_Tokens">Get Delegation Tokens</a></li>
<li><a href="#Renew_Delegation_Token">Renew Delegation Token</a></li>
<li><a href="#Cancel_Delegation_Token">Cancel Delegation Token</a></li></ul></li>
<li><a href="#Error_Responses">Error Responses</a>
<ul>
<li><a href="#HTTP_Response_Codes">HTTP Response Codes</a>
<ul>
<li><a href="#Illegal_Argument_Exception">Illegal Argument Exception</a></li>
<li><a href="#Security_Exception">Security Exception</a></li>
<li><a href="#Access_Control_Exception">Access Control Exception</a></li>
<li><a href="#File_Not_Found_Exception">File Not Found Exception</a></li></ul></li></ul></li>
<li><a href="#JSON_Schemas">JSON Schemas</a>
<ul>
<li><a href="#Boolean_JSON_Schema">Boolean JSON Schema</a></li>
<li><a href="#ContentSummary_JSON_Schema">ContentSummary JSON Schema</a></li>
<li><a href="#FileChecksum_JSON_Schema">FileChecksum JSON Schema</a></li>
<li><a href="#FileStatus_JSON_Schema">FileStatus JSON Schema</a>
<ul>
<li><a href="#FileStatus_Properties">FileStatus Properties</a></li></ul></li>
<li><a href="#FileStatuses_JSON_Schema">FileStatuses JSON Schema</a></li>
<li><a href="#Long_JSON_Schema">Long JSON Schema</a></li>
<li><a href="#Path_JSON_Schema">Path JSON Schema</a></li>
<li><a href="#RemoteException_JSON_Schema">RemoteException JSON Schema</a></li>
<li><a href="#Token_JSON_Schema">Token JSON Schema</a>
<ul>
<li><a href="#Token_Properties">Token Properties</a></li></ul></li>
<li><a href="#Tokens_JSON_Schema">Tokens JSON Schema</a></li></ul></li>
<li><a href="#HTTP_Query_Parameter_Dictionary">HTTP Query Parameter Dictionary</a>
<ul>
<li><a href="#Access_Time">Access Time</a></li>
<li><a href="#Block_Size">Block Size</a></li>
<li><a href="#Buffer_Size">Buffer Size</a></li>
<li><a href="#Create_Parent">Create Parent</a></li>
<li><a href="#Delegation">Delegation</a></li>
<li><a href="#Destination">Destination</a></li>
<li><a href="#Do_As">Do As</a></li>
<li><a href="#Group">Group</a></li>
<li><a href="#Length">Length</a></li>
<li><a href="#Modification_Time">Modification Time</a></li>
<li><a href="#Offset">Offset</a></li>
<li><a href="#Op">Op</a></li>
<li><a href="#Overwrite">Overwrite</a></li>
<li><a href="#Owner">Owner</a></li>
<li><a href="#Permission">Permission</a></li>
<li><a href="#Recursive">Recursive</a></li>
<li><a href="#Renewer">Renewer</a></li>
<li><a href="#Replication">Replication</a></li>
<li><a href="#Sources">Sources</a></li>
<li><a href="#Token">Token</a></li>
<li><a href="#Username">Username</a></li></ul></li></ul></li></ul>
<div class="section">
<h3><a name="Document_Conventions">Document Conventions</a></h3>
<table border="1" class="bodyTable">
<tr class="a">
<td align="left"><tt>Monospaced</tt></td>
<td align="left">Used for commands, HTTP request and responses and code blocks.</td></tr>
<tr class="b">
<td align="left"><tt>&lt;Monospaced&gt;</tt></td>
<td align="left">User entered values.</td></tr>
<tr class="a">
<td align="left"><tt>[Monospaced]</tt></td>
<td align="left">Optional values. When the value is not specified, the default value is used.</td></tr>
<tr class="b">
<td align="left"><i>Italics</i></td>
<td align="left">Important phrases and words.</td></tr></table></div>
<div class="section">
<h3><a name="Introduction">Introduction</a></h3>
<p>The HTTP REST API supports the complete <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>/<a href="../../api/org/apache/hadoop/fs/FileContext.html">FileContext</a> interface for HDFS. The operations and the corresponding FileSystem/FileContext methods are shown in the next section. The Section <a href="#HTTP_Query_Parameter_Dictionary">HTTP Query Parameter Dictionary</a> specifies the parameter details such as the defaults and the valid values.</p>
<div class="section">
<h4><a name="Operations">Operations</a></h4>
<ul>
<li>HTTP GET
<ul>
<li><a href="#Open_and_Read_a_File"><tt>OPEN</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.open)</li>
<li><a href="#Status_of_a_FileDirectory"><tt>GETFILESTATUS</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getFileStatus)</li>
<li><a href="#List_a_Directory"><tt>LISTSTATUS</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.listStatus)</li>
<li><a href="#Get_Content_Summary_of_a_Directory"><tt>GETCONTENTSUMMARY</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getContentSummary)</li>
<li><a href="#Get_File_Checksum"><tt>GETFILECHECKSUM</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getFileChecksum)</li>
<li><a href="#Get_Home_Directory"><tt>GETHOMEDIRECTORY</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getHomeDirectory)</li>
<li><a href="#Get_Delegation_Token"><tt>GETDELEGATIONTOKEN</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getDelegationToken)</li>
<li><a href="#Get_Delegation_Tokens"><tt>GETDELEGATIONTOKENS</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getDelegationTokens)</li></ul></li>
<li>HTTP PUT
<ul>
<li><a href="#Create_and_Write_to_a_File"><tt>CREATE</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.create)</li>
<li><a href="#Make_a_Directory"><tt>MKDIRS</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.mkdirs)</li>
<li><a href="#Create_a_Symbolic_Link"><tt>CREATESYMLINK</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileContext.html">FileContext</a>.createSymlink)</li>
<li><a href="#Rename_a_FileDirectory"><tt>RENAME</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.rename)</li>
<li><a href="#Set_Replication_Factor"><tt>SETREPLICATION</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setReplication)</li>
<li><a href="#Set_Owner"><tt>SETOWNER</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setOwner)</li>
<li><a href="#Set_Permission"><tt>SETPERMISSION</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setPermission)</li>
<li><a href="#Set_Access_or_Modification_Time"><tt>SETTIMES</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setTimes)</li>
<li><a href="#Renew_Delegation_Token"><tt>RENEWDELEGATIONTOKEN</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.renewDelegationToken)</li>
<li><a href="#Cancel_Delegation_Token"><tt>CANCELDELEGATIONTOKEN</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.cancelDelegationToken)</li></ul></li>
<li>HTTP POST
<ul>
<li><a href="#Append_to_a_File"><tt>APPEND</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.append)</li>
<li><a href="#Concat_Files"><tt>CONCAT</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.concat)</li></ul></li>
<li>HTTP DELETE
<ul>
<li><a href="#Delete_a_FileDirectory"><tt>DELETE</tt></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.delete)</li></ul></li></ul></div>
<div class="section">
<h4><a name="FileSystem_URIs_vs_HTTP_URLs">FileSystem URIs vs HTTP URLs</a></h4>
<p>The FileSystem scheme of WebHDFS is &quot;<tt>webhdfs://</tt>&quot;. A WebHDFS FileSystem URI has the following format.</p>
<div class="source">
<pre> webhdfs://&lt;HOST&gt;:&lt;HTTP_PORT&gt;/&lt;PATH&gt;</pre></div>
<p>The above WebHDFS URI corresponds to the below HDFS URI.</p>
<div class="source">
<pre> hdfs://&lt;HOST&gt;:&lt;RPC_PORT&gt;/&lt;PATH&gt;</pre></div>
<p>In the REST API, the prefix &quot;<tt>/webhdfs/v1</tt>&quot; is inserted in the path and a query is appended at the end. Therefore, the corresponding HTTP URL has the following format.</p>
<div class="source">
<pre> http://&lt;HOST&gt;:&lt;HTTP_PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=...</pre></div></div>
<div class="section">
<h4><a name="HDFS_Configuration_Options">HDFS Configuration Options</a></h4>
<p>Below are the HDFS configuration options for WebHDFS.</p>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Property Name</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left"><tt>dfs.webhdfs.enabled </tt></td>
<td align="left">Enable/disable WebHDFS in Namenodes and Datanodes</td></tr>
<tr class="a">
<td align="left"><tt>dfs.web.authentication.kerberos.principal</tt></td>
<td align="left">The HTTP Kerberos principal used by Hadoop-Auth in the HTTP endpoint. The HTTP Kerberos principal MUST start with 'HTTP/' per Kerberos HTTP SPNEGO specification.</td></tr>
<tr class="b">
<td align="left"><tt>dfs.web.authentication.kerberos.keytab </tt></td>
<td align="left">The Kerberos keytab file with the credentials for the HTTP Kerberos principal used by Hadoop-Auth in the HTTP endpoint.</td></tr></table></div></div>
<div class="section">
<h3><a name="Authentication">Authentication</a></h3>
<p>When security is <i>off</i>, the authenticated user is the username specified in the <tt>user.name</tt> query parameter. If the <tt>user.name</tt> parameter is not set, the server may either set the authenticated user to a default web user, if there is any, or return an error response.</p>
<p>When security is <i>on</i>, authentication is performed by either Hadoop delegation token or Kerberos SPNEGO. If a token is set in the <tt>delegation</tt> query parameter, the authenticated user is the user encoded in the token. If the <tt>delegation</tt> parameter is not set, the user is authenticated by Kerberos SPNEGO.</p>
<p>Below are examples using the <tt>curl</tt> command tool.</p>
<ol style="list-style-type: decimal">
<li>Authentication when security is off:
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?[user.name=&lt;USER&gt;&amp;]op=...&quot;</pre></div></li>
<li>Authentication using Kerberos SPNEGO when security is on:
<div class="source">
<pre>curl -i --negotiate -u : &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=...&quot;</pre></div></li>
<li>Authentication using Hadoop delegation token when security is on:
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?delegation=&lt;TOKEN&gt;&amp;op=...&quot;</pre></div></li></ol>
<p>See also: <a href="../hadoop-common/HttpAuthentication.html">Authentication for Hadoop HTTP web-consoles</a></p></div>
<div class="section">
<h3><a name="Proxy_Users">Proxy Users</a></h3>
<p>When the proxy user feature is enabled, a proxy user <i>P</i> may submit a request on behalf of another user <i>U</i>. The username of <i>U</i> must be specified in the <tt>doas</tt> query parameter unless a delegation token is presented in authentication. In such case, the information of both users <i>P</i> and <i>U</i> must be encoded in the delegation token.</p>
<ol style="list-style-type: decimal">
<li>A proxy request when security is off:
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?[user.name=&lt;USER&gt;&amp;]doas=&lt;USER&gt;&amp;op=...&quot;</pre></div></li>
<li>A proxy request using Kerberos SPNEGO when security is on:
<div class="source">
<pre>curl -i --negotiate -u : &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?doas=&lt;USER&gt;&amp;op=...&quot;</pre></div></li>
<li>A proxy request using Hadoop delegation token when security is on:
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?delegation=&lt;TOKEN&gt;&amp;op=...&quot;</pre></div></li></ol></div>
<div class="section">
<h3><a name="File_and_Directory_Operations">File and Directory Operations</a></h3>
<div class="section">
<h4><a name="Create_and_Write_to_a_File">Create and Write to a File</a></h4>
<ul>
<li>Step 1: Submit a HTTP PUT request without automatically following redirects and without sending the file data.
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=CREATE
[&amp;overwrite=&lt;true|false&gt;][&amp;blocksize=&lt;LONG&gt;][&amp;replication=&lt;SHORT&gt;]
[&amp;permission=&lt;OCTAL&gt;][&amp;buffersize=&lt;INT&gt;]&quot;</pre></div>
<p>The request is redirected to a datanode where the file data is to be written:</p>
<div class="source">
<pre>HTTP/1.1 307 TEMPORARY_REDIRECT
Location: http://&lt;DATANODE&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=CREATE...
Content-Length: 0</pre></div></li>
<li>Step 2: Submit another HTTP PUT request using the URL in the <tt>Location</tt> header with the file data to be written.
<div class="source">
<pre>curl -i -X PUT -T &lt;LOCAL_FILE&gt; &quot;http://&lt;DATANODE&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=CREATE...&quot;</pre></div>
<p>The client receives a <tt>201 Created</tt> response with zero content length and the WebHDFS URI of the file in the <tt>Location</tt> header:</p>
<div class="source">
<pre>HTTP/1.1 201 Created
Location: webhdfs://&lt;HOST&gt;:&lt;PORT&gt;/&lt;PATH&gt;
Content-Length: 0</pre></div></li></ul>
<p><b>Note</b> that the reason of having two-step create/append is for preventing clients to send out data before the redirect. This issue is addressed by the &quot;<tt>Expect: 100-continue</tt>&quot; header in HTTP/1.1; see <a class="externalLink" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3">RFC 2616, Section 8.2.3</a>. Unfortunately, there are software library bugs (e.g. Jetty 6 HTTP server and Java 6 HTTP client), which do not correctly implement &quot;<tt>Expect: 100-continue</tt>&quot;. The two-step create/append is a temporary workaround for the software library bugs.</p>
<p>See also: <a href="#Overwrite"><tt>overwrite</tt></a>, <a href="#Block_Size"><tt>blocksize</tt></a>, <a href="#Replication"><tt>replication</tt></a>, <a href="#Permission"><tt>permission</tt></a>, <a href="#Buffer_Size"><tt>buffersize</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.create</p></div>
<div class="section">
<h4><a name="Append_to_a_File">Append to a File</a></h4>
<ul>
<li>Step 1: Submit a HTTP POST request without automatically following redirects and without sending the file data.
<div class="source">
<pre>curl -i -X POST &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=APPEND[&amp;buffersize=&lt;INT&gt;]&quot;</pre></div>
<p>The request is redirected to a datanode where the file data is to be appended:</p>
<div class="source">
<pre>HTTP/1.1 307 TEMPORARY_REDIRECT
Location: http://&lt;DATANODE&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=APPEND...
Content-Length: 0</pre></div></li>
<li>Step 2: Submit another HTTP POST request using the URL in the <tt>Location</tt> header with the file data to be appended.
<div class="source">
<pre>curl -i -X POST -T &lt;LOCAL_FILE&gt; &quot;http://&lt;DATANODE&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=APPEND...&quot;</pre></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0</pre></div></li></ul>
<p>See the note in the previous section for the description of why this operation requires two steps.</p>
<p>See also: <a href="#Buffer_Size"><tt>buffersize</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.append</p></div>
<div class="section">
<h4><a name="Concat_Files">Concat File(s)</a></h4>
<ul>
<li>Submit a HTTP POST request.
<div class="source">
<pre>curl -i -X POST &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=CONCAT&amp;sources=&lt;PATHS&gt;&quot;</pre></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0</pre></div></li></ul>
<p>See also: <a href="#Sources"><tt>sources</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.concat</p></div>
<div class="section">
<h4><a name="Open_and_Read_a_File">Open and Read a File</a></h4>
<ul>
<li>Submit a HTTP GET request with automatically following redirects.
<div class="source">
<pre>curl -i -L &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=OPEN
[&amp;offset=&lt;LONG&gt;][&amp;length=&lt;LONG&gt;][&amp;buffersize=&lt;INT&gt;]&quot;</pre></div>
<p>The request is redirected to a datanode where the file data can be read:</p>
<div class="source">
<pre>HTTP/1.1 307 TEMPORARY_REDIRECT
Location: http://&lt;DATANODE&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=OPEN...
Content-Length: 0</pre></div>
<p>The client follows the redirect to the datanode and receives the file data:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 22
Hello, webhdfs user!</pre></div></li></ul>
<p>See also: <a href="#Offset"><tt>offset</tt></a>, <a href="#Length"><tt>length</tt></a>, <a href="#Buffer_Size"><tt>buffersize</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.open</p></div>
<div class="section">
<h4><a name="Make_a_Directory">Make a Directory</a></h4>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/&lt;PATH&gt;?op=MKDIRS[&amp;permission=&lt;OCTAL&gt;]&quot;</pre></div>
<p>The client receives a response with a <a href="#Boolean_JSON_Schema"><tt>boolean</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;boolean&quot;: true}</pre></div></li></ul>
<p>See also: <a href="#Permission"><tt>permission</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.mkdirs</p></div>
<div class="section">
<h4><a name="Create_a_Symbolic_Link">Create a Symbolic Link</a></h4>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/&lt;PATH&gt;?op=CREATESYMLINK
&amp;destination=&lt;PATH&gt;[&amp;createParent=&lt;true|false&gt;]&quot;</pre></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0</pre></div></li></ul>
<p>See also: <a href="#Destination"><tt>destination</tt></a>, <a href="#Create_Parent"><tt>createParent</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.createSymlink</p></div>
<div class="section">
<h4><a name="Rename_a_FileDirectory">Rename a File/Directory</a></h4>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<pre>curl -i -X PUT &quot;&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=RENAME&amp;destination=&lt;PATH&gt;&quot;</pre></div>
<p>The client receives a response with a <a href="#Boolean_JSON_Schema"><tt>boolean</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;boolean&quot;: true}</pre></div></li></ul>
<p>See also: <a href="#Destination"><tt>destination</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.rename</p></div>
<div class="section">
<h4><a name="Delete_a_FileDirectory">Delete a File/Directory</a></h4>
<ul>
<li>Submit a HTTP DELETE request.
<div class="source">
<pre>curl -i -X DELETE &quot;http://&lt;host&gt;:&lt;port&gt;/webhdfs/v1/&lt;path&gt;?op=DELETE
[&amp;recursive=&lt;true|false&gt;]&quot;</pre></div>
<p>The client receives a response with a <a href="#Boolean_JSON_Schema"><tt>boolean</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;boolean&quot;: true}</pre></div></li></ul>
<p>See also: <a href="#Recursive"><tt>recursive</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.delete</p></div>
<div class="section">
<h4><a name="Status_of_a_FileDirectory">Status of a File/Directory</a></h4>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETFILESTATUS&quot;</pre></div>
<p>The client receives a response with a <a href="#FileStatus_JSON_Schema"><tt>FileStatus</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;FileStatus&quot;:
{
&quot;accessTime&quot; : 0,
&quot;blockSize&quot; : 0,
&quot;group&quot; : &quot;supergroup&quot;,
&quot;length&quot; : 0, //in bytes, zero for directories
&quot;modificationTime&quot;: 1320173277227,
&quot;owner&quot; : &quot;webuser&quot;,
&quot;pathSuffix&quot; : &quot;&quot;,
&quot;permission&quot; : &quot;777&quot;,
&quot;replication&quot; : 0,
&quot;type&quot; : &quot;DIRECTORY&quot; //enum {FILE, DIRECTORY, SYMLINK}
}
}</pre></div></li></ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getFileStatus</p></div>
<div class="section">
<h4><a name="List_a_Directory">List a Directory</a></h4>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=LISTSTATUS&quot;</pre></div>
<p>The client receives a response with a <a href="#FileStatuses_JSON_Schema"><tt>FileStatuses</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 427
{
&quot;FileStatuses&quot;:
{
&quot;FileStatus&quot;:
[
{
&quot;accessTime&quot; : 1320171722771,
&quot;blockSize&quot; : 33554432,
&quot;group&quot; : &quot;supergroup&quot;,
&quot;length&quot; : 24930,
&quot;modificationTime&quot;: 1320171722771,
&quot;owner&quot; : &quot;webuser&quot;,
&quot;pathSuffix&quot; : &quot;a.patch&quot;,
&quot;permission&quot; : &quot;644&quot;,
&quot;replication&quot; : 1,
&quot;type&quot; : &quot;FILE&quot;
},
{
&quot;accessTime&quot; : 0,
&quot;blockSize&quot; : 0,
&quot;group&quot; : &quot;supergroup&quot;,
&quot;length&quot; : 0,
&quot;modificationTime&quot;: 1320895981256,
&quot;owner&quot; : &quot;szetszwo&quot;,
&quot;pathSuffix&quot; : &quot;bar&quot;,
&quot;permission&quot; : &quot;711&quot;,
&quot;replication&quot; : 0,
&quot;type&quot; : &quot;DIRECTORY&quot;
},
...
]
}
}</pre></div></li></ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.listStatus</p></div></div>
<div class="section">
<h3><a name="Other_File_System_Operations">Other File System Operations</a></h3>
<div class="section">
<h4><a name="Get_Content_Summary_of_a_Directory">Get Content Summary of a Directory</a></h4>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETCONTENTSUMMARY&quot;</pre></div>
<p>The client receives a response with a <a href="#ContentSummary_JSON_Schema"><tt>ContentSummary</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;ContentSummary&quot;:
{
&quot;directoryCount&quot;: 2,
&quot;fileCount&quot; : 1,
&quot;length&quot; : 24930,
&quot;quota&quot; : -1,
&quot;spaceConsumed&quot; : 24930,
&quot;spaceQuota&quot; : -1
}
}</pre></div></li></ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getContentSummary</p></div>
<div class="section">
<h4><a name="Get_File_Checksum">Get File Checksum</a></h4>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETFILECHECKSUM&quot;</pre></div>
<p>The request is redirected to a datanode:</p>
<div class="source">
<pre>HTTP/1.1 307 TEMPORARY_REDIRECT
Location: http://&lt;DATANODE&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETFILECHECKSUM...
Content-Length: 0</pre></div>
<p>The client follows the redirect to the datanode and receives a <a href="#FileChecksum_JSON_Schema"><tt>FileChecksum</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;FileChecksum&quot;:
{
&quot;algorithm&quot;: &quot;MD5-of-1MD5-of-512CRC32&quot;,
&quot;bytes&quot; : &quot;eadb10de24aa315748930df6e185c0d ...&quot;,
&quot;length&quot; : 28
}
}</pre></div></li></ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getFileChecksum</p></div>
<div class="section">
<h4><a name="Get_Home_Directory">Get Home Directory</a></h4>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/?op=GETHOMEDIRECTORY&quot;</pre></div>
<p>The client receives a response with a <a href="#Path_JSON_Schema"><tt>Path</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;Path&quot;: &quot;/user/szetszwo&quot;}</pre></div></li></ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getHomeDirectory</p></div>
<div class="section">
<h4><a name="Set_Permission">Set Permission</a></h4>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=SETPERMISSION
[&amp;permission=&lt;OCTAL&gt;]&quot;</pre></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0</pre></div></li></ul>
<p>See also: <a href="#Permission"><tt>permission</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setPermission</p></div>
<div class="section">
<h4><a name="Set_Owner">Set Owner</a></h4>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=SETOWNER
[&amp;owner=&lt;USER&gt;][&amp;group=&lt;GROUP&gt;]&quot;</pre></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0</pre></div></li></ul>
<p>See also: <a href="#Owner"><tt>owner</tt></a>, <a href="#Group"><tt>group</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setOwner</p></div>
<div class="section">
<h4><a name="Set_Replication_Factor">Set Replication Factor</a></h4>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=SETREPLICATION
[&amp;replication=&lt;SHORT&gt;]&quot;</pre></div>
<p>The client receives a response with a <a href="#Boolean_JSON_Schema"><tt>boolean</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;boolean&quot;: true}</pre></div></li></ul>
<p>See also: <a href="#Replication"><tt>replication</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setReplication</p></div>
<div class="section">
<h4><a name="Set_Access_or_Modification_Time">Set Access or Modification Time</a></h4>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=SETTIMES
[&amp;modificationtime=&lt;TIME&gt;][&amp;accesstime=&lt;TIME&gt;]&quot;</pre></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0</pre></div></li></ul>
<p>See also: <a href="#Modification_Time"><tt>modificationtime</tt></a>, <a href="#Access_Time"><tt>accesstime</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setTimes</p></div></div>
<div class="section">
<h3><a name="Delegation_Token_Operations">Delegation Token Operations</a></h3>
<div class="section">
<h4><a name="Get_Delegation_Token">Get Delegation Token</a></h4>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/?op=GETDELEGATIONTOKEN&amp;renewer=&lt;USER&gt;&quot;</pre></div>
<p>The client receives a response with a <a href="#Token_JSON_Schema"><tt>Token</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;Token&quot;:
{
&quot;urlString&quot;: &quot;JQAIaG9y...&quot;
}
}</pre></div></li></ul>
<p>See also: <a href="#Renewer"><tt>renewer</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getDelegationToken</p></div>
<div class="section">
<h4><a name="Get_Delegation_Tokens">Get Delegation Tokens</a></h4>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/?op=GETDELEGATIONTOKENS&amp;renewer=&lt;USER&gt;&quot;</pre></div>
<p>The client receives a response with a <a href="#Tokens_JSON_Schema"><tt>Tokens</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;Tokens&quot;:
{
&quot;Token&quot;:
[
{
&quot;urlString&quot;:&quot;KAAKSm9i ...&quot;
}
]
}
}</pre></div></li></ul>
<p>See also: <a href="#Renewer"><tt>renewer</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getDelegationTokens</p></div>
<div class="section">
<h4><a name="Renew_Delegation_Token">Renew Delegation Token</a></h4>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/?op=RENEWDELEGATIONTOKEN&amp;token=&lt;TOKEN&gt;&quot;</pre></div>
<p>The client receives a response with a <a href="#Long_JSON_Schema"><tt>long</tt> JSON object</a>:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;long&quot;: 1320962673997} //the new expiration time</pre></div></li></ul>
<p>See also: <a href="#Token"><tt>token</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.renewDelegationToken</p></div>
<div class="section">
<h4><a name="Cancel_Delegation_Token">Cancel Delegation Token</a></h4>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/?op=CANCELDELEGATIONTOKEN&amp;token=&lt;TOKEN&gt;&quot;</pre></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0</pre></div></li></ul>
<p>See also: <a href="#Token"><tt>token</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.cancelDelegationToken</p></div></div>
<div class="section">
<h3><a name="Error_Responses">Error Responses</a></h3>
<p>When an operation fails, the server may throw an exception. The JSON schema of error responses is defined in <a href="#RemoteException_JSON_Schema">RemoteException JSON Schema</a>. The table below shows the mapping from exceptions to HTTP response codes.</p>
<div class="section">
<h4><a name="HTTP_Response_Codes">HTTP Response Codes</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Exceptions</th>
<th align="left">HTTP Response Codes</th></tr>
<tr class="b">
<td align="left"><tt>IllegalArgumentException </tt></td>
<td align="left"><tt>400 Bad Request </tt></td></tr>
<tr class="a">
<td align="left"><tt>UnsupportedOperationException</tt></td>
<td align="left"><tt>400 Bad Request </tt></td></tr>
<tr class="b">
<td align="left"><tt>SecurityException </tt></td>
<td align="left"><tt>401 Unauthorized </tt></td></tr>
<tr class="a">
<td align="left"><tt>IOException </tt></td>
<td align="left"><tt>403 Forbidden </tt></td></tr>
<tr class="b">
<td align="left"><tt>FileNotFoundException </tt></td>
<td align="left"><tt>404 Not Found </tt></td></tr>
<tr class="a">
<td align="left"><tt>RumtimeException </tt></td>
<td align="left"><tt>500 Internal Server Error</tt></td></tr></table>
<p>Below are examples of exception responses.</p>
<div class="section">
<h5><a name="Illegal_Argument_Exception">Illegal Argument Exception</a></h5>
<div class="source">
<pre>HTTP/1.1 400 Bad Request
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;RemoteException&quot;:
{
&quot;exception&quot; : &quot;IllegalArgumentException&quot;,
&quot;javaClassName&quot;: &quot;java.lang.IllegalArgumentException&quot;,
&quot;message&quot; : &quot;Invalid value for webhdfs parameter \&quot;permission\&quot;: ...&quot;
}
}</pre></div></div>
<div class="section">
<h5><a name="Security_Exception">Security Exception</a></h5>
<div class="source">
<pre>HTTP/1.1 401 Unauthorized
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;RemoteException&quot;:
{
&quot;exception&quot; : &quot;SecurityException&quot;,
&quot;javaClassName&quot;: &quot;java.lang.SecurityException&quot;,
&quot;message&quot; : &quot;Failed to obtain user group information: ...&quot;
}
}</pre></div></div>
<div class="section">
<h5><a name="Access_Control_Exception">Access Control Exception</a></h5>
<div class="source">
<pre>HTTP/1.1 403 Forbidden
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;RemoteException&quot;:
{
&quot;exception&quot; : &quot;AccessControlException&quot;,
&quot;javaClassName&quot;: &quot;org.apache.hadoop.security.AccessControlException&quot;,
&quot;message&quot; : &quot;Permission denied: ...&quot;
}
}</pre></div></div>
<div class="section">
<h5><a name="File_Not_Found_Exception">File Not Found Exception</a></h5>
<div class="source">
<pre>HTTP/1.1 404 Not Found
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;RemoteException&quot;:
{
&quot;exception&quot; : &quot;FileNotFoundException&quot;,
&quot;javaClassName&quot;: &quot;java.io.FileNotFoundException&quot;,
&quot;message&quot; : &quot;File does not exist: /foo/a.patch&quot;
}
}</pre></div></div></div></div>
<div class="section">
<h3><a name="JSON_Schemas">JSON Schemas</a></h3>
<p>All operations, except for <a href="#Open_and_Read_a_File"><tt>OPEN</tt></a>, either return a zero-length response or a JSON response. For <a href="#Open_and_Read_a_File"><tt>OPEN</tt></a>, the response is an octet-stream. The JSON schemas are shown below. See <a class="externalLink" href="http://tools.ietf.org/id/draft-zyp-json-schema-03.html">draft-zyp-json-schema-03</a> for the syntax definitions of the JSON schemas.</p>
<p><b>Note</b> that the default value of <a class="externalLink" href="http://tools.ietf.org/id/draft-zyp-json-schema-03.html#additionalProperties"><tt>additionalProperties</tt></a> is an empty schema which allows any value for additional properties. Therefore, all WebHDFS JSON responses allow any additional property. However, if additional properties are included in the responses, they are considered as optional properties in order to maintain compatibility.</p>
<div class="section">
<h4><a name="Boolean_JSON_Schema">Boolean JSON Schema</a></h4>
<div class="source">
<pre>{
&quot;name&quot; : &quot;boolean&quot;,
&quot;properties&quot;:
{
&quot;boolean&quot;:
{
&quot;description&quot;: &quot;A boolean value&quot;,
&quot;type&quot; : &quot;boolean&quot;,
&quot;required&quot; : true
}
}
}</pre></div>
<p>See also: <a href="#Make_a_Directory"><tt>MKDIRS</tt></a>, <a href="#Rename_a_FileDirectory"><tt>RENAME</tt></a>, <a href="#Delete_a_FileDirectory"><tt>DELETE</tt></a>, <a href="#Set_Replication_Factor"><tt>SETREPLICATION</tt></a></p></div>
<div class="section">
<h4><a name="ContentSummary_JSON_Schema">ContentSummary JSON Schema</a></h4>
<div class="source">
<pre>{
&quot;name&quot; : &quot;ContentSummary&quot;,
&quot;properties&quot;:
{
&quot;ContentSummary&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;directoryCount&quot;:
{
&quot;description&quot;: &quot;The number of directories.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;fileCount&quot;:
{
&quot;description&quot;: &quot;The number of files.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;length&quot;:
{
&quot;description&quot;: &quot;The number of bytes used by the content.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;quota&quot;:
{
&quot;description&quot;: &quot;The namespace quota of this directory.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;spaceConsumed&quot;:
{
&quot;description&quot;: &quot;The disk space consumed by the content.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;spaceQuota&quot;:
{
&quot;description&quot;: &quot;The disk space quota.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
}
}
}
}
}</pre></div>
<p>See also: <a href="#Get_Content_Summary_of_a_Directory"><tt>GETCONTENTSUMMARY</tt></a></p></div>
<div class="section">
<h4><a name="FileChecksum_JSON_Schema">FileChecksum JSON Schema</a></h4>
<div class="source">
<pre>{
&quot;name&quot; : &quot;FileChecksum&quot;,
&quot;properties&quot;:
{
&quot;FileChecksum&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;algorithm&quot;:
{
&quot;description&quot;: &quot;The name of the checksum algorithm.&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;bytes&quot;:
{
&quot;description&quot;: &quot;The byte sequence of the checksum in hexadecimal.&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;length&quot;:
{
&quot;description&quot;: &quot;The length of the bytes (not the length of the string).&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
}
}
}
}
}</pre></div>
<p>See also: <a href="#Get_File_Checksum"><tt>GETFILECHECKSUM</tt></a></p></div>
<div class="section">
<h4><a name="FileStatus_JSON_Schema">FileStatus JSON Schema</a></h4>
<div class="source">
<pre>{
&quot;name&quot; : &quot;FileStatus&quot;,
&quot;properties&quot;:
{
&quot;FileStatus&quot;: fileStatusProperties //See FileStatus Properties
}
}</pre></div>
<p>See also: <a href="#FileStatus_Properties"><tt>FileStatus</tt> Properties</a>, <a href="#Status_of_a_FileDirectory"><tt>GETFILESTATUS</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileStatus.html">FileStatus</a></p>
<div class="section">
<h5><a name="FileStatus_Properties">FileStatus Properties</a></h5>
<p>JavaScript syntax is used to define <tt>fileStatusProperties</tt> so that it can be referred in both <tt>FileStatus</tt> and <tt>FileStatuses</tt> JSON schemas.</p>
<div class="source">
<pre>var fileStatusProperties =
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;accessTime&quot;:
{
&quot;description&quot;: &quot;The access time.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;blockSize&quot;:
{
&quot;description&quot;: &quot;The block size of a file.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;group&quot;:
{
&quot;description&quot;: &quot;The group owner.&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;length&quot;:
{
&quot;description&quot;: &quot;The number of bytes in a file.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;modificationTime&quot;:
{
&quot;description&quot;: &quot;The modification time.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;owner&quot;:
{
&quot;description&quot;: &quot;The user who is the owner.&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;pathSuffix&quot;:
{
&quot;description&quot;: &quot;The path suffix.&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;permission&quot;:
{
&quot;description&quot;: &quot;The permission represented as a octal string.&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;replication&quot;:
{
&quot;description&quot;: &quot;The number of replication of a file.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;symlink&quot;: //an optional property
{
&quot;description&quot;: &quot;The link target of a symlink.&quot;,
&quot;type&quot; : &quot;string&quot;
},
&quot;type&quot;:
{
&quot;description&quot;: &quot;The type of the path object.&quot;,
&quot;enum&quot; : [&quot;FILE&quot;, &quot;DIRECTORY&quot;, &quot;SYMLINK&quot;],
&quot;required&quot; : true
}
}
};</pre></div></div></div>
<div class="section">
<h4><a name="FileStatuses_JSON_Schema">FileStatuses JSON Schema</a></h4>
<p>A <tt>FileStatuses</tt> JSON object represents an array of <tt>FileStatus</tt> JSON objects.</p>
<div class="source">
<pre>{
&quot;name&quot; : &quot;FileStatuses&quot;,
&quot;properties&quot;:
{
&quot;FileStatuses&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;FileStatus&quot;:
{
&quot;description&quot;: &quot;An array of FileStatus&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;items&quot; : fileStatusProperties //See FileStatus Properties
}
}
}
}
}</pre></div>
<p>See also: <a href="#FileStatus_Properties"><tt>FileStatus</tt> Properties</a>, <a href="#List_a_Directory"><tt>LISTSTATUS</tt></a>, <a href="../../api/org/apache/hadoop/fs/FileStatus.html">FileStatus</a></p></div>
<div class="section">
<h4><a name="Long_JSON_Schema">Long JSON Schema</a></h4>
<div class="source">
<pre>{
&quot;name&quot; : &quot;long&quot;,
&quot;properties&quot;:
{
&quot;long&quot;:
{
&quot;description&quot;: &quot;A long integer value&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
}
}
}</pre></div>
<p>See also: <a href="#Renew_Delegation_Token"><tt>RENEWDELEGATIONTOKEN</tt></a>,</p></div>
<div class="section">
<h4><a name="Path_JSON_Schema">Path JSON Schema</a></h4>
<div class="source">
<pre>{
&quot;name&quot; : &quot;Path&quot;,
&quot;properties&quot;:
{
&quot;Path&quot;:
{
&quot;description&quot;: &quot;The string representation a Path.&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
}
}
}</pre></div>
<p>See also: <a href="#Get_Home_Directory"><tt>GETHOMEDIRECTORY</tt></a>, <a href="../../api/org/apache/hadoop/fs/Path.html">Path</a></p></div>
<div class="section">
<h4><a name="RemoteException_JSON_Schema">RemoteException JSON Schema</a></h4>
<div class="source">
<pre>{
&quot;name&quot; : &quot;RemoteException&quot;,
&quot;properties&quot;:
{
&quot;RemoteException&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;exception&quot;:
{
&quot;description&quot;: &quot;Name of the exception&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;message&quot;:
{
&quot;description&quot;: &quot;Exception message&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;javaClassName&quot;: //an optional property
{
&quot;description&quot;: &quot;Java class name of the exception&quot;,
&quot;type&quot; : &quot;string&quot;,
}
}
}
}
}</pre></div>
<p>See also: <a href="#Error_Responses">Error Responses</a></p></div>
<div class="section">
<h4><a name="Token_JSON_Schema">Token JSON Schema</a></h4>
<div class="source">
<pre>{
&quot;name&quot; : &quot;Token&quot;,
&quot;properties&quot;:
{
&quot;Token&quot;: tokenProperties //See Token Properties
}
}</pre></div>
<p>See also: <a href="#Token_Properties"><tt>Token</tt> Properties</a>, <a href="#Get_Delegation_Token"><tt>GETDELEGATIONTOKEN</tt></a>, the note in <a href="#Delegation">Delegation</a>.</p>
<div class="section">
<h5><a name="Token_Properties">Token Properties</a></h5>
<p>JavaScript syntax is used to define <tt>tokenProperties</tt> so that it can be referred in both <tt>Token</tt> and <tt>Tokens</tt> JSON schemas.</p>
<div class="source">
<pre>var tokenProperties =
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;urlString&quot;:
{
&quot;description&quot;: &quot;A delegation token encoded as a URL safe string.&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
}
}
}</pre></div></div></div>
<div class="section">
<h4><a name="Tokens_JSON_Schema">Tokens JSON Schema</a></h4>
<p>A <tt>Tokens</tt> JSON object represents an array of <tt>Token</tt> JSON objects.</p>
<div class="source">
<pre>{
&quot;name&quot; : &quot;Tokens&quot;,
&quot;properties&quot;:
{
&quot;Tokens&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;Token&quot;:
{
&quot;description&quot;: &quot;An array of Token&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;items&quot; : &quot;Token&quot;: tokenProperties //See Token Properties
}
}
}
}
}</pre></div>
<p>See also: <a href="#Token_Properties"><tt>Token</tt> Properties</a>, <a href="#Get_Delegation_Tokens"><tt>GETDELEGATIONTOKENS</tt></a>, the note in <a href="#Delegation">Delegation</a>.</p></div></div>
<div class="section">
<h3><a name="HTTP_Query_Parameter_Dictionary">HTTP Query Parameter Dictionary</a></h3>
<div class="section">
<h4><a name="Access_Time">Access Time</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>accesstime</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The access time of a file/directory.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">long</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">-1 (means keeping it unchanged)</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">-1 or a timestamp</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any integer.</td></tr></table>
<p>See also: <a href="#Set_Access_or_Modification_Time"><tt>SETTIMES</tt></a></p></div>
<div class="section">
<h4><a name="Block_Size">Block Size</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>blocksize</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The block size of a file.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">long</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">Specified in the configuration.</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">&gt; 0</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any integer.</td></tr></table>
<p>See also: <a href="#Create_and_Write_to_a_File"><tt>CREATE</tt></a></p></div>
<div class="section">
<h4><a name="Buffer_Size">Buffer Size</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>buffersize</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The size of the buffer used in transferring data.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">int</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">Specified in the configuration.</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">&gt; 0</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any integer.</td></tr></table>
<p>See also: <a href="#Create_and_Write_to_a_File"><tt>CREATE</tt></a>, <a href="#Append_to_a_File"><tt>APPEND</tt></a>, <a href="#Open_and_Read_a_File"><tt>OPEN</tt></a></p></div>
<div class="section">
<h4><a name="Create_Parent">Create Parent</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>createparent</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">If the parent directories do not exist, should they be created?</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">boolean</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">false</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">true</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">true</td></tr></table>
<p>See also: <a href="#Create_a_Symbolic_Link"><tt>CREATESYMLINK</tt></a></p></div>
<div class="section">
<h4><a name="Delegation">Delegation</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>delegation</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The delegation token used for authentication.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">String</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">&lt;empty&gt;</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">An encoded token.</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">See the note below.</td></tr></table>
<p><b>Note</b> that delegation tokens are encoded as a URL safe string; see <tt>encodeToUrlString()</tt> and <tt>decodeFromUrlString(String)</tt> in <tt>org.apache.hadoop.security.token.Token</tt> for the details of the encoding.</p>
<p>See also: <a href="#Authentication">Authentication</a></p></div>
<div class="section">
<h4><a name="Destination">Destination</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>destination</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The destination path.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">Path</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">&lt;empty&gt; (an invalid path)</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">An absolute FileSystem path without scheme and authority.</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any path.</td></tr></table>
<p>See also: <a href="#Create_a_Symbolic_Link"><tt>CREATESYMLINK</tt></a>, <a href="#Rename_a_FileDirectory"><tt>RENAME</tt></a></p></div>
<div class="section">
<h4><a name="Do_As">Do As</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>doas</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">Allowing a proxy user to do as another user.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">String</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">null</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">Any valid username.</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any string.</td></tr></table>
<p>See also: <a href="#Proxy_Users">Proxy Users</a></p></div>
<div class="section">
<h4><a name="Group">Group</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>group</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The name of a group.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">String</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">&lt;empty&gt; (means keeping it unchanged)</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">Any valid group name.</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any string.</td></tr></table>
<p>See also: <a href="#Set_Owner"><tt>SETOWNER</tt></a></p></div>
<div class="section">
<h4><a name="Length">Length</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>length</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The number of bytes to be processed.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">long</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">null (means the entire file)</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">&gt;= 0 or null</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any integer.</td></tr></table>
<p>See also: <a href="#Open_and_Read_a_File"><tt>OPEN</tt></a></p></div>
<div class="section">
<h4><a name="Modification_Time">Modification Time</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>modificationtime</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The modification time of a file/directory.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">long</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">-1 (means keeping it unchanged)</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">-1 or a timestamp</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any integer.</td></tr></table>
<p>See also: <a href="#Set_Access_or_Modification_Time"><tt>SETTIMES</tt></a></p></div>
<div class="section">
<h4><a name="Offset">Offset</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>offset</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The starting byte position.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">long</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">0</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">&gt;= 0</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any integer.</td></tr></table>
<p>See also: <a href="#Open_and_Read_a_File"><tt>OPEN</tt></a></p></div>
<div class="section">
<h4><a name="Op">Op</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>op</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The name of the operation to be executed.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">enum</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">null (an invalid value)</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">Any valid operation name.</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any string.</td></tr></table>
<p>See also: <a href="#Operations">Operations</a></p></div>
<div class="section">
<h4><a name="Overwrite">Overwrite</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>overwrite</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">If a file already exists, should it be overwritten?</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">boolean</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">false</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">true</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">true</td></tr></table>
<p>See also: <a href="#Create_and_Write_to_a_File"><tt>CREATE</tt></a></p></div>
<div class="section">
<h4><a name="Owner">Owner</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>owner</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The username who is the owner of a file/directory.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">String</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">&lt;empty&gt; (means keeping it unchanged)</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">Any valid username.</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any string.</td></tr></table>
<p>See also: <a href="#Set_Owner"><tt>SETOWNER</tt></a></p></div>
<div class="section">
<h4><a name="Permission">Permission</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>permission</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The permission of a file/directory.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">Octal</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">755</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">0 - 1777</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any radix-8 integer (leading zeros may be omitted.)</td></tr></table>
<p>See also: <a href="#Create_and_Write_to_a_File"><tt>CREATE</tt></a>, <a href="#Make_a_Directory"><tt>MKDIRS</tt></a>, <a href="#Set_Permission"><tt>SETPERMISSION</tt></a></p></div>
<div class="section">
<h4><a name="Recursive">Recursive</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>recursive</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">Should the operation act on the content in the subdirectories?</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">boolean</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">false</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">true</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">true</td></tr></table>
<p>See also: <a href="#Rename_a_FileDirectory"><tt>RENAME</tt></a></p></div>
<div class="section">
<h4><a name="Renewer">Renewer</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>renewer</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The username of the renewer of a delegation token.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">String</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">&lt;empty&gt; (means the current user)</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">Any valid username.</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any string.</td></tr></table>
<p>See also: <a href="#Get_Delegation_Token"><tt>GETDELEGATIONTOKEN</tt></a>, <a href="#Get_Delegation_Tokens"><tt>GETDELEGATIONTOKENS</tt></a></p></div>
<div class="section">
<h4><a name="Replication">Replication</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>replication</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The number of replications of a file.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">short</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">Specified in the configuration.</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">&gt; 0</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any integer.</td></tr></table>
<p>See also: <a href="#Create_and_Write_to_a_File"><tt>CREATE</tt></a>, <a href="#Set_Replication_Factor"><tt>SETREPLICATION</tt></a></p></div>
<div class="section">
<h4><a name="Sources">Sources</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>sources</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">A list of source paths.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">String</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">&lt;empty&gt;</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">A list of comma seperated absolute FileSystem paths without scheme and authority.</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any string.</td></tr></table>
<p>See also: <a href="#Concat_Files"><tt>CONCAT</tt></a></p></div>
<div class="section">
<h4><a name="Token">Token</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>token</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The delegation token used for the operation.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">String</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">&lt;empty&gt;</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">An encoded token.</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">See the note in <a href="#Delegation">Delegation</a>.</td></tr></table>
<p>See also: <a href="#Renew_Delegation_Token"><tt>RENEWDELEGATIONTOKEN</tt></a>, <a href="#Cancel_Delegation_Token"><tt>CANCELDELEGATIONTOKEN</tt></a></p></div>
<div class="section">
<h4><a name="Username">Username</a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Name</th>
<td align="left"><tt>user.name</tt></td></tr>
<tr class="b">
<th align="left">Description</th>
<td align="left">The authenticated user; see <a href="#Authentication">Authentication</a>.</td></tr>
<tr class="a">
<th align="left">Type</th>
<td align="left">String</td></tr>
<tr class="b">
<th align="left">Default Value</th>
<td align="left">null</td></tr>
<tr class="a">
<th align="left">Valid Values</th>
<td align="left">Any valid username.</td></tr>
<tr class="b">
<th align="left">Syntax</th>
<td align="left">Any string.</td></tr></table>
<p>See also: <a href="#Authentication">Authentication</a></p></div></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">&#169; 2014
Apache Software Foundation
- <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a></div>
<div class="clear">
<hr/>
</div>
</div>
</body>
</html>

Event Timeline