Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
e2ffb8c
ABFS: Added changes for expect hundred continue header with append re…
anmolasrani123 Feb 28, 2022
d110408
ABFS: Added changes for expect hundred continue
anmolasrani123 Mar 2, 2022
a29faa8
ABFS: Added changes for expect hundred continue
anmolasrani123 Mar 2, 2022
dacfde0
ABFS: Added changes for expect hundred continue
anmolasrani123 Mar 2, 2022
c14f458
Added retry mechanism for certain HTTP errors
anmolasrani123 Mar 4, 2022
7e40f07
Added retry mechanism for certain HTTP errors
anmolasrani123 Mar 4, 2022
ef67598
Merge branch 'apache:trunk' into HADOOP-18146
anmolanmol1234 Mar 4, 2022
93a77a7
Added retry mechanism for certain HTTP errors
anmolasrani123 Mar 30, 2022
9b43316
ABFS: Added changes for expect hundred continue header with append re…
anmolasrani123 Feb 28, 2022
899b40b
ABFS: Added changes for expect hundred continue
anmolasrani123 Mar 2, 2022
2af317d
ABFS: Added changes for expect hundred continue
anmolasrani123 Mar 2, 2022
cc9fcdb
ABFS: Added changes for expect hundred continue
anmolasrani123 Mar 2, 2022
9fc9c99
Added retry mechanism for certain HTTP errors
anmolasrani123 Mar 4, 2022
56eda26
Added retry mechanism for certain HTTP errors
anmolasrani123 Mar 4, 2022
091f1d4
Added retry mechanism for certain HTTP errors
anmolasrani123 Mar 30, 2022
3709619
Fix trunk conflict
anmolasrani123 May 12, 2022
fe33f93
Merge branch 'HADOOP-18146' of https://github.com/anmolanmol1234/hado…
anmolasrani123 Jul 20, 2022
94397c7
Added config details in md file
anmolasrani123 Jul 20, 2022
9c8f7d0
Merge branch 'trunk' into HADOOP-18146
anmolanmol1234 Jul 20, 2022
5f26061
Changing class modifier
anmolasrani123 Jul 20, 2022
f2ffb23
Merge branch 'HADOOP-18146' of https://github.com/anmolanmol1234/hado…
anmolasrani123 Jul 20, 2022
0f18d94
Spot bugs and checkstyle fixes
anmolasrani123 Aug 2, 2022
83fbd8c
Merge branch 'apache:trunk' into HADOOP-18146
anmolanmol1234 Aug 2, 2022
58c1123
remove unused imports
anmolasrani123 Aug 2, 2022
aab3128
Fix imports
anmolasrani123 Aug 22, 2022
d13f8bd
Merge branch 'apache:trunk' into HADOOP-18146
anmolanmol1234 Sep 19, 2022
478021a
Separate out account throttling
anmolasrani123 Sep 19, 2022
9fbb4de
Documentation added
anmolasrani123 Oct 25, 2022
7c43202
Formatting
anmolasrani123 Oct 25, 2022
75a3332
Merge branch 'apache:trunk' into HADOOP-18146
anmolanmol1234 Oct 25, 2022
3fc18b9
Addressed PR comments
anmolasrani123 Oct 28, 2022
aaca1c1
Addressed PR comments
anmolasrani123 Oct 28, 2022
135e04f
Addressed PR comments
anmolasrani123 Oct 28, 2022
eaf9dfc
Merge branch 'apache:trunk' into HADOOP-18146
anmolanmol1234 Nov 29, 2022
2a1834f
Addressed PR comments
anmolasrani123 Nov 29, 2022
3f37058
Merge branch 'HADOOP-18146' of https://github.com/anmolanmol1234/hado…
anmolasrani123 Nov 29, 2022
443e263
Fix for exception
anmolasrani123 Nov 29, 2022
e694264
Merge branch 'trunk' into HADOOP-18146
anmolanmol1234 Dec 5, 2022
7961d08
Merge branch 'apache:trunk' into HADOOP-18146
anmolanmol1234 Dec 5, 2022
05df41c
Update AbfsConfiguration.java
anmolanmol1234 Dec 5, 2022
457fda0
Changes for exception handling
anmolasrani123 Dec 6, 2022
f2e6f52
String correction
anmolasrani123 Dec 7, 2022
fd006bd
Tests for hundred continue
anmolasrani123 Dec 15, 2022
baf9ec7
Add tests for 100 continue
anmolasrani123 Dec 15, 2022
fe8deea
Add tests for hundred continue
anmolasrani123 Dec 15, 2022
cafd409
Parameters for test
anmolasrani123 Dec 19, 2022
f17c15a
Tests for expect header
anmolasrani123 Dec 19, 2022
61138e9
Update metrics fix
anmolasrani123 Dec 20, 2022
ac3e973
Metric update changes
anmolasrani123 Dec 20, 2022
36ec260
Tests for metric updation verification
anmolasrani123 Dec 20, 2022
8283ef2
Update md file
anmolasrani123 Dec 20, 2022
9611999
Remove unused imports
anmolasrani123 Dec 20, 2022
93003b2
Merge branch 'apache:trunk' into HADOOP-18146
anmolanmol1234 Dec 20, 2022
7899d1c
Checkstyle fixes
anmolasrani123 Dec 20, 2022
5398f2a
Checkstyle fixes
anmolasrani123 Dec 21, 2022
796b774
PR comments addressing
anmolasrani123 Dec 22, 2022
115b0b6
PR comments
anmolasrani123 Dec 22, 2022
db89c78
remove stter for connection
anmolasrani123 Dec 23, 2022
0fb9067
Update AbfsClient.java
anmolanmol1234 Dec 26, 2022
f3e2e14
Addressing PR comments
anmolanmol1234 Mar 16, 2023
51bdece
String fix
anmolanmol1234 Mar 16, 2023
83f14fb
Merge branch 'apache:trunk' into HADOOP-18146
anmolanmol1234 Mar 16, 2023
c3268dc
Remove unused imports
anmolanmol1234 Mar 16, 2023
675687c
Import fix
anmolanmol1234 Mar 16, 2023
99a9377
Checkstyle fixes
anmolanmol1234 Mar 16, 2023
e210b04
Build fixed
anmolanmol1234 Mar 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ public AbfsRestOperation append(final String path, final byte[] buffer,
*/
int responseStatusCode = ((AbfsRestOperationException) e).getStatusCode();
if (checkUserError(responseStatusCode) && reqParams.isExpectHeaderEnabled()) {
LOG.debug("User error, retrying without 100 continue enabled for the given path " + path);
LOG.debug("User error, retrying without 100 continue enabled for the given path {} " , path);
reqParams.setExpectHeaderEnabled(false);
return this.append(path, buffer, reqParams, cachedSasToken,
tracingContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void updateMetrics(AbfsRestOperationType operationType,
throttling but there were some expectedBytesToBeSent.
*/
if (updateBytesTransferred(isThrottledOperation, abfsHttpOperation)) {
LOG.debug("Updating metrics due to throttling for path " + abfsHttpOperation.getConnUrl().getPath());
LOG.debug("Updating metrics due to throttling for path {} " , abfsHttpOperation.getConnUrl().getPath());
contentLength = abfsHttpOperation.getExpectedBytesToBeSent();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.net.UnknownHostException;
import java.util.List;

import org.apache.hadoop.classification.VisibleForTesting;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -249,19 +250,6 @@ private void completeExecute(TracingContext tracingContext)
LOG.trace("{} REST operation complete", operationType);
}

/**
* Returns a new object of AbfsHttpOperation.
* @param url The url for the operation.
* @param method The http method.
* @param requestHeaders The request headers for the operation.
* @return AbfsHttpOperation object.
* @throws IOException
*/
AbfsHttpOperation getHttpOperation(final URL url, final String method,
final List<AbfsHttpHeader> requestHeaders) throws IOException {
return new AbfsHttpOperation(url, method, requestHeaders);
}

/**
* Executes a single HTTP operation to complete the REST operation. If it
* fails, there may be a retry. The retryCount is incremented with each
Expand All @@ -273,7 +261,7 @@ private boolean executeHttpOperation(final int retryCount,

try {
// initialize the HTTP request and open the connection
httpOperation = getHttpOperation(url, method, requestHeaders);
httpOperation = createHttpOperation();
incrementCounter(AbfsStatistic.CONNECTIONS_MADE, 1);
tracingContext.constructHeader(httpOperation);

Expand Down Expand Up @@ -372,6 +360,15 @@ private boolean executeHttpOperation(final int retryCount,
return true;
}

/**
* Creates new object of {@link AbfsHttpOperation} with the url, method, and
* requestHeaders fields of the AbfsRestOperation object.
*/
@VisibleForTesting
AbfsHttpOperation createHttpOperation() throws IOException {
return new AbfsHttpOperation(url, method, requestHeaders);
}

/**
* Incrementing Abfs counters with a long value.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.Random;
import java.util.regex.Pattern;

import org.assertj.core.api.AbstractBooleanAssert;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import org.mockito.Mockito;
Expand Down Expand Up @@ -551,7 +552,7 @@ public void testExpectHundredContinue() throws Exception {
// Sets the httpOperation for the rest operation.
Mockito.doReturn(abfsHttpOperation)
.when(op)
.getHttpOperation(Mockito.any(), Mockito.any(), Mockito.any());
.createHttpOperation();

// Mock the restOperation for the client.
Mockito.doReturn(op)
Expand All @@ -566,7 +567,9 @@ public void testExpectHundredContinue() throws Exception {
TracingHeaderFormat.ALL_ID_FORMAT, null));

// Check that expect header is enabled before the append call.
assertTrue(appendRequestParameters.isExpectHeaderEnabled());
Assertions.assertThat(appendRequestParameters.isExpectHeaderEnabled())
.describedAs("The expect header is not true before the append call")
.isTrue();

intercept(AzureBlobFileSystemException.class,
() -> testClient.append(finalTestPath, buffer, appendRequestParameters, null, tracingContext));
Expand All @@ -577,6 +580,8 @@ public void testExpectHundredContinue() throws Exception {
.isEqualTo(0);

// Verify that the same request was retried with expect header disabled.
assertFalse(appendRequestParameters.isExpectHeaderEnabled());
Assertions.assertThat(appendRequestParameters.isExpectHeaderEnabled())
.describedAs("The expect header is not false")
.isFalse();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public void write(final int i) throws IOException {
// Sets the httpOperation for the rest operation.
Mockito.doReturn(abfsHttpOperation)
.when(op)
.getHttpOperation(Mockito.any(), Mockito.any(), Mockito.any());
.createHttpOperation();
return op;
}

Expand Down Expand Up @@ -285,7 +285,7 @@ void assertTraceContextState(int retryCount, int assertRetryCount, int bytesSent
public void testExpectHundredContinue() throws Exception {
// Gets the AbfsRestOperation.
AbfsRestOperation op = getRestOperation();
AbfsHttpOperation httpOperation = op.getHttpOperation(Mockito.any(), Mockito.any(), Mockito.any());
AbfsHttpOperation httpOperation = op.createHttpOperation();

TracingContext tracingContext = Mockito.spy(new TracingContext("abcd",
"abcde", FSOperationType.APPEND,
Expand Down