Skip to content

Commit

Permalink
[hotfix][metrics] Remove unnecessary ScopeFormats constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Oct 31, 2017
1 parent d11a983 commit 280dcc2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static MetricRegistryConfiguration fromConfiguration(Configuration config
scopeFormats = ScopeFormats.fromConfig(configuration);
} catch (Exception e) {
LOG.warn("Failed to parse scope format, using default scope formats", e);
scopeFormats = new ScopeFormats();
scopeFormats = ScopeFormats.fromConfig(new Configuration());
}

char delim;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,6 @@ public class ScopeFormats {

// ------------------------------------------------------------------------

/**
* Creates all default scope formats.
*/
public ScopeFormats() {
this.jobManagerFormat = new JobManagerScopeFormat(MetricOptions.SCOPE_NAMING_JM.defaultValue());

this.jobManagerJobFormat = new JobManagerJobScopeFormat(
MetricOptions.SCOPE_NAMING_JM_JOB.defaultValue(), this.jobManagerFormat);

this.taskManagerFormat = new TaskManagerScopeFormat(MetricOptions.SCOPE_NAMING_TM.defaultValue());

this.taskManagerJobFormat = new TaskManagerJobScopeFormat(
MetricOptions.SCOPE_NAMING_TM_JOB.defaultValue(), this.taskManagerFormat);

this.taskFormat = new TaskScopeFormat(
MetricOptions.SCOPE_NAMING_TASK.defaultValue(), this.taskManagerJobFormat);

this.operatorFormat = new OperatorScopeFormat(
MetricOptions.SCOPE_NAMING_OPERATOR.defaultValue(), this.taskFormat);
}

/**
* Creates all scope formats, based on the given scope format strings.
*/
Expand Down

0 comments on commit 280dcc2

Please sign in to comment.