@Test(dependsOnMethods = { "testPut" }) public void testGet() throws IOException { Optional<CommitSequence> sequence2 = this.store.get(this.jobName, this.datasetUrn); Assert.assertTrue(sequence2.isPresent()); Assert.assertEquals(GSON.toJsonTree(sequence2.get()), GSON.toJsonTree(this.sequence)); }
@Override public Collection<String> get(String jobName) throws IOException { ImmutableList.Builder<String> builder = new ImmutableList.Builder<>(); Path jobPath = new Path(this.rootPath, jobName); if (this.fs.exists(jobPath)) { for (FileStatus status : this.fs.listStatus(jobPath, new HiddenFilter())) { builder.add(status.getPath().getName()); } } return builder.build(); }
FsCommitSequenceStore implements CommitSequenceStore { @Override public Collection<String> get(String jobName) throws IOException { ImmutableList.Builder<String> builder = new ImmutableList.Builder<>(); Path jobPath = new Path(this.rootPath, jobName); if (this.fs.exists(jobPath)) { for (FileStatus status : this.fs.listStatus(jobPath, new HiddenFilter())) { builder.add(status.getPath().getName()); } } return builder.build(); } }
FsCommitSequenceStore implements CommitSequenceStore { @Override public Collection<String> get(String jobName) throws IOException { ImmutableList.Builder<String> builder = new ImmutableList.Builder<>(); Path jobPath = new Path(this.rootPath, jobName); if (this.fs.exists(jobPath)) { for (FileStatus status : this.fs.listStatus(jobPath, new HiddenFilter())) { builder.add(status.getPath().getName()); } } return builder.build(); } FsCommitSequenceStore(FileSystem fs, Path rootPath); }
FsCommitSequenceStore implements CommitSequenceStore { @Override public Collection<String> get(String jobName) throws IOException { ImmutableList.Builder<String> builder = new ImmutableList.Builder<>(); Path jobPath = new Path(this.rootPath, jobName); if (this.fs.exists(jobPath)) { for (FileStatus status : this.fs.listStatus(jobPath, new HiddenFilter())) { builder.add(status.getPath().getName()); } } return builder.build(); } FsCommitSequenceStore(FileSystem fs, Path rootPath); @Override boolean exists(String jobName); @Override boolean exists(String jobName, String datasetUrn); @Override void delete(String jobName); @Override void delete(String jobName, String datasetUrn); @Override void put(String jobName, String datasetUrn, CommitSequence commitSequence); @Override Collection<String> get(String jobName); @Override Optional<CommitSequence> get(String jobName, String datasetUrn); }
FsCommitSequenceStore implements CommitSequenceStore { @Override public Collection<String> get(String jobName) throws IOException { ImmutableList.Builder<String> builder = new ImmutableList.Builder<>(); Path jobPath = new Path(this.rootPath, jobName); if (this.fs.exists(jobPath)) { for (FileStatus status : this.fs.listStatus(jobPath, new HiddenFilter())) { builder.add(status.getPath().getName()); } } return builder.build(); } FsCommitSequenceStore(FileSystem fs, Path rootPath); @Override boolean exists(String jobName); @Override boolean exists(String jobName, String datasetUrn); @Override void delete(String jobName); @Override void delete(String jobName, String datasetUrn); @Override void put(String jobName, String datasetUrn, CommitSequence commitSequence); @Override Collection<String> get(String jobName); @Override Optional<CommitSequence> get(String jobName, String datasetUrn); static final String GOBBLIN_RUNTIME_COMMIT_SEQUENCE_STORE_FS_URI; static final String GOBBLIN_RUNTIME_COMMIT_SEQUENCE_STORE_DIR; }