-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Change error store to be part of configuration instead #39
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
60eb689
Change error store to be part of configuration instead
def65b0
Revert to provider providing list of error stores
578003f
Rebase with master
7c916fc
Merge branch 'master' into error-store-fix
tims 378ddcf
merge master, reformat, align mocks stores to lowercase type
tims 3f6b2c7
Merge pull request #1 from tims/error-store-fix
zhilingc 8578ba7
Remove extra parantheses
2b33f1f
Format code to follow style
7c07226
Format code to follow style
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
ingestion/src/main/java/feast/ingestion/util/JsonUtil.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package feast.ingestion.util; | ||
|
|
||
| import com.google.gson.Gson; | ||
| import com.google.gson.reflect.TypeToken; | ||
|
|
||
| import java.lang.reflect.Type; | ||
| import java.util.Collections; | ||
| import java.util.Map; | ||
|
|
||
| public class JsonUtil { | ||
| private static Gson gson = new Gson(); | ||
| /** | ||
| * Unmarshals a given json string to map | ||
| * | ||
| * @param jsonString valid json formatted string | ||
| * @return map of keys to values in json | ||
| */ | ||
| public static Map<String, String> convertJsonStringToMap(String jsonString) { | ||
| if (jsonString == null || jsonString.equals("") || jsonString.equals("{}")) { | ||
| return Collections.emptyMap(); | ||
| } | ||
| Type stringMapType = new TypeToken<Map<String, String>>() {}.getType(); | ||
| return gson.fromJson(jsonString, stringMapType); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,11 +19,12 @@ | |
|
|
||
| import com.google.common.collect.Iterators; | ||
| import com.google.common.collect.Lists; | ||
| import feast.storage.ErrorsStore; | ||
| import lombok.extern.slf4j.Slf4j; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
| import java.util.ServiceLoader; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import feast.storage.ErrorsStore; | ||
|
|
||
| @Slf4j | ||
| public class ErrorsStoreService { | ||
|
|
@@ -38,7 +39,7 @@ public class ErrorsStoreService { | |
|
|
||
| public static List<ErrorsStore> getAll() { | ||
| return Lists.newArrayList( | ||
| Iterators.concat(manuallyRegistered.iterator(), serviceLoader.iterator())); | ||
| Iterators.concat(manuallyRegistered.iterator(), serviceLoader.iterator())); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is weird, are you using the google-java-format plugin or the imported googles styles xml? The imports don't get rearranged for me either. |
||
| } | ||
|
|
||
| /** Get store of the given subclass. */ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.