diff --git a/clients/unshaded/src/main/java/tachyon/client/file/FileOutStream.java b/clients/unshaded/src/main/java/tachyon/client/file/FileOutStream.java index 1ee70f68d9ed..4df92398f3ea 100644 --- a/clients/unshaded/src/main/java/tachyon/client/file/FileOutStream.java +++ b/clients/unshaded/src/main/java/tachyon/client/file/FileOutStream.java @@ -122,11 +122,11 @@ public void close() throws IOException { Boolean canComplete = false; if (mUnderStorageType.isPersist()) { + FileInfo fileInfo = getFileInfo(mFileId); + String ufsPath = fileInfo.getUfsPath(); if (mCanceled) { // TODO(yupeng): Handle this special case in under storage integrations. mUnderStorageOutputStream.close(); - FileInfo fileInfo = getFileInfo(mFileId); - String ufsPath = fileInfo.getUfsPath(); String fileName = PathUtils.temporaryFileName(mFileId, mNonce, ufsPath); UnderFileSystem underFsClient = UnderFileSystem.get(fileName, ClientContext.getConf()); underFsClient.delete(fileName, false); @@ -136,7 +136,7 @@ public void close() throws IOException { WorkerClient workerClient = BlockStoreContext.INSTANCE.acquireWorkerClient(); try { // TODO(yupeng): Investigate if this RPC can be moved to master. - workerClient.addCheckpoint(mFileId, mNonce); + workerClient.persistFile(mFileId, mNonce, ufsPath); } finally { BlockStoreContext.INSTANCE.releaseWorkerClient(workerClient); } diff --git a/common/src/main/java/tachyon/thrift/BlockInfo.java b/common/src/main/java/tachyon/thrift/BlockInfo.java index d305c3bb006e..2af398114fb3 100644 --- a/common/src/main/java/tachyon/thrift/BlockInfo.java +++ b/common/src/main/java/tachyon/thrift/BlockInfo.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class BlockInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BlockInfo"); diff --git a/common/src/main/java/tachyon/thrift/BlockInfoException.java b/common/src/main/java/tachyon/thrift/BlockInfoException.java index a054333222d3..8130ad34b234 100644 --- a/common/src/main/java/tachyon/thrift/BlockInfoException.java +++ b/common/src/main/java/tachyon/thrift/BlockInfoException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class BlockInfoException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BlockInfoException"); diff --git a/common/src/main/java/tachyon/thrift/BlockLocation.java b/common/src/main/java/tachyon/thrift/BlockLocation.java index 6749cd2d2cb2..b9960893c21c 100644 --- a/common/src/main/java/tachyon/thrift/BlockLocation.java +++ b/common/src/main/java/tachyon/thrift/BlockLocation.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class BlockLocation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BlockLocation"); diff --git a/common/src/main/java/tachyon/thrift/BlockMasterService.java b/common/src/main/java/tachyon/thrift/BlockMasterService.java index 6a556bf9bda3..19f0424a531d 100644 --- a/common/src/main/java/tachyon/thrift/BlockMasterService.java +++ b/common/src/main/java/tachyon/thrift/BlockMasterService.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class BlockMasterService { public interface Iface { diff --git a/common/src/main/java/tachyon/thrift/Command.java b/common/src/main/java/tachyon/thrift/Command.java index 50769e288afa..b6e95f699142 100644 --- a/common/src/main/java/tachyon/thrift/Command.java +++ b/common/src/main/java/tachyon/thrift/Command.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class Command implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Command"); diff --git a/common/src/main/java/tachyon/thrift/DependencyDoesNotExistException.java b/common/src/main/java/tachyon/thrift/DependencyDoesNotExistException.java index f7915301d69c..bba9acbf1423 100644 --- a/common/src/main/java/tachyon/thrift/DependencyDoesNotExistException.java +++ b/common/src/main/java/tachyon/thrift/DependencyDoesNotExistException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class DependencyDoesNotExistException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DependencyDoesNotExistException"); diff --git a/common/src/main/java/tachyon/thrift/DependencyInfo.java b/common/src/main/java/tachyon/thrift/DependencyInfo.java index e1d23ef30d1d..90a15c766653 100644 --- a/common/src/main/java/tachyon/thrift/DependencyInfo.java +++ b/common/src/main/java/tachyon/thrift/DependencyInfo.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class DependencyInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DependencyInfo"); diff --git a/common/src/main/java/tachyon/thrift/FailedToCheckpointException.java b/common/src/main/java/tachyon/thrift/FailedToCheckpointException.java index dbc65eea78ae..be56177d91f7 100644 --- a/common/src/main/java/tachyon/thrift/FailedToCheckpointException.java +++ b/common/src/main/java/tachyon/thrift/FailedToCheckpointException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class FailedToCheckpointException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FailedToCheckpointException"); diff --git a/common/src/main/java/tachyon/thrift/FileAlreadyExistException.java b/common/src/main/java/tachyon/thrift/FileAlreadyExistException.java index 6a03464f4574..128c0e330e90 100644 --- a/common/src/main/java/tachyon/thrift/FileAlreadyExistException.java +++ b/common/src/main/java/tachyon/thrift/FileAlreadyExistException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class FileAlreadyExistException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FileAlreadyExistException"); diff --git a/common/src/main/java/tachyon/thrift/FileBlockInfo.java b/common/src/main/java/tachyon/thrift/FileBlockInfo.java index 077777bd994d..1b4f20d0ba75 100644 --- a/common/src/main/java/tachyon/thrift/FileBlockInfo.java +++ b/common/src/main/java/tachyon/thrift/FileBlockInfo.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class FileBlockInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FileBlockInfo"); diff --git a/common/src/main/java/tachyon/thrift/FileDoesNotExistException.java b/common/src/main/java/tachyon/thrift/FileDoesNotExistException.java index a38549c80c11..f0e3d0566abb 100644 --- a/common/src/main/java/tachyon/thrift/FileDoesNotExistException.java +++ b/common/src/main/java/tachyon/thrift/FileDoesNotExistException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class FileDoesNotExistException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FileDoesNotExistException"); diff --git a/common/src/main/java/tachyon/thrift/FileInfo.java b/common/src/main/java/tachyon/thrift/FileInfo.java index c75a13216cb9..8867648b2d09 100644 --- a/common/src/main/java/tachyon/thrift/FileInfo.java +++ b/common/src/main/java/tachyon/thrift/FileInfo.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class FileInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FileInfo"); diff --git a/common/src/main/java/tachyon/thrift/FileSystemMasterService.java b/common/src/main/java/tachyon/thrift/FileSystemMasterService.java index 41413425eb3c..068b40e9c0e5 100644 --- a/common/src/main/java/tachyon/thrift/FileSystemMasterService.java +++ b/common/src/main/java/tachyon/thrift/FileSystemMasterService.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class FileSystemMasterService { public interface Iface { diff --git a/common/src/main/java/tachyon/thrift/InvalidPathException.java b/common/src/main/java/tachyon/thrift/InvalidPathException.java index e555e16abf08..2e62fc35e4ab 100644 --- a/common/src/main/java/tachyon/thrift/InvalidPathException.java +++ b/common/src/main/java/tachyon/thrift/InvalidPathException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class InvalidPathException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidPathException"); diff --git a/common/src/main/java/tachyon/thrift/MountOpts.java b/common/src/main/java/tachyon/thrift/MountOpts.java index 0231ead88b1a..d9d985d37488 100644 --- a/common/src/main/java/tachyon/thrift/MountOpts.java +++ b/common/src/main/java/tachyon/thrift/MountOpts.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class MountOpts implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MountOpts"); diff --git a/common/src/main/java/tachyon/thrift/NetAddress.java b/common/src/main/java/tachyon/thrift/NetAddress.java index 6c7d4a59c803..a5b830f58eeb 100644 --- a/common/src/main/java/tachyon/thrift/NetAddress.java +++ b/common/src/main/java/tachyon/thrift/NetAddress.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class NetAddress implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NetAddress"); diff --git a/common/src/main/java/tachyon/thrift/NoWorkerException.java b/common/src/main/java/tachyon/thrift/NoWorkerException.java index 763b7785f2b1..d71a09c4b8bd 100644 --- a/common/src/main/java/tachyon/thrift/NoWorkerException.java +++ b/common/src/main/java/tachyon/thrift/NoWorkerException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class NoWorkerException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NoWorkerException"); diff --git a/common/src/main/java/tachyon/thrift/OutOfSpaceException.java b/common/src/main/java/tachyon/thrift/OutOfSpaceException.java index 54afcca59d98..32926def1f39 100644 --- a/common/src/main/java/tachyon/thrift/OutOfSpaceException.java +++ b/common/src/main/java/tachyon/thrift/OutOfSpaceException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class OutOfSpaceException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OutOfSpaceException"); diff --git a/common/src/main/java/tachyon/thrift/RawTableInfo.java b/common/src/main/java/tachyon/thrift/RawTableInfo.java index 58171a2fbaba..2ae37862f073 100644 --- a/common/src/main/java/tachyon/thrift/RawTableInfo.java +++ b/common/src/main/java/tachyon/thrift/RawTableInfo.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class RawTableInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RawTableInfo"); diff --git a/common/src/main/java/tachyon/thrift/RawTableMasterService.java b/common/src/main/java/tachyon/thrift/RawTableMasterService.java index 0b5667e55edb..99b4643944ac 100644 --- a/common/src/main/java/tachyon/thrift/RawTableMasterService.java +++ b/common/src/main/java/tachyon/thrift/RawTableMasterService.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class RawTableMasterService { public interface Iface { diff --git a/common/src/main/java/tachyon/thrift/SuspectedFileSizeException.java b/common/src/main/java/tachyon/thrift/SuspectedFileSizeException.java index 58f678f7c948..5bbaf9602d66 100644 --- a/common/src/main/java/tachyon/thrift/SuspectedFileSizeException.java +++ b/common/src/main/java/tachyon/thrift/SuspectedFileSizeException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class SuspectedFileSizeException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SuspectedFileSizeException"); diff --git a/common/src/main/java/tachyon/thrift/TableColumnException.java b/common/src/main/java/tachyon/thrift/TableColumnException.java index 51a92c50628a..0935ab369d75 100644 --- a/common/src/main/java/tachyon/thrift/TableColumnException.java +++ b/common/src/main/java/tachyon/thrift/TableColumnException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class TableColumnException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableColumnException"); diff --git a/common/src/main/java/tachyon/thrift/TableDoesNotExistException.java b/common/src/main/java/tachyon/thrift/TableDoesNotExistException.java index 65bb0703ab97..d01d87bb2558 100644 --- a/common/src/main/java/tachyon/thrift/TableDoesNotExistException.java +++ b/common/src/main/java/tachyon/thrift/TableDoesNotExistException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class TableDoesNotExistException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableDoesNotExistException"); diff --git a/common/src/main/java/tachyon/thrift/TachyonException.java b/common/src/main/java/tachyon/thrift/TachyonException.java index 3a8878981241..d3f63c27f01a 100644 --- a/common/src/main/java/tachyon/thrift/TachyonException.java +++ b/common/src/main/java/tachyon/thrift/TachyonException.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class TachyonException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TachyonException"); diff --git a/common/src/main/java/tachyon/thrift/WorkerInfo.java b/common/src/main/java/tachyon/thrift/WorkerInfo.java index e37c1193c676..60c9ae526691 100644 --- a/common/src/main/java/tachyon/thrift/WorkerInfo.java +++ b/common/src/main/java/tachyon/thrift/WorkerInfo.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class WorkerInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkerInfo"); diff --git a/common/src/main/java/tachyon/thrift/WorkerService.java b/common/src/main/java/tachyon/thrift/WorkerService.java index fbec7c657584..cd0004ab00de 100644 --- a/common/src/main/java/tachyon/thrift/WorkerService.java +++ b/common/src/main/java/tachyon/thrift/WorkerService.java @@ -34,14 +34,14 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") public class WorkerService { public interface Iface { public void accessBlock(long blockId) throws org.apache.thrift.TException; - public void addCheckpoint(long fileId, long nonce) throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException; + public void persistFile(long fileId, long nonce, String path) throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException; public boolean asyncCheckpoint(long fileId) throws TachyonException, org.apache.thrift.TException; @@ -49,7 +49,7 @@ public interface Iface { * Used to cache a block into Tachyon space, worker will move the temporary block file from session * folder to data folder, and update the space usage information related. then update the block * information to master. - * + * * @param sessionId * @param blockId */ @@ -58,7 +58,7 @@ public interface Iface { /** * Used to cancel a block which is being written. worker will delete the temporary block file and * the location and space information related, then reclaim space allocated to the block. - * + * * @param sessionId * @param blockId */ @@ -68,7 +68,7 @@ public interface Iface { * Lock the file in Tachyon's space while the session is reading it, and the path of the block file * locked will be returned, if the block file is not found, FileDoesNotExistException will be * thrown. - * + * * @param blockId * @param sessionId */ @@ -78,7 +78,7 @@ public interface Iface { * Used to promote block on under storage layer to top storage layer when there are more than one * storage layers in Tachyon's space. return true if the block is successfully promoted, false * otherwise. - * + * * @param blockId */ public boolean promoteBlock(long blockId) throws org.apache.thrift.TException; @@ -89,7 +89,7 @@ public interface Iface { * temporary file path of the block file will be returned. if there is no enough space on Tachyon * storage OutOfSpaceException will be thrown, if the file is already being written by the session, * FileAlreadyExistException will be thrown. - * + * * @param sessionId * @param blockId * @param initialBytes @@ -100,7 +100,7 @@ public interface Iface { * Used to request space for some block file. return true if the worker successfully allocates * space for the block on block’s location, false if there is no enough space, if there is no * information of the block on worker, FileDoesNotExistException will be thrown. - * + * * @param sessionId * @param blockId * @param requestBytes @@ -111,7 +111,7 @@ public interface Iface { * Used to unlock a block after the block is accessed, if the block is to be removed, delete the * block file. return true if successfully unlock the block, return false if the block is not * found or failed to delete the block. - * + * * @param blockId * @param sessionId */ @@ -120,7 +120,7 @@ public interface Iface { /** * Local session send heartbeat to local worker to keep its temporary folder. It also sends client * metrics to the worker. - * + * * @param sessionId * @param metrics */ @@ -132,7 +132,7 @@ public interface AsyncIface { public void accessBlock(long blockId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void addCheckpoint(long fileId, long nonce, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void persistFile(long fileId, long nonce, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void asyncCheckpoint(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -194,23 +194,24 @@ public void recv_accessBlock() throws org.apache.thrift.TException return; } - public void addCheckpoint(long fileId, long nonce) throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException + public void persistFile(long fileId, long nonce, String path) throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException { - send_addCheckpoint(fileId, nonce); - recv_addCheckpoint(); + send_persistFile(fileId, nonce, path); + recv_persistFile(); } - public void send_addCheckpoint(long fileId, long nonce) throws org.apache.thrift.TException + public void send_persistFile(long fileId, long nonce, String path) throws org.apache.thrift.TException { - addCheckpoint_args args = new addCheckpoint_args(); + persistFile_args args = new persistFile_args(); args.setFileId(fileId); args.setNonce(nonce); + args.setPath(path); sendBase("persistFile", args); } - public void recv_addCheckpoint() throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException + public void recv_persistFile() throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException { - addCheckpoint_result result = new addCheckpoint_result(); + persistFile_result result = new persistFile_result(); receiveBase(result, "persistFile"); if (result.eP != null) { throw result.eP; @@ -505,27 +506,30 @@ public void getResult() throws org.apache.thrift.TException { } } - public void addCheckpoint(long fileId, long nonce, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void persistFile(long fileId, long nonce, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - addCheckpoint_call method_call = new addCheckpoint_call(fileId, nonce, resultHandler, this, ___protocolFactory, ___transport); + persistFile_call method_call = new persistFile_call(fileId, nonce, path, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class addCheckpoint_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class persistFile_call extends org.apache.thrift.async.TAsyncMethodCall { private long fileId; private long nonce; - public addCheckpoint_call(long fileId, long nonce, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private String path; + public persistFile_call(long fileId, long nonce, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.fileId = fileId; this.nonce = nonce; + this.path = path; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("persistFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - addCheckpoint_args args = new addCheckpoint_args(); + persistFile_args args = new persistFile_args(); args.setFileId(fileId); args.setNonce(nonce); + args.setPath(path); args.write(prot); prot.writeMessageEnd(); } @@ -536,7 +540,7 @@ public void getResult() throws FileDoesNotExistException, SuspectedFileSizeExcep } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_addCheckpoint(); + (new Client(prot)).recv_persistFile(); } } @@ -869,7 +873,7 @@ protected Processor(I iface, Map Map> getProcessMap(Map> processMap) { processMap.put("accessBlock", new accessBlock()); - processMap.put("persistFile", new addCheckpoint()); + processMap.put("persistFile", new persistFile()); processMap.put("asyncCheckpoint", new asyncCheckpoint()); processMap.put("cacheBlock", new cacheBlock()); processMap.put("cancelBlock", new cancelBlock()); @@ -902,23 +906,23 @@ public accessBlock_result getResult(I iface, accessBlock_args args) throws org.a } } - public static class addCheckpoint extends org.apache.thrift.ProcessFunction { - public addCheckpoint() { + public static class persistFile extends org.apache.thrift.ProcessFunction { + public persistFile() { super("persistFile"); } - public addCheckpoint_args getEmptyArgsInstance() { - return new addCheckpoint_args(); + public persistFile_args getEmptyArgsInstance() { + return new persistFile_args(); } protected boolean isOneway() { return false; } - public addCheckpoint_result getResult(I iface, addCheckpoint_args args) throws org.apache.thrift.TException { - addCheckpoint_result result = new addCheckpoint_result(); + public persistFile_result getResult(I iface, persistFile_args args) throws org.apache.thrift.TException { + persistFile_result result = new persistFile_result(); try { - iface.addCheckpoint(args.fileId, args.nonce); + iface.persistFile(args.fileId, args.nonce, args.path); } catch (FileDoesNotExistException eP) { result.eP = eP; } catch (SuspectedFileSizeException eS) { @@ -1154,7 +1158,7 @@ protected AsyncProcessor(I iface, Map Map> getProcessMap(Map> processMap) { processMap.put("accessBlock", new accessBlock()); - processMap.put("persistFile", new addCheckpoint()); + processMap.put("persistFile", new persistFile()); processMap.put("asyncCheckpoint", new asyncCheckpoint()); processMap.put("cacheBlock", new cacheBlock()); processMap.put("cancelBlock", new cancelBlock()); @@ -1178,7 +1182,7 @@ public accessBlock_args getEmptyArgsInstance() { public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new AsyncMethodCallback() { public void onComplete(Void o) { accessBlock_result result = new accessBlock_result(); try { @@ -1217,20 +1221,20 @@ public void start(I iface, accessBlock_args args, org.apache.thrift.async.AsyncM } } - public static class addCheckpoint extends org.apache.thrift.AsyncProcessFunction { - public addCheckpoint() { + public static class persistFile extends org.apache.thrift.AsyncProcessFunction { + public persistFile() { super("persistFile"); } - public addCheckpoint_args getEmptyArgsInstance() { - return new addCheckpoint_args(); + public persistFile_args getEmptyArgsInstance() { + return new persistFile_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new AsyncMethodCallback() { public void onComplete(Void o) { - addCheckpoint_result result = new addCheckpoint_result(); + persistFile_result result = new persistFile_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -1242,7 +1246,7 @@ public void onComplete(Void o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - addCheckpoint_result result = new addCheckpoint_result(); + persistFile_result result = new persistFile_result(); if (e instanceof FileDoesNotExistException) { result.eP = (FileDoesNotExistException) e; result.setEPIsSet(true); @@ -1263,7 +1267,7 @@ else if (e instanceof BlockInfoException) { result.setEBIsSet(true); msg = result; } - else + else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -1283,8 +1287,8 @@ protected boolean isOneway() { return false; } - public void start(I iface, addCheckpoint_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.addCheckpoint(args.fileId, args.nonce,resultHandler); + public void start(I iface, persistFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.persistFile(args.fileId, args.nonce, args.path,resultHandler); } } @@ -1299,7 +1303,7 @@ public asyncCheckpoint_args getEmptyArgsInstance() { public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new AsyncMethodCallback() { public void onComplete(Boolean o) { asyncCheckpoint_result result = new asyncCheckpoint_result(); result.success = o; @@ -1321,7 +1325,7 @@ public void onError(Exception e) { result.setEIsSet(true); msg = result; } - else + else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -1357,7 +1361,7 @@ public cacheBlock_args getEmptyArgsInstance() { public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new AsyncMethodCallback() { public void onComplete(Void o) { cacheBlock_result result = new cacheBlock_result(); try { @@ -1382,7 +1386,7 @@ else if (e instanceof BlockInfoException) { result.setEBIsSet(true); msg = result; } - else + else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -1418,7 +1422,7 @@ public cancelBlock_args getEmptyArgsInstance() { public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new AsyncMethodCallback() { public void onComplete(Void o) { cancelBlock_result result = new cancelBlock_result(); try { @@ -1468,7 +1472,7 @@ public lockBlock_args getEmptyArgsInstance() { public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new AsyncMethodCallback() { public void onComplete(String o) { lockBlock_result result = new lockBlock_result(); result.success = o; @@ -1489,7 +1493,7 @@ public void onError(Exception e) { result.setEPIsSet(true); msg = result; } - else + else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -1525,7 +1529,7 @@ public promoteBlock_args getEmptyArgsInstance() { public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new AsyncMethodCallback() { public void onComplete(Boolean o) { promoteBlock_result result = new promoteBlock_result(); result.success = o; @@ -1577,7 +1581,7 @@ public requestBlockLocation_args getEmptyArgsInstance() { public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new AsyncMethodCallback() { public void onComplete(String o) { requestBlockLocation_result result = new requestBlockLocation_result(); result.success = o; @@ -1603,7 +1607,7 @@ else if (e instanceof FileAlreadyExistException) { result.setESIsSet(true); msg = result; } - else + else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -1639,7 +1643,7 @@ public requestSpace_args getEmptyArgsInstance() { public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new AsyncMethodCallback() { public void onComplete(Boolean o) { requestSpace_result result = new requestSpace_result(); result.success = o; @@ -1661,7 +1665,7 @@ public void onError(Exception e) { result.setEPIsSet(true); msg = result; } - else + else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -1697,7 +1701,7 @@ public unlockBlock_args getEmptyArgsInstance() { public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new AsyncMethodCallback() { public void onComplete(Boolean o) { unlockBlock_result result = new unlockBlock_result(); result.success = o; @@ -1749,7 +1753,7 @@ public sessionHeartbeat_args getEmptyArgsInstance() { public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new AsyncMethodCallback() { public void onComplete(Void o) { sessionHeartbeat_result result = new sessionHeartbeat_result(); try { @@ -1867,7 +1871,7 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(accessBlock_args.class, metaDataMap); @@ -2079,7 +2083,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, accessBlock_args st while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -2087,7 +2091,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, accessBlock_args st if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.blockId = iprot.readI64(); struct.setBlockIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2351,7 +2355,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, accessBlock_result while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -2397,25 +2401,28 @@ public void read(org.apache.thrift.protocol.TProtocol prot, accessBlock_result s } - public static class addCheckpoint_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCheckpoint_args"); + public static class persistFile_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("persistFile_args"); private static final org.apache.thrift.protocol.TField FILE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fileId", org.apache.thrift.protocol.TType.I64, (short)1); private static final org.apache.thrift.protocol.TField NONCE_FIELD_DESC = new org.apache.thrift.protocol.TField("nonce", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new addCheckpoint_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new addCheckpoint_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new persistFile_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new persistFile_argsTupleSchemeFactory()); } public long fileId; // required public long nonce; // required + public String path; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { FILE_ID((short)1, "fileId"), - NONCE((short)2, "nonce"); + NONCE((short)2, "nonce"), + PATH((short)3, "path"); private static final Map byName = new HashMap(); @@ -2434,6 +2441,8 @@ public static _Fields findByThriftId(int fieldId) { return FILE_ID; case 2: // NONCE return NONCE; + case 3: // PATH + return PATH; default: return null; } @@ -2480,39 +2489,46 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FILE_ID, new org.apache.thrift.meta_data.FieldMetaData("fileId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.FILE_ID, new org.apache.thrift.meta_data.FieldMetaData("fileId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NONCE, new org.apache.thrift.meta_data.FieldMetaData("nonce", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.NONCE, new org.apache.thrift.meta_data.FieldMetaData("nonce", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCheckpoint_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(persistFile_args.class, metaDataMap); } - public addCheckpoint_args() { + public persistFile_args() { } - public addCheckpoint_args( + public persistFile_args( long fileId, - long nonce) + long nonce, + String path) { this(); this.fileId = fileId; setFileIdIsSet(true); this.nonce = nonce; setNonceIsSet(true); + this.path = path; } /** * Performs a deep copy on other. */ - public addCheckpoint_args(addCheckpoint_args other) { + public persistFile_args(persistFile_args other) { __isset_bitfield = other.__isset_bitfield; this.fileId = other.fileId; this.nonce = other.nonce; + if (other.isSetPath()) { + this.path = other.path; + } } - public addCheckpoint_args deepCopy() { - return new addCheckpoint_args(this); + public persistFile_args deepCopy() { + return new persistFile_args(this); } @Override @@ -2521,13 +2537,14 @@ public void clear() { this.fileId = 0; setNonceIsSet(false); this.nonce = 0; + this.path = null; } public long getFileId() { return this.fileId; } - public addCheckpoint_args setFileId(long fileId) { + public persistFile_args setFileId(long fileId) { this.fileId = fileId; setFileIdIsSet(true); return this; @@ -2550,7 +2567,7 @@ public long getNonce() { return this.nonce; } - public addCheckpoint_args setNonce(long nonce) { + public persistFile_args setNonce(long nonce) { this.nonce = nonce; setNonceIsSet(true); return this; @@ -2569,6 +2586,30 @@ public void setNonceIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NONCE_ISSET_ID, value); } + public String getPath() { + return this.path; + } + + public persistFile_args setPath(String path) { + this.path = path; + return this; + } + + public void unsetPath() { + this.path = null; + } + + /** Returns true if field path is set (has been assigned a value) and false otherwise */ + public boolean isSetPath() { + return this.path != null; + } + + public void setPathIsSet(boolean value) { + if (!value) { + this.path = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case FILE_ID: @@ -2587,6 +2628,14 @@ public void setFieldValue(_Fields field, Object value) { } break; + case PATH: + if (value == null) { + unsetPath(); + } else { + setPath((String)value); + } + break; + } } @@ -2598,6 +2647,9 @@ public Object getFieldValue(_Fields field) { case NONCE: return Long.valueOf(getNonce()); + case PATH: + return getPath(); + } throw new IllegalStateException(); } @@ -2613,6 +2665,8 @@ public boolean isSet(_Fields field) { return isSetFileId(); case NONCE: return isSetNonce(); + case PATH: + return isSetPath(); } throw new IllegalStateException(); } @@ -2621,12 +2675,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof addCheckpoint_args) - return this.equals((addCheckpoint_args)that); + if (that instanceof persistFile_args) + return this.equals((persistFile_args)that); return false; } - public boolean equals(addCheckpoint_args that) { + public boolean equals(persistFile_args that) { if (that == null) return false; @@ -2648,6 +2702,15 @@ public boolean equals(addCheckpoint_args that) { return false; } + boolean this_present_path = true && this.isSetPath(); + boolean that_present_path = true && that.isSetPath(); + if (this_present_path || that_present_path) { + if (!(this_present_path && that_present_path)) + return false; + if (!this.path.equals(that.path)) + return false; + } + return true; } @@ -2665,11 +2728,16 @@ public int hashCode() { if (present_nonce) list.add(nonce); + boolean present_path = true && (isSetPath()); + list.add(present_path); + if (present_path) + list.add(path); + return list.hashCode(); } @Override - public int compareTo(addCheckpoint_args other) { + public int compareTo(persistFile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -2696,6 +2764,16 @@ public int compareTo(addCheckpoint_args other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -2713,7 +2791,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("addCheckpoint_args("); + StringBuilder sb = new StringBuilder("persistFile_args("); boolean first = true; sb.append("fileId:"); @@ -2723,6 +2801,14 @@ public String toString() { sb.append("nonce:"); sb.append(this.nonce); first = false; + if (!first) sb.append(", "); + sb.append("path:"); + if (this.path == null) { + sb.append("null"); + } else { + sb.append(this.path); + } + first = false; sb.append(")"); return sb.toString(); } @@ -2750,21 +2836,21 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class addCheckpoint_argsStandardSchemeFactory implements SchemeFactory { - public addCheckpoint_argsStandardScheme getScheme() { - return new addCheckpoint_argsStandardScheme(); + private static class persistFile_argsStandardSchemeFactory implements SchemeFactory { + public persistFile_argsStandardScheme getScheme() { + return new persistFile_argsStandardScheme(); } } - private static class addCheckpoint_argsStandardScheme extends StandardScheme { + private static class persistFile_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -2772,7 +2858,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_args if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.fileId = iprot.readI64(); struct.setFileIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2780,7 +2866,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_args if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.nonce = iprot.readI64(); struct.setNonceIsSet(true); - } else { + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2795,7 +2889,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_args struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, addCheckpoint_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, persistFile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -2805,22 +2899,27 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, addCheckpoint_args oprot.writeFieldBegin(NONCE_FIELD_DESC); oprot.writeI64(struct.nonce); oprot.writeFieldEnd(); + if (struct.path != null) { + oprot.writeFieldBegin(PATH_FIELD_DESC); + oprot.writeString(struct.path); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class addCheckpoint_argsTupleSchemeFactory implements SchemeFactory { - public addCheckpoint_argsTupleScheme getScheme() { - return new addCheckpoint_argsTupleScheme(); + private static class persistFile_argsTupleSchemeFactory implements SchemeFactory { + public persistFile_argsTupleScheme getScheme() { + return new persistFile_argsTupleScheme(); } } - private static class addCheckpoint_argsTupleScheme extends TupleScheme { + private static class persistFile_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, persistFile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetFileId()) { @@ -2829,19 +2928,25 @@ public void write(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_args if (struct.isSetNonce()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); + if (struct.isSetPath()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); if (struct.isSetFileId()) { oprot.writeI64(struct.fileId); } if (struct.isSetNonce()) { oprot.writeI64(struct.nonce); } + if (struct.isSetPath()) { + oprot.writeString(struct.path); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, persistFile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.fileId = iprot.readI64(); struct.setFileIdIsSet(true); @@ -2850,13 +2955,17 @@ public void read(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_args s struct.nonce = iprot.readI64(); struct.setNonceIsSet(true); } + if (incoming.get(2)) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); + } } } } - public static class addCheckpoint_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCheckpoint_result"); + public static class persistFile_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("persistFile_result"); private static final org.apache.thrift.protocol.TField E_P_FIELD_DESC = new org.apache.thrift.protocol.TField("eP", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField E_S_FIELD_DESC = new org.apache.thrift.protocol.TField("eS", org.apache.thrift.protocol.TType.STRUCT, (short)2); @@ -2865,8 +2974,8 @@ public static class addCheckpoint_result implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new addCheckpoint_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new addCheckpoint_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new persistFile_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new persistFile_resultTupleSchemeFactory()); } public FileDoesNotExistException eP; // required @@ -2945,22 +3054,22 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.E_S, new org.apache.thrift.meta_data.FieldMetaData("eS", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.E_S, new org.apache.thrift.meta_data.FieldMetaData("eS", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.E_F, new org.apache.thrift.meta_data.FieldMetaData("eF", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.E_F, new org.apache.thrift.meta_data.FieldMetaData("eF", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.E_B, new org.apache.thrift.meta_data.FieldMetaData("eB", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.E_B, new org.apache.thrift.meta_data.FieldMetaData("eB", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCheckpoint_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(persistFile_result.class, metaDataMap); } - public addCheckpoint_result() { + public persistFile_result() { } - public addCheckpoint_result( + public persistFile_result( FileDoesNotExistException eP, SuspectedFileSizeException eS, FailedToCheckpointException eF, @@ -2976,7 +3085,7 @@ public addCheckpoint_result( /** * Performs a deep copy on other. */ - public addCheckpoint_result(addCheckpoint_result other) { + public persistFile_result(persistFile_result other) { if (other.isSetEP()) { this.eP = new FileDoesNotExistException(other.eP); } @@ -2991,8 +3100,8 @@ public addCheckpoint_result(addCheckpoint_result other) { } } - public addCheckpoint_result deepCopy() { - return new addCheckpoint_result(this); + public persistFile_result deepCopy() { + return new persistFile_result(this); } @Override @@ -3007,7 +3116,7 @@ public FileDoesNotExistException getEP() { return this.eP; } - public addCheckpoint_result setEP(FileDoesNotExistException eP) { + public persistFile_result setEP(FileDoesNotExistException eP) { this.eP = eP; return this; } @@ -3031,7 +3140,7 @@ public SuspectedFileSizeException getES() { return this.eS; } - public addCheckpoint_result setES(SuspectedFileSizeException eS) { + public persistFile_result setES(SuspectedFileSizeException eS) { this.eS = eS; return this; } @@ -3055,7 +3164,7 @@ public FailedToCheckpointException getEF() { return this.eF; } - public addCheckpoint_result setEF(FailedToCheckpointException eF) { + public persistFile_result setEF(FailedToCheckpointException eF) { this.eF = eF; return this; } @@ -3079,7 +3188,7 @@ public BlockInfoException getEB() { return this.eB; } - public addCheckpoint_result setEB(BlockInfoException eB) { + public persistFile_result setEB(BlockInfoException eB) { this.eB = eB; return this; } @@ -3177,12 +3286,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof addCheckpoint_result) - return this.equals((addCheckpoint_result)that); + if (that instanceof persistFile_result) + return this.equals((persistFile_result)that); return false; } - public boolean equals(addCheckpoint_result that) { + public boolean equals(persistFile_result that) { if (that == null) return false; @@ -3253,7 +3362,7 @@ public int hashCode() { } @Override - public int compareTo(addCheckpoint_result other) { + public int compareTo(persistFile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -3317,7 +3426,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("addCheckpoint_result("); + StringBuilder sb = new StringBuilder("persistFile_result("); boolean first = true; sb.append("eP:"); @@ -3376,21 +3485,21 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class addCheckpoint_resultStandardSchemeFactory implements SchemeFactory { - public addCheckpoint_resultStandardScheme getScheme() { - return new addCheckpoint_resultStandardScheme(); + private static class persistFile_resultStandardSchemeFactory implements SchemeFactory { + public persistFile_resultStandardScheme getScheme() { + return new persistFile_resultStandardScheme(); } } - private static class addCheckpoint_resultStandardScheme extends StandardScheme { + private static class persistFile_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -3399,7 +3508,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_resul struct.eP = new FileDoesNotExistException(); struct.eP.read(iprot); struct.setEPIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -3408,7 +3517,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_resul struct.eS = new SuspectedFileSizeException(); struct.eS.read(iprot); struct.setESIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -3417,7 +3526,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_resul struct.eF = new FailedToCheckpointException(); struct.eF.read(iprot); struct.setEFIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -3426,7 +3535,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_resul struct.eB = new BlockInfoException(); struct.eB.read(iprot); struct.setEBIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -3441,7 +3550,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_resul struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, addCheckpoint_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, persistFile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -3471,16 +3580,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, addCheckpoint_resu } - private static class addCheckpoint_resultTupleSchemeFactory implements SchemeFactory { - public addCheckpoint_resultTupleScheme getScheme() { - return new addCheckpoint_resultTupleScheme(); + private static class persistFile_resultTupleSchemeFactory implements SchemeFactory { + public persistFile_resultTupleScheme getScheme() { + return new persistFile_resultTupleScheme(); } } - private static class addCheckpoint_resultTupleScheme extends TupleScheme { + private static class persistFile_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, persistFile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetEP()) { @@ -3511,7 +3620,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_resul } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, persistFile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { @@ -3616,7 +3725,7 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FILE_ID, new org.apache.thrift.meta_data.FieldMetaData("fileId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.FILE_ID, new org.apache.thrift.meta_data.FieldMetaData("fileId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(asyncCheckpoint_args.class, metaDataMap); @@ -3828,7 +3937,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_arg while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -3836,7 +3945,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_arg if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.fileId = iprot.readI64(); struct.setFileIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -3980,9 +4089,9 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(asyncCheckpoint_result.class, metaDataMap); @@ -4269,7 +4378,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_res while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -4277,7 +4386,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_res if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -4286,7 +4395,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_res struct.e = new TachyonException(); struct.e.read(iprot); struct.setEIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -4449,9 +4558,9 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cacheBlock_args.class, metaDataMap); @@ -4733,7 +4842,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_args str while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -4741,7 +4850,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_args str if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.sessionId = iprot.readI64(); struct.setSessionIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -4749,7 +4858,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_args str if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.blockId = iprot.readI64(); struct.setBlockIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -4904,9 +5013,9 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.E_B, new org.apache.thrift.meta_data.FieldMetaData("eB", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.E_B, new org.apache.thrift.meta_data.FieldMetaData("eB", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cacheBlock_result.class, metaDataMap); @@ -5195,7 +5304,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_result s while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -5204,7 +5313,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_result s struct.eP = new FileDoesNotExistException(); struct.eP.read(iprot); struct.setEPIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -5213,7 +5322,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_result s struct.eB = new BlockInfoException(); struct.eB.read(iprot); struct.setEBIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -5377,9 +5486,9 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelBlock_args.class, metaDataMap); @@ -5661,7 +5770,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_args st while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -5669,7 +5778,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_args st if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.sessionId = iprot.readI64(); struct.setSessionIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -5677,7 +5786,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_args st if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.blockId = iprot.readI64(); struct.setBlockIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -5954,7 +6063,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_result while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -6083,9 +6192,9 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(lockBlock_args.class, metaDataMap); @@ -6367,7 +6476,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_args stru while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -6375,7 +6484,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_args stru if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.blockId = iprot.readI64(); struct.setBlockIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -6383,7 +6492,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_args stru if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.sessionId = iprot.readI64(); struct.setSessionIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -6538,9 +6647,9 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(lockBlock_result.class, metaDataMap); @@ -6829,7 +6938,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_result st while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -6837,7 +6946,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_result st if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -6846,7 +6955,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_result st struct.eP = new FileDoesNotExistException(); struct.eP.read(iprot); struct.setEPIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -7003,7 +7112,7 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(promoteBlock_args.class, metaDataMap); @@ -7215,7 +7324,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, promoteBlock_args s while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -7223,7 +7332,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, promoteBlock_args s if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.blockId = iprot.readI64(); struct.setBlockIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -7362,7 +7471,7 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(promoteBlock_result.class, metaDataMap); @@ -7574,7 +7683,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, promoteBlock_result while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -7582,7 +7691,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, promoteBlock_result if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -7735,11 +7844,11 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.INITIAL_BYTES, new org.apache.thrift.meta_data.FieldMetaData("initialBytes", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.INITIAL_BYTES, new org.apache.thrift.meta_data.FieldMetaData("initialBytes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestBlockLocation_args.class, metaDataMap); @@ -8091,7 +8200,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestBlockLocatio while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -8099,7 +8208,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestBlockLocatio if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.sessionId = iprot.readI64(); struct.setSessionIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -8107,7 +8216,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestBlockLocatio if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.blockId = iprot.readI64(); struct.setBlockIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -8115,7 +8224,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestBlockLocatio if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.initialBytes = iprot.readI64(); struct.setInitialBytesIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -8288,11 +8397,11 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.E_S, new org.apache.thrift.meta_data.FieldMetaData("eS", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.E_S, new org.apache.thrift.meta_data.FieldMetaData("eS", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestBlockLocation_result.class, metaDataMap); @@ -8656,7 +8765,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestBlockLocatio while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -8664,7 +8773,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestBlockLocatio if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -8673,7 +8782,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestBlockLocatio struct.eP = new OutOfSpaceException(); struct.eP.read(iprot); struct.setEPIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -8682,7 +8791,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestBlockLocatio struct.eS = new FileAlreadyExistException(); struct.eS.read(iprot); struct.setESIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -8867,11 +8976,11 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.REQUEST_BYTES, new org.apache.thrift.meta_data.FieldMetaData("requestBytes", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.REQUEST_BYTES, new org.apache.thrift.meta_data.FieldMetaData("requestBytes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestSpace_args.class, metaDataMap); @@ -9223,7 +9332,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestSpace_args s while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -9231,7 +9340,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestSpace_args s if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.sessionId = iprot.readI64(); struct.setSessionIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -9239,7 +9348,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestSpace_args s if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.blockId = iprot.readI64(); struct.setBlockIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -9247,7 +9356,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestSpace_args s if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.requestBytes = iprot.readI64(); struct.setRequestBytesIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -9417,9 +9526,9 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestSpace_result.class, metaDataMap); @@ -9706,7 +9815,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestSpace_result while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -9714,7 +9823,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestSpace_result if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -9723,7 +9832,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestSpace_result struct.eP = new FileDoesNotExistException(); struct.eP.read(iprot); struct.setEPIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -9886,9 +9995,9 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unlockBlock_args.class, metaDataMap); @@ -10170,7 +10279,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_args st while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -10178,7 +10287,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_args st if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.blockId = iprot.readI64(); struct.setBlockIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -10186,7 +10295,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_args st if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.sessionId = iprot.readI64(); struct.setSessionIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -10338,7 +10447,7 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unlockBlock_result.class, metaDataMap); @@ -10550,7 +10659,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_result while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -10558,7 +10667,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_result if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -10704,10 +10813,10 @@ public String getFieldName() { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.METRICS, new org.apache.thrift.meta_data.FieldMetaData("metrics", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + tmpMap.put(_Fields.METRICS, new org.apache.thrift.meta_data.FieldMetaData("metrics", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionHeartbeat_args.class, metaDataMap); @@ -11010,7 +11119,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_ar while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -11018,7 +11127,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_ar if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.sessionId = iprot.readI64(); struct.setSessionIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -11036,7 +11145,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_ar iprot.readListEnd(); } struct.setMetricsIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -11337,7 +11446,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_re while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { diff --git a/common/src/main/java/tachyon/worker/WorkerClient.java b/common/src/main/java/tachyon/worker/WorkerClient.java index 771393060855..c22fe9145299 100644 --- a/common/src/main/java/tachyon/worker/WorkerClient.java +++ b/common/src/main/java/tachyon/worker/WorkerClient.java @@ -114,16 +114,18 @@ public synchronized void accessBlock(long blockId) throws IOException { } /** - * Notifies the worker that the checkpoint file of the file has been added. + * Notifies the worker that a file has been persisted. * - * @param fileId The id of the checkpointed file + * @param fileId the file id + * @param nonce nonce a nonce used for temporary file creation + * @param path the UFS path of the file * @throws IOException */ - public synchronized void addCheckpoint(long fileId, long nonce) throws IOException { + public synchronized void persistFile(long fileId, long nonce, String path) throws IOException { mustConnect(); try { - mClient.addCheckpoint(fileId, nonce); + mClient.persistFile(fileId, nonce, path); } catch (FileDoesNotExistException e) { throw new IOException(e); } catch (SuspectedFileSizeException e) { diff --git a/common/src/thrift/tachyon.thrift b/common/src/thrift/tachyon.thrift index 6f96df345c10..cc44e3c7b31a 100644 --- a/common/src/thrift/tachyon.thrift +++ b/common/src/thrift/tachyon.thrift @@ -283,7 +283,7 @@ service RawTableMasterService { service WorkerService { void accessBlock(1: i64 blockId) - void addCheckpoint(1: i64 fileId, 2: i64 nonce) + void persistFile(1: i64 fileId, 2: i64 nonce, 3: string path) throws (1: FileDoesNotExistException eP, 2: SuspectedFileSizeException eS, 3: FailedToCheckpointException eF, 4: BlockInfoException eB) diff --git a/integration-tests/src/test/java/tachyon/master/file/FileSystemMasterIntegrationTest.java b/integration-tests/src/test/java/tachyon/master/file/FileSystemMasterIntegrationTest.java index 655d2fea0670..b09e0e1edb6c 100644 --- a/integration-tests/src/test/java/tachyon/master/file/FileSystemMasterIntegrationTest.java +++ b/integration-tests/src/test/java/tachyon/master/file/FileSystemMasterIntegrationTest.java @@ -245,17 +245,6 @@ public void exec(int depth, int concurrencyDepth, TachyonURI path) throws Except @Rule public ExpectedException mThrown = ExpectedException.none(); - @Test - public void addCheckpointTest() throws Exception { - long fileId = - mFsMaster.createFile(new TachyonURI("/testFile"), Constants.DEFAULT_BLOCK_SIZE_BYTE, false); - FileInfo fileInfo = mFsMaster.getFileInfo(fileId); - Assert.assertFalse(fileInfo.isPersisted); - mFsMaster.persistFile(fileId, 1); - fileInfo = mFsMaster.getFileInfo(fileId); - Assert.assertTrue(fileInfo.isPersisted); - } - @After public final void after() throws Exception { mLocalTachyonCluster.stop(); @@ -637,6 +626,18 @@ public void notFileCheckpointTest() throws Exception { mFsMaster.persistFile(mFsMaster.getFileId(new TachyonURI("/testFile")), 0); } + @Test + public void persistFileTest() throws Exception { + long fileId = + mFsMaster.createFile(new TachyonURI("/testFile"), Constants.DEFAULT_BLOCK_SIZE_BYTE, false); + FileInfo fileInfo = mFsMaster.getFileInfo(fileId); + Assert.assertFalse(fileInfo.isPersisted); + mFsMaster.persistFile(fileId, 1); + fileInfo = mFsMaster.getFileInfo(fileId); + Assert.assertTrue(fileInfo.isPersisted); + } + + @Test public void renameExistingDstTest() throws Exception { mFsMaster.createFile(new TachyonURI("/testFile1"), Constants.DEFAULT_BLOCK_SIZE_BYTE, true); diff --git a/integration-tests/src/test/java/tachyon/worker/BlockServiceHandlerIntegrationTest.java b/integration-tests/src/test/java/tachyon/worker/BlockServiceHandlerIntegrationTest.java index c4a78c0bc875..b94d968fd352 100644 --- a/integration-tests/src/test/java/tachyon/worker/BlockServiceHandlerIntegrationTest.java +++ b/integration-tests/src/test/java/tachyon/worker/BlockServiceHandlerIntegrationTest.java @@ -94,7 +94,7 @@ public final void before() throws Exception { mLocalTachyonCluster.getMasterPort()), mExecutorService, mWorkerTachyonConf); } - // Tests that checkpointing a file successfully informs master of the update + // Tests that persisting a file successfully informs master of the update @Test public void addCheckpointTest() throws Exception { FileOutStream os = mTfs.getOutStream(new TachyonURI("/testFile")); @@ -108,7 +108,7 @@ public void addCheckpointTest() throws Exception { out.write(BufferUtils.getIncreasingByteArray(blockSize)); out.close(); - mWorkerServiceHandler.addCheckpoint(file.getFileId(), os.getNonce()); + mWorkerServiceHandler.persistFile(file.getFileId(), os.getNonce(), ufsPath); // No space should be used in Tachyon, but the file should be complete Assert.assertEquals(0, mBlockMasterClient.getUsedBytes()); diff --git a/servers/src/main/java/tachyon/worker/block/BlockDataManager.java b/servers/src/main/java/tachyon/worker/block/BlockDataManager.java index 8d0adb30b2bf..9523a357164d 100644 --- a/servers/src/main/java/tachyon/worker/block/BlockDataManager.java +++ b/servers/src/main/java/tachyon/worker/block/BlockDataManager.java @@ -22,6 +22,7 @@ import org.apache.thrift.TException; import tachyon.Sessions; +import tachyon.client.UnderStorageType; import tachyon.client.WorkerBlockMasterClient; import tachyon.client.WorkerFileSystemMasterClient; import tachyon.conf.TachyonConf; @@ -149,37 +150,41 @@ public void accessBlock(long sessionId, long blockId) throws NotFoundException { } /** - * Add the checkpoint information of a file. The information is from the session - * sessionId. + * Completes the process of persisting a file by renaming it to its final destination. * * This method is normally triggered from {@link tachyon.client.file.FileOutStream#close()} if and - * only if {@link tachyon.client.WriteType#isThrough()} is true. The current implementation of - * checkpointing is that through {@link tachyon.client.WriteType} operations write to + * only if {@link UnderStorageType#isPersist()} ()} is true. The current implementation of + * persistence is that through {@link tachyon.client.UnderStorageType} operations write to * {@link tachyon.underfs.UnderFileSystem} on the client's write path, but under a temporary file. * * @param fileId a file id * @param nonce a nonce used for temporary file creation + * @param path the UFS path of the file * @throws TException if the file does not exist or cannot be renamed * @throws IOException if the update to the master fails */ - public void addCheckpoint(long fileId, long nonce) throws TException, IOException { - FileInfo fileInfo = mFileSystemMasterClient.getFileInfo(fileId); - String dstPath = fileInfo.getUfsPath(); - String srcPath = PathUtils.temporaryFileName(fileId, nonce, dstPath); - UnderFileSystem ufs = UnderFileSystem.get(srcPath, WorkerContext.getConf()); + public void persistFile(long fileId, long nonce, String path) throws TException, IOException { + String tmpPath = PathUtils.temporaryFileName(fileId, nonce, path); + UnderFileSystem ufs = UnderFileSystem.get(tmpPath, WorkerContext.getConf()); try { - if (!ufs.rename(srcPath, dstPath)) { - throw new FailedToCheckpointException("Failed to rename " + srcPath + " to " + dstPath); + if (!ufs.exists(tmpPath)) { + // Location of the temporary file has changed, recompute it. + FileInfo fileInfo = mFileSystemMasterClient.getFileInfo(fileId); + path = fileInfo.getUfsPath(); + tmpPath = PathUtils.temporaryFileName(fileId, nonce, path); + } + if (!ufs.rename(tmpPath, path)) { + throw new FailedToCheckpointException("Failed to rename " + tmpPath + " to " + path); } } catch (IOException ioe) { - throw new FailedToCheckpointException("Failed to rename " + srcPath + " to " + dstPath + ": " + throw new FailedToCheckpointException("Failed to rename " + tmpPath + " to " + path + ": " + ioe); } long fileSize; try { - fileSize = ufs.getFileSize(dstPath); + fileSize = ufs.getFileSize(path); } catch (IOException ioe) { - throw new FailedToCheckpointException("Failed to getFileSize " + dstPath); + throw new FailedToCheckpointException("Failed to getFileSize " + path); } mFileSystemMasterClient.persistFile(fileId, fileSize); } diff --git a/servers/src/main/java/tachyon/worker/block/BlockServiceHandler.java b/servers/src/main/java/tachyon/worker/block/BlockServiceHandler.java index a5dc36d6a674..64e9364af5d8 100644 --- a/servers/src/main/java/tachyon/worker/block/BlockServiceHandler.java +++ b/servers/src/main/java/tachyon/worker/block/BlockServiceHandler.java @@ -64,18 +64,18 @@ public void accessBlock(long blockId) throws TException { } /** - * This should be called in order to commit a file that was written directly to the under storage + * This should be called in order to persist a file that was written directly to the under storage * system via a THROUGH type write. This will update the master with the appropriate metadata * for the new block. * - * @param sessionId the id of the client requesting the checkpoint - * @param fileId the id of the file that was written to the under storage system - * @throws TException if the underlying worker RPC fails + * @param fileId the file id + * @param nonce nonce a nonce used for temporary file creation + * @param path the UFS path of the file */ @Override - public void addCheckpoint(long sessionId, long fileId) throws TException { + public void persistFile(long fileId, long nonce, String path) throws TException { try { - mWorker.addCheckpoint(sessionId, fileId); + mWorker.persistFile(fileId, nonce, path); } catch (IOException ioe) { throw new TException(ioe); } diff --git a/servers/src/test/java/tachyon/master/journal/JournalFormatterTestBase.java b/servers/src/test/java/tachyon/master/journal/JournalFormatterTestBase.java index 417626c9e8e0..40ca1b6f3696 100644 --- a/servers/src/test/java/tachyon/master/journal/JournalFormatterTestBase.java +++ b/servers/src/test/java/tachyon/master/journal/JournalFormatterTestBase.java @@ -162,7 +162,7 @@ public void inodePersistedEntryTest() throws IOException { } @Test - public void addCheckpointEntryTest() throws IOException { + public void persistFileEntryTest() throws IOException { entryTest(new PersistFileEntry(TEST_FILE_ID, TEST_LENGTH_BYTES, TEST_OP_TIME_MS)); } diff --git a/servers/src/test/java/tachyon/worker/block/BlockDataManagerTest.java b/servers/src/test/java/tachyon/worker/block/BlockDataManagerTest.java index b9b75e6054a1..919ee0d0ff0e 100644 --- a/servers/src/test/java/tachyon/worker/block/BlockDataManagerTest.java +++ b/servers/src/test/java/tachyon/worker/block/BlockDataManagerTest.java @@ -134,7 +134,7 @@ public void addCheckpointTest() throws Exception { Mockito.when(UnderFileSystem.get(srcPath, WorkerContext.getConf())).thenReturn(ufs); Mockito.when(ufs.rename(srcPath,dstPath)).thenReturn(true); Mockito.when(ufs.getFileSize(dstPath)).thenReturn(fileSize); - mHarness.mManager.addCheckpoint(fileId, nonce); + mHarness.mManager.persistFile(fileId, nonce, dstPath); Mockito.verify(mHarness.mFileSystemMasterClient).persistFile(fileId, fileSize); }