You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BigQuerySinkConfig and BigQuerySinkTaskConfig define properties and perform validation on configuration files. However the rest of the code extracts values from the config and passes those values around to various methods.
Issue
There are two issues that this change will address:
Whenever a new configuration is added a new variable in the mainline code is created and it is passed down to where it is needed through various layers. This causes a significant amount of churn in classes that do nothing but pass the data down.
When the configuration objects are passed as parameters the code to extract the data may differ across the code base.
Proposal
Make all configuration definition statics private. This restricts their usage to the internals of the configuration objects.
For every access of a configuration value that is outside the configuration object create a configuration method to retrieve the value.
Refactor the higher levels of the code base so that the configuration object is passed in method calls rather than the specific value for a property. This change applies to the higher level components and not to the lowest level simple calls that require variables that are already well defined within the scope of a larger component.
This change would require a major version change as it changes published APIs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Current state
BigQuerySinkConfig
andBigQuerySinkTaskConfig
define properties and perform validation on configuration files. However the rest of the code extracts values from the config and passes those values around to various methods.Issue
There are two issues that this change will address:
Proposal
private
. This restricts their usage to the internals of the configuration objects.This change would require a major version change as it changes published APIs.
Beta Was this translation helpful? Give feedback.
All reactions