yandrey321 commented on code in PR #11501:
URL: https://github.com/apache/ozone/pull/11501#discussion_r4311077885
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestSecureOzoneRpcClient.java:
##########
@@ -434,6 +441,62 @@ public void testS3Auth() throws Exception {
assertEquals(Status.INVALID_TOKEN, omResponse.getStatus());
}
+ /**
+ * Reads a multi-cell EC key with S3 authentication and a read-consistency
hint set on the request thread, with
+ * sequential and with parallel EC reads.
+ */
+ @ParameterizedTest
+ @ValueSource(booleans = {false, true})
+ void testEcReadWithS3AuthAndReadConsistency(boolean parallelRead) throws
Exception {
+ String volumeName = UUID.randomUUID().toString();
+ String bucketName = UUID.randomUUID().toString();
+ String keyName = UUID.randomUUID().toString();
+ getStore().createVolume(volumeName);
+ getStore().getVolume(volumeName).createBucket(bucketName);
+ OzoneBucket bucket =
getStore().getVolume(volumeName).getBucket(bucketName);
+
+ // Two full rs-3-2-1024k stripes and a partial one, so one read spans all
data cells.
+ byte[] data = new byte[7 * (int) OzoneConsts.MB + 100];
+ ThreadLocalRandom.current().nextBytes(data);
+ ECReplicationConfig ecConfig = new ECReplicationConfig(3, 2,
ECReplicationConfig.EcCodec.RS, (int) OzoneConsts.MB);
+ try (OzoneOutputStream out = bucket.createKey(keyName, data.length,
ecConfig, new HashMap<>())) {
+ out.write(data);
+ }
+
+ String strToSign = "AWS4-HMAC-SHA256\n" +
Review Comment:
fixed, the string to sign, signature and secret are now shared constants
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]