2023-02-14 00:55:33 -05:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
2023-02-24 14:03:05 -05:00
| Generated by Apache Maven Doxia at 2023-02-24
2023-02-14 00:55:33 -05:00
| Rendered using Apache Maven Stylus Skin 1.5
-->
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< title > Apache Hadoop 3.4.0-SNAPSHOT – 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" / >
2023-02-24 14:03:05 -05:00
< meta name = "Date-Revision-yyyymmdd" content = "20230224" / >
2023-02-14 00:55:33 -05:00
< 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 >
2023-02-24 14:03:05 -05:00
| Last Published: 2023-02-24
2023-02-14 00:55:33 -05:00
| 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 > < Monospaced> < / 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 “ < code > webhdfs://< / code > ” . A WebHDFS FileSystem URI has the following format.< / p >
< div class = "source" >
< div class = "source" >
< pre > webhdfs://< HOST> :< HTTP_PORT> /< PATH>
< / pre > < / div > < / div >
< p > The above WebHDFS URI corresponds to the below HDFS URI.< / p >
< div class = "source" >
< div class = "source" >
< pre > hdfs://< HOST> :< RPC_PORT> /< PATH>
< / pre > < / div > < / div >
< p > In the REST API, the prefix “ < code > /webhdfs/v1< / code > ” 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://< HOST> :< HTTP_PORT> /webhdfs/v1/< PATH> ?op=...
< / pre > < / div > < / div >
< p > < b > Note< / b > that if WebHDFS is secured with SSL, then the scheme should be “ < code > swebhdfs://< / code > ” .< / p >
< div class = "source" >
< div class = "source" >
< pre > swebhdfs://< HOST> :< HTTP_PORT> /< PATH>
< / 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 ‘ HTTP/’ per Kerberos HTTP SPNEGO specification. A value of “ *” 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?[user.name=< USER> & ]op=..."
< / 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 : " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=..."
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?delegation=< TOKEN> & op=..."
< / 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 > < configuration>
< property>
< name> ssl.client.truststore.location< /name>
< value> /work/keystore.jks< /value>
< description> Truststore to be used by clients. Must be specified.< /description>
< /property>
< property>
< name> ssl.client.truststore.password< /name>
< value> changeme< /value>
< description> Optional. Default value is " " .< /description>
< /property>
< property>
< name> ssl.client.truststore.type< /name>
< value> jks< /value>
< description> Optional. Default value is " jks" .< /description>
< /property>
< /configuration>
< / 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 > < property>
< name> hadoop.ssl.client.conf< /name>
< value> ssl-client.xml< /value>
< description>
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 " ssl-client.xml" .
< /description>
< /property>
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?[user.name=< USER> & ]doas=< USER> & op=..."
< / 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 : " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?doas=< USER> & op=..."
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?delegation=< TOKEN> & op=..."
< / 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’ 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’ 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: " " ' 'http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?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 “ true” , enable the retry policy of WebHDFS client. If “ false” , 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), … , 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=CREATE
[& overwrite=< true |false> ][& blocksize=< LONG> ][& replication=< SHORT> ]
[& permission=< OCTAL> ][& buffersize=< INT> ][& noredirect=< true|false> ]"
< / 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://< DATANODE> :< PORT> /webhdfs/v1/< PATH> ?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
{" Location" :" http://< DATANODE> :< PORT> /webhdfs/v1/< PATH> ?op=CREATE..." }
< / 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 < LOCAL_FILE> " http://< DATANODE> :< PORT> /webhdfs/v1/< PATH> ?op=CREATE..."
< / 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://< HOST> :< PORT> /< PATH>
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 “ fs.permissions.umask-mode” 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 “ < code > Expect: 100-continue< / code > ” 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 “ < code > Expect: 100-continue< / code > ” . 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=APPEND[& buffersize=< INT> ][& noredirect=< true|false> ]"
< / 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://< DATANODE> :< PORT> /webhdfs/v1/< PATH> ?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
{" Location" :" http://< DATANODE> :< PORT> /webhdfs/v1/< PATH> ?op=APPEND..." }
< / 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 < LOCAL_FILE> " http://< DATANODE> :< PORT> /webhdfs/v1/< PATH> ?op=APPEND..."
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=CONCAT& sources=< PATHS> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=OPEN
[& offset=< LONG> ][& length=< LONG> ][& buffersize=< INT> ][& noredirect=< true|false> ]"
< / 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://< DATANODE> :< PORT> /webhdfs/v1/< PATH> ?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
{" Location" :" http://< DATANODE> :< PORT> /webhdfs/v1/< PATH> ?op=OPEN..." }
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=MKDIRS[& permission=< OCTAL> ]"
< / 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
{" boolean" : 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 “ fs.permissions.umask-mode” 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=CREATESYMLINK
& destination=< PATH> [& createParent=< true |false> ]"
< / 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 " < HOST> :< PORT> /webhdfs/v1/< PATH> ?op=RENAME& destination=< PATH> "
< / 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
{" boolean" : 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 " http://< host> :< port> /webhdfs/v1/< path> ?op=DELETE
[& recursive=< true |false> ]"
< / 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
{" boolean" : 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=TRUNCATE& newlength=< LONG> "
< / 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
{" boolean" : 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETFILESTATUS"
< / 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
{
" FileStatus" :
{
" accessTime" : 0,
" blockSize" : 0,
" group" : " supergroup" ,
" length" : 0, //in bytes, zero for directories
" modificationTime" : 1320173277227,
" owner" : " webuser" ,
" pathSuffix" : " " ,
" permission" : " 777" ,
" replication" : 0,
" snapshotEnabled" : true
" type" : " DIRECTORY" //enum {FILE, DIRECTORY, SYMLINK}
" ecPolicy" : " RS-6-3-1024k"
}
}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=LISTSTATUS"
< / 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
{
" FileStatuses" :
{
" FileStatus" :
[
{
" accessTime" : 1320171722771,
" blockSize" : 33554432,
" childrenNum" : 0,
" fileId" : 16388,
" group" : " supergroup" ,
" length" : 24930,
" modificationTime" : 1320171722771,
" owner" : " webuser" ,
" pathSuffix" : " a.patch" ,
" permission" : " 644" ,
" replication" : 1,
" storagePolicy" : 0,
" type" : " FILE"
},
{
" accessTime" : 0,
" blockSize" : 0,
" childrenNum" : 0,
" fileId" : 16389,
" group" : " supergroup" ,
" length" : 0,
" modificationTime" : 1320895981256,
" owner" : " username" ,
" pathSuffix" : " bar" ,
" permission" : " 711" ,
" replication" : 0,
" snapshotEnabled" : true
" type" : " DIRECTORY"
},
...
]
}
}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=LISTSTATUS"
< / 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
{
" FileStatuses" :
{
" FileStatus" :
[
{
" accessTime" : 1320171722771,
" blockSize" : 33554432,
" childrenNum" : 0,
" fileId" : 16390,
" group" : " supergroup" ,
" length" : 1366,
" modificationTime" : 1501770633062,
" owner" : " webuser" ,
" pathSuffix" : " " ,
" permission" : " 644" ,
" replication" : 1,
" storagePolicy" : 0,
" type" : " FILE"
}
]
}
}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=LISTSTATUS_BATCH& startAfter=< CHILD> "
< / 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)
{
" DirectoryListing" : {
" partialListing" : {
" FileStatuses" : {
" FileStatus" : [
{
" accessTime" : 0,
" blockSize" : 0,
" childrenNum" : 0,
" fileId" : 16387,
" group" : " supergroup" ,
" length" : 0,
" modificationTime" : 1473305882563,
" owner" : " andrew" ,
" pathSuffix" : " bardir" ,
" permission" : " 755" ,
" replication" : 0,
" storagePolicy" : 0,
" type" : " DIRECTORY"
},
{
" accessTime" : 1473305896945,
" blockSize" : 1024,
" childrenNum" : 0,
" fileId" : 16388,
" group" : " supergroup" ,
" length" : 0,
" modificationTime" : 1473305896965,
" owner" : " andrew" ,
" pathSuffix" : " bazfile" ,
" permission" : " 644" ,
" replication" : 3,
" storagePolicy" : 0,
" type" : " FILE"
}
]
}
},
" remainingEntries" : 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=LISTSTATUS_BATCH& startAfter=bazfile"
< / 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)
{
" DirectoryListing" : {
" partialListing" : {
" FileStatuses" : {
" FileStatus" : [
{
" accessTime" : 0,
" blockSize" : 0,
" childrenNum" : 0,
" fileId" : 16386,
" group" : " supergroup" ,
" length" : 0,
" modificationTime" : 1473305878951,
" owner" : " andrew" ,
" pathSuffix" : " foodir" ,
" permission" : " 755" ,
" replication" : 0,
" storagePolicy" : 0,
" type" : " DIRECTORY"
},
{
" accessTime" : 1473305902864,
" blockSize" : 1024,
" childrenNum" : 0,
" fileId" : 16389,
" group" : " supergroup" ,
" length" : 0,
" modificationTime" : 1473305902878,
" owner" : " andrew" ,
" pathSuffix" : " quxfile" ,
" permission" : " 644" ,
" replication" : 3,
" storagePolicy" : 0,
" type" : " FILE"
}
]
}
},
" remainingEntries" : 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETCONTENTSUMMARY"
< / 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
{
" ContentSummary" :
{
" directoryCount" : 2,
" ecPolicy" : " RS-6-3-1024k" ,
" fileCount" : 1,
" length" : 24930,
" quota" : -1,
" spaceConsumed" : 24930,
" spaceQuota" : -1,
" typeQuota" :
{
" ARCHIVE" :
{
" consumed" : 500,
" quota" : 10000
},
" DISK" :
{
" consumed" : 500,
" quota" : 10000
},
" SSD" :
{
" consumed" : 500,
" quota" : 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETQUOTAUSAGE"
< / 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
{
" QuotaUsage" :
{
" fileAndDirectoryCount" : 1,
" quota" : 100,
" spaceConsumed" : 24930,
" spaceQuota" : 100000,
" typeQuota" :
{
" ARCHIVE" :
{
" consumed" : 500,
" quota" : 10000
},
" DISK" :
{
" consumed" : 500,
" quota" : 10000
},
" SSD" :
{
" consumed" : 500,
" quota" : 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=SETQUOTA
& namespacequota=< QUOTA> [& storagespacequota=< QUOTA> ]"
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=SETQUOTABYSTORAGETYPE
& storagetype=< STORAGETYPE> & storagespacequota=< QUOTA> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETFILECHECKSUM"
< / 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://< DATANODE> :< PORT> /webhdfs/v1/< PATH> ?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
{" Location" :" http://< DATANODE> :< PORT> /webhdfs/v1/< PATH> ?op=GETFILECHECKSUM..." }
< / 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
{
" FileChecksum" :
{
" algorithm" : " MD5-of-1MD5-of-512CRC32" ,
" bytes" : " eadb10de24aa315748930df6e185c0d ..." ,
" length" : 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 " http://< HOST> :< PORT> /webhdfs/v1/?op=GETHOMEDIRECTORY"
< / 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
{" Path" : " /user/username" }
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETTRASHROOT"
< / 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
{" Path" : " /user/username/.Trash" }
< / 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
{" Path" : " /PATH/.Trash/username" }
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=SETPERMISSION
[& permission=< OCTAL> ]"
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=SETOWNER
[& owner=< USER> ][& group=< GROUP> ]"
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=SETREPLICATION
[& replication=< SHORT> ]"
< / 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
{" boolean" : 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=SETTIMES
[& modificationtime=< TIME> ][& accesstime=< TIME> ]"
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=MODIFYACLENTRIES
& aclspec=< ACLSPEC> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=REMOVEACLENTRIES
& aclspec=< ACLSPEC> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=REMOVEDEFAULTACL"
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=REMOVEACL"
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=SETACL
& aclspec=< ACLSPEC> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETACLSTATUS"
< / 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
{
" AclStatus" : {
" entries" : [
" user:carla:rw-" ,
" group::r-x"
],
" group" : " supergroup" ,
" owner" : " hadoop" ,
" permission" :" 775" ,
" stickyBit" : 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=CHECKACCESS
& fsaction=< FSACTION>
< / 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 " http://< HOST> :< PORT> /webhdfs/v1?op=GETALLSTORAGEPOLICY"
< / 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
{
" BlockStoragePolicies" : {
" BlockStoragePolicy" : [
{
" copyOnCreateFile" : false,
" creationFallbacks" : [],
" id" : 2,
" name" : " COLD" ,
" replicationFallbacks" : [],
" storageTypes" : [" ARCHIVE" ]
},
{
" copyOnCreateFile" : false,
" creationFallbacks" : [" DISK" ," ARCHIVE" ],
" id" : 5,
" name" : " WARM" ,
" replicationFallbacks" : [" DISK" ," ARCHIVE" ],
" storageTypes" : [" DISK" ," ARCHIVE" ]
},
{
" copyOnCreateFile" : false,
" creationFallbacks" : [],
" id" : 7,
" name" : " HOT" ,
" replicationFallbacks" : [" ARCHIVE" ],
" storageTypes" : [" DISK" ]
},
{
" copyOnCreateFile" : false,
" creationFallbacks" : [" SSD" ," DISK" ],
" id" : 10," name" : " ONE_SSD" ,
" replicationFallbacks" : [" SSD" ," DISK" ],
" storageTypes" : [" SSD" ," DISK" ]
},
{
" copyOnCreateFile" : false,
" creationFallbacks" : [" DISK" ],
" id" : 12,
" name" : " ALL_SSD" ,
" replicationFallbacks" : [" DISK" ],
" storageTypes" : [" SSD" ]
},
{
" copyOnCreateFile" : false,
" creationFallbacks" : [" DISK" ],
" id" : 14,
" name" : " ALL_NVDIMM" ,
" replicationFallbacks" : [" DISK" ],
" storageTypes" : [" NVDIMM" ]
},
{
" copyOnCreateFile" : true,
" creationFallbacks" : [" DISK" ],
" id" : 15,
" name" : " LAZY_PERSIST" ,
" replicationFallbacks" : [" DISK" ],
" storageTypes" : [" RAM_DISK" ," DISK" ]
}
]
}
}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=SETSTORAGEPOLICY
& storagepolicy=< policy> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=UNSETSTORAGEPOLICY"
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETSTORAGEPOLICY"
< / 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
{
" BlockStoragePolicy" : {
" copyOnCreateFile" : false,
" creationFallbacks" : [],
" id" :7,
" name" :" HOT" ,
" replicationFallbacks" :[" ARCHIVE" ],
" storageTypes" :[" DISK" ]
}
}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=SATISFYSTORAGEPOLICY"
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?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
{
" BlockLocations" :
{
" BlockLocation" :
[
{
" cachedHosts" : [],
" corrupt" : false,
" hosts" : [" host" ],
" length" : 134217728, // length of this block
" names" : [" host:ip" ],
" offset" : 0, // offset of the block in the file
" storageTypes" : [" DISK" ], // enum {RAM_DISK, SSD, DISK, ARCHIVE}
" topologyPaths" : [" /default-rack/hostname:ip" ]
}, {
" cachedHosts" : [],
" corrupt" : false,
" hosts" : [" host" ],
" length" : 62599364,
" names" : [" host:ip" ],
" offset" : 134217728,
" storageTypes" : [" DISK" ],
" topologyPaths" : [" /default-rack/hostname:ip" ]
},
...
]
}
}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=SETXATTR
& xattr.name=< XATTRNAME> & xattr.value=< XATTRVALUE>
& flag=< FLAG> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=REMOVEXATTR
& xattr.name=< XATTRNAME> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETXATTRS
& xattr.name=< XATTRNAME> & encoding=< ENCODING> "
< / 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
{
" XAttrs" : [
{
" name" :" XATTRNAME" ,
" value" :" XATTRVALUE"
}
]
}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETXATTRS
& xattr.name=< XATTRNAME1> & xattr.name=< XATTRNAME2>
& encoding=< ENCODING> "
< / 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
{
" XAttrs" : [
{
" name" :" XATTRNAME1" ,
" value" :" XATTRVALUE1"
},
{
" name" :" XATTRNAME2" ,
" value" :" XATTRVALUE2"
}
]
}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETXATTRS
& encoding=< ENCODING> "
< / 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
{
" XAttrs" : [
{
" name" :" XATTRNAME1" ,
" value" :" XATTRVALUE1"
},
{
" name" :" XATTRNAME2" ,
" value" :" XATTRVALUE2"
},
{
" name" :" XATTRNAME3" ,
" value" :" XATTRVALUE3"
}
]
}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=LISTXATTRS"
< / 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
{
" XAttrNames" :" [\" XATTRNAME1\" ,\" XATTRNAME2\" ,\" XATTRNAME3\" ]"
}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/?op=ENABLEECPOLICY
& ecpolicy=< policy> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/?op=DISABLEECPOLICY
& ecpolicy=< policy> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=SETECPOLICY
& ecpolicy=< policy> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETECPOLICY
"
< / 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 > {
" name" : " RS-10-4-1024k" ,
" schema" :
{
" codecName" : " rs" ,
" numDataUnits" : 10,
" numParityUnits" : 4,
" extraOptions" : {}
}
" cellSize" : 1048576,
" id" :5,
" codecname" :" rs" ,
" numDataUnits" : 10,
" numParityUnits" : 4,
" replicationpolicy" :false,
" systemPolicy" :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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=UNSETECPOLICY
"
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=ALLOWSNAPSHOT"
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=DISALLOWSNAPSHOT"
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=CREATESNAPSHOT[& snapshotname=< SNAPSHOTNAME> ]"
< / 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
{" Path" : " /user/username/.snapshot/s1" }
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=DELETESNAPSHOT& snapshotname=< SNAPSHOTNAME> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=RENAMESNAPSHOT
& oldsnapshotname=< SNAPSHOTNAME> & snapshotname=< SNAPSHOTNAME> "
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETSNAPSHOTDIFF
& oldsnapshotname=< SNAPSHOTNAME> & snapshotname=< SNAPSHOTNAME> "
< / 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
{" SnapshotDiffReport" :{" diffList" :[]," fromSnapshot" :" s3" ," snapshotRoot" :" /foo" ," toSnapshot" :" s4" }}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?op=GETSNAPSHOTDIFFLISTING
& oldsnapshotname=< SNAPSHOTNAME> & snapshotname=< SNAPSHOTNAME> & snapshotdiffstartpath=< STARTPATH> & snapshotdiffindex=< STARTINDEX>
< / pre > < / div > < / div >
< p > If < code > snapshotdiffstartpath< / code > and < code > snapshotdiffindex< / code > are not given, < code > " " < / 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
{" SnapshotDiffReportListing" :{" createList" :[]," deleteList" :[]," isFromEarlier" :true," lastIndex" :-1," lastPath" :" " ," modifyList" :[]}}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/?user.name=< USER> & op=GETSNAPSHOTTABLEDIRECTORYLIST"
< / 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
{
" SnapshottableDirectoryList" :
[
{
" dirStatus" :
{
" accessTime" :0,
" blockSize" :0,
" childrenNum" :0,
" fileId" :16386,
" group" :" hadoop" ,
" length" :0,
" modificationTime" :1520761889225,
" owner" :" random" ,
" pathSuffix" :" bar" ,
" permission" :" 755" ,
" replication" :0,
" storagePolicy" :0,
" type" :" DIRECTORY"
},
" parentFullPath" :" /" ,
" snapshotNumber" :0,
" snapshotQuota" :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 " http://< HOST> :< PORT> /webhdfs/v1/< PATH> ?"
< / 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
{
" SnapshotList" :
[
{
" dirStatus" :
{
" accessTime" :0,
" blockSize" :0,
" childrenNum" :0,
" fileId" :16386,
" group" :" hadoop" ,
" length" :0,
" modificationTime" :1520761889225,
" owner" :" random" ,
" pathSuffix" :" bar" ,
" permission" :" 755" ,
" replication" :0,
" storagePolicy" :0,
" type" :" DIRECTORY"
},
" fullPath" :" /" ,
" snapshotID" :0,
" deletionStatus" :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 " http://< HOST> :< PORT> /webhdfs/v1/?op=GETDELEGATIONTOKEN
[& renewer=< USER> ][& service=< SERVICE> ][& kind=< KIND> ]"
< / 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
{
" Token" :
{
" urlString" : " JQAIaG9y..."
}
}
< / 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 " http://< HOST> :< PORT> /webhdfs/v1/?op=RENEWDELEGATIONTOKEN& token=< TOKEN> "
< / 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
{" long" : 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 " http://< HOST> :< PORT> /webhdfs/v1/?op=CANCELDELEGATIONTOKEN& token=< TOKEN> "
< / 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
{
" RemoteException" :
{
" exception" : " IllegalArgumentException" ,
" javaClassName" : " java.lang.IllegalArgumentException" ,
" message" : " Invalid value for webhdfs parameter \" permission\" : ..."
}
}
< / 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
{
" RemoteException" :
{
" exception" : " SecurityException" ,
" javaClassName" : " java.lang.SecurityException" ,
" message" : " Failed to obtain user group information: ..."
}
}
< / 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
{
" RemoteException" :
{
" exception" : " AccessControlException" ,
" javaClassName" : " org.apache.hadoop.security.AccessControlException" ,
" message" : " Permission denied: ..."
}
}
< / 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
{
" RemoteException" :
{
" exception" : " FileNotFoundException" ,
" javaClassName" : " java.io.FileNotFoundException" ,
" message" : " File does not exist: /foo/a.patch"
}
}
< / 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 > {
" name" : " AclStatus" ,
" properties" :
{
" AclStatus" :
{
" type" : " object" ,
" properties" :
{
" entries" :
{
" type" : " array" ,
" items" :
{
" description" : " ACL entry." ,
" type" : " string"
}
},
" group" :
{
" description" : " The group owner." ,
" type" : " string" ,
" required" : true
},
" owner" :
{
" description" : " The user who is the owner." ,
" type" : " string" ,
" required" : true
},
" stickyBit" :
{
" description" : " True if the sticky bit is on." ,
" type" : " boolean" ,
" required" : true
}
}
}
}
}
< / pre > < / div > < / div >
< / section > < section >
< h3 > < a name = "XAttrs_JSON_Schema" > < / a > XAttrs JSON Schema< / h3 >
< div class = "source" >
< div class = "source" >
< pre > {
" name" : " XAttrs" ,
" properties" :
{
" XAttrs" :
{
" type" : " array" ,
" items" :
{
" type" : " object" ,
" properties" :
{
" name" :
{
" description" : " XAttr name." ,
" type" : " string" ,
" required" : true
},
" value" :
{
" description" : " XAttr value." ,
" type" : " string"
}
}
}
}
}
}
< / pre > < / div > < / div >
< / section > < section >
< h3 > < a name = "XAttrNames_JSON_Schema" > < / a > XAttrNames JSON Schema< / h3 >
< div class = "source" >
< div class = "source" >
< pre > {
" name" : " XAttrNames" ,
" properties" :
{
" XAttrNames" :
{
" description" : " XAttr names." ,
" type" : " string" ,
" required" : true
}
}
}
< / pre > < / div > < / div >
< / section > < section >
< h3 > < a name = "Boolean_JSON_Schema" > < / a > Boolean JSON Schema< / h3 >
< div class = "source" >
< div class = "source" >
< pre > {
" name" : " boolean" ,
" properties" :
{
" boolean" :
{
" description" : " A boolean value" ,
" type" : " boolean" ,
" required" : 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 > {
" name" : " ContentSummary" ,
" properties" :
{
" ContentSummary" :
{
" type" : " object" ,
" properties" :
{
" directoryCount" :
{
" description" : " The number of directories." ,
" type" : " integer" ,
" required" : true
},
" fileCount" :
{
" description" : " The number of files." ,
" type" : " integer" ,
" required" : true
},
" length" :
{
" description" : " The number of bytes used by the content." ,
" type" : " integer" ,
" required" : true
},
" quota" :
{
" description" : " The namespace quota of this directory." ,
" type" : " integer" ,
" required" : true
},
" spaceConsumed" :
{
" description" : " The disk space consumed by the content." ,
" type" : " integer" ,
" required" : true
},
" spaceQuota" :
{
" description" : " The disk space quota." ,
" type" : " integer" ,
" required" : true
},
" typeQuota" :
{
" type" : " object" ,
" properties" :
{
" ARCHIVE" :
{
" type" : " object" ,
" properties" :
{
" consumed" :
{
" description" : " The storage type space consumed." ,
" type" : " integer" ,
" required" : true
},
" quota" :
{
" description" : " The storage type quota." ,
" type" : " integer" ,
" required" : true
}
}
},
" DISK" :
{
" type" : " object" ,
" properties" :
{
" consumed" :
{
" description" : " The storage type space consumed." ,
" type" : " integer" ,
" required" : true
},
" quota" :
{
" description" : " The storage type quota." ,
" type" : " integer" ,
" required" : true
}
}
},
" SSD" :
{
" type" : " object" ,
" properties" :
{
" consumed" :
{
" description" : " The storage type space consumed." ,
" type" : " integer" ,
" required" : true
},
" quota" :
{
" description" : " The storage type quota." ,
" type" : " integer" ,
" required" : 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 > {
" name" : " QuotaUsage" ,
" properties" :
{
" QuotaUsage" :
{
" type" : " object" ,
" properties" :
{
" fileAndDirectoryCount" :
{
" description" : " The number of files and directories." ,
" type" : " integer" ,
" required" : true
},
" quota" :
{
" description" : " The namespace quota of this directory." ,
" type" : " integer" ,
" required" : true
},
" spaceConsumed" :
{
" description" : " The disk space consumed by the content." ,
" type" : " integer" ,
" required" : true
},
" spaceQuota" :
{
" description" : " The disk space quota." ,
" type" : " integer" ,
" required" : true
},
" typeQuota" :
{
" type" : " object" ,
" properties" :
{
" ARCHIVE" :
{
" type" : " object" ,
" properties" :
{
" consumed" :
{
" description" : " The storage type space consumed." ,
" type" : " integer" ,
" required" : true
},
" quota" :
{
" description" : " The storage type quota." ,
" type" : " integer" ,
" required" : true
}
}
},
" DISK" :
{
" type" : " object" ,
" properties" :
{
" consumed" :
{
" description" : " The storage type space consumed." ,
" type" : " integer" ,
" required" : true
},
" quota" :
{
" description" : " The storage type quota." ,
" type" : " integer" ,
" required" : true
}
}
},
" SSD" :
{
" type" : " object" ,
" properties" :
{
" consumed" :
{
" description" : " The storage type space consumed." ,
" type" : " integer" ,
" required" : true
},
" quota" :
{
" description" : " The storage type quota." ,
" type" : " integer" ,
" required" : 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 > {
" name" : " FileChecksum" ,
" properties" :
{
" FileChecksum" :
{
" type" : " object" ,
" properties" :
{
" algorithm" :
{
" description" : " The name of the checksum algorithm." ,
" type" : " string" ,
" required" : true
},
" bytes" :
{
" description" : " The byte sequence of the checksum in hexadecimal." ,
" type" : " string" ,
" required" : true
},
" length" :
{
" description" : " The length of the bytes (not the length of the string)." ,
" type" : " integer" ,
" required" : true
}
}
}
}
}
< / pre > < / div > < / div >
< / section > < section >
< h3 > < a name = "FileStatus_JSON_Schema" > < / a > FileStatus JSON Schema< / h3 >
< div class = "source" >
< div class = "source" >
< pre > {
" name" : " FileStatus" ,
" properties" :
{
" FileStatus" : 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 =
{
" type" : " object" ,
" properties" :
{
" accessTime" :
{
" description" : " The access time." ,
" type" : " integer" ,
" required" : true
},
" blockSize" :
{
" description" : " The block size of a file." ,
" type" : " integer" ,
" required" : true
},
" group" :
{
" description" : " The group owner." ,
" type" : " string" ,
" required" : true
},
" length" :
{
" description" : " The number of bytes in a file." ,
" type" : " integer" ,
" required" : true
},
" modificationTime" :
{
" description" : " The modification time." ,
" type" : " integer" ,
" required" : true
},
" owner" :
{
" description" : " The user who is the owner." ,
" type" : " string" ,
" required" : true
},
" pathSuffix" :
{
" description" : " The path suffix." ,
" type" : " string" ,
" required" : true
},
" permission" :
{
" description" : " The permission represented as a octal string." ,
" type" : " string" ,
" required" : true
},
" replication" :
{
" description" : " The number of replication of a file." ,
" type" : " integer" ,
" required" : true
},
" symlink" : //an optional property
{
" description" : " The link target of a symlink." ,
" type" : " string"
},
" type" :
{
" description" : " The type of the path object." ,
" enum" : [" FILE" , " DIRECTORY" , " SYMLINK" ],
" required" : true
},
" aclBit" :
{
" description" : " Has ACLs set or not." ,
" type" : " boolean" ,
},
" encBit" :
{
" description" : " Is Encrypted or not." ,
" type" : " boolean" ,
},
" ecBit" :
{
" description" : " Is ErasureCoded or not." ,
" type" : " boolean" ,
},
" ecPolicy" :
{
" description" : " The namenode of ErasureCodePolicy." ,
" type" : " String" ,
}
}
};
< / 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 > {
" name" : " FileStatuses" ,
" properties" :
{
" FileStatuses" :
{
" type" : " object" ,
" properties" :
{
" FileStatus" :
{
" description" : " An array of FileStatus" ,
" type" : " array" ,
" items" : 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 > {
" name" : " DirectoryListing" ,
" properties" :
{
" DirectoryListing" :
{
" type" : " object" ,
" properties" :
{
" partialListing" :
{
" description" : " A partial directory listing" ,
" type" : " object" , // A FileStatuses object
" required" : true
},
" remainingEntries" :
{
" description" : " Number of remaining entries" ,
" type" : " integer" ,
" required" : 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 > {
" name" : " long" ,
" properties" :
{
" long" :
{
" description" : " A long integer value" ,
" type" : " integer" ,
" required" : 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 > {
" name" : " Path" ,
" properties" :
{
" Path" :
{
" description" : " The string representation a Path." ,
" type" : " string" ,
" required" : 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 > {
" name" : " RemoteException" ,
" properties" :
{
" RemoteException" :
{
" type" : " object" ,
" properties" :
{
" exception" :
{
" description" : " Name of the exception" ,
" type" : " string" ,
" required" : true
},
" message" :
{
" description" : " Exception message" ,
" type" : " string" ,
" required" : true
},
" javaClassName" : //an optional property
{
" description" : " Java class name of the exception" ,
" type" : " string"
}
}
}
}
}
< / 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 > {
" name" : " Token" ,
" properties" :
{
" Token" : 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 =
{
" type" : " object" ,
" properties" :
{
" urlString" :
{
" description" : " A delegation token encoded as a URL safe string." ,
" type" : " string" ,
" required" : 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 > {
" name" : " BlockStoragePolicy" ,
" properties" :
{
" BlockStoragePolicy" : 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 =
{
" type" : " object" ,
" properties" :
{
" id" :
{
" description" : " Policy ID." ,
" type" : " integer" ,
" required" : true
},
" name" :
{
" description" : " Policy name." ,
" type" : " string" ,
" required" : true
},
" storageTypes" :
{
" description" : " An array of storage types for block placement." ,
" type" : " array" ,
" required" : true
" items" :
{
" type" : " string"
}
},
" replicationFallbacks" :
{
" description" : " An array of fallback storage types for replication." ,
" type" : " array" ,
" required" : true
" items" :
{
" type" : " string"
}
},
" creationFallbacks" :
{
" description" : " An array of fallback storage types for file creation." ,
" type" : " array" ,
" required" : true
" items" :
{
" type" : " string"
}
},
" copyOnCreateFile" :
{
" description" : " If set then the policy cannot be changed after file creation." ,
" type" : " boolean" ,
" required" : 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 > {
" name" : " RS-10-4-1024k" ,
schema {
" codecName" : " rs" ,
" numDataUnits" : 10,
" numParityUnits" : 4,
" extraOptions" : {}
}
" cellSize" : 1048576,
" id" :5,
" codecname" :" rs" ,
" numDataUnits" : 10,
" numParityUnits" : 4,
" replicationpolicy" :false,
" systemPolicy" :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 > {
" name" : " BlockStoragePolicies" ,
" properties" :
{
" BlockStoragePolicies" :
{
" type" : " object" ,
" properties" :
{
" BlockStoragePolicy" :
{
" description" : " An array of BlockStoragePolicy" ,
" type" : " array" ,
" items" : 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 > {
" name" : " SnapshotDiffReport" ,
" type" : " object" ,
" properties" :
{
" SnapshotDiffReport" :
{
" type" : " object" ,
" properties" :
{
" diffList" :
{
" description" : " An array of DiffReportEntry" ,
" type" : " array" ,
" items" : diffReportEntries,
" required" : true
},
" fromSnapshot" :
{
" description" : " Source snapshot" ,
" type" : " string" ,
" required" : true
},
" snapshotRoot" :
{
" description" : " String representation of snapshot root path" ,
" type" : " string" ,
" required" : true
},
" toSnapshot" :
{
" description" : " Destination snapshot" ,
" type" : " string" ,
" required" : 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 =
{
" type" : " object" ,
" properties" :
{
" sourcePath" :
{
" description" : " Source path name relative to snapshot root" ,
" type" : " string" ,
" required" : true
},
" targetPath" :
{
" description" : " Target path relative to snapshot root used for renames" ,
" type" : " string" ,
" required" : true
},
" type" :
{
" description" : " Type of diff report entry" ,
" enum" : [" CREATE" , " MODIFY" , " DELETE" , " RENAME" ],
" required" : 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 > {
" name" : " SnapshotDiffReportListing" ,
" type" : " object" ,
" properties" :
{
" SnapshotDiffReportListing" :
{
" type" : " object" ,
" properties" :
{
" isFromEarlier" :
{
" description" : " the diff is calculated from older to newer snapshot or not" ,
" type" : " boolean" ,
" required" : true
},
" lastIndex" :
{
" description" : " the last index of listing iteration" ,
" type" : " integer" ,
" required" : true
},
" lastPath" :
{
" description" : " String representation of the last path of the listing iteration" ,
" type" : " string" ,
" required" : true
},
" modifyList" :
{
" description" : " An array of DiffReportListingEntry" ,
" type" : " array" ,
" items" : diffReportListingEntries,
" required" : true
},
" createList" :
{
" description" : " An array of DiffReportListingEntry" ,
" type" : " array" ,
" items" : diffReportListingEntries,
" required" : true
},
" deleteList" :
{
" description" : " An array of DiffReportListingEntry" ,
" type" : " array" ,
" items" : diffReportListingEntries,
" required" : 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 =
{
" type" : " object" ,
" properties" :
{
" dirId" :
{
" description" : " inode id of the directory" ,
" type" : " integer" ,
" required" : true
},
" fileId" :
{
" description" : " inode id of the file" ,
" type" : " integer" ,
" required" : true
},
" isRereference" :
{
" description" : " this is reference or not" ,
" type" : " boolean" ,
" required" : true
},
" sourcePath" :
{
" description" : " string representation of path where changes have happened" ,
" type" : " string" ,
" required" : true
},
" targetPath" :
{
" description" : " string representation of target path of rename op" ,
" type" : " string" ,
" required" : 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 > {
" name" : " SnapshottableDirectoryList" ,
" type" : " object" ,
" properties" :
{
" SnapshottableDirectoryList" :
{
" description" : " An array of SnapshottableDirectoryStatus" ,
" type" : " array" ,
" items" : snapshottableDirectoryStatus,
" required" : 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 =
{
" type" : " object" ,
" properties" :
{
" dirStatus" : fileStatusProperties,
" parentFullPath" :
{
" description" : " Full path of the parent of snapshottable directory" ,
" type" : " string" ,
" required" : true
},
" snapshotNumber" :
{
" description" : " Number of snapshots created on the snapshottable directory" ,
" type" : " integer" ,
" required" : true
},
" snapshotQuota" :
{
" description" : " Total number of snapshots allowed on the snapshottable directory" ,
" type" : " integer" ,
" required" : 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 > {
" name" : " SnapshotList" ,
" type" : " object" ,
" properties" :
{
" SnapshotList" :
{
" description" : " An array of SnapshotStatus" ,
" type" : " array" ,
" items" : snapshotStatus,
" required" : 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 =
{
" type" : " object" ,
" properties" :
{
" dirStatus" : fileStatusProperties,
" fullPath" :
{
" description" : " Full path of the parent of the snapshot" ,
" type" : " string" ,
" required" : true
},
" snapshotID" :
{
" description" : " snapshot ID for the snapshot" ,
" type" : " integer" ,
" required" : true
},
" deletionStatus" :
{
" description" : " Status showing whether the snapshot is active or in deleted state" ,
" type" : " string" ,
" required" : 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 > {
" name" : " BlockLocations" ,
" properties" :
{
" BlockLocations" :
{
" type" : " object" ,
" properties" :
{
" BlockLocation" :
{
" description" : " An array of BlockLocation" ,
" type" : " array" ,
" items" : 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 > {
" name" : " BlockLocation" ,
" properties" :
{
" BlockLocation" : 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 =
{
" type" : " object" ,
" properties" :
{
" cachedHosts" :
{
" description" : " Datanode hostnames with a cached replica" ,
" type" : " array" ,
" required" : " true" ,
" items" :
{
" description" : " A datanode hostname" ,
" type" : " string"
}
},
" corrupt" :
{
" description" : " True if the block is corrupted" ,
" type" : " boolean" ,
" required" : " true"
},
" hosts" :
{
" description" : " Datanode hostnames store the block" ,
" type" : " array" ,
" required" : " true" ,
" items" :
{
" description" : " A datanode hostname" ,
" type" : " string"
}
},
" length" :
{
" description" : " Length of the block" ,
" type" : " integer" ,
" required" : " true"
},
" names" :
{
" description" : " Datanode IP:xferPort for accessing the block" ,
" type" : " array" ,
" required" : " true" ,
" items" :
{
" description" : " DatanodeIP:xferPort" ,
" type" : " string"
}
},
" offset" :
{
" description" : " Offset of the block in the file" ,
" type" : " integer" ,
" required" : " true"
},
" storageTypes" :
{
" description" : " Storage type of each replica" ,
" type" : " array" ,
" required" : " true" ,
" items" :
{
" description" : " Storage type" ,
" enum" : [" RAM_DISK" , " SSD" , " DISK" , " ARCHIVE" ]
}
},
" topologyPaths" :
{
" description" : " Datanode addresses in network topology" ,
" type" : " array" ,
" required" : " true" ,
" items" :
{
" description" : " /rack/host:ip" ,
" type" : " string"
}
}
}
};
< / 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" > < empty> < / 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" > < empty> < / 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" > < empty> < / 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" > < empty> < / 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" > < empty> < / 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" > > 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" > > 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" > < empty> < / 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" > < empty> < / 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" > < empty> (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   " [r-][w-][x-]  " < / td > < / tr >
< tr class = "b" >
< td align = "left" > Syntax < / td >
< td align = "left" >   " [r-][w-][x-]  " < / 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" > < empty> (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" > > = 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" > > = 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" > > = 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" > < empty> (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" > < empty> (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" > > 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" > < empty> < / 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" > < empty> < / 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" > < empty> (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 “ HDFS_DELEGATION_TOKEN” or “ WEBHDFS delegation” < / 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" > < empty> < / 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" > > 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" > > 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" > < empty> < / 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" > < empty> < / 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" > < empty> < / 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" > < empty> < / 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" >
© 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 >