From 0ee6136ea3ca5481e951bafa7d594b365862d026 Mon Sep 17 00:00:00 2001 From: Gian Merlino Date: Fri, 20 Dec 2013 08:56:17 -0800 Subject: [PATCH] NoopTask: Fix things that should be static. Add simple factory method. --- .../java/io/druid/indexing/common/task/NoopTask.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java index d45f66377b7..b4de3512fbe 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java @@ -35,9 +35,9 @@ import org.joda.time.DateTime; public class NoopTask extends AbstractTask { private static final Logger log = new Logger(NoopTask.class); - private static int defaultRunTime = 2500; - private static int defaultIsReadyTime = 0; - private static IsReadyResult defaultIsReadyResult = IsReadyResult.YES; + private static final int defaultRunTime = 2500; + private static final int defaultIsReadyTime = 0; + private static final IsReadyResult defaultIsReadyResult = IsReadyResult.YES; enum IsReadyResult { @@ -139,4 +139,9 @@ public class NoopTask extends AbstractTask log.info("Woke up!"); return TaskStatus.success(getId()); } + + public static NoopTask create() + { + return new NoopTask(null, 0, 0, null, null); + } }