@@ -0,0 +1,2581 @@
+package stroom.pipeline.refdata.store.offheapstore;%0A%0Aimport com.google.inject.AbstractModule;%0Aimport com.google.inject.Guice;%0Aimport com.google.inject.Injector;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport stroom.pipeline.refdata.store.RefDataStore;%0Aimport stroom.pipeline.refdata.store.RefDataStoreConfig;%0Aimport stroom.pipeline.refdata.store.RefDataStoreFactory;%0Aimport stroom.pipeline.refdata.store.RefDataStoreModule;%0Aimport stroom.util.io.PathConfig;%0Aimport stroom.util.logging.LogUtil;%0Aimport stroom.util.pipeline.scope.PipelineScopeModule;%0A%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0A%0Apublic class DumpRefDataOffHeapStore %7B%0A%0A    private static final Logger LOGGER = LoggerFactory.getLogger(DumpRefDataOffHeapStore.class);%0A%0A    private static final Path DEFAULT_STORE_DIR = Paths.get(%22/tmp/stroom/refDataOffHeapStore%22);%0A%0A    /**%0A     * main() method to dump the contents of all the table in the %7B@link RefDataOffHeapStore%7D.%0A     * This is useful when running pipeline processing int tests or stroom and you want to see what is%0A     * in the store.%0A     *%0A     * Not advisable to use if there are large amounts of data in the store.%0A     *%0A     */%0A    public static void main(String%5B%5D args) %7B%0A%0A        Path storeDir;%0A        if (args.length %3E 0) %7B%0A            storeDir = Paths.get(args%5B0%5D);%0A        %7D else %7B%0A            storeDir = DEFAULT_STORE_DIR;%0A        %7D%0A%0A        if (!Files.isDirectory(storeDir)) %7B%0A            throw new RuntimeException(LogUtil.message(%22Unable to find store directory %7B%7D%22, storeDir.toString()));%0A        %7D%0A%0A        LOGGER.info(%22Using storeDir %7B%7D%22, storeDir.toAbsolutePath().normalize());%0A%0A        PathConfig pathConfig = new PathConfig();%0A        String tempDirStr = pathConfig.getTemp();%0A        RefDataStoreConfig refDataStoreConfig = new RefDataStoreConfig();%0A        refDataStoreConfig.setLocalDir(storeDir.toAbsolutePath().toString());%0A%0A        Injector injector = Guice.createInjector(%0A                new AbstractModule() %7B%0A                    @Override%0A                    protected void configure() %7B%0A                        bind(RefDataStoreConfig.class).toInstance(refDataStoreConfig);%0A                        install(new RefDataStoreModule());%0A                        install(new PipelineScopeModule());%0A                    %7D%0A                %7D);%0A%0A        RefDataStoreFactory refDataStoreFactory = injector.getInstance(RefDataStoreFactory.class);%0A        RefDataStore refDataStore = refDataStoreFactory.getOffHeapStore();%0A%0A        refDataStore.logAllContents(LOGGER::info);%0A    %7D%0A%7D%0A

Add DumpRefDataOffHeapStore