Search in sources :

Example 1 with LineageEntry

use of alluxio.proto.journal.Lineage.LineageEntry in project alluxio by Alluxio.

the class Lineage method toJournalEntry.

@Override
public synchronized JournalEntry toJournalEntry() {
    List<Long> inputFileIds = new ArrayList<>(mInputFiles);
    List<Long> outputFileIds = new ArrayList<>(mOutputFiles);
    Preconditions.checkState(mJob instanceof CommandLineJob);
    CommandLineJob commandLineJob = (CommandLineJob) mJob;
    String jobCommand = commandLineJob.getCommand();
    String jobOutputPath = commandLineJob.getJobConf().getOutputFilePath();
    LineageEntry lineage = LineageEntry.newBuilder().setId(mId).addAllInputFiles(inputFileIds).addAllOutputFileIds(outputFileIds).setJobCommand(jobCommand).setJobOutputPath(jobOutputPath).setCreationTimeMs(mCreationTimeMs).build();
    return JournalEntry.newBuilder().setLineage(lineage).build();
}
Also used : LineageEntry(alluxio.proto.journal.Lineage.LineageEntry) ArrayList(java.util.ArrayList) CommandLineJob(alluxio.job.CommandLineJob)

Aggregations

CommandLineJob (alluxio.job.CommandLineJob)1 LineageEntry (alluxio.proto.journal.Lineage.LineageEntry)1 ArrayList (java.util.ArrayList)1