ParquetStore extends Store { public void setLatestSnapshot(final long snapshot) throws StoreException { final Path snapshotPath = new Path(getDataDir(), getSnapshotPath(snapshot)); try { if (!fs.exists(snapshotPath)) { throw new StoreException(String.format("Failed setting currentSnapshot: '%s' does not exist", snapshotPath.toString())); } } catch (final IOException e) { throw new StoreException("IOException checking Path: ", e); } LOGGER.info("Setting currentSnapshot to {} and reloading graph partitioner", snapshot); this.currentSnapshot = snapshot; loadGraphPartitioner(); }  @Override void initialise(final String graphId, final Schema schema, final StoreProperties properties); static String getSnapshotPath(final long snapshot); Path getGraphPartitionerPath(); FileSystem getFS(); SchemaUtils getSchemaUtils(); @Override Set<StoreTrait> getTraits(); String getDataDir(); String getTempFilesDir(); String getFile(final String group, final Partition partition); String getFile(final String group, final Integer partitionId); static String getFile(final Integer partitionId); String getFileForReversedEdges(final String group, final Partition partition); String getFileForReversedEdges(final String group, final Integer partitionId); List<Path> getFilesForGroup(final String group); Path getGroupPath(final String group); static String getGroupSubDir(final String group, final boolean reversed); Path getGroupPathForReversedEdges(final String group); String getGraphPath(); @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE", justification = "The properties should always be ParquetStoreProperties") @Override ParquetStoreProperties getProperties(); @Override void validateSchemas(); long getLatestSnapshot(); void setLatestSnapshot(final long snapshot); GraphPartitioner getGraphPartitioner(); static final String GROUP; static final String GRAPH; static final String VERTEX; static final String SOURCE; static final String DESTINATION; static final String DIRECTED; static final String SNAPSHOT; static final String REVERSED_EDGES; static final String PARTITION; static final int LENGTH_OF_PARTITION_NUMBER_IN_FILENAME; @SuppressFBWarnings("MS_MUTABLE_ARRAY")
    static final Serialiser[] SERIALISERS; }
@Test public void shouldFailSettingSnapshotWhenSnapshotNotExists(@TempDir java.nio.file.Path tempDir) throws IOException { final ParquetStoreProperties properties = getParquetStoreProperties(tempDir); ParquetStore store = (ParquetStore) ParquetStore.createStore("G", TestUtils.gafferSchema("schemaUsingStringVertexType"), properties); try { store.setLatestSnapshot(12345L); } catch (StoreException e) { assertThat(e.getMessage(), containsString("does not exist")); return; } fail("StoreException should have been thrown as folder already exists"); }