File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -290,6 +290,10 @@ public void init() {
290290 //replace environment variables to support multi-node execution
291291 prefix = resolvePrefix (prefix );
292292 }
293+ if (duration != null && !allowDuration ()) {
294+ LOG .warn ("--duration is ignored" );
295+ duration = null ;
296+ }
293297 if (duration != null ) {
294298 durationInSecond = TimeDurationUtil .getTimeDurationHelper (
295299 "--runtime" , duration , TimeUnit .SECONDS );
@@ -554,6 +558,15 @@ public String getPrefix() {
554558 return prefix ;
555559 }
556560
561+ /**
562+ * Whether to enable Duration.
563+ * If enabled, the command will load the --duration option.
564+ * If not enabled, the command will not load the --duration option.
565+ */
566+ public boolean allowDuration () {
567+ return true ;
568+ }
569+
557570 public MetricRegistry getMetrics () {
558571 return metrics ;
559572 }
Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ public class OmBucketGenerator extends BaseFreonGenerator
5757
5858 private Timer bucketCreationTimer ;
5959
60+ @ Override
61+ public boolean allowDuration () {
62+ return false ;
63+ }
64+
6065 @ Override
6166 public Void call () throws Exception {
6267
You can’t perform that action at this time.
0 commit comments