Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ public void init() {
//replace environment variables to support multi-node execution
prefix = resolvePrefix(prefix);
}
if (duration != null && !allowDuration()) {
LOG.warn("--duration is ignored");
duration = null;
}
if (duration != null) {
durationInSecond = TimeDurationUtil.getTimeDurationHelper(
"--runtime", duration, TimeUnit.SECONDS);
Expand Down Expand Up @@ -554,6 +558,15 @@ public String getPrefix() {
return prefix;
}

/**
* Whether to enable Duration.
* If enabled, the command will load the --duration option.
* If not enabled, the command will not load the --duration option.
*/
public boolean allowDuration() {
return true;
}

public MetricRegistry getMetrics() {
return metrics;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public class OmBucketGenerator extends BaseFreonGenerator

private Timer bucketCreationTimer;

@Override
public boolean allowDuration() {
return false;
}

@Override
public Void call() throws Exception {

Expand Down