Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Federated StoreConfigured files cannot be set #2877

Closed
t92549 opened this issue Feb 3, 2023 · 1 comment · Fixed by #2878
Closed

New Federated StoreConfigured files cannot be set #2877

t92549 opened this issue Feb 3, 2023 · 1 comment · Fixed by #2878
Assignees
Labels
bug Confirmed or suspected bug federated-store Specific to/touches the federated-store module

Comments

@t92549
Copy link
Contributor

t92549 commented Feb 3, 2023

Describe the bug
The new FederatedStore StoreConfigured options cannot be set to files outside the resources. These are storeConfiguredMergeFunctions and storeConfiguredGraphIds.

To Reproduce
Steps to reproduce the behavior:

  1. Set gaffer.federatedstore.storeConfiguredMergeFunctions property to a full path
  2. It will not be loaded as it was not part of resources when built

Expected behavior
It should accept full paths like operationDeclarations

Additional context

public static List<String> loadStoreConfiguredGraphIdsListFrom(final String path) throws IOException {
if (isNull(path)) {
return null;
} else {
return JSONSerialiser.deserialise(IOUtils.toByteArray(StreamUtil.openStream(FederatedStoreUtil.class, path)), List.class);
}
}
public static Map<String, BiFunction> loadStoreConfiguredMergeFunctionMapFrom(final String path) throws IOException {
if (isNull(path)) {
return Collections.emptyMap();
} else {
return JSONSerialiser.deserialise(IOUtils.toByteArray(StreamUtil.openStream(FederatedStoreUtil.class, path)), SerialisableConfiguredMergeFunctionsMap.class).getMap();
}
}

@t92549 t92549 added bug Confirmed or suspected bug federated-store Specific to/touches the federated-store module labels Feb 3, 2023
@t92549 t92549 added this to the v2.0.0-alpha-0.5 milestone Feb 3, 2023
@t92549 t92549 self-assigned this Feb 3, 2023
@t92549 t92549 linked a pull request Feb 3, 2023 that will close this issue
@t92549
Copy link
Contributor Author

t92549 commented Feb 3, 2023

Closed by #2878

@t92549 t92549 closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed or suspected bug federated-store Specific to/touches the federated-store module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant