Thanks for the reply. It seems the following class in newer release can do what the test needs:
class OffsetCheckpointFile(val file: File, logDirFailureChannel: LogDirFailureChannel = null) { Cheers On Thu, May 31, 2018 at 9:27 AM, Ismael Juma <isma...@gmail.com> wrote: > Hi Ted, > > There are two such classes. The example you have is for the broker class, > not the Streams one. > > Ismael > > On Thu, 31 May 2018, 09:03 Ted Yu, <yuzhih...@gmail.com> wrote: > > > Hi, > > OffsetCheckpoint has been relocated > > to org.apache.kafka.streams.state.internals package. > > > > Does this mean that downstream project should no longer reference this > > class ? > > > > This is how the class is used (against Kafka 0.10.0.1 release) : > > > > // ensure that topic is removed from all cleaner offsets > > assert(servers.forall(server => topicAndPartitions.forall { tp => > > val checkpoints = server.getLogManager().logDirs.map { logDir => > > new OffsetCheckpoint(new File(logDir, > > "cleaner-offset-checkpoint")).read() > > } > > checkpoints.forall(checkpointsPerLogDir => > > !checkpointsPerLogDir.contains(tp)) > > }), s"checkpoint for topic $topic still exists") > > > > Cheers > > >