snvijaya commented on a change in pull request #2509:
URL: https://github.com/apache/hadoop/pull/2509#discussion_r540697708
##########
File path:
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java
##########
@@ -395,38 +396,58 @@ public AbfsRestOperation renameIdempotencyCheckOp(
return op;
}
- public AbfsRestOperation append(final String path, final long position,
final byte[] buffer, final int offset,
- final int length, final String
cachedSasToken, final boolean isAppendBlob) throws AzureBlobFileSystemException
{
+ public AbfsRestOperation append(final String path, final byte[] buffer,
+ AppendRequestParameters reqParams, final String cachedSasToken)
+ throws AzureBlobFileSystemException {
final List<AbfsHttpHeader> requestHeaders = createDefaultHeaders();
// JDK7 does not support PATCH, so to workaround the issue we will use
// PUT and specify the real method in the X-Http-Method-Override header.
requestHeaders.add(new AbfsHttpHeader(X_HTTP_METHOD_OVERRIDE,
- HTTP_METHOD_PATCH));
+ HTTP_METHOD_PATCH));
final AbfsUriQueryBuilder abfsUriQueryBuilder =
createDefaultUriQueryBuilder();
abfsUriQueryBuilder.addQuery(QUERY_PARAM_ACTION, APPEND_ACTION);
- abfsUriQueryBuilder.addQuery(QUERY_PARAM_POSITION,
Long.toString(position));
+ abfsUriQueryBuilder.addQuery(QUERY_PARAM_POSITION,
Long.toString(reqParams.getPosition()));
+
+ if ((reqParams.getMode() == AppendRequestParameters.Mode.FLUSH_MODE) || (
Review comment:
On either condition being true, flush queryParam will be true. and for
close alone close queryParam will be true.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]