From 4d83837e88f6008cb040fef377a118c2432377e1 Mon Sep 17 00:00:00 2001 From: Gian Merlino Date: Fri, 20 Dec 2013 11:37:16 -0800 Subject: [PATCH] RealtimeIndexTask: Clean up imports and comments --- .../io/druid/indexing/common/task/RealtimeIndexTask.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/RealtimeIndexTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/RealtimeIndexTask.java index 6ddc523140b..c9235a045ad 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/RealtimeIndexTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/RealtimeIndexTask.java @@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Throwables; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; import com.google.common.io.Closeables; import com.metamx.common.exception.FormattedException; import com.metamx.emitter.EmittingLogger; @@ -35,9 +34,7 @@ import io.druid.indexing.common.TaskLock; import io.druid.indexing.common.TaskStatus; import io.druid.indexing.common.TaskToolbox; import io.druid.indexing.common.actions.LockAcquireAction; -import io.druid.indexing.common.actions.LockListAction; import io.druid.indexing.common.actions.LockReleaseAction; -import io.druid.indexing.common.actions.SegmentInsertAction; import io.druid.indexing.common.actions.TaskActionClient; import io.druid.query.FinalizeResultsQueryRunner; import io.druid.query.Query; @@ -212,7 +209,7 @@ public class RealtimeIndexTask extends AbstractTask @Override public void announceSegment(final DataSegment segment) throws IOException { - // NOTE: Side effect: Calling announceSegment causes a lock to be acquired + // Side effect: Calling announceSegment causes a lock to be acquired toolbox.getTaskActionClient().submit(new LockAcquireAction(segment.getInterval())); toolbox.getSegmentAnnouncer().announceSegment(segment); } @@ -231,6 +228,7 @@ public class RealtimeIndexTask extends AbstractTask @Override public void announceSegments(Iterable segments) throws IOException { + // Side effect: Calling announceSegments causes locks to be acquired for (DataSegment segment : segments) { toolbox.getTaskActionClient().submit(new LockAcquireAction(segment.getInterval())); } @@ -263,7 +261,7 @@ public class RealtimeIndexTask extends AbstractTask public String getVersion(final Interval interval) { try { - // NOTE: Side effect: Calling getVersion causes a lock to be acquired + // Side effect: Calling getVersion causes a lock to be acquired final TaskLock myLock = toolbox.getTaskActionClient() .submit(new LockAcquireAction(interval));