Search in sources :

Example 1 with FsCommitSequenceStore

use of org.apache.gobblin.runtime.commit.FsCommitSequenceStore in project incubator-gobblin by apache.

the class FsCommitSequenceStoreTest method setUp.

@BeforeClass
public void setUp() throws IOException {
    FileSystem fs = FileSystem.getLocal(new Configuration());
    this.store = new FsCommitSequenceStore(fs, new Path("commit-sequence-store-test"));
    State props = new State();
    props.setId("propsId");
    props.setProp("prop1", "valueOfProp1");
    props.setProp("prop2", "valueOfProp2");
    DatasetState datasetState = new DatasetState();
    datasetState.setDatasetUrn(this.datasetUrn);
    datasetState.incrementJobFailures();
    this.sequence = new CommitSequence.Builder().withJobName("testjob").withDatasetUrn("testurn").beginStep(FsRenameCommitStep.Builder.class).from(new Path("/ab/cd")).to(new Path("/ef/gh")).withProps(props).endStep().beginStep(DatasetStateCommitStep.Builder.class).withDatasetUrn(this.datasetUrn).withDatasetState(datasetState).withProps(props).endStep().build();
}
Also used : FsCommitSequenceStore(org.apache.gobblin.runtime.commit.FsCommitSequenceStore) Path(org.apache.hadoop.fs.Path) Configuration(org.apache.hadoop.conf.Configuration) DatasetStateCommitStep(org.apache.gobblin.runtime.commit.DatasetStateCommitStep) State(org.apache.gobblin.configuration.State) DatasetState(org.apache.gobblin.runtime.JobState.DatasetState) FileSystem(org.apache.hadoop.fs.FileSystem) DatasetState(org.apache.gobblin.runtime.JobState.DatasetState) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

State (org.apache.gobblin.configuration.State)1 DatasetState (org.apache.gobblin.runtime.JobState.DatasetState)1 DatasetStateCommitStep (org.apache.gobblin.runtime.commit.DatasetStateCommitStep)1 FsCommitSequenceStore (org.apache.gobblin.runtime.commit.FsCommitSequenceStore)1 Configuration (org.apache.hadoop.conf.Configuration)1 FileSystem (org.apache.hadoop.fs.FileSystem)1 Path (org.apache.hadoop.fs.Path)1 BeforeClass (org.testng.annotations.BeforeClass)1