|
@@ -53,6 +53,7 @@ The HTTP REST API supports the complete [FileSystem](../../api/org/apache/hadoop
|
|
|
* [`GETSNAPSHOTDIFF`](#Get_Snapshot_Diff)
|
|
|
* [`GETSNAPSHOTTABLEDIRECTORYLIST`](#Get_Snapshottable_Directory_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)
|
|
|
* 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)
|
|
@@ -73,11 +74,13 @@ The HTTP REST API supports the complete [FileSystem](../../api/org/apache/hadoop
|
|
|
* [`SETSTORAGEPOLICY`](#Set_Storage_Policy) (see [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).setStoragePolicy)
|
|
|
* [`ENABLEECPOLICY`](#Enable_EC_Policy) (see [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).enablePolicy)
|
|
|
* [`DISABLEECPOLICY`](#Disable_EC_Policy) (see [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).disablePolicy)
|
|
|
+ * [`SETECPOLICY`](#Set_EC_Policy) (see [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).setErasureCodingPolicy)
|
|
|
* HTTP POST
|
|
|
* [`APPEND`](#Append_to_a_File) (see [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).append)
|
|
|
* [`CONCAT`](#Concat_Files) (see [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).concat)
|
|
|
* [`TRUNCATE`](#Truncate_a_File) (see [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).truncate)
|
|
|
* [`UNSETSTORAGEPOLICY`](#Unset_Storage_Policy) (see [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).unsetStoragePolicy)
|
|
|
+ * [`UNSETECPOLICY`](#Unset_EC_Policy) (see [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).unsetErasureCodingPolicy)
|
|
|
* HTTP DELETE
|
|
|
* [`DELETE`](#Delete_a_FileDirectory) (see [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).delete)
|
|
|
* [`DELETESNAPSHOT`](#Delete_Snapshot) (see [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).deleteSnapshot)
|
|
@@ -1285,7 +1288,7 @@ Erasure Coding Operations
|
|
|
HTTP/1.1 200 OK
|
|
|
Content-Length: 0
|
|
|
|
|
|
-See also: [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).enablePolicy)
|
|
|
+See also: [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).enablePolicy
|
|
|
|
|
|
### Disable EC Policy
|
|
|
|
|
@@ -1299,7 +1302,68 @@ See also: [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).
|
|
|
HTTP/1.1 200 OK
|
|
|
Content-Length: 0
|
|
|
|
|
|
-See also: [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).disablePolicy)
|
|
|
+See also: [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).disablePolicy
|
|
|
+
|
|
|
+### Set EC Policy
|
|
|
+
|
|
|
+* Submit a HTTP PUT request.
|
|
|
+
|
|
|
+ curl -i -X PUT "http://<HOST>:<PORT>/webhdfs/v1/<PATH>?op=SETECPOLICY
|
|
|
+ &ecpolicy=<policy>"
|
|
|
+
|
|
|
+ The client receives a response with zero content length:
|
|
|
+
|
|
|
+ HTTP/1.1 200 OK
|
|
|
+ Content-Length: 0
|
|
|
+
|
|
|
+See also: [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).setErasureCodingPolicy
|
|
|
+
|
|
|
+### Get EC Policy
|
|
|
+
|
|
|
+* Submit a HTTP GET request.
|
|
|
+
|
|
|
+ curl -i -X GET "http://<HOST>:<PORT>/webhdfs/v1/<PATH>?op=GETECPOLICY
|
|
|
+ "
|
|
|
+
|
|
|
+ The client receives a response with a [`ECPolicy` JSON object](#ECPolicy_JSON_Schema):
|
|
|
+
|
|
|
+
|
|
|
+ {
|
|
|
+ "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
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+See also: [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).getErasureCodingPolicy
|
|
|
+
|
|
|
+### Unset EC Policy
|
|
|
+
|
|
|
+* Submit a HTTP POST request.
|
|
|
+
|
|
|
+ curl -i -X POST "http://<HOST>:<PORT>/webhdfs/v1/<PATH>?op=UNSETECPOLICY
|
|
|
+ "
|
|
|
+
|
|
|
+ The client receives a response with zero content length:
|
|
|
+
|
|
|
+ HTTP/1.1 200 OK
|
|
|
+ Content-Length: 0
|
|
|
+
|
|
|
+See also: [HDFSErasureCoding](./HDFSErasureCoding.html#Administrative_commands).unsetErasureCodingPolicy
|
|
|
|
|
|
Snapshot Operations
|
|
|
-------------------
|
|
@@ -2173,6 +2237,26 @@ var blockStoragePolicyProperties =
|
|
|
}
|
|
|
};
|
|
|
```
|
|
|
+### ECPolicy JSON Schema
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "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
|
|
|
+}
|
|
|
+```
|
|
|
|
|
|
### BlockStoragePolicies JSON Schema
|
|
|
|
|
@@ -2244,6 +2328,7 @@ A `BlockStoragePolicies` JSON object represents an array of `BlockStoragePolicy`
|
|
|
}
|
|
|
```
|
|
|
|
|
|
+
|
|
|
#### DiffReport Entries
|
|
|
|
|
|
JavaScript syntax is used to define `diffReportEntries` so that it can be referred in `SnapshotDiffReport` JSON schema.
|