I'm trying to set continuous backup right after creating a new table via AmazonDynamDBs method updateContinuousBackups.
In my unit tests I use dynamodbv2.local.embedded.DynamoDBEmbedded and dynamodbv2.local.shared.access.AmazonDynamoDBLocal to create my test client. Then when executing the updateContinuousBackups call it results in the following exception:
java.lang.UnsupportedOperationException
at com.amazonaws.services.dynamodbv2.AbstractAmazonDynamoDB.updateContinuousBackups(AbstractAmazonDynamoDB.java:380)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.amazonaws.services.dynamodbv2.local.embedded.DDBExceptionMappingInvocationHandler.invoke(DDBExceptionMappingInvocationHandler.java:172)
at jdk.proxy3/jdk.proxy3.$Proxy18.updateContinuousBackups(Unknown Source)
.
.
.
Tested this with a live client and that worked as expected to might be the case that DynamoDBLocal does not consume this method.
Update continous backups code:
final UpdateContinuousBackupsRequest continuousBackupsRequest = new UpdateContinuousBackupsRequest();
continuousBackupsRequest.setTableName(createTableRequest.getTableName());
final PointInTimeRecoverySpecification pitrSpec = new PointInTimeRecoverySpecification();
pitrSpec.setPointInTimeRecoveryEnabled(true);
continuousBackupsRequest.withPointInTimeRecoverySpecification(pitrSpec);
client.updateContinuousBackups(continuousBackupsRequest);
Current work-around is to surround the last call in a try catch and ignore the exception, but this is not very sustainable :upside_down_face:
Hi,
I'm trying to set continuous backup right after creating a new table via AmazonDynamDBs method updateContinuousBackups. In my unit tests I use
dynamodbv2.local.embedded.DynamoDBEmbedded
anddynamodbv2.local.shared.access.AmazonDynamoDBLocal
to create my test client. Then when executing the updateContinuousBackups call it results in the following exception:Tested this with a live client and that worked as expected to might be the case that DynamoDBLocal does not consume this method.
Update continous backups code:
Current work-around is to surround the last call in a try catch and ignore the exception, but this is not very sustainable :upside_down_face:
Versions:
com.amazonaws.DynamoDBLocal: 2.4.0 com.amazonaws.aws-java-sdk-dynamodb: 1.13.720 Java: 17
Thanks in advance and let me know if I should provide any more information.
/Markus