Skip to content

Commit

Permalink
Split journal entries between file, block, lineage, and rawTable
Browse files Browse the repository at this point in the history
  • Loading branch information
aaudiber committed Nov 23, 2015
1 parent aaa1bcd commit a8c11fd
Show file tree
Hide file tree
Showing 41 changed files with 15,891 additions and 15,724 deletions.
Expand Up @@ -40,7 +40,7 @@
import tachyon.heartbeat.HeartbeatScheduler; import tachyon.heartbeat.HeartbeatScheduler;
import tachyon.job.CommandLineJob; import tachyon.job.CommandLineJob;
import tachyon.job.JobConf; import tachyon.job.JobConf;
import tachyon.proto.JournalEntryProtos.LineageFileState; import tachyon.proto.journal.Lineage.LineageFileState;
import tachyon.thrift.LineageInfo; import tachyon.thrift.LineageInfo;
import tachyon.util.CommonUtils; import tachyon.util.CommonUtils;


Expand Down
2 changes: 1 addition & 1 deletion servers/src/main/java/tachyon/master/Master.java
Expand Up @@ -22,7 +22,7 @@
import tachyon.master.journal.JournalCheckpointStreamable; import tachyon.master.journal.JournalCheckpointStreamable;
import tachyon.master.journal.JournalInputStream; import tachyon.master.journal.JournalInputStream;
import tachyon.master.journal.ReadWriteJournal; import tachyon.master.journal.ReadWriteJournal;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;


public interface Master extends JournalCheckpointStreamable { public interface Master extends JournalCheckpointStreamable {
/** /**
Expand Down
2 changes: 1 addition & 1 deletion servers/src/main/java/tachyon/master/MasterBase.java
Expand Up @@ -31,7 +31,7 @@
import tachyon.master.journal.JournalTailerThread; import tachyon.master.journal.JournalTailerThread;
import tachyon.master.journal.JournalWriter; import tachyon.master.journal.JournalWriter;
import tachyon.master.journal.ReadWriteJournal; import tachyon.master.journal.ReadWriteJournal;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;


/** /**
* This is the base class for all masters, and contains common functionality. Common functionality * This is the base class for all masters, and contains common functionality. Common functionality
Expand Down
Expand Up @@ -18,8 +18,8 @@
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;


import tachyon.master.journal.JournalEntryRepresentable; import tachyon.master.journal.JournalEntryRepresentable;
import tachyon.proto.JournalEntryProtos.BlockContainerIdGeneratorEntry; import tachyon.proto.journal.Block.BlockContainerIdGeneratorEntry;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;


/** /**
* This class generates unique block container ids. * This class generates unique block container ids.
Expand Down
6 changes: 3 additions & 3 deletions servers/src/main/java/tachyon/master/block/BlockMaster.java
Expand Up @@ -57,9 +57,9 @@
import tachyon.master.journal.JournalInputStream; import tachyon.master.journal.JournalInputStream;
import tachyon.master.journal.JournalOutputStream; import tachyon.master.journal.JournalOutputStream;
import tachyon.master.journal.JournalProtoUtils; import tachyon.master.journal.JournalProtoUtils;
import tachyon.proto.JournalEntryProtos.BlockContainerIdGeneratorEntry; import tachyon.proto.journal.Block.BlockContainerIdGeneratorEntry;
import tachyon.proto.JournalEntryProtos.BlockInfoEntry; import tachyon.proto.journal.Block.BlockInfoEntry;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.thrift.BlockInfo; import tachyon.thrift.BlockInfo;
import tachyon.thrift.BlockLocation; import tachyon.thrift.BlockLocation;
import tachyon.thrift.BlockMasterService; import tachyon.thrift.BlockMasterService;
Expand Down
26 changes: 13 additions & 13 deletions servers/src/main/java/tachyon/master/file/FileSystemMaster.java
Expand Up @@ -72,19 +72,19 @@
import tachyon.master.journal.Journal; import tachyon.master.journal.Journal;
import tachyon.master.journal.JournalOutputStream; import tachyon.master.journal.JournalOutputStream;
import tachyon.master.journal.JournalProtoUtils; import tachyon.master.journal.JournalProtoUtils;
import tachyon.proto.JournalEntryProtos.AddMountPointEntry; import tachyon.proto.journal.File.AddMountPointEntry;
import tachyon.proto.JournalEntryProtos.CompleteFileEntry; import tachyon.proto.journal.File.CompleteFileEntry;
import tachyon.proto.JournalEntryProtos.DeleteFileEntry; import tachyon.proto.journal.File.DeleteFileEntry;
import tachyon.proto.JournalEntryProtos.DeleteMountPointEntry; import tachyon.proto.journal.File.DeleteMountPointEntry;
import tachyon.proto.JournalEntryProtos.InodeDirectoryEntry; import tachyon.proto.journal.File.InodeDirectoryEntry;
import tachyon.proto.JournalEntryProtos.InodeDirectoryIdGeneratorEntry; import tachyon.proto.journal.File.InodeDirectoryIdGeneratorEntry;
import tachyon.proto.JournalEntryProtos.InodeFileEntry; import tachyon.proto.journal.File.InodeFileEntry;
import tachyon.proto.JournalEntryProtos.InodeLastModificationTimeEntry; import tachyon.proto.journal.File.InodeLastModificationTimeEntry;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.File.PersistDirectoryEntry;
import tachyon.proto.JournalEntryProtos.PersistDirectoryEntry; import tachyon.proto.journal.File.ReinitializeFileEntry;
import tachyon.proto.JournalEntryProtos.ReinitializeFileEntry; import tachyon.proto.journal.File.RenameEntry;
import tachyon.proto.JournalEntryProtos.RenameEntry; import tachyon.proto.journal.File.SetStateEntry;
import tachyon.proto.JournalEntryProtos.SetStateEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.thrift.BlockInfo; import tachyon.thrift.BlockInfo;
import tachyon.thrift.BlockLocation; import tachyon.thrift.BlockLocation;
import tachyon.thrift.FileBlockInfo; import tachyon.thrift.FileBlockInfo;
Expand Down
Expand Up @@ -22,8 +22,8 @@


import tachyon.Constants; import tachyon.Constants;
import tachyon.collections.IndexedSet; import tachyon.collections.IndexedSet;
import tachyon.proto.JournalEntryProtos.InodeDirectoryEntry; import tachyon.proto.journal.File.InodeDirectoryEntry;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.thrift.FileInfo; import tachyon.thrift.FileInfo;


/** /**
Expand Down
Expand Up @@ -20,8 +20,8 @@
import tachyon.master.block.BlockId; import tachyon.master.block.BlockId;
import tachyon.master.block.ContainerIdGenerable; import tachyon.master.block.ContainerIdGenerable;
import tachyon.master.journal.JournalEntryRepresentable; import tachyon.master.journal.JournalEntryRepresentable;
import tachyon.proto.JournalEntryProtos.InodeDirectoryIdGeneratorEntry; import tachyon.proto.journal.File.InodeDirectoryIdGeneratorEntry;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;


/** /**
* Inode id management for directory inodes. Keep track of a block container id, along with a block * Inode id management for directory inodes. Keep track of a block container id, along with a block
Expand Down
4 changes: 2 additions & 2 deletions servers/src/main/java/tachyon/master/file/meta/InodeFile.java
Expand Up @@ -26,8 +26,8 @@
import tachyon.exception.FileAlreadyCompletedException; import tachyon.exception.FileAlreadyCompletedException;
import tachyon.exception.InvalidFileSizeException; import tachyon.exception.InvalidFileSizeException;
import tachyon.master.block.BlockId; import tachyon.master.block.BlockId;
import tachyon.proto.JournalEntryProtos.InodeFileEntry; import tachyon.proto.journal.File.InodeFileEntry;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.thrift.FileInfo; import tachyon.thrift.FileInfo;


/** /**
Expand Down
6 changes: 3 additions & 3 deletions servers/src/main/java/tachyon/master/file/meta/InodeTree.java
Expand Up @@ -47,9 +47,9 @@
import tachyon.master.journal.JournalCheckpointStreamable; import tachyon.master.journal.JournalCheckpointStreamable;
import tachyon.master.journal.JournalOutputStream; import tachyon.master.journal.JournalOutputStream;
import tachyon.master.journal.JournalProtoUtils; import tachyon.master.journal.JournalProtoUtils;
import tachyon.proto.JournalEntryProtos.InodeDirectoryEntry; import tachyon.proto.journal.File.InodeDirectoryEntry;
import tachyon.proto.JournalEntryProtos.InodeFileEntry; import tachyon.proto.journal.File.InodeFileEntry;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.underfs.UnderFileSystem; import tachyon.underfs.UnderFileSystem;
import tachyon.util.FormatUtils; import tachyon.util.FormatUtils;
import tachyon.util.io.PathUtils; import tachyon.util.io.PathUtils;
Expand Down
Expand Up @@ -15,7 +15,7 @@


package tachyon.master.journal; package tachyon.master.journal;


import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;


/** /**
* This interface enables representing a class as a {@link JournalEntry}. * This interface enables representing a class as a {@link JournalEntry}.
Expand Down
Expand Up @@ -23,7 +23,7 @@


import tachyon.Constants; import tachyon.Constants;
import tachyon.conf.TachyonConf; import tachyon.conf.TachyonConf;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.util.CommonUtils; import tachyon.util.CommonUtils;


/** /**
Expand Down
Expand Up @@ -17,7 +17,7 @@


import java.io.IOException; import java.io.IOException;


import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;


/** /**
* This input stream retrieves {@link JournalEntry} from journal checkpoint files and journal log * This input stream retrieves {@link JournalEntry} from journal checkpoint files and journal log
Expand Down
Expand Up @@ -17,7 +17,7 @@


import java.io.IOException; import java.io.IOException;


import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;


/** /**
* This output stream writes {@link JournalEntry} objects to the journal. This output stream can * This output stream writes {@link JournalEntry} objects to the journal. This output stream can
Expand Down
Expand Up @@ -18,7 +18,7 @@
import com.google.protobuf.Message; import com.google.protobuf.Message;


import tachyon.exception.ExceptionMessage; import tachyon.exception.ExceptionMessage;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;


/** /**
* Utils for working with the journal. * Utils for working with the journal.
Expand Down
Expand Up @@ -24,7 +24,7 @@


import tachyon.Constants; import tachyon.Constants;
import tachyon.master.Master; import tachyon.master.Master;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;


/** /**
* This class tails the journal for a master. It will process the journal checkpoint file, and then * This class tails the journal for a master. It will process the journal checkpoint file, and then
Expand Down
Expand Up @@ -29,7 +29,7 @@
import tachyon.conf.TachyonConf; import tachyon.conf.TachyonConf;
import tachyon.exception.ExceptionMessage; import tachyon.exception.ExceptionMessage;
import tachyon.master.MasterContext; import tachyon.master.MasterContext;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.underfs.UnderFileSystem; import tachyon.underfs.UnderFileSystem;


/** /**
Expand Down
Expand Up @@ -19,7 +19,7 @@
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;


import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;


/** /**
* Reads and writes protocol buffer journal entries. The entries contain headers describing their * Reads and writes protocol buffer journal entries. The entries contain headers describing their
Expand Down
16 changes: 8 additions & 8 deletions servers/src/main/java/tachyon/master/lineage/LineageMaster.java
Expand Up @@ -65,14 +65,14 @@
import tachyon.master.lineage.meta.LineageStoreView; import tachyon.master.lineage.meta.LineageStoreView;
import tachyon.master.lineage.recompute.RecomputeExecutor; import tachyon.master.lineage.recompute.RecomputeExecutor;
import tachyon.master.lineage.recompute.RecomputePlanner; import tachyon.master.lineage.recompute.RecomputePlanner;
import tachyon.proto.JournalEntryProtos.AsyncCompleteFileEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.proto.JournalEntryProtos.DeleteLineageEntry; import tachyon.proto.journal.Lineage.AsyncCompleteFileEntry;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Lineage.DeleteLineageEntry;
import tachyon.proto.JournalEntryProtos.LineageEntry; import tachyon.proto.journal.Lineage.LineageEntry;
import tachyon.proto.JournalEntryProtos.LineageFileState; import tachyon.proto.journal.Lineage.LineageFileState;
import tachyon.proto.JournalEntryProtos.LineageIdGeneratorEntry; import tachyon.proto.journal.Lineage.LineageIdGeneratorEntry;
import tachyon.proto.JournalEntryProtos.PersistFilesEntry; import tachyon.proto.journal.Lineage.PersistFilesEntry;
import tachyon.proto.JournalEntryProtos.PersistFilesRequestEntry; import tachyon.proto.journal.Lineage.PersistFilesRequestEntry;
import tachyon.thrift.BlockLocation; import tachyon.thrift.BlockLocation;
import tachyon.thrift.CheckpointFile; import tachyon.thrift.CheckpointFile;
import tachyon.thrift.CommandType; import tachyon.thrift.CommandType;
Expand Down
Expand Up @@ -26,9 +26,9 @@
import tachyon.job.Job; import tachyon.job.Job;
import tachyon.job.JobConf; import tachyon.job.JobConf;
import tachyon.master.journal.JournalEntryRepresentable; import tachyon.master.journal.JournalEntryRepresentable;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.proto.JournalEntryProtos.LineageEntry; import tachyon.proto.journal.Lineage.LineageEntry;
import tachyon.proto.JournalEntryProtos.LineageFileState; import tachyon.proto.journal.Lineage.LineageFileState;
import tachyon.thrift.LineageFileInfo; import tachyon.thrift.LineageFileInfo;
import tachyon.thrift.LineageInfo; import tachyon.thrift.LineageInfo;


Expand Down Expand Up @@ -261,7 +261,7 @@ public synchronized JournalEntry toJournalEntry() {
String jobCommand = commandLineJob.getCommand(); String jobCommand = commandLineJob.getCommand();
String jobOutputPath = commandLineJob.getJobConf().getOutputFilePath(); String jobOutputPath = commandLineJob.getJobConf().getOutputFilePath();


LineageEntry lineage = tachyon.proto.JournalEntryProtos.LineageEntry.newBuilder() LineageEntry lineage = LineageEntry.newBuilder()
.setId(mId) .setId(mId)
.addAllInputFiles(inputFileIds) .addAllInputFiles(inputFileIds)
.addAllOutputFileIds(outputFileIds) .addAllOutputFileIds(outputFileIds)
Expand Down
Expand Up @@ -16,7 +16,7 @@
package tachyon.master.lineage.meta; package tachyon.master.lineage.meta;


import tachyon.client.file.TachyonFile; import tachyon.client.file.TachyonFile;
import tachyon.proto.JournalEntryProtos.LineageFileState; import tachyon.proto.journal.Lineage.LineageFileState;
import tachyon.thrift.LineageFileInfo; import tachyon.thrift.LineageFileInfo;


/** /**
Expand Down
Expand Up @@ -18,8 +18,8 @@
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;


import tachyon.master.journal.JournalEntryRepresentable; import tachyon.master.journal.JournalEntryRepresentable;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.proto.JournalEntryProtos.LineageIdGeneratorEntry; import tachyon.proto.journal.Lineage.LineageIdGeneratorEntry;


/** /**
* Generates the lineage id as sequence number. * Generates the lineage id as sequence number.
Expand Down
Expand Up @@ -33,8 +33,8 @@
import tachyon.job.Job; import tachyon.job.Job;
import tachyon.master.journal.JournalCheckpointStreamable; import tachyon.master.journal.JournalCheckpointStreamable;
import tachyon.master.journal.JournalOutputStream; import tachyon.master.journal.JournalOutputStream;
import tachyon.proto.JournalEntryProtos.LineageEntry; import tachyon.proto.journal.Lineage.LineageEntry;
import tachyon.proto.JournalEntryProtos.LineageFileState; import tachyon.proto.journal.Lineage.LineageFileState;


/** /**
* A store of lineages. This class is thread-safe. * A store of lineages. This class is thread-safe.
Expand Down
Expand Up @@ -44,9 +44,9 @@
import tachyon.master.journal.JournalOutputStream; import tachyon.master.journal.JournalOutputStream;
import tachyon.master.journal.JournalProtoUtils; import tachyon.master.journal.JournalProtoUtils;
import tachyon.master.rawtable.meta.RawTables; import tachyon.master.rawtable.meta.RawTables;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.proto.JournalEntryProtos.RawTableEntry; import tachyon.proto.journal.RawTable.RawTableEntry;
import tachyon.proto.JournalEntryProtos.UpdateMetadataEntry; import tachyon.proto.journal.RawTable.UpdateMetadataEntry;
import tachyon.thrift.FileInfo; import tachyon.thrift.FileInfo;
import tachyon.thrift.RawTableInfo; import tachyon.thrift.RawTableInfo;
import tachyon.thrift.RawTableMasterService; import tachyon.thrift.RawTableMasterService;
Expand Down
Expand Up @@ -20,8 +20,8 @@
import com.google.protobuf.ByteString; import com.google.protobuf.ByteString;


import tachyon.master.journal.JournalEntryRepresentable; import tachyon.master.journal.JournalEntryRepresentable;
import tachyon.proto.JournalEntryProtos.JournalEntry; import tachyon.proto.journal.Journal.JournalEntry;
import tachyon.proto.JournalEntryProtos.RawTableEntry; import tachyon.proto.journal.RawTable.RawTableEntry;
import tachyon.util.io.BufferUtils; import tachyon.util.io.BufferUtils;


public class RawTable implements JournalEntryRepresentable { public class RawTable implements JournalEntryRepresentable {
Expand Down

0 comments on commit a8c11fd

Please sign in to comment.