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

Lift required override on deprecated method in MetricLoader #609

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ Current

### Changed:

- [Lift required override on deprecated method in MetricLoader](https://github.com/yahoo/fili/pull/609)
* Add default implementation to deprecated `loadMetricDictionary` in `MetricLoader` so that downstream projects are
able to implement the new version without worrying about the deprecated version.

- [Added DataApiRequestFactory layer](https://github.com/yahoo/fili/issues/603)
* Replaced static construction of DataApiRequest with an injectableFactory
* Create an additional constructor for DataApiRequestImpl which unpacks the config resources bundle to make it easier to override dictionaries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import com.yahoo.bard.webservice.data.dimension.DimensionDictionary;
import com.yahoo.bard.webservice.data.metric.MetricDictionary;

import org.slf4j.LoggerFactory;

/**
* Defines the core interactions for loading metrics into a metric dictionary.
*/
Expand All @@ -18,7 +20,12 @@ public interface MetricLoader {
* @deprecated in favor of loadMetricDictionary(MetricDictionary, DimensionDictionary)
*/
@Deprecated
void loadMetricDictionary(MetricDictionary metricDictionary);
default void loadMetricDictionary(MetricDictionary metricDictionary) {
String message = "loadMetricDictionary(MetricDictionary) is not implemented. It has been deprecated. " +
"Implement and use loadMetricDictionary(MetricDictionary, DimensionDictionary) instead.";
LoggerFactory.getLogger(MetricLoader.class).error(message);
throw new UnsupportedOperationException(message);
}

/**
* Load metrics and populate the metric dictionary with dimension dictionary for dimension dependent metrics.
Expand Down