mirror of https://github.com/apache/druid.git
Make SegmentHandoffNotifier Closeable.
This commit is contained in:
parent
ad5ffdf483
commit
92c828f904
|
@ -1005,7 +1005,7 @@ public class RealtimeIndexTaskTest
|
|||
}
|
||||
|
||||
@Override
|
||||
public void stop()
|
||||
public void close()
|
||||
{
|
||||
//Noop
|
||||
}
|
||||
|
|
|
@ -451,7 +451,7 @@ public class TaskLifecycleTest
|
|||
}
|
||||
|
||||
@Override
|
||||
public void stop()
|
||||
public void close()
|
||||
{
|
||||
//Noop
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ public class CoordinatorBasedSegmentHandoffNotifier implements SegmentHandoffNot
|
|||
}
|
||||
|
||||
@Override
|
||||
public void stop()
|
||||
public void close()
|
||||
{
|
||||
scheduledExecutor.shutdown();
|
||||
}
|
||||
|
|
|
@ -651,7 +651,7 @@ public class RealtimePlumber implements Plumber
|
|||
}
|
||||
}
|
||||
|
||||
handoffNotifier.stop();
|
||||
handoffNotifier.close();
|
||||
shutdownExecutors();
|
||||
|
||||
stopped = true;
|
||||
|
|
|
@ -21,9 +21,10 @@ package io.druid.segment.realtime.plumber;
|
|||
|
||||
import io.druid.query.SegmentDescriptor;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
public interface SegmentHandoffNotifier
|
||||
public interface SegmentHandoffNotifier extends Closeable
|
||||
{
|
||||
/**
|
||||
* register a handOffCallback to be called when segment handoff is complete.
|
||||
|
@ -47,6 +48,6 @@ public interface SegmentHandoffNotifier
|
|||
/**
|
||||
* Perform any final processing and clean up after ourselves.
|
||||
*/
|
||||
void stop();
|
||||
void close();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue