mirror of https://github.com/apache/druid.git
RealtimeIndexTask: Clean up imports and comments
This commit is contained in:
parent
9043c211b2
commit
4d83837e88
|
@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.google.common.base.Throwables;
|
import com.google.common.base.Throwables;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableSet;
|
|
||||||
import com.google.common.io.Closeables;
|
import com.google.common.io.Closeables;
|
||||||
import com.metamx.common.exception.FormattedException;
|
import com.metamx.common.exception.FormattedException;
|
||||||
import com.metamx.emitter.EmittingLogger;
|
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.TaskStatus;
|
||||||
import io.druid.indexing.common.TaskToolbox;
|
import io.druid.indexing.common.TaskToolbox;
|
||||||
import io.druid.indexing.common.actions.LockAcquireAction;
|
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.LockReleaseAction;
|
||||||
import io.druid.indexing.common.actions.SegmentInsertAction;
|
|
||||||
import io.druid.indexing.common.actions.TaskActionClient;
|
import io.druid.indexing.common.actions.TaskActionClient;
|
||||||
import io.druid.query.FinalizeResultsQueryRunner;
|
import io.druid.query.FinalizeResultsQueryRunner;
|
||||||
import io.druid.query.Query;
|
import io.druid.query.Query;
|
||||||
|
@ -212,7 +209,7 @@ public class RealtimeIndexTask extends AbstractTask
|
||||||
@Override
|
@Override
|
||||||
public void announceSegment(final DataSegment segment) throws IOException
|
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.getTaskActionClient().submit(new LockAcquireAction(segment.getInterval()));
|
||||||
toolbox.getSegmentAnnouncer().announceSegment(segment);
|
toolbox.getSegmentAnnouncer().announceSegment(segment);
|
||||||
}
|
}
|
||||||
|
@ -231,6 +228,7 @@ public class RealtimeIndexTask extends AbstractTask
|
||||||
@Override
|
@Override
|
||||||
public void announceSegments(Iterable<DataSegment> segments) throws IOException
|
public void announceSegments(Iterable<DataSegment> segments) throws IOException
|
||||||
{
|
{
|
||||||
|
// Side effect: Calling announceSegments causes locks to be acquired
|
||||||
for (DataSegment segment : segments) {
|
for (DataSegment segment : segments) {
|
||||||
toolbox.getTaskActionClient().submit(new LockAcquireAction(segment.getInterval()));
|
toolbox.getTaskActionClient().submit(new LockAcquireAction(segment.getInterval()));
|
||||||
}
|
}
|
||||||
|
@ -263,7 +261,7 @@ public class RealtimeIndexTask extends AbstractTask
|
||||||
public String getVersion(final Interval interval)
|
public String getVersion(final Interval interval)
|
||||||
{
|
{
|
||||||
try {
|
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()
|
final TaskLock myLock = toolbox.getTaskActionClient()
|
||||||
.submit(new LockAcquireAction(interval));
|
.submit(new LockAcquireAction(interval));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue