Skip to content

Commit

Permalink
minor global handling update
Browse files Browse the repository at this point in the history
  • Loading branch information
ableegoldman committed Oct 29, 2024
1 parent 5bf5978 commit 21c692e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ public class GlobalOperations implements KeyValueOperations {

public static GlobalOperations create(
final StateStoreContext storeContext,
final ResponsiveKeyValueParams params
final ResponsiveKeyValueParams params,
final Optional<TtlResolver<?, ?>> ttlResolver
) throws InterruptedException, TimeoutException {

if (params.ttlProvider().isPresent()) {
if (ttlResolver.isPresent()) {
throw new UnsupportedOperationException("Global stores are not yet compatible with ttl");
}

Expand All @@ -68,7 +69,7 @@ public static GlobalOperations create(
final var spec = RemoteTableSpecFactory.fromKVParams(
params,
defaultPartitioner(),
Optional.empty()
ttlResolver
);

final var table = client.globalFactory().create(spec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private static KeyValueOperations provideOperations(
final TaskType taskType
) throws InterruptedException, TimeoutException {
return (taskType == TaskType.GLOBAL)
? GlobalOperations.create(context, params)
? GlobalOperations.create(context, params, ttlResolver)
: PartitionedOperations.create(params.name(), ttlResolver, context, params);
}

Expand Down

0 comments on commit 21c692e

Please sign in to comment.