hadoop/hadoop-project-dist/hadoop-hdfs/WebHDFS.html

5454 lines
206 KiB
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 2023-02-24
| Rendered using Apache Maven Stylus Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Apache Hadoop 3.4.0-SNAPSHOT &#x2013; 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="20230224" />
<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="xright"> <a href="http://wiki.apache.org/hadoop" class="externalLink">Wiki</a>
|
<a href="https://gitbox.apache.org/repos/asf/hadoop.git" class="externalLink">git</a>
|
<a href="http://hadoop.apache.org/" class="externalLink">Apache Hadoop</a>
&nbsp;| Last Published: 2023-02-24
&nbsp;| Version: 3.4.0-SNAPSHOT
</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">Commands Reference</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/FileSystemShell.html">FileSystem Shell</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Compatibility.html">Compatibility Specification</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/DownstreamDev.html">Downstream Developer's Guide</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/AdminCompatibilityGuide.html">Admin Compatibility Guide</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/InterfaceClassification.html">Interface Classification</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/filesystem/index.html">FileSystem Specification</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/FairCallQueue.html">Fair Call Queue</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">Proxy User</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/RackAwareness.html">Rack Awareness</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>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CredentialProviderAPI.html">Credential Provider API</a>
</li>
<li class="none">
<a href="../../hadoop-kms/index.html">Hadoop KMS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Tracing.html">Tracing</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/UnixShellGuide.html">Unix Shell Guide</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/registry/index.html">Registry</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/AsyncProfilerServlet.html">Async Profiler</a>
</li>
</ul>
<h5>HDFS</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsDesign.html">Architecture</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html">User Guide</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HDFSCommands.html">Commands Reference</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.html">NameNode HA With QJM</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithNFS.html">NameNode HA With NFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ObserverNameNode.html">Observer NameNode</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/ViewFs.html">ViewFs</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ViewFsOverloadScheme.html">ViewFsOverloadScheme</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsSnapshots.html">Snapshots</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/LibHdfs.html">libhdfs (C API)</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</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">NFS Gateway</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsRollingUpgrade.html">Rolling Upgrade</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ExtendedAttributes.html">Extended Attributes</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/TransparentEncryption.html">Transparent Encryption</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsMultihoming.html">Multihoming</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ArchivalStorage.html">Storage Policies</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/MemoryStorage.html">Memory Storage Support</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/SLGUserGuide.html">Synthetic Load Generator</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HDFSErasureCoding.html">Erasure Coding</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HDFSDiskbalancer.html">Disk Balancer</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsUpgradeDomain.html">Upgrade Domain</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsDataNodeAdminGuide.html">DataNode Admin</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs-rbf/HDFSRouterFederation.html">Router Federation</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsProvidedStorage.html">Provided Storage</a>
</li>
</ul>
<h5>MapReduce</h5>
<ul>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html">Tutorial</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapredCommands.html">Commands Reference</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduce_Compatibility_Hadoop1_Hadoop2.html">Compatibility with 1.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>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/SharedCacheSupport.html">Support for YARN Shared Cache</a>
</li>
</ul>
<h5>MapReduce REST APIs</h5>
<ul>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapredAppMasterRest.html">MR Application Master</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-hs/HistoryServerRest.html">MR History Server</a>
</li>
</ul>
<h5>YARN</h5>
<ul>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YARN.html">Architecture</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YarnCommands.html">Commands Reference</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/ResourceManagerRestart.html">ResourceManager Restart</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/ResourceManagerHA.html">ResourceManager HA</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/ResourceModel.html">Resource Model</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeLabel.html">Node Labels</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeAttributes.html">Node Attributes</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/TimelineServer.html">Timeline Server</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/TimelineServiceV2.html">Timeline Service V.2</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/YarnApplicationSecurity.html">YARN Application Security</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeManager.html">NodeManager</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/DockerContainers.html">Running Applications in Docker Containers</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/RuncContainers.html">Running Applications in runC Containers</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeManagerCgroups.html">Using CGroups</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/SecureContainer.html">Secure Containers</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/ReservationSystem.html">Reservation System</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/GracefulDecommission.html">Graceful Decommission</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/OpportunisticContainers.html">Opportunistic Containers</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/Federation.html">YARN Federation</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/SharedCache.html">Shared Cache</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/UsingGpus.html">Using GPU</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/UsingFPGA.html">Using FPGA</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/PlacementConstraints.html">Placement Constraints</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YarnUI2.html">YARN UI2</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/TimelineServer.html#Timeline_Server_REST_API_v1">Timeline Server</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/TimelineServiceV2.html#Timeline_Service_v.2_REST_API">Timeline Service V.2</a>
</li>
</ul>
<h5>YARN Service</h5>
<ul>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/Overview.html">Overview</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/QuickStart.html">QuickStart</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/Concepts.html">Concepts</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/YarnServiceAPI.html">Yarn Service API</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/ServiceDiscovery.html">Service Discovery</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/SystemServices.html">System Services</a>
</li>
</ul>
<h5>Hadoop Compatible File Systems</h5>
<ul>
<li class="none">
<a href="../../hadoop-aliyun/tools/hadoop-aliyun/index.html">Aliyun OSS</a>
</li>
<li class="none">
<a href="../../hadoop-aws/tools/hadoop-aws/index.html">Amazon S3</a>
</li>
<li class="none">
<a href="../../hadoop-azure/index.html">Azure Blob Storage</a>
</li>
<li class="none">
<a href="../../hadoop-azure-datalake/index.html">Azure Data Lake Storage</a>
</li>
<li class="none">
<a href="../../hadoop-cos/cloud-storage/index.html">Tencent COS</a>
</li>
<li class="none">
<a href="../../hadoop-huaweicloud/cloud-storage/index.html">Huaweicloud OBS</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>Tools</h5>
<ul>
<li class="none">
<a href="../../hadoop-streaming/HadoopStreaming.html">Hadoop Streaming</a>
</li>
<li class="none">
<a href="../../hadoop-archives/HadoopArchives.html">Hadoop Archives</a>
</li>
<li class="none">
<a href="../../hadoop-archive-logs/HadoopArchiveLogs.html">Hadoop Archive Logs</a>
</li>
<li class="none">
<a href="../../hadoop-distcp/DistCp.html">DistCp</a>
</li>
<li class="none">
<a href="../../hadoop-federation-balance/HDFSFederationBalance.html">HDFS Federation Balance</a>
</li>
<li class="none">
<a href="../../hadoop-gridmix/GridMix.html">GridMix</a>
</li>
<li class="none">
<a href="../../hadoop-rumen/Rumen.html">Rumen</a>
</li>
<li class="none">
<a href="../../hadoop-resourceestimator/ResourceEstimator.html">Resource Estimator Service</a>
</li>
<li class="none">
<a href="../../hadoop-sls/SchedulerLoadSimulator.html">Scheduler Load Simulator</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Benchmarking.html">Hadoop Benchmarking</a>
</li>
<li class="none">
<a href="../../hadoop-dynamometer/Dynamometer.html">Dynamometer</a>
</li>
</ul>
<h5>Reference</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/release/">Changelog and Release Notes</a>
</li>
<li class="none">
<a href="../../api/index.html">Java API docs</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/UnixShellAPI.html">Unix Shell API</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Metrics.html">Metrics</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-project-dist/hadoop-hdfs-rbf/hdfs-rbf-default.xml">hdfs-rbf-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-kms/kms-default.html">kms-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-hdfs-httpfs/httpfs-default.html">httpfs-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.
-->
<h1>WebHDFS REST API</h1>
<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="#SSL_Configurations_for_SWebHDFS">SSL Configurations for SWebHDFS</a></li>
<li><a href="#Proxy_Users">Proxy Users</a></li>
<li><a href="#Cross-Site_Request_Forgery_Prevention">Cross-Site Request Forgery Prevention</a></li>
<li><a href="#WebHDFS_Retry_Policy">WebHDFS Retry Policy</a></li>
<li><a href="#WebHDFS_Request_Filtering">WebHDFS Request Filtering</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_File.28s.29">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_File.2FDirectory">Rename a File/Directory</a></li>
<li><a href="#Delete_a_File.2FDirectory">Delete a File/Directory</a></li>
<li><a href="#Truncate_a_File">Truncate a File</a></li>
<li><a href="#Status_of_a_File.2FDirectory">Status of a File/Directory</a></li>
<li><a href="#List_a_Directory">List a Directory</a></li>
<li><a href="#List_a_File">List a File</a></li>
<li><a href="#Iteratively_List_a_Directory">Iteratively 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_Quota_Usage_of_a_Directory">Get Quota Usage of a Directory</a></li>
<li><a href="#Set_Quota">Set Quota</a></li>
<li><a href="#Set_Quota_By_Storage_Type">Set Quota By Storage Type</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="#Get_Trash_Root">Get Trash Root</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>
<li><a href="#Modify_ACL_Entries">Modify ACL Entries</a></li>
<li><a href="#Remove_ACL_Entries">Remove ACL Entries</a></li>
<li><a href="#Remove_Default_ACL">Remove Default ACL</a></li>
<li><a href="#Remove_ACL">Remove ACL</a></li>
<li><a href="#Set_ACL">Set ACL</a></li>
<li><a href="#Get_ACL_Status">Get ACL Status</a></li>
<li><a href="#Check_access">Check access</a></li></ul></li>
<li><a href="#Storage_Policy_Operations">Storage Policy Operations</a>
<ul>
<li><a href="#Get_all_Storage_Policies">Get all Storage Policies</a></li>
<li><a href="#Set_Storage_Policy">Set Storage Policy</a></li>
<li><a href="#Unset_Storage_Policy">Unset Storage Policy</a></li>
<li><a href="#Get_Storage_Policy">Get Storage Policy</a></li>
<li><a href="#Satisfy_Storage_Policy">Satisfy Storage Policy</a></li>
<li><a href="#Get_File_Block_Locations">Get File Block Locations</a></li></ul></li>
<li><a href="#Extended_Attributes.28XAttrs.29_Operations">Extended Attributes(XAttrs) Operations</a>
<ul>
<li><a href="#Set_XAttr">Set XAttr</a></li>
<li><a href="#Remove_XAttr">Remove XAttr</a></li>
<li><a href="#Get_an_XAttr">Get an XAttr</a></li>
<li><a href="#Get_multiple_XAttrs">Get multiple XAttrs</a></li>
<li><a href="#Get_all_XAttrs">Get all XAttrs</a></li>
<li><a href="#List_all_XAttrs">List all XAttrs</a></li></ul></li>
<li><a href="#Erasure_Coding_Operations">Erasure Coding Operations</a>
<ul>
<li><a href="#Enable_EC_Policy">Enable EC Policy</a></li>
<li><a href="#Disable_EC_Policy">Disable EC Policy</a></li>
<li><a href="#Set_EC_Policy">Set EC Policy</a></li>
<li><a href="#Get_EC_Policy">Get EC Policy</a></li>
<li><a href="#Unset_EC_Policy">Unset EC Policy</a></li></ul></li>
<li><a href="#Snapshot_Operations">Snapshot Operations</a>
<ul>
<li><a href="#Allow_Snapshot">Allow Snapshot</a></li>
<li><a href="#Disallow_Snapshot">Disallow Snapshot</a></li>
<li><a href="#Create_Snapshot">Create Snapshot</a></li>
<li><a href="#Delete_Snapshot">Delete Snapshot</a></li>
<li><a href="#Rename_Snapshot">Rename Snapshot</a></li>
<li><a href="#Get_Snapshot_Diff">Get Snapshot Diff</a></li>
<li><a href="#Get_Snapshot_Diff_Iteratively">Get Snapshot Diff Iteratively</a></li>
<li><a href="#Get_Snapshottable_Directory_List">Get Snapshottable Directory List</a></li>
<li><a href="#Get_Snapshot_List">Get Snapshot List</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="#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="#ACL_Status_JSON_Schema">ACL Status JSON Schema</a></li>
<li><a href="#XAttrs_JSON_Schema">XAttrs JSON Schema</a></li>
<li><a href="#XAttrNames_JSON_Schema">XAttrNames JSON Schema</a></li>
<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="#QuotaUsage_JSON_Schema">QuotaUsage 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="#DirectoryListing_JSON_Schema">DirectoryListing 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="#BlockStoragePolicy_JSON_Schema">BlockStoragePolicy JSON Schema</a>
<ul>
<li><a href="#BlockStoragePolicy_Properties">BlockStoragePolicy Properties</a></li></ul></li>
<li><a href="#ECPolicy_JSON_Schema">ECPolicy JSON Schema</a></li>
<li><a href="#BlockStoragePolicies_JSON_Schema">BlockStoragePolicies JSON Schema</a></li>
<li><a href="#SnapshotDiffReport_JSON_Schema">SnapshotDiffReport JSON Schema</a>
<ul>
<li><a href="#DiffReport_Entries">DiffReport Entries</a></li></ul></li>
<li><a href="#SnapshotDiffReportListing_JSON_Schema">SnapshotDiffReportListing JSON Schema</a>
<ul>
<li><a href="#DiffReportListing_Entries">DiffReportListing Entries</a></li></ul></li>
<li><a href="#SnapshottableDirectoryList_JSON_Schema">SnapshottableDirectoryList JSON Schema</a>
<ul>
<li><a href="#SnapshottableDirectoryStatus">SnapshottableDirectoryStatus</a></li></ul></li>
<li><a href="#SnapshotList_JSON_Schema">SnapshotList JSON Schema</a>
<ul>
<li><a href="#SnapshotStatus">SnapshotStatus</a></li></ul></li>
<li><a href="#BlockLocations_JSON_Schema">BlockLocations JSON Schema</a></li>
<li><a href="#BlockLocation_JSON_Schema">BlockLocation JSON Schema</a>
<ul>
<li><a href="#BlockLocation_Properties">BlockLocation Properties</a></li></ul></li></ul></li>
<li><a href="#HTTP_Query_Parameter_Dictionary">HTTP Query Parameter Dictionary</a>
<ul>
<li><a href="#ACL_Spec">ACL Spec</a></li>
<li><a href="#XAttr_Name">XAttr Name</a></li>
<li><a href="#XAttr_Value">XAttr Value</a></li>
<li><a href="#XAttr_set_flag">XAttr set flag</a></li>
<li><a href="#XAttr_value_encoding">XAttr value encoding</a></li>
<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_Flag">Create Flag</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="#Fs_Action">Fs Action</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="#New_Length">New Length</a></li>
<li><a href="#Offset">Offset</a></li>
<li><a href="#Old_Snapshot_Name">Old Snapshot Name</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="#Snapshot_Name">Snapshot Name</a></li>
<li><a href="#Sources">Sources</a></li>
<li><a href="#Token">Token</a></li>
<li><a href="#Token_Kind">Token Kind</a></li>
<li><a href="#Token_Service">Token Service</a></li>
<li><a href="#Username">Username</a></li>
<li><a href="#NoRedirect">NoRedirect</a></li>
<li><a href="#Namespace_Quota">Namespace Quota</a></li>
<li><a href="#Storage_Space_Quota">Storage Space Quota</a></li>
<li><a href="#Storage_Type">Storage Type</a></li>
<li><a href="#Storage_Policy">Storage Policy</a></li>
<li><a href="#Erasure_Coding_Policy">Erasure Coding Policy</a></li>
<li><a href="#Start_After">Start After</a></li></ul></li></ul>
<section>
<h2><a name="Document_Conventions"></a>Document Conventions</h2>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> <code>Monospaced</code> </th>
<th align="left"> Used for commands, HTTP request and responses and code blocks. </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <code>&lt;Monospaced&gt;</code> </td>
<td align="left"> User entered values. </td></tr>
<tr class="a">
<td align="left"> <code>[Monospaced]</code> </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>
</tbody>
</table></section><section>
<h2><a name="Introduction"></a>Introduction</h2>
<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><section>
<h3><a name="Operations"></a>Operations</h3>
<ul>
<li>HTTP GET
<ul>
<li><a href="#Open_and_Read_a_File"><code>OPEN</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.open)</li>
<li><a href="#Status_of_a_FileDirectory"><code>GETFILESTATUS</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getFileStatus)</li>
<li><a href="#List_a_Directory"><code>LISTSTATUS</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.listStatus)</li>
<li><a href="#Iteratively_List_a_Directory"><code>LISTSTATUS_BATCH</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.listStatusIterator)</li>
<li><a href="#Get_Content_Summary_of_a_Directory"><code>GETCONTENTSUMMARY</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getContentSummary)</li>
<li><a href="#Get_Quota_Usage_of_a_Directory"><code>GETQUOTAUSAGE</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getQuotaUsage)</li>
<li><a href="#Get_File_Checksum"><code>GETFILECHECKSUM</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getFileChecksum)</li>
<li><a href="#Get_Home_Directory"><code>GETHOMEDIRECTORY</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getHomeDirectory)</li>
<li><a href="#Get_Delegation_Token"><code>GETDELEGATIONTOKEN</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getDelegationToken)</li>
<li><a href="#Get_Trash_Root"><code>GETTRASHROOT</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getTrashRoot)</li>
<li><a href="#Get_an_XAttr"><code>GETXATTRS</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getXAttr)</li>
<li><a href="#Get_multiple_XAttrs"><code>GETXATTRS</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getXAttrs)</li>
<li><a href="#Get_all_XAttrs"><code>GETXATTRS</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getXAttrs)</li>
<li><a href="#List_all_XAttrs"><code>LISTXATTRS</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.listXAttrs)</li>
<li><a href="#Check_access"><code>CHECKACCESS</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.access)</li>
<li><a href="#Get_all_Storage_Policies"><code>GETALLSTORAGEPOLICY</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getAllStoragePolicies)</li>
<li><a href="#Get_Storage_Policy"><code>GETSTORAGEPOLICY</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getStoragePolicy)</li>
<li><a href="#Get_Snapshot_Diff"><code>GETSNAPSHOTDIFF</code></a></li>
<li><a href="#Get_Snapshot_Diff_Iteratively"><code>GETSNAPSHOTDIFFLISTING</code></a></li>
<li><a href="#Get_Snapshottable_Directory_List"><code>GETSNAPSHOTTABLEDIRECTORYLIST</code></a></li>
<li><a href="#Get_Snapshot_List"><code>GETSNAPSHOTLIST</code></a></li>
<li><a href="#Get_File_Block_Locations"><code>GETFILEBLOCKLOCATIONS</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getFileBlockLocations)</li>
<li><a href="#Get_EC_Policy"><code>GETECPOLICY</code></a> (see <a href="./HDFSErasureCoding.html#Administrative_commands">HDFSErasureCoding</a>.getErasureCodingPolicy)</li>
</ul>
</li>
<li>HTTP PUT
<ul>
<li><a href="#Create_and_Write_to_a_File"><code>CREATE</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.create)</li>
<li><a href="#Make_a_Directory"><code>MKDIRS</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.mkdirs)</li>
<li><a href="#Create_a_Symbolic_Link"><code>CREATESYMLINK</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileContext.html">FileContext</a>.createSymlink)</li>
<li><a href="#Rename_a_FileDirectory"><code>RENAME</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.rename)</li>
<li><a href="#Set_Replication_Factor"><code>SETREPLICATION</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setReplication)</li>
<li><a href="#Set_Owner"><code>SETOWNER</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setOwner)</li>
<li><a href="#Set_Permission"><code>SETPERMISSION</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setPermission)</li>
<li><a href="#Set_Access_or_Modification_Time"><code>SETTIMES</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setTimes)</li>
<li><a href="#Renew_Delegation_Token"><code>RENEWDELEGATIONTOKEN</code></a> (see <a href="../../api/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticator.html">DelegationTokenAuthenticator</a>.renewDelegationToken)</li>
<li><a href="#Cancel_Delegation_Token"><code>CANCELDELEGATIONTOKEN</code></a> (see <a href="../../api/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticator.html">DelegationTokenAuthenticator</a>.cancelDelegationToken)</li>
<li><a href="#Allow_Snapshot"><code>ALLOWSNAPSHOT</code></a></li>
<li><a href="#Disallow_Snapshot"><code>DISALLOWSNAPSHOT</code></a></li>
<li><a href="#Create_Snapshot"><code>CREATESNAPSHOT</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.createSnapshot)</li>
<li><a href="#Rename_Snapshot"><code>RENAMESNAPSHOT</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.renameSnapshot)</li>
<li><a href="#Set_XAttr"><code>SETXATTR</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setXAttr)</li>
<li><a href="#Remove_XAttr"><code>REMOVEXATTR</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.removeXAttr)</li>
<li><a href="#Set_Storage_Policy"><code>SETSTORAGEPOLICY</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setStoragePolicy)</li>
<li><a href="#Satisfy_Storage_Policy"><code>SATISFYSTORAGEPOLICY</code></a> (see <a href="./ArchivalStorage.html#Satisfy_Storage_Policy">ArchivalStorage</a>.satisfyStoragePolicy)</li>
<li><a href="#Enable_EC_Policy"><code>ENABLEECPOLICY</code></a> (see <a href="./HDFSErasureCoding.html#Administrative_commands">HDFSErasureCoding</a>.enablePolicy)</li>
<li><a href="#Disable_EC_Policy"><code>DISABLEECPOLICY</code></a> (see <a href="./HDFSErasureCoding.html#Administrative_commands">HDFSErasureCoding</a>.disablePolicy)</li>
<li><a href="#Set_EC_Policy"><code>SETECPOLICY</code></a> (see <a href="./HDFSErasureCoding.html#Administrative_commands">HDFSErasureCoding</a>.setErasureCodingPolicy)</li>
</ul>
</li>
<li>HTTP POST
<ul>
<li><a href="#Append_to_a_File"><code>APPEND</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.append)</li>
<li><a href="#Concat_Files"><code>CONCAT</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.concat)</li>
<li><a href="#Truncate_a_File"><code>TRUNCATE</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.truncate)</li>
<li><a href="#Unset_Storage_Policy"><code>UNSETSTORAGEPOLICY</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.unsetStoragePolicy)</li>
<li><a href="#Unset_EC_Policy"><code>UNSETECPOLICY</code></a> (see <a href="./HDFSErasureCoding.html#Administrative_commands">HDFSErasureCoding</a>.unsetErasureCodingPolicy)</li>
</ul>
</li>
<li>HTTP DELETE
<ul>
<li><a href="#Delete_a_FileDirectory"><code>DELETE</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.delete)</li>
<li><a href="#Delete_Snapshot"><code>DELETESNAPSHOT</code></a> (see <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.deleteSnapshot)</li>
</ul>
</li>
</ul></section><section>
<h3><a name="FileSystem_URIs_vs_HTTP_URLs"></a>FileSystem URIs vs HTTP URLs</h3>
<p>The FileSystem scheme of WebHDFS is &#x201c;<code>webhdfs://</code>&#x201d;. A WebHDFS FileSystem URI has the following format.</p>
<div class="source">
<div class="source">
<pre> webhdfs://&lt;HOST&gt;:&lt;HTTP_PORT&gt;/&lt;PATH&gt;
</pre></div></div>
<p>The above WebHDFS URI corresponds to the below HDFS URI.</p>
<div class="source">
<div class="source">
<pre> hdfs://&lt;HOST&gt;:&lt;RPC_PORT&gt;/&lt;PATH&gt;
</pre></div></div>
<p>In the REST API, the prefix &#x201c;<code>/webhdfs/v1</code>&#x201d; 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">
<div class="source">
<pre> http://&lt;HOST&gt;:&lt;HTTP_PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=...
</pre></div></div>
<p><b>Note</b> that if WebHDFS is secured with SSL, then the scheme should be &#x201c;<code>swebhdfs://</code>&#x201d;.</p>
<div class="source">
<div class="source">
<pre> swebhdfs://&lt;HOST&gt;:&lt;HTTP_PORT&gt;/&lt;PATH&gt;
</pre></div></div>
<p>See also: <a href="#SSL_Configurations_for_SWebHDFS">SSL Configurations for SWebHDFS</a></p></section><section>
<h3><a name="HDFS_Configuration_Options"></a>HDFS Configuration Options</h3>
<p>Below are the HDFS configuration options for WebHDFS.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Property Name </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <code>dfs.web.authentication.kerberos.principal</code> </td>
<td align="left"> The HTTP Kerberos principal used by Hadoop-Auth in the HTTP endpoint. The HTTP Kerberos principal MUST start with &#x2018;HTTP/&#x2019; per Kerberos HTTP SPNEGO specification. A value of &#x201c;*&#x201d; will use all HTTP principals found in the keytab. </td></tr>
<tr class="a">
<td align="left"> <code>dfs.web.authentication.kerberos.keytab</code> </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>
<tr class="b">
<td align="left"> <code>dfs.webhdfs.socket.connect-timeout</code> </td>
<td align="left"> How long to wait for a connection to be established before failing. Specified as a time duration, ie numerical value followed by a units symbol, eg 2m for two minutes. Defaults to 60s. </td></tr>
<tr class="a">
<td align="left"> <code>dfs.webhdfs.socket.read-timeout</code> </td>
<td align="left"> How long to wait for data to arrive before failing. Defaults to 60s. </td></tr>
</tbody>
</table></section></section><section>
<h2><a name="Authentication"></a>Authentication</h2>
<p>When security is <i>off</i>, the authenticated user is the username specified in the <code>user.name</code> query parameter. If the <code>user.name</code> 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 <code>delegation</code> query parameter, the authenticated user is the user encoded in the token. If the <code>delegation</code> parameter is not set, the user is authenticated by Kerberos SPNEGO.</p>
<p>Below are examples using the <code>curl</code> command tool.</p>
<ol style="list-style-type: decimal">
<li>
<p>Authentication when security is off:</p>
<div class="source">
<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></div>
</li>
<li>
<p>Authentication using Kerberos SPNEGO when security is on:</p>
<div class="source">
<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></div>
</li>
<li>
<p>Authentication using Hadoop delegation token when security is on:</p>
<div class="source">
<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></div>
</li>
</ol>
<p>See also: <a href="../hadoop-common/HttpAuthentication.html">Authentication for Hadoop HTTP web-consoles</a></p>
<p>Additionally, WebHDFS supports OAuth2 on the client side. The Namenode and Datanodes do not currently support clients using OAuth2 but other backends that implement the WebHDFS REST interface may.</p>
<p>WebHDFS supports two type of OAuth2 code grants (user-provided refresh and access token or user provided credential) by default and provides a pluggable mechanism for implementing other OAuth2 authentications per the <a class="externalLink" href="https://tools.ietf.org/html/rfc6749">OAuth2 RFC</a>, or custom authentications. When using either of the provided code grant mechanisms, the WebHDFS client will refresh the access token as necessary.</p>
<p>OAuth2 should only be enabled for clients not running with Kerberos SPENGO.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> OAuth2 code grant mechanism </th>
<th align="left"> Description </th>
<th align="left"> Value of <code>dfs.webhdfs.oauth2.access.token.provider</code> that implements code grant </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Authorization Code Grant </td>
<td align="left"> The user provides an initial access token and refresh token, which are then used to authenticate WebHDFS requests and obtain replacement access tokens, respectively. </td>
<td align="left"> org.apache.hadoop.hdfs.web.oauth2.ConfRefreshTokenBasedAccessTokenProvider </td></tr>
<tr class="a">
<td align="left"> Client Credentials Grant </td>
<td align="left"> The user provides a credential which is used to obtain access tokens, which are then used to authenticate WebHDFS requests. </td>
<td align="left"> org.apache.hadoop.hdfs.web.oauth2.ConfCredentialBasedAccessTokenProvider </td></tr>
</tbody>
</table>
<p>The following properties control OAuth2 authentication.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> OAuth2 related property </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <code>dfs.webhdfs.oauth2.enabled</code> </td>
<td align="left"> Boolean to enable/disable OAuth2 authentication </td></tr>
<tr class="a">
<td align="left"> <code>dfs.webhdfs.oauth2.access.token.provider</code> </td>
<td align="left"> Class name of an implementation of <code>org.apache.hadoop.hdfs.web.oauth.AccessTokenProvider.</code> Two are provided with the code, as described above, or the user may specify a user-provided implementation. The default value for this configuration key is the <code>ConfCredentialBasedAccessTokenProvider</code> implementation. </td></tr>
<tr class="b">
<td align="left"> <code>dfs.webhdfs.oauth2.client.id</code> </td>
<td align="left"> Client id used to obtain access token with either credential or refresh token </td></tr>
<tr class="a">
<td align="left"> <code>dfs.webhdfs.oauth2.refresh.url</code> </td>
<td align="left"> URL against which to post for obtaining bearer token with either credential or refresh token </td></tr>
<tr class="b">
<td align="left"> <code>dfs.webhdfs.oauth2.access.token</code> </td>
<td align="left"> (required if using ConfRefreshTokenBasedAccessTokenProvider) Initial access token with which to authenticate </td></tr>
<tr class="a">
<td align="left"> <code>dfs.webhdfs.oauth2.refresh.token</code> </td>
<td align="left"> (required if using ConfRefreshTokenBasedAccessTokenProvider) Initial refresh token to use to obtain new access tokens </td></tr>
<tr class="b">
<td align="left"> <code>dfs.webhdfs.oauth2.refresh.token.expires.ms.since.epoch</code> </td>
<td align="left"> (required if using ConfRefreshTokenBasedAccessTokenProvider) Access token expiration measured in milliseconds since Jan 1, 1970. <i>Note this is a different value than provided by OAuth providers and has been munged as described in interface to be suitable for a client application</i> </td></tr>
<tr class="a">
<td align="left"> <code>dfs.webhdfs.oauth2.credential</code> </td>
<td align="left"> (required if using ConfCredentialBasedAccessTokenProvider). Credential used to obtain initial and subsequent access tokens. </td></tr>
</tbody>
</table></section><section>
<h2><a name="SSL_Configurations_for_SWebHDFS"></a>SSL Configurations for SWebHDFS</h2>
<p>To use SWebHDFS FileSystem (i.e. using the swebhdfs protocol), a SSL configuration file needs to be specified on the client side. This must specify 3 parameters:</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> SSL property </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <code>ssl.client.truststore.location</code> </td>
<td align="left"> The local-filesystem location of the trust-store file, containing the certificate for the NameNode. </td></tr>
<tr class="a">
<td align="left"> <code>ssl.client.truststore.type</code> </td>
<td align="left"> (Optional) The format of the trust-store file. </td></tr>
<tr class="b">
<td align="left"> <code>ssl.client.truststore.password</code> </td>
<td align="left"> (Optional) Password for the trust-store file. </td></tr>
</tbody>
</table>
<p>The following is an example SSL configuration file (<b>ssl-client.xml</b>):</p>
<div class="source">
<div class="source">
<pre>&lt;configuration&gt;
&lt;property&gt;
&lt;name&gt;ssl.client.truststore.location&lt;/name&gt;
&lt;value&gt;/work/keystore.jks&lt;/value&gt;
&lt;description&gt;Truststore to be used by clients. Must be specified.&lt;/description&gt;
&lt;/property&gt;
&lt;property&gt;
&lt;name&gt;ssl.client.truststore.password&lt;/name&gt;
&lt;value&gt;changeme&lt;/value&gt;
&lt;description&gt;Optional. Default value is &quot;&quot;.&lt;/description&gt;
&lt;/property&gt;
&lt;property&gt;
&lt;name&gt;ssl.client.truststore.type&lt;/name&gt;
&lt;value&gt;jks&lt;/value&gt;
&lt;description&gt;Optional. Default value is &quot;jks&quot;.&lt;/description&gt;
&lt;/property&gt;
&lt;/configuration&gt;
</pre></div></div>
<p>The SSL configuration file must be in the class-path of the client program and the filename needs to be specified in <b>core-site.xml</b>:</p>
<div class="source">
<div class="source">
<pre>&lt;property&gt;
&lt;name&gt;hadoop.ssl.client.conf&lt;/name&gt;
&lt;value&gt;ssl-client.xml&lt;/value&gt;
&lt;description&gt;
Resource file from which ssl client keystore information will be extracted.
This file is looked up in the classpath, typically it should be in Hadoop
conf/ directory. Default value is &quot;ssl-client.xml&quot;.
&lt;/description&gt;
&lt;/property&gt;
</pre></div></div>
</section><section>
<h2><a name="Proxy_Users"></a>Proxy Users</h2>
<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 <code>doas</code> 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>
<p>A proxy request when security is off:</p>
<div class="source">
<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></div>
</li>
<li>
<p>A proxy request using Kerberos SPNEGO when security is on:</p>
<div class="source">
<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></div>
</li>
<li>
<p>A proxy request using Hadoop delegation token when security is on:</p>
<div class="source">
<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></div>
</li>
</ol></section><section>
<h2><a name="Cross-Site_Request_Forgery_Prevention"></a>Cross-Site Request Forgery Prevention</h2>
<p>WebHDFS supports an optional, configurable mechanism for cross-site request forgery (CSRF) prevention. When enabled, WebHDFS HTTP requests to the NameNode or DataNode must include a custom HTTP header. Configuration properties allow adjusting which specific HTTP methods are protected and the name of the HTTP header. The value sent in the header is not relevant. Only the presence of a header by that name is required.</p>
<p>Enabling CSRF prevention also sets up the <code>WebHdfsFileSystem</code> class to send the required header. This ensures that CLI commands like <a href="./HDFSCommands.html#dfs"><code>hdfs dfs</code></a> and <a href="../../hadoop-distcp/DistCp.html"><code>hadoop distcp</code></a> continue to work correctly when used with <code>webhdfs:</code> URIs.</p>
<p>Enabling CSRF prevention also sets up the NameNode web UI to send the required header. After enabling CSRF prevention and restarting the NameNode, existing users of the NameNode web UI need to refresh the browser to reload the page and find the new configuration.</p>
<p>The following properties control CSRF prevention.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Property </th>
<th align="left"> Description </th>
<th align="left"> Default Value </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <code>dfs.webhdfs.rest-csrf.enabled</code> </td>
<td align="left"> If true, then enables WebHDFS protection against cross-site request forgery (CSRF). The WebHDFS client also uses this property to determine whether or not it needs to send the custom CSRF prevention header in its HTTP requests. </td>
<td align="left"> <code>false</code> </td></tr>
<tr class="a">
<td align="left"> <code>dfs.webhdfs.rest-csrf.custom-header</code> </td>
<td align="left"> The name of a custom header that HTTP requests must send when protection against cross-site request forgery (CSRF) is enabled for WebHDFS by setting dfs.webhdfs.rest-csrf.enabled to true. The WebHDFS client also uses this property to determine whether or not it needs to send the custom CSRF prevention header in its HTTP requests. </td>
<td align="left"> <code>X-XSRF-HEADER</code> </td></tr>
<tr class="b">
<td align="left"> <code>dfs.webhdfs.rest-csrf.methods-to-ignore</code> </td>
<td align="left"> A comma-separated list of HTTP methods that do not require HTTP requests to include a custom header when protection against cross-site request forgery (CSRF) is enabled for WebHDFS by setting dfs.webhdfs.rest-csrf.enabled to true. The WebHDFS client also uses this property to determine whether or not it needs to send the custom CSRF prevention header in its HTTP requests. </td>
<td align="left"> <code>GET,OPTIONS,HEAD,TRACE</code> </td></tr>
<tr class="a">
<td align="left"> <code>dfs.webhdfs.rest-csrf.browser-useragents-regex</code> </td>
<td align="left"> A comma-separated list of regular expressions used to match against an HTTP request&#x2019;s User-Agent header when protection against cross-site request forgery (CSRF) is enabled for WebHDFS by setting dfs.webhdfs.reset-csrf.enabled to true. If the incoming User-Agent matches any of these regular expressions, then the request is considered to be sent by a browser, and therefore CSRF prevention is enforced. If the request&#x2019;s User-Agent does not match any of these regular expressions, then the request is considered to be sent by something other than a browser, such as scripted automation. In this case, CSRF is not a potential attack vector, so the prevention is not enforced. This helps achieve backwards-compatibility with existing automation that has not been updated to send the CSRF prevention header. </td>
<td align="left"> <code>^Mozilla.*,^Opera.*</code> </td></tr>
<tr class="b">
<td align="left"> <code>dfs.datanode.httpserver.filter.handlers</code> </td>
<td align="left"> Comma separated list of Netty servlet-style filter handlers to inject into the Datanode WebHDFS I/O path </td>
<td align="left"> <code>org.apache.hadoop.hdfs.server.datanode.web.RestCsrfPreventionFilterHandler</code> </td></tr>
</tbody>
</table>
<p>The following is an example <code>curl</code> call that uses the <code>-H</code> option to include the custom header in the request.</p>
<div class="source">
<div class="source">
<pre> curl -i -L -X PUT -H 'X-XSRF-HEADER: &quot;&quot;' 'http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=CREATE'
</pre></div></div>
</section><section>
<h2><a name="WebHDFS_Retry_Policy"></a>WebHDFS Retry Policy</h2>
<p>WebHDFS supports an optional, configurable retry policy for resilient copy of large files that could timeout, or copy file between HA clusters that could failover during the copy.</p>
<p>The following properties control WebHDFS retry and failover policy.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Property </th>
<th align="left"> Description </th>
<th align="left"> Default Value </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <code>dfs.http.client.retry.policy.enabled</code> </td>
<td align="left"> If &#x201c;true&#x201d;, enable the retry policy of WebHDFS client. If &#x201c;false&#x201d;, retry policy is turned off. </td>
<td align="left"> <code>false</code> </td></tr>
<tr class="a">
<td align="left"> <code>dfs.http.client.retry.policy.spec</code> </td>
<td align="left"> Specify a policy of multiple linear random retry for WebHDFS client, e.g. given pairs of number of retries and sleep time (n0, t0), (n1, t1), &#x2026;, the first n0 retries sleep t0 milliseconds on average, the following n1 retries sleep t1 milliseconds on average, and so on. </td>
<td align="left"> <code>10000,6,60000,10</code> </td></tr>
<tr class="b">
<td align="left"> <code>dfs.http.client.failover.max.attempts</code> </td>
<td align="left"> Specify the max number of failover attempts for WebHDFS client in case of network exception. </td>
<td align="left"> <code>15</code> </td></tr>
<tr class="a">
<td align="left"> <code>dfs.http.client.retry.max.attempts</code> </td>
<td align="left"> Specify the max number of retry attempts for WebHDFS client, if the difference between retried attempts and failovered attempts is larger than the max number of retry attempts, there will be no more retries. </td>
<td align="left"> <code>10</code> </td></tr>
<tr class="b">
<td align="left"> <code>dfs.http.client.failover.sleep.base.millis</code> </td>
<td align="left"> Specify the base amount of time in milliseconds upon which the exponentially increased sleep time between retries or failovers is calculated for WebHDFS client. </td>
<td align="left"> <code>500</code> </td></tr>
<tr class="a">
<td align="left"> <code>dfs.http.client.failover.sleep.max.millis</code> </td>
<td align="left"> Specify the upper bound of sleep time in milliseconds between retries or failovers for WebHDFS client. </td>
<td align="left"> <code>15000</code> </td></tr>
</tbody>
</table></section><section>
<h2><a name="WebHDFS_Request_Filtering"></a>WebHDFS Request Filtering</h2>
<p>One may control directionality of data in the WebHDFS protocol allowing only writing data from insecure networks. To enable, one must ensure <code>dfs.datanode.httpserver.filter.handlers</code> includes <code>org.apache.hadoop.hdfs.server.datanode.web.HostRestrictingAuthorizationFilterHandler</code>. Configuration of the <code>HostRestrictingAuthorizationFilter</code> is controlled via the following properties.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Property </th>
<th align="left"> Description </th>
<th align="left"> Default Value </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <code>dfs.datanode.httpserver.filter.handlers</code> </td>
<td align="left"> Comma separated list of Netty servlet-style filter handlers to inject into the Datanode WebHDFS I/O path </td>
<td align="left"> <code>org.apache.hadoop.hdfs.server.datanode.web.RestCsrfPreventionFilterHandler</code> </td></tr>
<tr class="a">
<td align="left"> <code>dfs.web.authentication.host.allow.rules</code> </td>
<td align="left"> Rules allowing users to read files in the format of <i>user</i>,<i>network/bits</i>,<i>path glob</i> newline or <code>|</code>-separated. Use <code>*</code> for a wildcard of all <i>users</i> or <i>network/bits</i>. </td>
<td align="left"> nothing - defaults to no one may read via WebHDFS </td></tr>
</tbody>
</table></section><section>
<h2><a name="File_and_Directory_Operations"></a>File and Directory Operations</h2><section>
<h3><a name="Create_and_Write_to_a_File"></a>Create and Write to a File</h3>
<ul>
<li>
<p>Step 1: Submit a HTTP PUT request without automatically following redirects and without sending the file data.</p>
<div class="source">
<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;][&amp;noredirect=&lt;true|false&gt;]&quot;
</pre></div></div>
<p>Usually the request is redirected to a datanode where the file data is to be written.</p>
<div class="source">
<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></div>
<p>However, if you do not want to be automatically redirected, you can set the noredirect flag.</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
{&quot;Location&quot;:&quot;http://&lt;DATANODE&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=CREATE...&quot;}
</pre></div></div>
</li>
<li>
<p>Step 2: Submit another HTTP PUT request using the URL in the <code>Location</code> header (or the returned response in case you specified noredirect) with the file data to be written.</p>
<div class="source">
<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></div>
<p>The client receives a <code>201 Created</code> response with zero content length and the WebHDFS URI of the file in the <code>Location</code> header:</p>
<div class="source">
<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></div>
<p>If no permissions are specified, the newly created file will be assigned with default 644 permission. No umask mode will be applied from server side (so &#x201c;fs.permissions.umask-mode&#x201d; value configuration set on Namenode side will have no effect).</p>
</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 &#x201c;<code>Expect: 100-continue</code>&#x201d; 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 &#x201c;<code>Expect: 100-continue</code>&#x201d;. The two-step create/append is a temporary workaround for the software library bugs.</p>
<p>See also: <a href="#Overwrite"><code>overwrite</code></a>, <a href="#Block_Size"><code>blocksize</code></a>, <a href="#Replication"><code>replication</code></a>, <a href="#Permission"><code>permission</code></a>, <a href="#Buffer_Size"><code>buffersize</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.create</p></section><section>
<h3><a name="Append_to_a_File"></a>Append to a File</h3>
<ul>
<li>Step 1: Submit a HTTP POST request without automatically following redirects and without sending the file data.
<div class="source">
<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;][&amp;noredirect=&lt;true|false&gt;]&quot;
</pre></div></div>
<p>Usually the request is redirected to a datanode where the file data is to be appended:</p>
<div class="source">
<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></div>
</li>
</ul>
<p>However, if you do not want to be automatically redirected, you can set the noredirect flag.</p>
<div class="source">
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/json
{&quot;Location&quot;:&quot;http://&lt;DATANODE&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=APPEND...&quot;}
</pre></div></div>
<ul>
<li>Step 2: Submit another HTTP POST request using the URL in the <code>Location</code> header (or the returned response in case you specified noredirect) with the file data to be appended.
<div class="source">
<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></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></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"><code>buffersize</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.append</p></section><section>
<h3><a name="Concat_File.28s.29"></a>Concat File(s)</h3>
<ul>
<li>Submit a HTTP POST request.
<div class="source">
<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></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#Sources"><code>sources</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.concat</p></section><section>
<h3><a name="Open_and_Read_a_File"></a>Open and Read a File</h3>
<ul>
<li>Submit a HTTP GET request with automatically following redirects.
<div class="source">
<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;][&amp;noredirect=&lt;true|false&gt;]&quot;
</pre></div></div>
<p>Usually the request is redirected to a datanode where the file data can be read:</p>
<div class="source">
<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></div>
<p>However if you do not want to be automatically redirected, you can set the noredirect flag.</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
{&quot;Location&quot;:&quot;http://&lt;DATANODE&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=OPEN...&quot;}
</pre></div></div>
<p>The client follows the redirect to the datanode and receives the file data:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 22
Hello, webhdfs user!
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#Offset"><code>offset</code></a>, <a href="#Length"><code>length</code></a>, <a href="#Buffer_Size"><code>buffersize</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.open</p></section><section>
<h3><a name="Make_a_Directory"></a>Make a Directory</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=MKDIRS[&amp;permission=&lt;OCTAL&gt;]&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#Boolean_JSON_Schema"><code>boolean</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;boolean&quot;: true}
</pre></div></div>
<p>If no permissions are specified, the newly created directory will have 755 permission as default. No umask mode will be applied from server side (so &#x201c;fs.permissions.umask-mode&#x201d; value configuration set on Namenode side will have no effect).</p></li>
</ul>
<p>See also: <a href="#Permission"><code>permission</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.mkdirs</p></section><section>
<h3><a name="Create_a_Symbolic_Link"></a>Create a Symbolic Link</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=CREATESYMLINK
&amp;destination=&lt;PATH&gt;[&amp;createParent=&lt;true |false&gt;]&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#Destination"><code>destination</code></a>, <a href="#Create_Parent"><code>createParent</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.createSymlink</p></section><section>
<h3><a name="Rename_a_File.2FDirectory"></a>Rename a File/Directory</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<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></div>
<p>The client receives a response with a <a href="#Boolean_JSON_Schema"><code>boolean</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;boolean&quot;: true}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#Destination"><code>destination</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.rename</p></section><section>
<h3><a name="Delete_a_File.2FDirectory"></a>Delete a File/Directory</h3>
<ul>
<li>Submit a HTTP DELETE request.
<div class="source">
<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></div>
<p>The client receives a response with a <a href="#Boolean_JSON_Schema"><code>boolean</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;boolean&quot;: true}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#Recursive"><code>recursive</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.delete</p></section><section>
<h3><a name="Truncate_a_File"></a>Truncate a File</h3>
<ul>
<li>Submit a HTTP POST request.
<div class="source">
<div class="source">
<pre>curl -i -X POST &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=TRUNCATE&amp;newlength=&lt;LONG&gt;&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#Boolean_JSON_Schema"><code>boolean</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;boolean&quot;: true}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#New_Length"><code>newlength</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.truncate</p></section><section>
<h3><a name="Status_of_a_File.2FDirectory"></a>Status of a File/Directory</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETFILESTATUS&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#FileStatus_JSON_Schema"><code>FileStatus</code> JSON object</a>:</p>
<div class="source">
<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;snapshotEnabled&quot; : true
&quot;type&quot; : &quot;DIRECTORY&quot; //enum {FILE, DIRECTORY, SYMLINK}
&quot;ecPolicy&quot; : &quot;RS-6-3-1024k&quot;
}
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getFileStatus</p></section><section>
<h3><a name="List_a_Directory"></a>List a Directory</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=LISTSTATUS&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#FileStatuses_JSON_Schema"><code>FileStatuses</code> JSON object</a>:</p>
<div class="source">
<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;childrenNum&quot; : 0,
&quot;fileId&quot; : 16388,
&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;storagePolicy&quot; : 0,
&quot;type&quot; : &quot;FILE&quot;
},
{
&quot;accessTime&quot; : 0,
&quot;blockSize&quot; : 0,
&quot;childrenNum&quot; : 0,
&quot;fileId&quot; : 16389,
&quot;group&quot; : &quot;supergroup&quot;,
&quot;length&quot; : 0,
&quot;modificationTime&quot;: 1320895981256,
&quot;owner&quot; : &quot;username&quot;,
&quot;pathSuffix&quot; : &quot;bar&quot;,
&quot;permission&quot; : &quot;711&quot;,
&quot;replication&quot; : 0,
&quot;snapshotEnabled&quot; : true
&quot;type&quot; : &quot;DIRECTORY&quot;
},
...
]
}
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.listStatus</p></section><section>
<h3><a name="List_a_File"></a>List a File</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=LISTSTATUS&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#FileStatuses_JSON_Schema"><code>FileStatuses</code> JSON object</a>:</p>
<div class="source">
<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;childrenNum&quot; : 0,
&quot;fileId&quot; : 16390,
&quot;group&quot; : &quot;supergroup&quot;,
&quot;length&quot; : 1366,
&quot;modificationTime&quot;: 1501770633062,
&quot;owner&quot; : &quot;webuser&quot;,
&quot;pathSuffix&quot; : &quot;&quot;,
&quot;permission&quot; : &quot;644&quot;,
&quot;replication&quot; : 1,
&quot;storagePolicy&quot; : 0,
&quot;type&quot; : &quot;FILE&quot;
}
]
}
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.listStatus</p></section><section>
<h3><a name="Iteratively_List_a_Directory"></a>Iteratively List a Directory</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=LISTSTATUS_BATCH&amp;startAfter=&lt;CHILD&gt;&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#DirectoryListing_JSON_Schema"><code>DirectoryListing</code> JSON object</a>, which contains a <a href="#FileStatuses_JSON_Schema"><code>FileStatuses</code> JSON object</a>, as well as iteration information:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Cache-Control: no-cache
Expires: Thu, 08 Sep 2016 03:40:38 GMT
Date: Thu, 08 Sep 2016 03:40:38 GMT
Pragma: no-cache
Expires: Thu, 08 Sep 2016 03:40:38 GMT
Date: Thu, 08 Sep 2016 03:40:38 GMT
Pragma: no-cache
Content-Type: application/json
X-FRAME-OPTIONS: SAMEORIGIN
Transfer-Encoding: chunked
Server: Jetty(6.1.26)
{
&quot;DirectoryListing&quot;: {
&quot;partialListing&quot;: {
&quot;FileStatuses&quot;: {
&quot;FileStatus&quot;: [
{
&quot;accessTime&quot;: 0,
&quot;blockSize&quot;: 0,
&quot;childrenNum&quot;: 0,
&quot;fileId&quot;: 16387,
&quot;group&quot;: &quot;supergroup&quot;,
&quot;length&quot;: 0,
&quot;modificationTime&quot;: 1473305882563,
&quot;owner&quot;: &quot;andrew&quot;,
&quot;pathSuffix&quot;: &quot;bardir&quot;,
&quot;permission&quot;: &quot;755&quot;,
&quot;replication&quot;: 0,
&quot;storagePolicy&quot;: 0,
&quot;type&quot;: &quot;DIRECTORY&quot;
},
{
&quot;accessTime&quot;: 1473305896945,
&quot;blockSize&quot;: 1024,
&quot;childrenNum&quot;: 0,
&quot;fileId&quot;: 16388,
&quot;group&quot;: &quot;supergroup&quot;,
&quot;length&quot;: 0,
&quot;modificationTime&quot;: 1473305896965,
&quot;owner&quot;: &quot;andrew&quot;,
&quot;pathSuffix&quot;: &quot;bazfile&quot;,
&quot;permission&quot;: &quot;644&quot;,
&quot;replication&quot;: 3,
&quot;storagePolicy&quot;: 0,
&quot;type&quot;: &quot;FILE&quot;
}
]
}
},
&quot;remainingEntries&quot;: 2
}
}
</pre></div></div>
</li>
</ul>
<p>If <code>remainingEntries</code> is non-zero, there are additional entries in the directory. To query the next batch, set the <code>startAfter</code> parameter to the <code>pathSuffix</code> of the last item returned in the current batch. For example:</p>
<div class="source">
<div class="source">
<pre> curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=LISTSTATUS_BATCH&amp;startAfter=bazfile&quot;
</pre></div></div>
<p>Which will return the next batch of directory entries:</p>
<div class="source">
<div class="source">
<pre> HTTP/1.1 200 OK
Cache-Control: no-cache
Expires: Thu, 08 Sep 2016 03:43:20 GMT
Date: Thu, 08 Sep 2016 03:43:20 GMT
Pragma: no-cache
Expires: Thu, 08 Sep 2016 03:43:20 GMT
Date: Thu, 08 Sep 2016 03:43:20 GMT
Pragma: no-cache
Content-Type: application/json
X-FRAME-OPTIONS: SAMEORIGIN
Transfer-Encoding: chunked
Server: Jetty(6.1.26)
{
&quot;DirectoryListing&quot;: {
&quot;partialListing&quot;: {
&quot;FileStatuses&quot;: {
&quot;FileStatus&quot;: [
{
&quot;accessTime&quot;: 0,
&quot;blockSize&quot;: 0,
&quot;childrenNum&quot;: 0,
&quot;fileId&quot;: 16386,
&quot;group&quot;: &quot;supergroup&quot;,
&quot;length&quot;: 0,
&quot;modificationTime&quot;: 1473305878951,
&quot;owner&quot;: &quot;andrew&quot;,
&quot;pathSuffix&quot;: &quot;foodir&quot;,
&quot;permission&quot;: &quot;755&quot;,
&quot;replication&quot;: 0,
&quot;storagePolicy&quot;: 0,
&quot;type&quot;: &quot;DIRECTORY&quot;
},
{
&quot;accessTime&quot;: 1473305902864,
&quot;blockSize&quot;: 1024,
&quot;childrenNum&quot;: 0,
&quot;fileId&quot;: 16389,
&quot;group&quot;: &quot;supergroup&quot;,
&quot;length&quot;: 0,
&quot;modificationTime&quot;: 1473305902878,
&quot;owner&quot;: &quot;andrew&quot;,
&quot;pathSuffix&quot;: &quot;quxfile&quot;,
&quot;permission&quot;: &quot;644&quot;,
&quot;replication&quot;: 3,
&quot;storagePolicy&quot;: 0,
&quot;type&quot;: &quot;FILE&quot;
}
]
}
},
&quot;remainingEntries&quot;: 0
}
}
</pre></div></div>
<p>Batch size is controlled by the <code>dfs.ls.limit</code> option on the NameNode.</p>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.listStatusIterator</p></section></section><section>
<h2><a name="Other_File_System_Operations"></a>Other File System Operations</h2><section>
<h3><a name="Get_Content_Summary_of_a_Directory"></a>Get Content Summary of a Directory</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETCONTENTSUMMARY&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#ContentSummary_JSON_Schema"><code>ContentSummary</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;ContentSummary&quot;:
{
&quot;directoryCount&quot;: 2,
&quot;ecPolicy&quot; : &quot;RS-6-3-1024k&quot;,
&quot;fileCount&quot; : 1,
&quot;length&quot; : 24930,
&quot;quota&quot; : -1,
&quot;spaceConsumed&quot; : 24930,
&quot;spaceQuota&quot; : -1,
&quot;typeQuota&quot;:
{
&quot;ARCHIVE&quot;:
{
&quot;consumed&quot;: 500,
&quot;quota&quot;: 10000
},
&quot;DISK&quot;:
{
&quot;consumed&quot;: 500,
&quot;quota&quot;: 10000
},
&quot;SSD&quot;:
{
&quot;consumed&quot;: 500,
&quot;quota&quot;: 10000
}
}
}
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getContentSummary</p></section><section>
<h3><a name="Get_Quota_Usage_of_a_Directory"></a>Get Quota Usage of a Directory</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETQUOTAUSAGE&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#QuotaUsage_JSON_Schema"><code>QuotaUsage</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;QuotaUsage&quot;:
{
&quot;fileAndDirectoryCount&quot;: 1,
&quot;quota&quot; : 100,
&quot;spaceConsumed&quot; : 24930,
&quot;spaceQuota&quot; : 100000,
&quot;typeQuota&quot;:
{
&quot;ARCHIVE&quot;:
{
&quot;consumed&quot;: 500,
&quot;quota&quot;: 10000
},
&quot;DISK&quot;:
{
&quot;consumed&quot;: 500,
&quot;quota&quot;: 10000
},
&quot;SSD&quot;:
{
&quot;consumed&quot;: 500,
&quot;quota&quot;: 10000
}
}
}
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getQuotaUsage</p></section><section>
<h3><a name="Set_Quota"></a>Set Quota</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=SETQUOTA
&amp;namespacequota=&lt;QUOTA&gt;[&amp;storagespacequota=&lt;QUOTA&gt;]&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setQuota</p></section><section>
<h3><a name="Set_Quota_By_Storage_Type"></a>Set Quota By Storage Type</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=SETQUOTABYSTORAGETYPE
&amp;storagetype=&lt;STORAGETYPE&gt;&amp;storagespacequota=&lt;QUOTA&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setQuotaByStorageType</p></section><section>
<h3><a name="Get_File_Checksum"></a>Get File Checksum</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETFILECHECKSUM&quot;
</pre></div></div>
<p>Usually the request is redirected to a datanode:</p>
<div class="source">
<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></div>
<p>However, if you do not want to be automatically redirected, you can set the noredirect flag.</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
{&quot;Location&quot;:&quot;http://&lt;DATANODE&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETFILECHECKSUM...&quot;}
</pre></div></div>
<p>The client follows the redirect to the datanode and receives a <a href="#FileChecksum_JSON_Schema"><code>FileChecksum</code> JSON object</a>:</p>
<div class="source">
<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></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getFileChecksum</p></section><section>
<h3><a name="Get_Home_Directory"></a>Get Home Directory</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/?op=GETHOMEDIRECTORY&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#Path_JSON_Schema"><code>Path</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;Path&quot;: &quot;/user/username&quot;}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getHomeDirectory</p></section><section>
<h3><a name="Get_Trash_Root"></a>Get Trash Root</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETTRASHROOT&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#Path_JSON_Schema"><code>Path</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;Path&quot;: &quot;/user/username/.Trash&quot;}
</pre></div></div>
<p>if the path is an encrypted zone path and user has permission of the path, the client receives a response like this:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;Path&quot;: &quot;/PATH/.Trash/username&quot;}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getTrashRoot</p>
<p>For more details about trash root in an encrypted zone, please refer to <a href="./TransparentEncryption.html#Rename_and_Trash_considerations">Transparent Encryption Guide</a>.</p></section><section>
<h3><a name="Set_Permission"></a>Set Permission</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<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></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#Permission"><code>permission</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setPermission</p></section><section>
<h3><a name="Set_Owner"></a>Set Owner</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<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></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#Owner"><code>owner</code></a>, <a href="#Group"><code>group</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setOwner</p></section><section>
<h3><a name="Set_Replication_Factor"></a>Set Replication Factor</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<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></div>
<p>The client receives a response with a <a href="#Boolean_JSON_Schema"><code>boolean</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;boolean&quot;: true}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#Replication"><code>replication</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setReplication</p></section><section>
<h3><a name="Set_Access_or_Modification_Time"></a>Set Access or Modification Time</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<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></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#Modification_Time"><code>modificationtime</code></a>, <a href="#Access_Time"><code>accesstime</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setTimes</p></section><section>
<h3><a name="Modify_ACL_Entries"></a>Modify ACL Entries</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=MODIFYACLENTRIES
&amp;aclspec=&lt;ACLSPEC&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.modifyAclEntries</p></section><section>
<h3><a name="Remove_ACL_Entries"></a>Remove ACL Entries</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=REMOVEACLENTRIES
&amp;aclspec=&lt;ACLSPEC&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.removeAclEntries</p></section><section>
<h3><a name="Remove_Default_ACL"></a>Remove Default ACL</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=REMOVEDEFAULTACL&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.removeDefaultAcl</p></section><section>
<h3><a name="Remove_ACL"></a>Remove ACL</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=REMOVEACL&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.removeAcl</p></section><section>
<h3><a name="Set_ACL"></a>Set ACL</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=SETACL
&amp;aclspec=&lt;ACLSPEC&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setAcl</p></section><section>
<h3><a name="Get_ACL_Status"></a>Get ACL Status</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETACLSTATUS&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#ACL_Status_JSON_Schema"><code>AclStatus</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;AclStatus&quot;: {
&quot;entries&quot;: [
&quot;user:carla:rw-&quot;,
&quot;group::r-x&quot;
],
&quot;group&quot;: &quot;supergroup&quot;,
&quot;owner&quot;: &quot;hadoop&quot;,
&quot;permission&quot;:&quot;775&quot;,
&quot;stickyBit&quot;: false
}
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getAclStatus</p></section><section>
<h3><a name="Check_access"></a>Check access</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=CHECKACCESS
&amp;fsaction=&lt;FSACTION&gt;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.access</p></section></section><section>
<h2><a name="Storage_Policy_Operations"></a>Storage Policy Operations</h2><section>
<h3><a name="Get_all_Storage_Policies"></a>Get all Storage Policies</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1?op=GETALLSTORAGEPOLICY&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#BlockStoragePolicies_JSON_Schema"><code>BlockStoragePolicies</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;BlockStoragePolicies&quot;: {
&quot;BlockStoragePolicy&quot;: [
{
&quot;copyOnCreateFile&quot;: false,
&quot;creationFallbacks&quot;: [],
&quot;id&quot;: 2,
&quot;name&quot;: &quot;COLD&quot;,
&quot;replicationFallbacks&quot;: [],
&quot;storageTypes&quot;: [&quot;ARCHIVE&quot;]
},
{
&quot;copyOnCreateFile&quot;: false,
&quot;creationFallbacks&quot;: [&quot;DISK&quot;,&quot;ARCHIVE&quot;],
&quot;id&quot;: 5,
&quot;name&quot;: &quot;WARM&quot;,
&quot;replicationFallbacks&quot;: [&quot;DISK&quot;,&quot;ARCHIVE&quot;],
&quot;storageTypes&quot;: [&quot;DISK&quot;,&quot;ARCHIVE&quot;]
},
{
&quot;copyOnCreateFile&quot;: false,
&quot;creationFallbacks&quot;: [],
&quot;id&quot;: 7,
&quot;name&quot;: &quot;HOT&quot;,
&quot;replicationFallbacks&quot;: [&quot;ARCHIVE&quot;],
&quot;storageTypes&quot;: [&quot;DISK&quot;]
},
{
&quot;copyOnCreateFile&quot;: false,
&quot;creationFallbacks&quot;: [&quot;SSD&quot;,&quot;DISK&quot;],
&quot;id&quot;: 10,&quot;name&quot;: &quot;ONE_SSD&quot;,
&quot;replicationFallbacks&quot;: [&quot;SSD&quot;,&quot;DISK&quot;],
&quot;storageTypes&quot;: [&quot;SSD&quot;,&quot;DISK&quot;]
},
{
&quot;copyOnCreateFile&quot;: false,
&quot;creationFallbacks&quot;: [&quot;DISK&quot;],
&quot;id&quot;: 12,
&quot;name&quot;: &quot;ALL_SSD&quot;,
&quot;replicationFallbacks&quot;: [&quot;DISK&quot;],
&quot;storageTypes&quot;: [&quot;SSD&quot;]
},
{
&quot;copyOnCreateFile&quot;: false,
&quot;creationFallbacks&quot;: [&quot;DISK&quot;],
&quot;id&quot;: 14,
&quot;name&quot;: &quot;ALL_NVDIMM&quot;,
&quot;replicationFallbacks&quot;: [&quot;DISK&quot;],
&quot;storageTypes&quot;: [&quot;NVDIMM&quot;]
},
{
&quot;copyOnCreateFile&quot;: true,
&quot;creationFallbacks&quot;: [&quot;DISK&quot;],
&quot;id&quot;: 15,
&quot;name&quot;: &quot;LAZY_PERSIST&quot;,
&quot;replicationFallbacks&quot;: [&quot;DISK&quot;],
&quot;storageTypes&quot;: [&quot;RAM_DISK&quot;,&quot;DISK&quot;]
}
]
}
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getAllStoragePolicies</p></section><section>
<h3><a name="Set_Storage_Policy"></a>Set Storage Policy</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=SETSTORAGEPOLICY
&amp;storagepolicy=&lt;policy&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setStoragePolicy</p></section><section>
<h3><a name="Unset_Storage_Policy"></a>Unset Storage Policy</h3>
<ul>
<li>Submit a HTTP POT request.
<div class="source">
<div class="source">
<pre>curl -i -X POST &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=UNSETSTORAGEPOLICY&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.unsetStoragePolicy</p></section><section>
<h3><a name="Get_Storage_Policy"></a>Get Storage Policy</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETSTORAGEPOLICY&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#BlockStoragePolicy_JSON_Schema"><code>BlockStoragePolicy</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;BlockStoragePolicy&quot;: {
&quot;copyOnCreateFile&quot;: false,
&quot;creationFallbacks&quot;: [],
&quot;id&quot;:7,
&quot;name&quot;:&quot;HOT&quot;,
&quot;replicationFallbacks&quot;:[&quot;ARCHIVE&quot;],
&quot;storageTypes&quot;:[&quot;DISK&quot;]
}
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getStoragePolicy</p></section><section>
<h3><a name="Satisfy_Storage_Policy"></a>Satisfy Storage Policy</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=SATISFYSTORAGEPOLICY&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="./ArchivalStorage.html#Satisfy_Storage_Policy">ArchivalStorage</a>.satisfyStoragePolicy</p></section><section>
<h3><a name="Get_File_Block_Locations"></a>Get File Block Locations</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETFILEBLOCKLOCATIONS
</pre></div></div>
<p>The client receives a response with a <a href="#Block_Locations_JSON_Schema"><code>BlockLocations</code> JSON Object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;BlockLocations&quot; :
{
&quot;BlockLocation&quot;:
[
{
&quot;cachedHosts&quot; : [],
&quot;corrupt&quot; : false,
&quot;hosts&quot; : [&quot;host&quot;],
&quot;length&quot; : 134217728, // length of this block
&quot;names&quot; : [&quot;host:ip&quot;],
&quot;offset&quot; : 0, // offset of the block in the file
&quot;storageTypes&quot; : [&quot;DISK&quot;], // enum {RAM_DISK, SSD, DISK, ARCHIVE}
&quot;topologyPaths&quot; : [&quot;/default-rack/hostname:ip&quot;]
}, {
&quot;cachedHosts&quot; : [],
&quot;corrupt&quot; : false,
&quot;hosts&quot; : [&quot;host&quot;],
&quot;length&quot; : 62599364,
&quot;names&quot; : [&quot;host:ip&quot;],
&quot;offset&quot; : 134217728,
&quot;storageTypes&quot; : [&quot;DISK&quot;],
&quot;topologyPaths&quot; : [&quot;/default-rack/hostname:ip&quot;]
},
...
]
}
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#Offset"><code>offset</code></a>, <a href="#Length"><code>length</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getFileBlockLocations</p></section></section><section>
<h2><a name="Extended_Attributes.28XAttrs.29_Operations"></a>Extended Attributes(XAttrs) Operations</h2><section>
<h3><a name="Set_XAttr"></a>Set XAttr</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=SETXATTR
&amp;xattr.name=&lt;XATTRNAME&gt;&amp;xattr.value=&lt;XATTRVALUE&gt;
&amp;flag=&lt;FLAG&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.setXAttr</p></section><section>
<h3><a name="Remove_XAttr"></a>Remove XAttr</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=REMOVEXATTR
&amp;xattr.name=&lt;XATTRNAME&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.removeXAttr</p></section><section>
<h3><a name="Get_an_XAttr"></a>Get an XAttr</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETXATTRS
&amp;xattr.name=&lt;XATTRNAME&gt;&amp;encoding=&lt;ENCODING&gt;&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#XAttrs_JSON_Schema"><code>XAttrs</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;XAttrs&quot;: [
{
&quot;name&quot;:&quot;XATTRNAME&quot;,
&quot;value&quot;:&quot;XATTRVALUE&quot;
}
]
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getXAttr</p></section><section>
<h3><a name="Get_multiple_XAttrs"></a>Get multiple XAttrs</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETXATTRS
&amp;xattr.name=&lt;XATTRNAME1&gt;&amp;xattr.name=&lt;XATTRNAME2&gt;
&amp;encoding=&lt;ENCODING&gt;&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#XAttrs_JSON_Schema"><code>XAttrs</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;XAttrs&quot;: [
{
&quot;name&quot;:&quot;XATTRNAME1&quot;,
&quot;value&quot;:&quot;XATTRVALUE1&quot;
},
{
&quot;name&quot;:&quot;XATTRNAME2&quot;,
&quot;value&quot;:&quot;XATTRVALUE2&quot;
}
]
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getXAttrs</p></section><section>
<h3><a name="Get_all_XAttrs"></a>Get all XAttrs</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETXATTRS
&amp;encoding=&lt;ENCODING&gt;&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#XAttrs_JSON_Schema"><code>XAttrs</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;XAttrs&quot;: [
{
&quot;name&quot;:&quot;XATTRNAME1&quot;,
&quot;value&quot;:&quot;XATTRVALUE1&quot;
},
{
&quot;name&quot;:&quot;XATTRNAME2&quot;,
&quot;value&quot;:&quot;XATTRVALUE2&quot;
},
{
&quot;name&quot;:&quot;XATTRNAME3&quot;,
&quot;value&quot;:&quot;XATTRVALUE3&quot;
}
]
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getXAttrs</p></section><section>
<h3><a name="List_all_XAttrs"></a>List all XAttrs</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=LISTXATTRS&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#XAttrNames_JSON_Schema"><code>XAttrNames</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;XAttrNames&quot;:&quot;[\&quot;XATTRNAME1\&quot;,\&quot;XATTRNAME2\&quot;,\&quot;XATTRNAME3\&quot;]&quot;
}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.listXAttrs</p></section></section><section>
<h2><a name="Erasure_Coding_Operations"></a>Erasure Coding Operations</h2><section>
<h3><a name="Enable_EC_Policy"></a>Enable EC Policy</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/?op=ENABLEECPOLICY
&amp;ecpolicy=&lt;policy&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="./HDFSErasureCoding.html#Administrative_commands">HDFSErasureCoding</a>.enablePolicy</p></section><section>
<h3><a name="Disable_EC_Policy"></a>Disable EC Policy</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/?op=DISABLEECPOLICY
&amp;ecpolicy=&lt;policy&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="./HDFSErasureCoding.html#Administrative_commands">HDFSErasureCoding</a>.disablePolicy</p></section><section>
<h3><a name="Set_EC_Policy"></a>Set EC Policy</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=SETECPOLICY
&amp;ecpolicy=&lt;policy&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="./HDFSErasureCoding.html#Administrative_commands">HDFSErasureCoding</a>.setErasureCodingPolicy</p></section><section>
<h3><a name="Get_EC_Policy"></a>Get EC Policy</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i -X GET &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETECPOLICY
&quot;
</pre></div></div>
</li>
</ul>
<p>The client receives a response with a <a href="#ECPolicy_JSON_Schema"><code>ECPolicy</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre> {
&quot;name&quot;: &quot;RS-10-4-1024k&quot;,
&quot;schema&quot;:
{
&quot;codecName&quot;: &quot;rs&quot;,
&quot;numDataUnits&quot;: 10,
&quot;numParityUnits&quot;: 4,
&quot;extraOptions&quot;: {}
}
&quot;cellSize&quot;: 1048576,
&quot;id&quot;:5,
&quot;codecname&quot;:&quot;rs&quot;,
&quot;numDataUnits&quot;: 10,
&quot;numParityUnits&quot;: 4,
&quot;replicationpolicy&quot;:false,
&quot;systemPolicy&quot;:true
}
</pre></div></div>
<p>See also: <a href="./HDFSErasureCoding.html#Administrative_commands">HDFSErasureCoding</a>.getErasureCodingPolicy</p></section><section>
<h3><a name="Unset_EC_Policy"></a>Unset EC Policy</h3>
<ul>
<li>Submit a HTTP POST request.
<div class="source">
<div class="source">
<pre>curl -i -X POST &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=UNSETECPOLICY
&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="./HDFSErasureCoding.html#Administrative_commands">HDFSErasureCoding</a>.unsetErasureCodingPolicy</p></section></section><section>
<h2><a name="Snapshot_Operations"></a>Snapshot Operations</h2><section>
<h3><a name="Allow_Snapshot"></a>Allow Snapshot</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=ALLOWSNAPSHOT&quot;
</pre></div></div>
<p>The client receives a response with zero content length on success:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul></section><section>
<h3><a name="Disallow_Snapshot"></a>Disallow Snapshot</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=DISALLOWSNAPSHOT&quot;
</pre></div></div>
<p>The client receives a response with zero content length on success:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul></section><section>
<h3><a name="Create_Snapshot"></a>Create Snapshot</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=CREATESNAPSHOT[&amp;snapshotname=&lt;SNAPSHOTNAME&gt;]&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#Path_JSON_Schema"><code>Path</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;Path&quot;: &quot;/user/username/.snapshot/s1&quot;}
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.createSnapshot</p></section><section>
<h3><a name="Delete_Snapshot"></a>Delete Snapshot</h3>
<ul>
<li>Submit a HTTP DELETE request.
<div class="source">
<div class="source">
<pre>curl -i -X DELETE &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=DELETESNAPSHOT&amp;snapshotname=&lt;SNAPSHOTNAME&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.deleteSnapshot</p></section><section>
<h3><a name="Rename_Snapshot"></a>Rename Snapshot</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<div class="source">
<pre>curl -i -X PUT &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=RENAMESNAPSHOT
&amp;oldsnapshotname=&lt;SNAPSHOTNAME&gt;&amp;snapshotname=&lt;SNAPSHOTNAME&gt;&quot;
</pre></div></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.renameSnapshot</p></section><section>
<h3><a name="Get_Snapshot_Diff"></a>Get Snapshot Diff</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i GET &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETSNAPSHOTDIFF
&amp;oldsnapshotname=&lt;SNAPSHOTNAME&gt;&amp;snapshotname=&lt;SNAPSHOTNAME&gt;&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#SnapshotDiffReport_JSON_Schema"><code>SnapshotDiffReport</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;SnapshotDiffReport&quot;:{&quot;diffList&quot;:[],&quot;fromSnapshot&quot;:&quot;s3&quot;,&quot;snapshotRoot&quot;:&quot;/foo&quot;,&quot;toSnapshot&quot;:&quot;s4&quot;}}
</pre></div></div>
</li>
</ul></section><section>
<h3><a name="Get_Snapshot_Diff_Iteratively"></a>Get Snapshot Diff Iteratively</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i -X GET &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?op=GETSNAPSHOTDIFFLISTING
&amp;oldsnapshotname=&lt;SNAPSHOTNAME&gt;&amp;snapshotname=&lt;SNAPSHOTNAME&gt;&amp;snapshotdiffstartpath=&lt;STARTPATH&gt;&amp;snapshotdiffindex=&lt;STARTINDEX&gt;
</pre></div></div>
<p>If <code>snapshotdiffstartpath</code> and <code>snapshotdiffindex</code> are not given, <code>&quot;&quot;</code> (empty string) and <code>-1</code> are used respectively implying the first iteration.</p>
<p>The client receives a response with a <a href="#SnapshotDiffReportListing_JSON_Schema"><code>SnapshotDiffReportListing</code> JSON object</a>. The value of <code>lastPath</code> and <code>lastIndex</code> must be specified as the value of <code>snapshotdiffstartpath</code> and <code>snapshotdiffindex</code> respectively on next iteration.</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{&quot;SnapshotDiffReportListing&quot;:{&quot;createList&quot;:[],&quot;deleteList&quot;:[],&quot;isFromEarlier&quot;:true,&quot;lastIndex&quot;:-1,&quot;lastPath&quot;:&quot;&quot;,&quot;modifyList&quot;:[]}}
</pre></div></div>
</li>
</ul></section><section>
<h3><a name="Get_Snapshottable_Directory_List"></a>Get Snapshottable Directory List</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i GET &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/?user.name=&lt;USER&gt;&amp;op=GETSNAPSHOTTABLEDIRECTORYLIST&quot;
</pre></div></div>
<p>If the USER is not the hdfs super user, the call lists only the snapshottable directories owned by the user. If the USER is the hdfs super user, the call lists all the snapshottable directories. The client receives a response with a <a href="#SnapshottableDirectoryList_JSON_Schema"><code>SnapshottableDirectoryList</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;SnapshottableDirectoryList&quot;:
[
{
&quot;dirStatus&quot;:
{
&quot;accessTime&quot;:0,
&quot;blockSize&quot;:0,
&quot;childrenNum&quot;:0,
&quot;fileId&quot;:16386,
&quot;group&quot;:&quot;hadoop&quot;,
&quot;length&quot;:0,
&quot;modificationTime&quot;:1520761889225,
&quot;owner&quot;:&quot;random&quot;,
&quot;pathSuffix&quot;:&quot;bar&quot;,
&quot;permission&quot;:&quot;755&quot;,
&quot;replication&quot;:0,
&quot;storagePolicy&quot;:0,
&quot;type&quot;:&quot;DIRECTORY&quot;
},
&quot;parentFullPath&quot;:&quot;/&quot;,
&quot;snapshotNumber&quot;:0,
&quot;snapshotQuota&quot;:65536
}
]
}
</pre></div></div>
</li>
</ul></section><section>
<h3><a name="Get_Snapshot_List"></a>Get Snapshot List</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i GET &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/&lt;PATH&gt;?&quot;
</pre></div></div>
<p>The call lists the snapshots for a snapshottable directory. The client receives a response with a <a href="#SnapshotList_JSON_Schema"><code>SnapshotList</code> JSON object</a>:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{
&quot;SnapshotList&quot;:
[
{
&quot;dirStatus&quot;:
{
&quot;accessTime&quot;:0,
&quot;blockSize&quot;:0,
&quot;childrenNum&quot;:0,
&quot;fileId&quot;:16386,
&quot;group&quot;:&quot;hadoop&quot;,
&quot;length&quot;:0,
&quot;modificationTime&quot;:1520761889225,
&quot;owner&quot;:&quot;random&quot;,
&quot;pathSuffix&quot;:&quot;bar&quot;,
&quot;permission&quot;:&quot;755&quot;,
&quot;replication&quot;:0,
&quot;storagePolicy&quot;:0,
&quot;type&quot;:&quot;DIRECTORY&quot;
},
&quot;fullPath&quot;:&quot;/&quot;,
&quot;snapshotID&quot;:0,
&quot;deletionStatus&quot;:ACTIVE
}
]
}
</pre></div></div>
</li>
</ul></section></section><section>
<h2><a name="Delegation_Token_Operations"></a>Delegation Token Operations</h2><section>
<h3><a name="Get_Delegation_Token"></a>Get Delegation Token</h3>
<ul>
<li>Submit a HTTP GET request.
<div class="source">
<div class="source">
<pre>curl -i &quot;http://&lt;HOST&gt;:&lt;PORT&gt;/webhdfs/v1/?op=GETDELEGATIONTOKEN
[&amp;renewer=&lt;USER&gt;][&amp;service=&lt;SERVICE&gt;][&amp;kind=&lt;KIND&gt;]&quot;
</pre></div></div>
<p>The client receives a response with a <a href="#Token_JSON_Schema"><code>Token</code> JSON object</a>:</p>
<div class="source">
<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></div>
</li>
</ul>
<p>See also: <a href="#Renewer"><code>renewer</code></a>, <a href="../../api/org/apache/hadoop/fs/FileSystem.html">FileSystem</a>.getDelegationToken, <a href="#Token_Kind"><code>kind</code></a>, <a href="#Token_Service"><code>service</code></a></p></section><section>
<h3><a name="Renew_Delegation_Token"></a>Renew Delegation Token</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<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></div>
<p>The client receives a response with a <a href="#Long_JSON_Schema"><code>long</code> JSON object</a>:</p>
<div class="source">
<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></div>
</li>
</ul>
<p>See also: <a href="#Token"><code>token</code></a>, <a href="../../api/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticator.html">DelegationTokenAuthenticator</a>.renewDelegationToken</p></section><section>
<h3><a name="Cancel_Delegation_Token"></a>Cancel Delegation Token</h3>
<ul>
<li>Submit a HTTP PUT request.
<div class="source">
<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></div>
<p>The client receives a response with zero content length:</p>
<div class="source">
<div class="source">
<pre>HTTP/1.1 200 OK
Content-Length: 0
</pre></div></div>
</li>
</ul>
<p>See also: <a href="#Token"><code>token</code></a>, <a href="../../api/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticator.html">DelegationTokenAuthenticator</a>.cancelDelegationToken</p></section></section><section>
<h2><a name="Error_Responses"></a>Error Responses</h2>
<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><section>
<h3><a name="HTTP_Response_Codes"></a>HTTP Response Codes</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Exceptions </th>
<th align="left"> HTTP Response Codes </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <code>IllegalArgumentException</code> </td>
<td align="left"> <code>400 Bad Request</code> </td></tr>
<tr class="a">
<td align="left"> <code>UnsupportedOperationException</code> </td>
<td align="left"> <code>400 Bad Request</code> </td></tr>
<tr class="b">
<td align="left"> <code>SecurityException</code> </td>
<td align="left"> <code>401 Unauthorized</code> </td></tr>
<tr class="a">
<td align="left"> <code>IOException</code> </td>
<td align="left"> <code>403 Forbidden</code> </td></tr>
<tr class="b">
<td align="left"> <code>FileNotFoundException</code> </td>
<td align="left"> <code>404 Not Found</code> </td></tr>
<tr class="a">
<td align="left"> <code>RuntimeException</code> </td>
<td align="left"> <code>500 Internal Server Error</code> </td></tr>
</tbody>
</table>
<p>Below are examples of exception responses.</p><section>
<h4><a name="Illegal_Argument_Exception"></a>Illegal Argument Exception</h4>
<div class="source">
<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>
</section><section>
<h4><a name="Security_Exception"></a>Security Exception</h4>
<div class="source">
<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>
</section><section>
<h4><a name="Access_Control_Exception"></a>Access Control Exception</h4>
<div class="source">
<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>
</section><section>
<h4><a name="File_Not_Found_Exception"></a>File Not Found Exception</h4>
<div class="source">
<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>
</section></section></section><section>
<h2><a name="JSON_Schemas"></a>JSON Schemas</h2>
<p>All operations, except for <a href="#Open_and_Read_a_File"><code>OPEN</code></a>, either return a zero-length response or a JSON response. For <a href="#Open_and_Read_a_File"><code>OPEN</code></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"><code>additionalProperties</code></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><section>
<h3><a name="ACL_Status_JSON_Schema"></a>ACL Status JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot; : &quot;AclStatus&quot;,
&quot;properties&quot;:
{
&quot;AclStatus&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;entries&quot;:
{
&quot;type&quot;: &quot;array&quot;,
&quot;items&quot;:
{
&quot;description&quot;: &quot;ACL entry.&quot;,
&quot;type&quot;: &quot;string&quot;
}
},
&quot;group&quot;:
{
&quot;description&quot;: &quot;The group owner.&quot;,
&quot;type&quot; : &quot;string&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;stickyBit&quot;:
{
&quot;description&quot;: &quot;True if the sticky bit is on.&quot;,
&quot;type&quot; : &quot;boolean&quot;,
&quot;required&quot; : true
}
}
}
}
}
</pre></div></div>
</section><section>
<h3><a name="XAttrs_JSON_Schema"></a>XAttrs JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot; : &quot;XAttrs&quot;,
&quot;properties&quot;:
{
&quot;XAttrs&quot;:
{
&quot;type&quot; : &quot;array&quot;,
&quot;items&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;name&quot;:
{
&quot;description&quot;: &quot;XAttr name.&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;value&quot;:
{
&quot;description&quot;: &quot;XAttr value.&quot;,
&quot;type&quot; : &quot;string&quot;
}
}
}
}
}
}
</pre></div></div>
</section><section>
<h3><a name="XAttrNames_JSON_Schema"></a>XAttrNames JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot; : &quot;XAttrNames&quot;,
&quot;properties&quot;:
{
&quot;XAttrNames&quot;:
{
&quot;description&quot;: &quot;XAttr names.&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
}
}
}
</pre></div></div>
</section><section>
<h3><a name="Boolean_JSON_Schema"></a>Boolean JSON Schema</h3>
<div class="source">
<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></div>
<p>See also: <a href="#Make_a_Directory"><code>MKDIRS</code></a>, <a href="#Rename_a_FileDirectory"><code>RENAME</code></a>, <a href="#Delete_a_FileDirectory"><code>DELETE</code></a>, <a href="#Set_Replication_Factor"><code>SETREPLICATION</code></a></p></section><section>
<h3><a name="ContentSummary_JSON_Schema"></a>ContentSummary JSON Schema</h3>
<div class="source">
<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
},
&quot;typeQuota&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;ARCHIVE&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;consumed&quot;:
{
&quot;description&quot;: &quot;The storage type space consumed.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;quota&quot;:
{
&quot;description&quot;: &quot;The storage type quota.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
}
}
},
&quot;DISK&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;consumed&quot;:
{
&quot;description&quot;: &quot;The storage type space consumed.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;quota&quot;:
{
&quot;description&quot;: &quot;The storage type quota.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
}
}
},
&quot;SSD&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;consumed&quot;:
{
&quot;description&quot;: &quot;The storage type space consumed.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;quota&quot;:
{
&quot;description&quot;: &quot;The storage type quota.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
}
}
}
}
}
}
}
}
}
</pre></div></div>
<p>See also: <a href="#Get_Content_Summary_of_a_Directory"><code>GETCONTENTSUMMARY</code></a></p></section><section>
<h3><a name="QuotaUsage_JSON_Schema"></a>QuotaUsage JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot; : &quot;QuotaUsage&quot;,
&quot;properties&quot;:
{
&quot;QuotaUsage&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;fileAndDirectoryCount&quot;:
{
&quot;description&quot;: &quot;The number of files and directories.&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
},
&quot;typeQuota&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;ARCHIVE&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;consumed&quot;:
{
&quot;description&quot;: &quot;The storage type space consumed.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;quota&quot;:
{
&quot;description&quot;: &quot;The storage type quota.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
}
}
},
&quot;DISK&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;consumed&quot;:
{
&quot;description&quot;: &quot;The storage type space consumed.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;quota&quot;:
{
&quot;description&quot;: &quot;The storage type quota.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
}
}
},
&quot;SSD&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;consumed&quot;:
{
&quot;description&quot;: &quot;The storage type space consumed.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;quota&quot;:
{
&quot;description&quot;: &quot;The storage type quota.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
}
}
}
}
}
}
}
}
}
</pre></div></div>
<p>See also: <a href="#Get_Quota_Usage_of_a_Directory"><code>GETQUOTAUSAGE</code></a></p></section><section>
<h3><a name="FileChecksum_JSON_Schema"></a>FileChecksum JSON Schema</h3>
<div class="source">
<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></div>
</section><section>
<h3><a name="FileStatus_JSON_Schema"></a>FileStatus JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot; : &quot;FileStatus&quot;,
&quot;properties&quot;:
{
&quot;FileStatus&quot;: fileStatusProperties //See FileStatus Properties
}
}
</pre></div></div>
<p>See also: <a href="#FileStatus_Properties"><code>FileStatus</code> Properties</a>, <a href="#Status_of_a_FileDirectory"><code>GETFILESTATUS</code></a>, <a href="../../api/org/apache/hadoop/fs/FileStatus.html">FileStatus</a></p><section>
<h4><a name="FileStatus_Properties"></a>FileStatus Properties</h4>
<p>JavaScript syntax is used to define <code>fileStatusProperties</code> so that it can be referred in both <code>FileStatus</code> and <code>FileStatuses</code> JSON schemas.</p>
<div class="source">
<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
},
&quot;aclBit&quot;:
{
&quot;description&quot;: &quot;Has ACLs set or not.&quot;,
&quot;type&quot; : &quot;boolean&quot;,
},
&quot;encBit&quot;:
{
&quot;description&quot;: &quot;Is Encrypted or not.&quot;,
&quot;type&quot; : &quot;boolean&quot;,
},
&quot;ecBit&quot;:
{
&quot;description&quot;: &quot;Is ErasureCoded or not.&quot;,
&quot;type&quot; : &quot;boolean&quot;,
},
&quot;ecPolicy&quot;:
{
&quot;description&quot;: &quot;The namenode of ErasureCodePolicy.&quot;,
&quot;type&quot; : &quot;String&quot;,
}
}
};
</pre></div></div>
</section></section><section>
<h3><a name="FileStatuses_JSON_Schema"></a>FileStatuses JSON Schema</h3>
<p>A <code>FileStatuses</code> JSON object represents an array of <code>FileStatus</code> JSON objects.</p>
<div class="source">
<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></div>
<p>See also: <a href="#FileStatus_Properties"><code>FileStatus</code> Properties</a>, <a href="#List_a_Directory"><code>LISTSTATUS</code></a>, <a href="../../api/org/apache/hadoop/fs/FileStatus.html">FileStatus</a></p></section><section>
<h3><a name="DirectoryListing_JSON_Schema"></a>DirectoryListing JSON Schema</h3>
<p>A <code>DirectoryListing</code> JSON object represents a batch of directory entries while iteratively listing a directory. It contains a <code>FileStatuses</code> JSON object as well as iteration information.</p>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot; : &quot;DirectoryListing&quot;,
&quot;properties&quot;:
{
&quot;DirectoryListing&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;partialListing&quot;:
{
&quot;description&quot;: &quot;A partial directory listing&quot;,
&quot;type&quot; : &quot;object&quot;, // A FileStatuses object
&quot;required&quot; : true
},
&quot;remainingEntries&quot;:
{
&quot;description&quot;: &quot;Number of remaining entries&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
}
}
}
}
}
</pre></div></div>
<p>See also: <a href="#FileStatuses_JSON_Schema"><code>FileStatuses</code> JSON Schema</a>, <a href="#Iteratively_List_a_Directory"><code>LISTSTATUS_BATCH</code></a>, <a href="../../api/org/apache/hadoop/fs/FileStatus.html">FileStatus</a></p></section><section>
<h3><a name="Long_JSON_Schema"></a>Long JSON Schema</h3>
<div class="source">
<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></div>
<p>See also: <a href="#Renew_Delegation_Token"><code>RENEWDELEGATIONTOKEN</code></a>,</p></section><section>
<h3><a name="Path_JSON_Schema"></a>Path JSON Schema</h3>
<div class="source">
<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></div>
<p>See also: <a href="#Get_Home_Directory"><code>GETHOMEDIRECTORY</code></a>, <a href="../../api/org/apache/hadoop/fs/Path.html">Path</a></p></section><section>
<h3><a name="RemoteException_JSON_Schema"></a>RemoteException JSON Schema</h3>
<div class="source">
<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></div>
<p>See also: <a href="#Error_Responses">Error Responses</a></p></section><section>
<h3><a name="Token_JSON_Schema"></a>Token JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot; : &quot;Token&quot;,
&quot;properties&quot;:
{
&quot;Token&quot;: tokenProperties //See Token Properties
}
}
</pre></div></div>
<p>See also: <a href="#Token_Properties"><code>Token</code> Properties</a>, <a href="#Get_Delegation_Token"><code>GETDELEGATIONTOKEN</code></a>, the note in <a href="#Delegation">Delegation</a>.</p><section>
<h4><a name="Token_Properties"></a>Token Properties</h4>
<p>JavaScript syntax is used to define <code>tokenProperties</code> so that it can be referred in <code>Token</code> JSON schema.</p>
<div class="source">
<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>
<p>See also: <a href="#Token_Properties"><code>Token</code> Properties</a>, the note in <a href="#Delegation">Delegation</a>.</p></section></section><section>
<h3><a name="BlockStoragePolicy_JSON_Schema"></a>BlockStoragePolicy JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot; : &quot;BlockStoragePolicy&quot;,
&quot;properties&quot;:
{
&quot;BlockStoragePolicy&quot;: blockStoragePolicyProperties //See BlockStoragePolicy Properties
}
}
</pre></div></div>
<p>See also: <a href="#BlockStoragePolicy_Properties"><code>BlockStoragePolicy</code> Properties</a>, <a href="#Get_Storage_Policy"><code>GETSTORAGEPOLICY</code></a></p><section>
<h4><a name="BlockStoragePolicy_Properties"></a>BlockStoragePolicy Properties</h4>
<p>JavaScript syntax is used to define <code>blockStoragePolicyProperties</code> so that it can be referred in both <code>BlockStoragePolicy</code> and <code>BlockStoragePolicies</code> JSON schemas.</p>
<div class="source">
<div class="source">
<pre>var blockStoragePolicyProperties =
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;id&quot;:
{
&quot;description&quot;: &quot;Policy ID.&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;name&quot;:
{
&quot;description&quot;: &quot;Policy name.&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;storageTypes&quot;:
{
&quot;description&quot;: &quot;An array of storage types for block placement.&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;required&quot; : true
&quot;items&quot; :
{
&quot;type&quot;: &quot;string&quot;
}
},
&quot;replicationFallbacks&quot;:
{
&quot;description&quot;: &quot;An array of fallback storage types for replication.&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;required&quot; : true
&quot;items&quot; :
{
&quot;type&quot;: &quot;string&quot;
}
},
&quot;creationFallbacks&quot;:
{
&quot;description&quot;: &quot;An array of fallback storage types for file creation.&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;required&quot; : true
&quot;items&quot; :
{
&quot;type&quot;: &quot;string&quot;
}
},
&quot;copyOnCreateFile&quot;:
{
&quot;description&quot;: &quot;If set then the policy cannot be changed after file creation.&quot;,
&quot;type&quot; : &quot;boolean&quot;,
&quot;required&quot; : true
}
}
};
</pre></div></div>
</section></section><section>
<h3><a name="ECPolicy_JSON_Schema"></a>ECPolicy JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot;: &quot;RS-10-4-1024k&quot;,
schema {
&quot;codecName&quot;: &quot;rs&quot;,
&quot;numDataUnits&quot;: 10,
&quot;numParityUnits&quot;: 4,
&quot;extraOptions&quot;: {}
}
&quot;cellSize&quot;: 1048576,
&quot;id&quot;:5,
&quot;codecname&quot;:&quot;rs&quot;,
&quot;numDataUnits&quot;: 10,
&quot;numParityUnits&quot;: 4,
&quot;replicationpolicy&quot;:false,
&quot;systemPolicy&quot;:true
}
</pre></div></div>
</section><section>
<h3><a name="BlockStoragePolicies_JSON_Schema"></a>BlockStoragePolicies JSON Schema</h3>
<p>A <code>BlockStoragePolicies</code> JSON object represents an array of <code>BlockStoragePolicy</code> JSON objects.</p>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot; : &quot;BlockStoragePolicies&quot;,
&quot;properties&quot;:
{
&quot;BlockStoragePolicies&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;BlockStoragePolicy&quot;:
{
&quot;description&quot;: &quot;An array of BlockStoragePolicy&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;items&quot; : blockStoragePolicyProperties //See BlockStoragePolicy Properties
}
}
}
}
}
</pre></div></div>
</section><section>
<h3><a name="SnapshotDiffReport_JSON_Schema"></a>SnapshotDiffReport JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot;: &quot;SnapshotDiffReport&quot;,
&quot;type&quot;: &quot;object&quot;,
&quot;properties&quot;:
{
&quot;SnapshotDiffReport&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot; :
{
&quot;diffList&quot;:
{
&quot;description&quot;: &quot;An array of DiffReportEntry&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;items&quot; : diffReportEntries,
&quot;required&quot; : true
},
&quot;fromSnapshot&quot;:
{
&quot;description&quot;: &quot;Source snapshot&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;snapshotRoot&quot;:
{
&quot;description&quot; : &quot;String representation of snapshot root path&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;toSnapshot&quot;:
{
&quot;description&quot; : &quot;Destination snapshot&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
}
}
}
}
}
</pre></div></div>
<section>
<h4><a name="DiffReport_Entries"></a>DiffReport Entries</h4>
<p>JavaScript syntax is used to define <code>diffReportEntries</code> so that it can be referred in <code>SnapshotDiffReport</code> JSON schema.</p>
<div class="source">
<div class="source">
<pre>var diffReportEntries =
{
&quot;type&quot;: &quot;object&quot;,
&quot;properties&quot;:
{
&quot;sourcePath&quot;:
{
&quot;description&quot; : &quot;Source path name relative to snapshot root&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;targetPath&quot;:
{
&quot;description&quot; : &quot;Target path relative to snapshot root used for renames&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;type&quot;:
{
&quot;description&quot; : &quot;Type of diff report entry&quot;,
&quot;enum&quot; : [&quot;CREATE&quot;, &quot;MODIFY&quot;, &quot;DELETE&quot;, &quot;RENAME&quot;],
&quot;required&quot; : true
}
}
}
</pre></div></div>
</section></section><section>
<h3><a name="SnapshotDiffReportListing_JSON_Schema"></a>SnapshotDiffReportListing JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot;: &quot;SnapshotDiffReportListing&quot;,
&quot;type&quot;: &quot;object&quot;,
&quot;properties&quot;:
{
&quot;SnapshotDiffReportListing&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot; :
{
&quot;isFromEarlier&quot;:
{
&quot;description&quot; : &quot;the diff is calculated from older to newer snapshot or not&quot;,
&quot;type&quot; : &quot;boolean&quot;,
&quot;required&quot; : true
},
&quot;lastIndex&quot;:
{
&quot;description&quot; : &quot;the last index of listing iteration&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;lastPath&quot;:
{
&quot;description&quot; : &quot;String representation of the last path of the listing iteration&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;modifyList&quot;:
{
&quot;description&quot;: &quot;An array of DiffReportListingEntry&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;items&quot; : diffReportListingEntries,
&quot;required&quot; : true
},
&quot;createList&quot;:
{
&quot;description&quot;: &quot;An array of DiffReportListingEntry&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;items&quot; : diffReportListingEntries,
&quot;required&quot; : true
},
&quot;deleteList&quot;:
{
&quot;description&quot;: &quot;An array of DiffReportListingEntry&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;items&quot; : diffReportListingEntries,
&quot;required&quot; : true
}
}
}
}
}
</pre></div></div>
<section>
<h4><a name="DiffReportListing_Entries"></a>DiffReportListing Entries</h4>
<p>JavaScript syntax is used to define <code>diffReportEntries</code> so that it can be referred in <code>SnapshotDiffReport</code> JSON schema.</p>
<div class="source">
<div class="source">
<pre>var diffReportListingEntries =
{
&quot;type&quot;: &quot;object&quot;,
&quot;properties&quot;:
{
&quot;dirId&quot;:
{
&quot;description&quot; : &quot;inode id of the directory&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;fileId&quot;:
{
&quot;description&quot; : &quot;inode id of the file&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;isRereference&quot;:
{
&quot;description&quot; : &quot;this is reference or not&quot;,
&quot;type&quot; : &quot;boolean&quot;,
&quot;required&quot; : true
},
&quot;sourcePath&quot;:
{
&quot;description&quot; : &quot;string representation of path where changes have happened&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;targetPath&quot;:
{
&quot;description&quot; : &quot;string representation of target path of rename op&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : false
}
}
}
</pre></div></div>
</section></section><section>
<h3><a name="SnapshottableDirectoryList_JSON_Schema"></a>SnapshottableDirectoryList JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot;: &quot;SnapshottableDirectoryList&quot;,
&quot;type&quot;: &quot;object&quot;,
&quot;properties&quot;:
{
&quot;SnapshottableDirectoryList&quot;:
{
&quot;description&quot;: &quot;An array of SnapshottableDirectoryStatus&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;items&quot; : snapshottableDirectoryStatus,
&quot;required&quot; : true
}
}
}
</pre></div></div>
<section>
<h4><a name="SnapshottableDirectoryStatus"></a>SnapshottableDirectoryStatus</h4>
<p>JavaScript syntax is used to define <code>snapshottableDirectoryStatus</code> so that it can be referred in <code>SnapshottableDirectoryList</code> JSON schema.</p>
<div class="source">
<div class="source">
<pre>var snapshottableDirectoryStatus =
{
&quot;type&quot;: &quot;object&quot;,
&quot;properties&quot;:
{
&quot;dirStatus&quot;: fileStatusProperties,
&quot;parentFullPath&quot;:
{
&quot;description&quot; : &quot;Full path of the parent of snapshottable directory&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;snapshotNumber&quot;:
{
&quot;description&quot; : &quot;Number of snapshots created on the snapshottable directory&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;snapshotQuota&quot;:
{
&quot;description&quot; : &quot;Total number of snapshots allowed on the snapshottable directory&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
}
}
}
</pre></div></div>
</section></section><section>
<h3><a name="SnapshotList_JSON_Schema"></a>SnapshotList JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot;: &quot;SnapshotList&quot;,
&quot;type&quot;: &quot;object&quot;,
&quot;properties&quot;:
{
&quot;SnapshotList&quot;:
{
&quot;description&quot;: &quot;An array of SnapshotStatus&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;items&quot; : snapshotStatus,
&quot;required&quot; : true
}
}
}
</pre></div></div>
<section>
<h4><a name="SnapshotStatus"></a>SnapshotStatus</h4>
<p>JavaScript syntax is used to define <code>snapshotStatus</code> so that it can be referred in <code>SnapshotList</code> JSON schema.</p>
<div class="source">
<div class="source">
<pre>var snapshotStatus =
{
&quot;type&quot;: &quot;object&quot;,
&quot;properties&quot;:
{
&quot;dirStatus&quot;: fileStatusProperties,
&quot;fullPath&quot;:
{
&quot;description&quot; : &quot;Full path of the parent of the snapshot&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
},
&quot;snapshotID&quot;:
{
&quot;description&quot; : &quot;snapshot ID for the snapshot&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : true
},
&quot;deletionStatus&quot;:
{
&quot;description&quot; : &quot;Status showing whether the snapshot is active or in deleted state&quot;,
&quot;type&quot; : &quot;string&quot;,
&quot;required&quot; : true
}
}
}
</pre></div></div>
</section></section><section>
<h3><a name="BlockLocations_JSON_Schema"></a>BlockLocations JSON Schema</h3>
<p>A <code>BlockLocations</code> JSON object represents an array of <code>BlockLocation</code> JSON objects.</p>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot; : &quot;BlockLocations&quot;,
&quot;properties&quot;:
{
&quot;BlockLocations&quot;:
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;BlockLocation&quot;:
{
&quot;description&quot;: &quot;An array of BlockLocation&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;items&quot; : blockLocationProperties //See BlockLocation Properties
}
}
}
}
}
</pre></div></div>
<p>See also <a href="#BlockLocation_Properties"><code>BlockLocation</code> Properties</a>, <a href="#Get_File_Block_Locations"><code>GETFILEBLOCKLOCATIONS</code></a>, <a href="../../api/org/apache/hadoop/fs/BlockLocation.html">BlockLocation</a></p></section><section>
<h3><a name="BlockLocation_JSON_Schema"></a>BlockLocation JSON Schema</h3>
<div class="source">
<div class="source">
<pre>{
&quot;name&quot; : &quot;BlockLocation&quot;,
&quot;properties&quot;:
{
&quot;BlockLocation&quot;: blockLocationProperties //See BlockLocation Properties
}
}
</pre></div></div>
<p>See also <a href="#BlockLocation_Properties"><code>BlockLocation</code> Properties</a>, <a href="#Get_File_Block_Locations"><code>GETFILEBLOCKLOCATIONS</code></a>, <a href="../../api/org/apache/hadoop/fs/BlockLocation.html">BlockLocation</a></p><section>
<h4><a name="BlockLocation_Properties"></a>BlockLocation Properties</h4>
<p>JavaScript syntax is used to define <code>blockLocationProperties</code> so that it can be referred in both <code>BlockLocation</code> and <code>BlockLocations</code> JSON schemas.</p>
<div class="source">
<div class="source">
<pre>var blockLocationProperties =
{
&quot;type&quot; : &quot;object&quot;,
&quot;properties&quot;:
{
&quot;cachedHosts&quot;:
{
&quot;description&quot;: &quot;Datanode hostnames with a cached replica&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;required&quot; : &quot;true&quot;,
&quot;items&quot; :
{
&quot;description&quot;: &quot;A datanode hostname&quot;,
&quot;type&quot; : &quot;string&quot;
}
},
&quot;corrupt&quot;:
{
&quot;description&quot;: &quot;True if the block is corrupted&quot;,
&quot;type&quot; : &quot;boolean&quot;,
&quot;required&quot; : &quot;true&quot;
},
&quot;hosts&quot;:
{
&quot;description&quot;: &quot;Datanode hostnames store the block&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;required&quot; : &quot;true&quot;,
&quot;items&quot; :
{
&quot;description&quot;: &quot;A datanode hostname&quot;,
&quot;type&quot; : &quot;string&quot;
}
},
&quot;length&quot;:
{
&quot;description&quot;: &quot;Length of the block&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : &quot;true&quot;
},
&quot;names&quot;:
{
&quot;description&quot;: &quot;Datanode IP:xferPort for accessing the block&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;required&quot; : &quot;true&quot;,
&quot;items&quot; :
{
&quot;description&quot;: &quot;DatanodeIP:xferPort&quot;,
&quot;type&quot; : &quot;string&quot;
}
},
&quot;offset&quot;:
{
&quot;description&quot;: &quot;Offset of the block in the file&quot;,
&quot;type&quot; : &quot;integer&quot;,
&quot;required&quot; : &quot;true&quot;
},
&quot;storageTypes&quot;:
{
&quot;description&quot;: &quot;Storage type of each replica&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;required&quot; : &quot;true&quot;,
&quot;items&quot; :
{
&quot;description&quot;: &quot;Storage type&quot;,
&quot;enum&quot; : [&quot;RAM_DISK&quot;, &quot;SSD&quot;, &quot;DISK&quot;, &quot;ARCHIVE&quot;]
}
},
&quot;topologyPaths&quot;:
{
&quot;description&quot;: &quot;Datanode addresses in network topology&quot;,
&quot;type&quot; : &quot;array&quot;,
&quot;required&quot; : &quot;true&quot;,
&quot;items&quot; :
{
&quot;description&quot;: &quot;/rack/host:ip&quot;,
&quot;type&quot; : &quot;string&quot;
}
}
}
};
</pre></div></div>
</section></section></section><section>
<h2><a name="HTTP_Query_Parameter_Dictionary"></a>HTTP Query Parameter Dictionary</h2><section>
<h3><a name="ACL_Spec"></a>ACL Spec</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>aclspec</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The ACL spec included in ACL modification operations. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> See <a href="./HdfsPermissionsGuide.html">Permissions and HDFS</a>. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> See <a href="./HdfsPermissionsGuide.html">Permissions and HDFS</a>. </td></tr>
</tbody>
</table></section><section>
<h3><a name="XAttr_Name"></a>XAttr Name</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>xattr.name</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The XAttr name of a file/directory. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any string prefixed with user./trusted./system./security.. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string prefixed with user./trusted./system./security.. </td></tr>
</tbody>
</table></section><section>
<h3><a name="XAttr_Value"></a>XAttr Value</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>xattr.value</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The XAttr value of a file/directory. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> An encoded value. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Enclosed in double quotes or prefixed with 0x or 0s. </td></tr>
</tbody>
</table>
<p>See also: <a href="./ExtendedAttributes.html">Extended Attributes</a></p></section><section>
<h3><a name="XAttr_set_flag"></a>XAttr set flag</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>flag</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The XAttr set flag. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> CREATE,REPLACE. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> CREATE,REPLACE. </td></tr>
</tbody>
</table>
<p>See also: <a href="./ExtendedAttributes.html">Extended Attributes</a></p></section><section>
<h3><a name="XAttr_value_encoding"></a>XAttr value encoding</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>encoding</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The XAttr value encoding. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> text </td>
<td> hex </td>
<td> base64 </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> text </td>
<td> hex </td>
<td> base64 </td></tr>
</tbody>
</table>
<p>See also: <a href="./ExtendedAttributes.html">Extended Attributes</a></p></section><section>
<h3><a name="Access_Time"></a>Access Time</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>accesstime</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The access time of a file/directory. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> long </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> -1 (means keeping it unchanged) </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> -1 or a timestamp </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any integer. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Set_Access_or_Modification_Time"><code>SETTIMES</code></a></p></section><section>
<h3><a name="Block_Size"></a>Block Size</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>blocksize</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The block size of a file. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> long </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> Specified in the configuration. </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> &gt; 0 </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any integer. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Create_and_Write_to_a_File"><code>CREATE</code></a></p></section><section>
<h3><a name="Buffer_Size"></a>Buffer Size</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>buffersize</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The size of the buffer used in transferring data. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> int </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> Specified in the configuration. </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> &gt; 0 </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any integer. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Create_and_Write_to_a_File"><code>CREATE</code></a>, <a href="#Append_to_a_File"><code>APPEND</code></a>, <a href="#Open_and_Read_a_File"><code>OPEN</code></a></p></section><section>
<h3><a name="Create_Flag"></a>Create Flag</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>createflag</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> Enum of possible flags to process while creating a file </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> enumerated strings </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Legal combinations of create, overwrite, append and sync_block </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> See note below </td></tr>
</tbody>
</table>
<p>The following combinations are not valid: * append,create * create,append,overwrite</p>
<p>See also: <a href="#Create_and_Write_to_a_File"><code>CREATE</code></a></p></section><section>
<h3><a name="Create_Parent"></a>Create Parent</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>createparent</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> If the parent directories do not exist, should they be created? </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> boolean </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> true </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> true, false </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> true </td></tr>
</tbody>
</table>
<p>See also: <a href="#Create_a_Symbolic_Link"><code>CREATESYMLINK</code></a></p></section><section>
<h3><a name="Delegation"></a>Delegation</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>delegation</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The delegation token used for authentication. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> An encoded token. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> See the note below. </td></tr>
</tbody>
</table>
<p><b>Note</b> that delegation tokens are encoded as a URL safe string; see <code>encodeToUrlString()</code> and <code>decodeFromUrlString(String)</code> in <code>org.apache.hadoop.security.token.Token</code> for the details of the encoding.</p>
<p>See also: <a href="#Authentication">Authentication</a></p></section><section>
<h3><a name="Destination"></a>Destination</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>destination</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The destination path. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> Path </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; (an invalid path) </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> An absolute FileSystem path without scheme and authority. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any path. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Create_a_Symbolic_Link"><code>CREATESYMLINK</code></a>, <a href="#Rename_a_FileDirectory"><code>RENAME</code></a></p></section><section>
<h3><a name="Do_As"></a>Do As</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>doas</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> Allowing a proxy user to do as another user. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> null </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any valid username. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Proxy_Users">Proxy Users</a></p></section><section>
<h3><a name="Fs_Action"></a>Fs Action</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>fsaction</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> File system operation read/write/execute </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> null (an invalid value) </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Strings matching regex pattern &#xa0;&quot;[r-][w-][x-]&#xa0;&quot; </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> &#xa0;&quot;[r-][w-][x-]&#xa0;&quot; </td></tr>
</tbody>
</table>
<p>See also: <a href="#Check_access"><code>CHECKACCESS</code></a>,</p></section><section>
<h3><a name="Group"></a>Group</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>group</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The name of a group. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; (means keeping it unchanged) </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any valid group name. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Set_Owner"><code>SETOWNER</code></a></p></section><section>
<h3><a name="Length"></a>Length</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>length</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The number of bytes to be processed. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> long </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> null (means the entire file) </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> &gt;= 0 or null </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any integer. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Open_and_Read_a_File"><code>OPEN</code></a></p></section><section>
<h3><a name="Modification_Time"></a>Modification Time</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>modificationtime</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The modification time of a file/directory. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> long </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> -1 (means keeping it unchanged) </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> -1 or a timestamp </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any integer. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Set_Access_or_Modification_Time"><code>SETTIMES</code></a></p></section><section>
<h3><a name="New_Length"></a>New Length</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>newlength</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The size the file is to be truncated to. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> long </td></tr>
<tr class="b">
<td align="left"> Valid Values </td>
<td align="left"> &gt;= 0 </td></tr>
<tr class="a">
<td align="left"> Syntax </td>
<td align="left"> Any long. </td></tr>
</tbody>
</table></section><section>
<h3><a name="Offset"></a>Offset</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>offset</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The starting byte position. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> long </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> 0 </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> &gt;= 0 </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any integer. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Open_and_Read_a_File"><code>OPEN</code></a></p></section><section>
<h3><a name="Old_Snapshot_Name"></a>Old Snapshot Name</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>oldsnapshotname</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The old name of the snapshot to be renamed. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> null </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> An existing snapshot name. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Rename_Snapshot"><code>RENAMESNAPSHOT</code></a></p></section><section>
<h3><a name="Op"></a>Op</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>op</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The name of the operation to be executed. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> enum </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> null (an invalid value) </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any valid operation name. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Operations">Operations</a></p></section><section>
<h3><a name="Overwrite"></a>Overwrite</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>overwrite</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> If a file already exists, should it be overwritten? </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> boolean </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> false </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> true </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> true </td></tr>
</tbody>
</table>
<p>See also: <a href="#Create_and_Write_to_a_File"><code>CREATE</code></a></p></section><section>
<h3><a name="Owner"></a>Owner</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>owner</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The username who is the owner of a file/directory. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; (means keeping it unchanged) </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any valid username. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Set_Owner"><code>SETOWNER</code></a></p></section><section>
<h3><a name="Permission"></a>Permission</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>permission</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The permission of a file/directory. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> Octal </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> 644 for files, 755 for directories </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> 0 - 1777 </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any radix-8 integer (leading zeros may be omitted.) </td></tr>
</tbody>
</table>
<p>See also: <a href="#Create_and_Write_to_a_File"><code>CREATE</code></a>, <a href="#Make_a_Directory"><code>MKDIRS</code></a>, <a href="#Set_Permission"><code>SETPERMISSION</code></a></p></section><section>
<h3><a name="Recursive"></a>Recursive</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>recursive</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> Should the operation act on the content in the subdirectories? </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> boolean </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> false </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> true </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> true </td></tr>
</tbody>
</table>
<p>See also: <a href="#Rename_a_FileDirectory"><code>RENAME</code></a></p></section><section>
<h3><a name="Renewer"></a>Renewer</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>renewer</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The username of the renewer of a delegation token. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; (means the current user) </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any valid username. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Get_Delegation_Token"><code>GETDELEGATIONTOKEN</code></a></p></section><section>
<h3><a name="Replication"></a>Replication</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>replication</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The number of replications of a file. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> short </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> Specified in the configuration. </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> &gt; 0 </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any integer. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Create_and_Write_to_a_File"><code>CREATE</code></a>, <a href="#Set_Replication_Factor"><code>SETREPLICATION</code></a></p></section><section>
<h3><a name="Snapshot_Name"></a>Snapshot Name</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>snapshotname</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The name of the snapshot to be created/deleted. Or the new name for snapshot rename. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> null </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any valid snapshot name. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Create_Snapshot"><code>CREATESNAPSHOT</code></a>, <a href="#Delete_Snapshot"><code>DELETESNAPSHOT</code></a>, <a href="#Rename_Snapshot"><code>RENAMESNAPSHOT</code></a></p></section><section>
<h3><a name="Sources"></a>Sources</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>sources</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> A list of source paths. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> A list of comma separated absolute FileSystem paths without scheme and authority. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Concat_Files"><code>CONCAT</code></a></p></section><section>
<h3><a name="Token"></a>Token</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>token</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The delegation token used for the operation. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> An encoded token. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> See the note in <a href="#Delegation">Delegation</a>. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Renew_Delegation_Token"><code>RENEWDELEGATIONTOKEN</code></a>, <a href="#Cancel_Delegation_Token"><code>CANCELDELEGATIONTOKEN</code></a></p></section><section>
<h3><a name="Token_Kind"></a>Token Kind</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>kind</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The kind of the delegation token requested </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; (Server sets the default kind for the service) </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> A string that represents token kind e.g &#x201c;HDFS_DELEGATION_TOKEN&#x201d; or &#x201c;WEBHDFS delegation&#x201d; </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Get_Delegation_Token"><code>GETDELEGATIONTOKEN</code></a></p></section><section>
<h3><a name="Token_Service"></a>Token Service</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>service</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The name of the service where the token is supposed to be used, e.g. ip:port of the namenode </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> ip:port in string format or logical name of the service </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Get_Delegation_Token"><code>GETDELEGATIONTOKEN</code></a></p></section><section>
<h3><a name="Username"></a>Username</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>user.name</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The authenticated user; see <a href="#Authentication">Authentication</a>. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> null </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any valid username. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Authentication">Authentication</a></p></section><section>
<h3><a name="NoRedirect"></a>NoRedirect</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>noredirect</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> Whether the response should return an HTTP 307 redirect or HTTP 200 OK. See <a href="#Create_and_Write_to_a_File">Create and Write to a File</a>. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> boolean </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> false </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> true </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> true </td></tr>
</tbody>
</table>
<p>See also: <a href="#Create_and_Write_to_a_File">Create and Write to a File</a></p></section><section>
<h3><a name="Namespace_Quota"></a>Namespace Quota</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>namespacequota</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> Limit on the namespace usage, i.e., number of files/directories, under a directory. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> Long.MAX_VALUE </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> &gt; 0. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any integer. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Set_Quota"><code>SETQUOTA</code></a></p></section><section>
<h3><a name="Storage_Space_Quota"></a>Storage Space Quota</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>storagespacequota</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> Limit on storage space usage (in bytes, including replication) under a directory. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> Long.MAX_VALUE </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> &gt; 0. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any integer. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Set_Quota"><code>SETQUOTA</code></a>, <a href="#Set_Quota_By_Storage_Type"><code>SETQUOTABYSTORAGETYPE</code></a></p></section><section>
<h3><a name="Storage_Type"></a>Storage Type</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>storagetype</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> Storage type of the specific storage type quota to be modified. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any valid storage type. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Set_Quota_By_Storage_Type"><code>SETQUOTABYSTORAGETYPE</code></a></p></section><section>
<h3><a name="Storage_Policy"></a>Storage Policy</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>storagepolicy</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The name of the storage policy. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any valid storage policy name; see <a href="#Get_all_Storage_Policies">GETALLSTORAGEPOLICY</a>. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Set_Storage_Policy"><code>SETSTORAGEPOLICY</code></a></p></section><section>
<h3><a name="Erasure_Coding_Policy"></a>Erasure Coding Policy</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>ecpolicy</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The name of the erasure coding policy. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any valid erasure coding policy name; </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Enable_EC_Policy"><code>ENABLEECPOLICY</code></a> or <a href="#Disable_EC_Policy"><code>DISABLEECPOLICY</code></a></p></section><section>
<h3><a name="Start_After"></a>Start After</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Name </th>
<th align="left"> <code>startAfter</code> </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> Description </td>
<td align="left"> The last item returned in the liststatus batch. </td></tr>
<tr class="a">
<td align="left"> Type </td>
<td align="left"> String </td></tr>
<tr class="b">
<td align="left"> Default Value </td>
<td align="left"> &lt;empty&gt; </td></tr>
<tr class="a">
<td align="left"> Valid Values </td>
<td align="left"> Any valid file/directory name. </td></tr>
<tr class="b">
<td align="left"> Syntax </td>
<td align="left"> Any string. </td></tr>
</tbody>
</table>
<p>See also: <a href="#Iteratively_List_a_Directory"><code>LISTSTATUS_BATCH</code></a></p></section></section>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
&#169; 2008-2023
Apache Software Foundation
- <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
Apache Maven, Maven, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
</div>
<div class="clear">
<hr/>
</div>
</div>
</body>
</html>