Skip to content

Commit 551aa5c

Browse files
committed
Syncing client with latest model
1 parent fa96f27 commit 551aa5c

File tree

11 files changed

+2158
-591
lines changed

11 files changed

+2158
-591
lines changed

bundle/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
<include>commons-codec:commons-codec</include>
7575
<include>software.amazon.awssdk.ion:ion-java</include>
7676
<include>software.amazon.awssdk:*</include>
77+
<include>software.amazon:*</include>
7778
<include>commons-logging:*</include>
7879
</includes>
7980
</artifactSet>

core/src/main/java/software/amazon/awssdk/core/auth/Aws4Signer.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import java.util.concurrent.TimeUnit;
3131
import org.slf4j.Logger;
3232
import org.slf4j.LoggerFactory;
33-
import software.amazon.awssdk.annotations.ReviewBeforeRelease;
3433
import software.amazon.awssdk.annotations.SdkTestInternalApi;
3534
import software.amazon.awssdk.core.auth.internal.Aws4SignerRequestParams;
3635
import software.amazon.awssdk.core.auth.internal.Aws4SignerUtils;
@@ -56,10 +55,7 @@ public class Aws4Signer extends AbstractAwsSigner
5655

5756
private static final int SIGNER_CACHE_MAX_SIZE = 300;
5857
private static final FifoCache<SignerKey> SIGNER_CACHE = new FifoCache<>(SIGNER_CACHE_MAX_SIZE);
59-
// TODO sigv4 auth
60-
@ReviewBeforeRelease("Remove this when Sigv4 auth is implemented properly service side.")
61-
private static final List<String> LIST_OF_HEADERS_TO_IGNORE_IN_LOWER_CASE = Arrays.asList("connection", "x-amzn-trace-id", "host");
62-
//private static final List<String> LIST_OF_HEADERS_TO_IGNORE_IN_LOWER_CASE = Arrays.asList("connection", "x-amzn-trace-id");
58+
private static final List<String> LIST_OF_HEADERS_TO_IGNORE_IN_LOWER_CASE = Arrays.asList("connection", "x-amzn-trace-id" );
6359

6460
/**
6561
* Service name override for use when the endpoint can't be used to

core/src/main/java/software/amazon/awssdk/core/http/pipeline/stages/ApplyTransactionIdStage.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ public class ApplyTransactionIdStage implements MutableRequestToRequestPipeline
3939
public SdkHttpFullRequest.Builder execute(SdkHttpFullRequest.Builder request, RequestExecutionContext context)
4040
throws Exception {
4141
InterruptMonitor.checkInterrupted();
42-
// for (int i = 1; i < 50; i++) {
43-
// request.header("x-amz-shorea-" + i, UUID.randomUUID().toString());
44-
// }
4542
return request.header(HEADER_SDK_TRANSACTION_ID, new UUID(random.nextLong(), random.nextLong()).toString());
4643
}
4744
}

flow/src/main/java/software/amazon/eventstream/MessageDecoder.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,23 @@ public final class MessageDecoder {
1515

1616
public MessageDecoder(Consumer<Message> messageConsumer) {
1717
this.messageConsumer = messageConsumer;
18-
this.buf = ByteBuffer.allocate(128 * 1024);
18+
this.buf = ByteBuffer.allocate(16 * 128 * 1024);
1919
}
2020

2121
public void feed(byte[] bytes) {
2222
feed(bytes, 0, bytes.length);
2323
}
2424

2525
public void feed(byte[] bytes, int offset, int length) {
26+
// TODO instead of blindly putting bytes can we first calculate the prelude if available then cache, then
27+
// put all bytes up to the length of the frame then decode then clear and reset for next prelude
28+
// Also we can detect the length of the payload and grow if needed
2629
buf.put(bytes, offset, length);
2730
ByteBuffer readView = (ByteBuffer) buf.duplicate().flip();
2831
int bytesConsumed = 0;
2932
while (readView.remaining() >= 15) {
33+
// TODO seems wasteful to decode the prelude multiple times. Can we cache until we've read all the data for
34+
// this frame?
3035
int totalMessageLength = toIntExact(Prelude.decode(readView.duplicate()).getTotalLength());
3136

3237
if (readView.remaining() >= totalMessageLength) {

services/kinesis/pom.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@
3131
<url>https://aws.amazon.com/sdkforjava</url>
3232

3333
<dependencies>
34-
<dependency>
35-
<groupId>log4j</groupId>
36-
<artifactId>log4j</artifactId>
37-
</dependency>
34+
<!--<dependency>-->
35+
<!--<groupId>log4j</groupId>-->
36+
<!--<artifactId>log4j</artifactId>-->
37+
<!--</dependency>-->
38+
<!--<dependency>-->
39+
<!--<groupId>org.slf4j</groupId>-->
40+
<!--<artifactId>slf4j-log4j12</artifactId>-->
41+
<!--</dependency>-->
3842
<dependency>
3943
<groupId>software.amazon.awssdk</groupId>
4044
<artifactId>netty-nio-client</artifactId>

services/kinesis/src/it/java/log4j.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
log4j.rootLogger=INFO, A1
1+
log4j.rootLogger=DEBUG, A1
22
log4j.appender.A1=org.apache.log4j.ConsoleAppender
33
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
44

services/kinesis/src/main/java/software/amazon/awssdk/services/kinesis/DefaultKinesisAsyncClient.java

Lines changed: 523 additions & 249 deletions
Large diffs are not rendered by default.

services/kinesis/src/main/java/software/amazon/awssdk/services/kinesis/KinesisAsyncClient.java

Lines changed: 1414 additions & 275 deletions
Large diffs are not rendered by default.

services/kinesis/src/main/resources/codegen-resources/kinesis/customization.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"customServiceMetadata": {
66
"protocol": "cbor"
77
},
8-
"skipSmokeTests": "true"
8+
"skipSmokeTests": "true",
9+
"verifiedSimpleMethods": ["deregisterStreamConsumer"]
910

1011
}

0 commit comments

Comments
 (0)