You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sl...@apache.org on 2023/04/01 10:18:30 UTC
[hadoop] branch trunk updated: HDFS-16951. Add description of GETSERVERDEFAULTS to WebHDFS doc (#5491)
This is an automated email from the ASF dual-hosted git repository.
slfan1989 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 811441d5bc4 HDFS-16951. Add description of GETSERVERDEFAULTS to WebHDFS doc (#5491)
811441d5bc4 is described below
commit 811441d5bc4fc6f788a277558274160bf4c242a9
Author: zhtttylz <hu...@hotmail.com>
AuthorDate: Sat Apr 1 18:18:20 2023 +0800
HDFS-16951. Add description of GETSERVERDEFAULTS to WebHDFS doc (#5491)
Co-authored-by: Zhtttylz <hu...@hotmail.com>
Reviewed-by: Shilun Fan <sl...@apache.org>
Signed-off-by: Shilun Fan <sl...@apache.org>
---
.../hadoop-hdfs/src/site/markdown/WebHDFS.md | 48 ++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/WebHDFS.md b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/WebHDFS.md
index 46b5613fe72..5e5924ad36e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/WebHDFS.md
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/WebHDFS.md
@@ -57,6 +57,7 @@ The HTTP REST API supports the complete [FileSystem](../../api/org/apache/hadoop
* [`GETSNAPSHOTLIST`](#Get_Snapshot_List)
* [`GETFILEBLOCKLOCATIONS`](#Get_File_Block_Locations) (see [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).getFileBlockLocations)
* [`GETECPOLICY`](#Get_EC_Policy) (see [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).getErasureCodingPolicy)
+ * [`GETSERVERDEFAULTS`](#Get_Server_Defaults) (see [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).getServerDefaults)
* HTTP PUT
* [`CREATE`](#Create_and_Write_to_a_File) (see [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).create)
* [`MKDIRS`](#Make_a_Directory) (see [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).mkdirs)
@@ -1109,6 +1110,35 @@ See also: [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).getAclSta
See also: [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).access
+### Get Server Defaults
+
+* Submit a HTTP GET request.
+
+ curl -i "http://<HOST>:<PORT>/webhdfs/v1/<PATH>?op=GETSERVERDEFAULTS"
+
+ The client receives a response with a [`ServerDefaults` JSON object](Server_Defaults_JSON_Schema):
+
+ HTTP/1.1 200 OK
+ Content-Type: application/json
+ Transfer-Encoding: chunked
+
+ {
+ "FsServerDefaults": {
+ "replication": 3,
+ "encryptDataTransfer": "false",
+ "defaultStoragePolicyId":7,
+ "writePacketSize": 65536,
+ "fileBufferSize": 4096,
+ "checksumType": 2,
+ "trashInterval": 10080,
+ "keyProviderUri": "",
+ "blockSize": 134217728,
+ "bytesPerChecksum": 512
+ }
+ }
+
+See also: [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).getServerDefaults
+
Storage Policy Operations
-------------------------
@@ -3042,6 +3072,24 @@ var blockLocationProperties =
}
};
```
+### Server Defaults JSON Schema
+
+```json
+{
+ "FsServerDefaults": {
+ "replication": 3,
+ "encryptDataTransfer": false,
+ "defaultStoragePolicyId": 7,
+ "writePacketSize": 65536,
+ "fileBufferSize": 4096,
+ "checksumType": 2,
+ "trashInterval": 10080,
+ "keyProviderUri": "",
+ "blockSize": 134217728,
+ "bytesPerChecksum": 512
+ }
+}
+```
HTTP Query Parameter Dictionary
-------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org