From 8e3dc44764c289f5e0a176b2f7e063a0c95e5faa Mon Sep 17 00:00:00 2001 From: begoldsm Date: Thu, 16 Feb 2017 11:32:38 -0800 Subject: [PATCH 1/2] Addressing WebHDFS team feedback about APIs These are changes that are necessary in order to properly match the Front end contract, since our swagger specs are designed only for client construction, it is an ongoing process to bring them in line with the current state of the service. missed explicit required false. Filesystem updates Add leaseId Add FileSessionId Switch everything to not use MS* apis except for MSConcat. Address CR Feedback add optional "permission" to the CREATE calls Explicitly call out that APPEND is for serial appends. Address CR comments Include tooId for GET operations (files and acls) Add aclBit as a property that is returned in fileStatus fixed a copy/paste comment. --- .../2016-11-01/swagger/filesystem.json | 96 ++++++++++++++++--- 1 file changed, 85 insertions(+), 11 deletions(-) diff --git a/arm-datalake-store/filesystem/2016-11-01/swagger/filesystem.json b/arm-datalake-store/filesystem/2016-11-01/swagger/filesystem.json index 695aaa28c0b2..b0aa2e8750c1 100644 --- a/arm-datalake-store/filesystem/2016-11-01/swagger/filesystem.json +++ b/arm-datalake-store/filesystem/2016-11-01/swagger/filesystem.json @@ -215,7 +215,7 @@ { "name": "fsaction", "in": "query", - "required": false, + "required": true, "type": "string", "description": "File system operation read/write/execute in string form, matching regex pattern '[rwx-]{3}'" }, @@ -260,6 +260,14 @@ "type": "string", "description": "The Data Lake Store path (starting with '/') of the directory to create." }, + { + "name": "permission", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "Optional octal permission with which the directory should be created." + }, { "name": "op", "in": "query", @@ -315,7 +323,7 @@ "type": "string" }, "collectionFormat": "csv", - "description": "A list of comma seperated Data Lake Store paths (starting with '/') of the files to concatenate, in the order in which they should be concatenated." + "description": "A list of comma separated Data Lake Store paths (starting with '/') of the files to concatenate, in the order in which they should be concatenated." }, { "name": "op", @@ -445,6 +453,13 @@ "type": "string", "description": "Gets or sets the item or lexographical index before which to begin returning results. For example, a file list of 'a','b','d' and listBefore='d' will return 'a','b', and a listBefore='c' will also return 'a','b'. Optional." }, + { + "name": "tooId", + "in": "query", + "required": false, + "type": "boolean", + "description": "An optional switch to return friendly names in place of owner and group. tooid=false returns friendly names instead of the AAD Object ID. Default value is true, returning AAD object IDs." + }, { "name": "op", "in": "query", @@ -452,7 +467,7 @@ "type": "string", "description": "The constant value for the operation.", "enum": [ - "MSLISTSTATUS" + "LISTSTATUS" ] }, { @@ -537,6 +552,13 @@ "type": "string", "description": "The Data Lake Store path (starting with '/') of the file or directory for which to retrieve the status." }, + { + "name": "tooId", + "in": "query", + "required": false, + "type": "boolean", + "description": "An optional switch to return friendly names in place of owner and group. tooid=false returns friendly names instead of the AAD Object ID. Default value is true, returning AAD object IDs." + }, { "name": "op", "in": "query", @@ -544,7 +566,7 @@ "type": "string", "description": "The constant value for the operation.", "enum": [ - "MSGETFILESTATUS" + "GETFILESTATUS" ] }, { @@ -577,7 +599,7 @@ "application/octet-stream" ], "operationId": "FileSystem_Append", - "description": "Appends to the specified file. NOTE: The target must not contain data added by ConcurrentAppend. ConcurrentAppend and Append cannot be used interchangeably; once a target file has been modified using either of these append options, the other append option cannot be used on the target file.", + "description": "Used for serial appends to the specified file. NOTE: The target must not contain data added by ConcurrentAppend. ConcurrentAppend and Append cannot be used interchangeably; once a target file has been modified using either of these append options, the other append option cannot be used on the target file.", "parameters": [ { "name": "directFilePath", @@ -621,6 +643,22 @@ "modelAsString": false } }, + { + "name": "leaseId", + "in": "query", + "required": false, + "type": "string", + "format": "uuid", + "description": "Optional unique GUID per file to ensure single writer semantics, meaning that only clients that append to the file with the same leaseId will be allowed to do so." + }, + { + "name": "fileSessionId", + "in": "query", + "required": false, + "type": "string", + "format": "uuid", + "description": "Optional unique GUID per file indicating all the appends with the same fileSessionId are from the same client and same session. This will give a performance benefit when syncFlag is DATA or METADATA." + }, { "name": "op", "in": "query", @@ -635,7 +673,7 @@ "name": "append", "in": "query", "required": true, - "description": "The constant value for the operation.", + "description": "Flag to skip redirection. When append=false or not specified, the request is redirected. Submit another HTTP PUT request using the URL in the Location header with the file data to be written. When append=true, this redirection is skipped.", "type": "string", "enum": [ "true" @@ -698,7 +736,7 @@ "required": false, "type": "string", "default": "CLOSE", - "description": "Optionally indicates what to do after completion of the append. DATA indicates more data is coming so no sync takes place, METADATA indicates a sync should be done to refresh metadata of the file only. CLOSE indicates that both the stream and metadata should be refreshed upon append completion.", + "description": "Optionally indicates what to do after completion of the append. DATA indicates more data is coming so no sync takes place, METADATA indicates a sync should be done to refresh metadata of the file only. CLOSE indicates that both the stream and metadata should be refreshed upon create completion.", "enum": [ "DATA", "METADATA", @@ -709,6 +747,21 @@ "modelAsString": false } }, + { + "name": "leaseId", + "in": "query", + "required": false, + "type": "string", + "format": "uuid", + "description": "Optional unique GUID per file to ensure single writer semantics, meaning that only clients that append to the file with the same leaseId will be allowed to do so." + }, + { + "permission" + "type": "integer", + "in": "query", + "format": "int32", + "description": "The octal representation of the unnamed user, mask and other permissions that should be set for the file when created. If not specified, it inherits these from the container." + }, { "name": "op", "in": "query", @@ -724,7 +777,7 @@ "in": "query", "required": true, "type": "string", - "description": "The constant value for the operation.", + "description": "Flag to skip redirection. When write=false or not specified, the request is redirected. Submit another HTTP PUT request using the URL in the Location header with the file data to be written. When write=true, this redirection is skipped.", "enum": [ "true" ] @@ -779,6 +832,14 @@ "format": "int64", "description": "The byte offset to start reading data from." }, + { + "name": "fileSessionId", + "in": "query", + "required": false, + "type": "string", + "format": "uuid", + "description": "Optional unique GUID per file indicating all the reads with the same fileSessionId are from the same client and same session. This will give a performance benefit." + }, { "name": "op", "in": "query", @@ -793,7 +854,7 @@ "name": "read", "in": "query", "required": true, - "description": "The constant value for the operation.", + "description": "Flag to skip redirection. When read=false or not specified, the request is redirected. Submit another HTTP PUT request using the URL in the Location header with the file data to be read. When read=true, this redirection is skipped.", "type": "string", "enum": [ "true" @@ -1069,6 +1130,13 @@ "type": "string", "description": "The Data Lake Store path (starting with '/') of the file or directory for which to get the ACL." }, + { + "name": "tooId", + "in": "query", + "required": false, + "type": "boolean", + "description": "An optional switch to return friendly names in place of object ID for ACL entries. tooid=false returns friendly names instead of the AAD Object ID. Default value is true, returning AAD object IDs." + }, { "name": "op", "in": "query", @@ -1076,7 +1144,7 @@ "type": "string", "description": "The constant value for the operation.", "enum": [ - "MSGETACLSTATUS" + "GETACLSTATUS" ] }, { @@ -1424,7 +1492,8 @@ "format": "int64", "description": "the number of children in the directory." }, - "expirationTime": { + "msExpirationTime": { + "x-ms-client-name": "expirationTime", "type": "integer", "readOnly": true, "format": "int64", @@ -1474,6 +1543,11 @@ "name": "FileType", "modelAsString": false } + }, + "aclBit": { + "type": "boolean", + "readOnly": true, + "description": "flag to indicate if extended acls are enabled " } }, "description": "Data Lake Store file or directory information." From 56f38a02c49f8b926643fb7034123f3ce0a26fa4 Mon Sep 17 00:00:00 2001 From: begoldsm Date: Tue, 14 Mar 2017 12:02:15 -0700 Subject: [PATCH 2/2] fix syntax error. --- .../filesystem/2016-11-01/swagger/filesystem.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm-datalake-store/filesystem/2016-11-01/swagger/filesystem.json b/arm-datalake-store/filesystem/2016-11-01/swagger/filesystem.json index b0aa2e8750c1..a6884320dc92 100644 --- a/arm-datalake-store/filesystem/2016-11-01/swagger/filesystem.json +++ b/arm-datalake-store/filesystem/2016-11-01/swagger/filesystem.json @@ -756,7 +756,7 @@ "description": "Optional unique GUID per file to ensure single writer semantics, meaning that only clients that append to the file with the same leaseId will be allowed to do so." }, { - "permission" + "name": "permission", "type": "integer", "in": "query", "format": "int32",