mirror of https://github.com/apache/druid.git
rename SegmentMoveAction to SegmentMetadataUpdateAction
This commit is contained in:
parent
ac2ca0e46c
commit
e333776aca
|
@ -13,13 +13,13 @@ import io.druid.timeline.DataSegment;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class SegmentMoveAction implements TaskAction<Void>
|
public class SegmentMetadataUpdateAction implements TaskAction<Void>
|
||||||
{
|
{
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private final Set<DataSegment> segments;
|
private final Set<DataSegment> segments;
|
||||||
|
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
public SegmentMoveAction(
|
public SegmentMetadataUpdateAction(
|
||||||
@JsonProperty("segments") Set<DataSegment> segments
|
@JsonProperty("segments") Set<DataSegment> segments
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ public class SegmentMoveAction implements TaskAction<Void>
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return "SegmentMoveAction{" +
|
return "SegmentMetadataUpdateAction{" +
|
||||||
"segments=" + segments +
|
"segments=" + segments +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
|
@ -36,7 +36,7 @@ import java.io.IOException;
|
||||||
@JsonSubTypes.Type(name = "segmentListUsed", value = SegmentListUsedAction.class),
|
@JsonSubTypes.Type(name = "segmentListUsed", value = SegmentListUsedAction.class),
|
||||||
@JsonSubTypes.Type(name = "segmentListUnused", value = SegmentListUnusedAction.class),
|
@JsonSubTypes.Type(name = "segmentListUnused", value = SegmentListUnusedAction.class),
|
||||||
@JsonSubTypes.Type(name = "segmentNuke", value = SegmentNukeAction.class),
|
@JsonSubTypes.Type(name = "segmentNuke", value = SegmentNukeAction.class),
|
||||||
@JsonSubTypes.Type(name = "segmentMove", value = SegmentMoveAction.class)
|
@JsonSubTypes.Type(name = "segmentMetadataUpdate", value = SegmentMetadataUpdateAction.class)
|
||||||
})
|
})
|
||||||
public interface TaskAction<RetType>
|
public interface TaskAction<RetType>
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,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.SegmentListUnusedAction;
|
import io.druid.indexing.common.actions.SegmentListUnusedAction;
|
||||||
import io.druid.indexing.common.actions.SegmentMoveAction;
|
import io.druid.indexing.common.actions.SegmentMetadataUpdateAction;
|
||||||
import io.druid.timeline.DataSegment;
|
import io.druid.timeline.DataSegment;
|
||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ public class ArchiveTask extends AbstractFixedIntervalTask
|
||||||
|
|
||||||
// Update metadata for moved segments
|
// Update metadata for moved segments
|
||||||
toolbox.getTaskActionClient().submit(
|
toolbox.getTaskActionClient().submit(
|
||||||
new SegmentMoveAction(
|
new SegmentMetadataUpdateAction(
|
||||||
ImmutableSet.copyOf(archivedSegments)
|
ImmutableSet.copyOf(archivedSegments)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -30,7 +30,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.SegmentListUnusedAction;
|
import io.druid.indexing.common.actions.SegmentListUnusedAction;
|
||||||
import io.druid.indexing.common.actions.SegmentMoveAction;
|
import io.druid.indexing.common.actions.SegmentMetadataUpdateAction;
|
||||||
import io.druid.timeline.DataSegment;
|
import io.druid.timeline.DataSegment;
|
||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ public class MoveTask extends AbstractFixedIntervalTask
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update metadata for moved segments
|
// Update metadata for moved segments
|
||||||
toolbox.getTaskActionClient().submit(new SegmentMoveAction(
|
toolbox.getTaskActionClient().submit(new SegmentMetadataUpdateAction(
|
||||||
ImmutableSet.copyOf(movedSegments)
|
ImmutableSet.copyOf(movedSegments)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue