From cb1fcef7eb4ddfa759a1bdb914dac7ffb3e9f567 Mon Sep 17 00:00:00 2001 From: Jiri Simsa Date: Sun, 27 Sep 2015 20:23:05 -0700 Subject: [PATCH] Addressing review comments. --- .../file/AbstractTachyonFileSystem.java | 6 - .../tachyon/client/file/FileInStream.java | 2 +- .../tachyon/client/file/FileOutStream.java | 8 +- .../client/file/TachyonFileSystemCore.java | 2 +- .../client/WorkerFileSystemMasterClient.java | 6 +- .../main/java/tachyon/thrift/BlockInfo.java | 2 +- .../tachyon/thrift/BlockInfoException.java | 2 +- .../java/tachyon/thrift/BlockLocation.java | 2 +- .../tachyon/thrift/BlockMasterService.java | 2 +- .../src/main/java/tachyon/thrift/Command.java | 2 +- .../DependencyDoesNotExistException.java | 2 +- .../java/tachyon/thrift/DependencyInfo.java | 2 +- .../thrift/FailedToCheckpointException.java | 2 +- .../thrift/FileAlreadyExistException.java | 2 +- .../java/tachyon/thrift/FileBlockInfo.java | 2 +- .../thrift/FileDoesNotExistException.java | 2 +- .../main/java/tachyon/thrift/FileInfo.java | 2 +- .../thrift/FileSystemMasterService.java | 198 ++++++------- .../tachyon/thrift/InvalidPathException.java | 2 +- .../main/java/tachyon/thrift/MountOpts.java | 2 +- .../main/java/tachyon/thrift/NetAddress.java | 2 +- .../tachyon/thrift/NoWorkerException.java | 2 +- .../tachyon/thrift/OutOfSpaceException.java | 2 +- .../java/tachyon/thrift/RawTableInfo.java | 2 +- .../tachyon/thrift/RawTableMasterService.java | 2 +- .../thrift/SuspectedFileSizeException.java | 2 +- .../tachyon/thrift/TableColumnException.java | 2 +- .../thrift/TableDoesNotExistException.java | 2 +- .../java/tachyon/thrift/TachyonException.java | 2 +- .../main/java/tachyon/thrift/WorkerInfo.java | 2 +- .../java/tachyon/thrift/WorkerService.java | 264 +++++++++--------- .../main/java/tachyon/util/io/PathUtils.java | 6 +- common/src/thrift/tachyon.thrift | 2 +- .../file/FileSystemMasterIntegrationTest.java | 11 +- .../tachyon/master/file/FileSystemMaster.java | 139 +++++---- .../file/FileSystemMasterServiceHandler.java | 36 ++- ...kpointEntry.java => PersistFileEntry.java} | 4 +- .../tachyon/master/file/meta/InodeFile.java | 8 +- .../tachyon/master/file/meta/InodeTree.java | 8 +- .../master/journal/JsonJournalFormatter.java | 4 +- .../worker/block/BlockDataManager.java | 4 +- .../journal/JournalFormatterTestBase.java | 4 +- .../worker/block/BlockDataManagerTest.java | 3 +- 43 files changed, 389 insertions(+), 374 deletions(-) rename servers/src/main/java/tachyon/master/file/journal/{AddCheckpointEntry.java => PersistFileEntry.java} (93%) diff --git a/clients/unshaded/src/main/java/tachyon/client/file/AbstractTachyonFileSystem.java b/clients/unshaded/src/main/java/tachyon/client/file/AbstractTachyonFileSystem.java index 021e717f63fb..90b481d88331 100644 --- a/clients/unshaded/src/main/java/tachyon/client/file/AbstractTachyonFileSystem.java +++ b/clients/unshaded/src/main/java/tachyon/client/file/AbstractTachyonFileSystem.java @@ -163,12 +163,6 @@ public List listStatus(TachyonFile file, ListStatusOptions options) th } } - /** - * {@inheritDoc} - * - * To add the data into Tachyon space perform an operation with the cache option specified, for - * example the load command of the Tachyon Shell. - */ @Override public long loadMetadata(TachyonURI path, LoadMetadataOptions options) throws IOException, TachyonException { diff --git a/clients/unshaded/src/main/java/tachyon/client/file/FileInStream.java b/clients/unshaded/src/main/java/tachyon/client/file/FileInStream.java index 9485b5dd7ec9..600b01032af6 100644 --- a/clients/unshaded/src/main/java/tachyon/client/file/FileInStream.java +++ b/clients/unshaded/src/main/java/tachyon/client/file/FileInStream.java @@ -180,7 +180,7 @@ public void seek(long pos) throws IOException { return; } Preconditions.checkArgument(pos >= 0, "Seek position is negative: " + pos); - Preconditions.checkArgument(pos <= mFileLength, "Seek position is past EOF: " + pos + Preconditions.checkArgument(pos < mFileLength, "Seek position is past EOF: " + pos + ", fileSize = " + mFileLength); seekBlockInStream(pos); 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 e83eac5c0ffa..1ee70f68d9ed 100644 --- a/clients/unshaded/src/main/java/tachyon/client/file/FileOutStream.java +++ b/clients/unshaded/src/main/java/tachyon/client/file/FileOutStream.java @@ -60,7 +60,6 @@ public final class FileOutStream extends OutputStream implements Cancelable { private final UnderStorageType mUnderStorageType; private final FileSystemContext mContext; private final OutputStream mUnderStorageOutputStream; - private final WorkerClient mWorkerClient; private final long mNonce; private boolean mCanceled; @@ -97,9 +96,7 @@ public FileOutStream(long fileId, OutStreamOptions options) throws IOException { } } mUnderStorageOutputStream = ufs.create(fileName, (int) mBlockSize); - mWorkerClient = BlockStoreContext.INSTANCE.acquireWorkerClient(); } else { - mWorkerClient = null; mUnderStorageOutputStream = null; } mClosed = false; @@ -136,11 +133,12 @@ public void close() throws IOException { } else { mUnderStorageOutputStream.flush(); mUnderStorageOutputStream.close(); + WorkerClient workerClient = BlockStoreContext.INSTANCE.acquireWorkerClient(); try { // TODO(yupeng): Investigate if this RPC can be moved to master. - mWorkerClient.addCheckpoint(mFileId, mNonce); + workerClient.addCheckpoint(mFileId, mNonce); } finally { - BlockStoreContext.INSTANCE.releaseWorkerClient(mWorkerClient); + BlockStoreContext.INSTANCE.releaseWorkerClient(workerClient); } canComplete = true; } diff --git a/clients/unshaded/src/main/java/tachyon/client/file/TachyonFileSystemCore.java b/clients/unshaded/src/main/java/tachyon/client/file/TachyonFileSystemCore.java index f7591f713097..e780860d52a1 100644 --- a/clients/unshaded/src/main/java/tachyon/client/file/TachyonFileSystemCore.java +++ b/clients/unshaded/src/main/java/tachyon/client/file/TachyonFileSystemCore.java @@ -100,7 +100,7 @@ List listStatus(TachyonFile file, ListStatusOptions options) throws IO /** * Loads metadata about a file in UFS to Tachyon. No data will be transferred. * - * @param path the path to create the file in Tachyon + * @param path the path for which to load metadat from UFS * @param options method options * @return the file id of the resulting file in Tachyon * @throws IOException if a non-Tachyon exception occurs diff --git a/common/src/main/java/tachyon/client/WorkerFileSystemMasterClient.java b/common/src/main/java/tachyon/client/WorkerFileSystemMasterClient.java index 41a4a6b7f084..e5d5e68b9a0e 100644 --- a/common/src/main/java/tachyon/client/WorkerFileSystemMasterClient.java +++ b/common/src/main/java/tachyon/client/WorkerFileSystemMasterClient.java @@ -66,19 +66,19 @@ protected void afterConnect() { } /** - * Adds a checkpoint. + * Persists a file. * * @param fileId the file id * @param length the checkpoint length * @return whether operation succeeded or not * @throws IOException if an I/O error occurs */ - public synchronized boolean addCheckpoint(long fileId, long length) throws IOException { + public synchronized boolean persistFile(long fileId, long length) throws IOException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { - return mClient.addCheckpoint(fileId, length); + return mClient.persistFile(fileId, length); } catch (FileDoesNotExistException e) { throw new IOException(e); } catch (TException e) { diff --git a/common/src/main/java/tachyon/thrift/BlockInfo.java b/common/src/main/java/tachyon/thrift/BlockInfo.java index 689512cb7c06..d305c3bb006e 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 77c0961b7263..a054333222d3 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 13dd4554a984..6749cd2d2cb2 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 d2affc7da394..6a556bf9bda3 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 ec3057784f87..50769e288afa 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 6d8486e48668..f7915301d69c 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 431db4657c24..e1d23ef30d1d 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 8da26664d1fa..dbc65eea78ae 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 65c69cc9445e..6a03464f4574 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 efeb2a13d8c4..077777bd994d 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 a31af4c0e834..a38549c80c11 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 d87b54993cdf..c75a13216cb9 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 a19d7e8440c8..41413425eb3c 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") public class FileSystemMasterService { public interface Iface { @@ -71,7 +71,7 @@ public interface Iface { public boolean free(long fileId, boolean recursive) throws FileDoesNotExistException, org.apache.thrift.TException; - public boolean addCheckpoint(long fileId, long length) throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException; + public boolean persistFile(long fileId, long length) throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException; /** * Loads metadata for the file identified by the given Tachyon path from UFS into Tachyon. @@ -144,7 +144,7 @@ public interface AsyncIface { public void free(long fileId, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void addCheckpoint(long fileId, long length, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void persistFile(long fileId, long length, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void loadFileInfoFromUfs(String ufsPath, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -619,24 +619,24 @@ public boolean recv_free() throws FileDoesNotExistException, org.apache.thrift.T throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "free failed: unknown result"); } - public boolean addCheckpoint(long fileId, long length) throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException + public boolean persistFile(long fileId, long length) throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException { - send_addCheckpoint(fileId, length); - return recv_addCheckpoint(); + send_persistFile(fileId, length); + return recv_persistFile(); } - public void send_addCheckpoint(long fileId, long length) throws org.apache.thrift.TException + public void send_persistFile(long fileId, long length) throws org.apache.thrift.TException { - addCheckpoint_args args = new addCheckpoint_args(); + persistFile_args args = new persistFile_args(); args.setFileId(fileId); args.setLength(length); - sendBase("addCheckpoint", args); + sendBase("persistFile", args); } - public boolean recv_addCheckpoint() throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException + public boolean recv_persistFile() throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException { - addCheckpoint_result result = new addCheckpoint_result(); - receiveBase(result, "addCheckpoint"); + persistFile_result result = new persistFile_result(); + receiveBase(result, "persistFile"); if (result.isSetSuccess()) { return result.success; } @@ -649,7 +649,7 @@ public boolean recv_addCheckpoint() throws FileDoesNotExistException, SuspectedF if (result.eB != null) { throw result.eB; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addCheckpoint failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "persistFile failed: unknown result"); } public long loadFileInfoFromUfs(String ufsPath, boolean recursive) throws BlockInfoException, FileDoesNotExistException, FileAlreadyExistException, InvalidPathException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException @@ -1414,25 +1414,25 @@ public boolean getResult() throws FileDoesNotExistException, org.apache.thrift.T } } - public void addCheckpoint(long fileId, long length, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void persistFile(long fileId, long length, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - addCheckpoint_call method_call = new addCheckpoint_call(fileId, length, resultHandler, this, ___protocolFactory, ___transport); + persistFile_call method_call = new persistFile_call(fileId, length, 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 length; - public addCheckpoint_call(long fileId, long length, 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 { + public persistFile_call(long fileId, long length, 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.length = length; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addCheckpoint", org.apache.thrift.protocol.TMessageType.CALL, 0)); - addCheckpoint_args args = new addCheckpoint_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("persistFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); + persistFile_args args = new persistFile_args(); args.setFileId(fileId); args.setLength(length); args.write(prot); @@ -1445,7 +1445,7 @@ public boolean getResult() throws FileDoesNotExistException, SuspectedFileSizeEx } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_addCheckpoint(); + return (new Client(prot)).recv_persistFile(); } } @@ -1735,7 +1735,7 @@ protected Processor(I iface, Map extends org.apache.thrift.ProcessFunction { - public addCheckpoint() { - super("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 { - result.success = iface.addCheckpoint(args.fileId, args.length); + result.success = iface.persistFile(args.fileId, args.length); result.setSuccessIsSet(true); } catch (FileDoesNotExistException eP) { result.eP = eP; @@ -2393,7 +2393,7 @@ protected AsyncProcessor(I iface, Map extends org.apache.thrift.AsyncProcessFunction { - public addCheckpoint() { - super("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() { public void onComplete(Boolean o) { - addCheckpoint_result result = new addCheckpoint_result(); + persistFile_result result = new persistFile_result(); result.success = o; result.setSuccessIsSet(true); try { @@ -3380,7 +3380,7 @@ public void onComplete(Boolean 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); @@ -3416,8 +3416,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.length,resultHandler); + public void start(I iface, persistFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.persistFile(args.fileId, args.length,resultHandler); } } @@ -18434,16 +18434,16 @@ public void read(org.apache.thrift.protocol.TProtocol prot, free_result struct) } - 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 LENGTH_FIELD_DESC = new org.apache.thrift.protocol.TField("length", org.apache.thrift.protocol.TType.I64, (short)2); 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 @@ -18522,13 +18522,13 @@ public String getFieldName() { tmpMap.put(_Fields.LENGTH, new org.apache.thrift.meta_data.FieldMetaData("length", 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(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 length) { @@ -18542,14 +18542,14 @@ public addCheckpoint_args( /** * 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.length = other.length; } - public addCheckpoint_args deepCopy() { - return new addCheckpoint_args(this); + public persistFile_args deepCopy() { + return new persistFile_args(this); } @Override @@ -18564,7 +18564,7 @@ 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; @@ -18587,7 +18587,7 @@ public long getLength() { return this.length; } - public addCheckpoint_args setLength(long length) { + public persistFile_args setLength(long length) { this.length = length; setLengthIsSet(true); return this; @@ -18658,12 +18658,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; @@ -18706,7 +18706,7 @@ public int 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()); } @@ -18750,7 +18750,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:"); @@ -18787,15 +18787,15 @@ 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) @@ -18832,7 +18832,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); @@ -18848,16 +18848,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, addCheckpoint_args } - 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()) { @@ -18876,7 +18876,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_args } @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); if (incoming.get(0)) { @@ -18892,8 +18892,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_args s } - 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 SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); 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); @@ -18902,8 +18902,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 boolean success; // required @@ -18993,13 +18993,13 @@ public String getFieldName() { 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( boolean success, FileDoesNotExistException eP, SuspectedFileSizeException eS, @@ -19016,7 +19016,7 @@ public addCheckpoint_result( /** * Performs a deep copy on other. */ - public addCheckpoint_result(addCheckpoint_result other) { + public persistFile_result(persistFile_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetEP()) { @@ -19030,8 +19030,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 @@ -19047,7 +19047,7 @@ public boolean isSuccess() { return this.success; } - public addCheckpoint_result setSuccess(boolean success) { + public persistFile_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; @@ -19070,7 +19070,7 @@ public FileDoesNotExistException getEP() { return this.eP; } - public addCheckpoint_result setEP(FileDoesNotExistException eP) { + public persistFile_result setEP(FileDoesNotExistException eP) { this.eP = eP; return this; } @@ -19094,7 +19094,7 @@ public SuspectedFileSizeException getES() { return this.eS; } - public addCheckpoint_result setES(SuspectedFileSizeException eS) { + public persistFile_result setES(SuspectedFileSizeException eS) { this.eS = eS; return this; } @@ -19118,7 +19118,7 @@ public BlockInfoException getEB() { return this.eB; } - public addCheckpoint_result setEB(BlockInfoException eB) { + public persistFile_result setEB(BlockInfoException eB) { this.eB = eB; return this; } @@ -19216,12 +19216,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; @@ -19292,7 +19292,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()); } @@ -19356,7 +19356,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("success:"); @@ -19413,15 +19413,15 @@ 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) @@ -19477,7 +19477,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); @@ -19507,16 +19507,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.isSetSuccess()) { @@ -19547,7 +19547,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)) { diff --git a/common/src/main/java/tachyon/thrift/InvalidPathException.java b/common/src/main/java/tachyon/thrift/InvalidPathException.java index fea67c95d9a5..e555e16abf08 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 7e5be14a1b14..0231ead88b1a 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 3843055e10e3..6c7d4a59c803 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 9787e6cc99e1..763b7785f2b1 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 97eb5adac385..54afcca59d98 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 a7c554d1bbaf..58171a2fbaba 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 62d07f9e91f3..0b5667e55edb 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 3d169b6181fe..58f678f7c948 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 bf0a54f2bfc8..51a92c50628a 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 b94f9359672e..65bb0703ab97 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 8b3eca42d763..3a8878981241 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 bfa0bb922d6f..e37c1193c676 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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") 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 2d3385f362ed..fbec7c657584 100644 --- a/common/src/main/java/tachyon/thrift/WorkerService.java +++ b/common/src/main/java/tachyon/thrift/WorkerService.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-26") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-27") public class WorkerService { public interface Iface { @@ -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 */ @@ -205,13 +205,13 @@ public void send_addCheckpoint(long fileId, long nonce) throws org.apache.thrift addCheckpoint_args args = new addCheckpoint_args(); args.setFileId(fileId); args.setNonce(nonce); - sendBase("addCheckpoint", args); + sendBase("persistFile", args); } public void recv_addCheckpoint() throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException { addCheckpoint_result result = new addCheckpoint_result(); - receiveBase(result, "addCheckpoint"); + receiveBase(result, "persistFile"); if (result.eP != null) { throw result.eP; } @@ -522,7 +522,7 @@ public addCheckpoint_call(long fileId, long nonce, org.apache.thrift.async.Async } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addCheckpoint", org.apache.thrift.protocol.TMessageType.CALL, 0)); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("persistFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); addCheckpoint_args args = new addCheckpoint_args(); args.setFileId(fileId); args.setNonce(nonce); @@ -869,7 +869,7 @@ protected Processor(I iface, Map Map> getProcessMap(Map> processMap) { processMap.put("accessBlock", new accessBlock()); - processMap.put("addCheckpoint", new addCheckpoint()); + processMap.put("persistFile", new addCheckpoint()); processMap.put("asyncCheckpoint", new asyncCheckpoint()); processMap.put("cacheBlock", new cacheBlock()); processMap.put("cancelBlock", new cancelBlock()); @@ -904,7 +904,7 @@ public accessBlock_result getResult(I iface, accessBlock_args args) throws org.a public static class addCheckpoint extends org.apache.thrift.ProcessFunction { public addCheckpoint() { - super("addCheckpoint"); + super("persistFile"); } public addCheckpoint_args getEmptyArgsInstance() { @@ -1154,7 +1154,7 @@ protected AsyncProcessor(I iface, Map Map> getProcessMap(Map> processMap) { processMap.put("accessBlock", new accessBlock()); - processMap.put("addCheckpoint", new addCheckpoint()); + processMap.put("persistFile", new addCheckpoint()); processMap.put("asyncCheckpoint", new asyncCheckpoint()); processMap.put("cacheBlock", new cacheBlock()); processMap.put("cancelBlock", new cancelBlock()); @@ -1178,7 +1178,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 { @@ -1219,7 +1219,7 @@ public void start(I iface, accessBlock_args args, org.apache.thrift.async.AsyncM public static class addCheckpoint extends org.apache.thrift.AsyncProcessFunction { public addCheckpoint() { - super("addCheckpoint"); + super("persistFile"); } public addCheckpoint_args getEmptyArgsInstance() { @@ -1228,7 +1228,7 @@ public addCheckpoint_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) { addCheckpoint_result result = new addCheckpoint_result(); try { @@ -1263,7 +1263,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()); @@ -1299,7 +1299,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 +1321,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 +1357,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 +1382,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 +1418,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 +1468,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 +1489,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 +1525,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 +1577,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 +1603,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 +1639,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 +1661,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 +1697,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 +1749,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 +1867,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 +2079,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 +2087,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 +2351,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) { @@ -2480,9 +2480,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.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))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCheckpoint_args.class, metaDataMap); @@ -2764,7 +2764,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_args 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 +2772,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 +2780,7 @@ 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; @@ -2945,13 +2945,13 @@ 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); @@ -3390,7 +3390,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_resul 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 +3399,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 +3408,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 +3417,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 +3426,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; @@ -3616,7 +3616,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 +3828,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 +3836,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 +3980,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 +4269,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 +4277,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 +4286,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 +4449,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 +4733,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 +4741,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 +4749,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 +4904,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 +5195,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 +5204,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 +5213,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 +5377,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 +5661,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 +5669,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 +5677,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 +5954,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 +6083,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 +6367,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 +6375,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 +6383,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 +6538,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 +6829,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 +6837,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 +6846,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 +7003,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 +7215,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 +7223,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 +7362,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 +7574,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 +7582,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 +7735,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 +8091,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 +8099,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 +8107,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 +8115,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 +8288,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 +8656,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 +8664,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 +8673,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 +8682,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 +8867,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 +9223,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 +9231,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 +9239,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 +9247,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 +9417,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 +9706,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 +9714,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 +9723,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 +9886,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 +10170,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 +10178,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 +10186,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 +10338,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 +10550,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 +10558,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 +10704,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 +11010,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 +11018,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 +11036,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 +11337,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/util/io/PathUtils.java b/common/src/main/java/tachyon/util/io/PathUtils.java index 2b8790532f4d..16adc00f353d 100644 --- a/common/src/main/java/tachyon/util/io/PathUtils.java +++ b/common/src/main/java/tachyon/util/io/PathUtils.java @@ -127,7 +127,9 @@ public static String[] getPathComponents(String path) throws InvalidPathExceptio } /** - * Checks whether the given path contains the given prefix. + * Checks whether the given path contains the given prefix. The comparison happens at a component + * granularity; for example, {@code hasPrefix(/dir/file, /dir)} should evaluate to true, while + * {@code hasPrefix(/dir/file, /d)} should evaluate to false. * * @param path a path * @param prefix a prefix @@ -180,7 +182,7 @@ public static void validatePath(String path) throws InvalidPathException { * @return a deterministic temporary file name */ public static final String temporaryFileName(long fileId, long nonce, String path) { - return path + ".tachyon." + fileId + "." + nonce + ".tmp"; + return path + ".tachyon." + fileId + "." + String.format("0x%16s", nonce) + ".tmp"; } /** diff --git a/common/src/thrift/tachyon.thrift b/common/src/thrift/tachyon.thrift index 61418489bb61..6f96df345c10 100644 --- a/common/src/thrift/tachyon.thrift +++ b/common/src/thrift/tachyon.thrift @@ -219,7 +219,7 @@ service FileSystemMasterService { bool free(1: i64 fileId, 2: bool recursive) throws (1: FileDoesNotExistException fdnee) - bool addCheckpoint(1: i64 fileId, 2: i64 length) + bool persistFile(1: i64 fileId, 2: i64 length) throws (1: FileDoesNotExistException eP, 2: SuspectedFileSizeException eS, 3: 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 9c389579ea00..016f84a1b151 100644 --- a/integration-tests/src/test/java/tachyon/master/file/FileSystemMasterIntegrationTest.java +++ b/integration-tests/src/test/java/tachyon/master/file/FileSystemMasterIntegrationTest.java @@ -15,7 +15,6 @@ package tachyon.master.file; -import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; @@ -40,16 +39,12 @@ import tachyon.TachyonURI; import tachyon.conf.TachyonConf; import tachyon.master.LocalTachyonCluster; -import tachyon.master.MasterContext; import tachyon.master.MasterTestUtils; import tachyon.master.block.BlockMaster; -import tachyon.thrift.BlockInfoException; import tachyon.thrift.FileAlreadyExistException; import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; import tachyon.thrift.InvalidPathException; -import tachyon.thrift.SuspectedFileSizeException; -import tachyon.thrift.TachyonException; import tachyon.util.CommonUtils; /** @@ -256,7 +251,7 @@ public void addCheckpointTest() throws Exception { mFsMaster.createFile(new TachyonURI("/testFile"), Constants.DEFAULT_BLOCK_SIZE_BYTE, false); FileInfo fileInfo = mFsMaster.getFileInfo(fileId); Assert.assertFalse(fileInfo.isIsPersisted()); - mFsMaster.addCheckpoint(fileId, 1); + mFsMaster.persistFile(fileId, 1); fileInfo = mFsMaster.getFileInfo(fileId); Assert.assertTrue(fileInfo.isIsPersisted()); } @@ -538,7 +533,7 @@ public void lastModificationTimeAddCheckpointTest() throws Exception { long fileId = mFsMaster.createFile(new TachyonURI("/testFile"), Constants.DEFAULT_BLOCK_SIZE_BYTE, true); long opTimeMs = System.currentTimeMillis(); - mFsMaster.addCheckpointInternal(fileId, 1, opTimeMs); + mFsMaster.persistFileInternal(fileId, 1, opTimeMs); FileInfo fileInfo = mFsMaster.getFileInfo(fileId); Assert.assertEquals(opTimeMs, fileInfo.lastModificationTimeMs); } @@ -639,7 +634,7 @@ public void lsTest() throws Exception { public void notFileCheckpointTest() throws Exception { mThrown.expect(FileDoesNotExistException.class); mFsMaster.mkdirs(new TachyonURI("/testFile"), true); - mFsMaster.addCheckpoint(mFsMaster.getFileId(new TachyonURI("/testFile")), 0); + mFsMaster.persistFile(mFsMaster.getFileId(new TachyonURI("/testFile")), 0); } @Test diff --git a/servers/src/main/java/tachyon/master/file/FileSystemMaster.java b/servers/src/main/java/tachyon/master/file/FileSystemMaster.java index c27d595e03a9..a7fe032656b1 100644 --- a/servers/src/main/java/tachyon/master/file/FileSystemMaster.java +++ b/servers/src/main/java/tachyon/master/file/FileSystemMaster.java @@ -44,7 +44,7 @@ import tachyon.master.MasterContext; import tachyon.master.block.BlockId; import tachyon.master.block.BlockMaster; -import tachyon.master.file.journal.AddCheckpointEntry; +import tachyon.master.file.journal.PersistFileEntry; import tachyon.master.file.journal.AddMountPointEntry; import tachyon.master.file.journal.CompleteFileEntry; import tachyon.master.file.journal.DeleteFileEntry; @@ -82,10 +82,8 @@ import tachyon.thrift.SuspectedFileSizeException; import tachyon.thrift.TachyonException; import tachyon.underfs.UnderFileSystem; -import tachyon.util.FormatUtils; import tachyon.util.ThreadFactoryUtils; import tachyon.util.io.PathUtils; -import tachyon.util.network.NetworkAddressUtils; /** * The master that handles all file system metadata management. @@ -180,8 +178,8 @@ public void processJournalEntry(JournalEntry entry) throws IOException { } catch (InvalidPathException e) { throw new IOException("failed to complete file " + ((CompleteFileEntry) entry).getFileId()); } - } else if (entry instanceof AddCheckpointEntry) { - addCheckpointFromEntry((AddCheckpointEntry) entry); + } else if (entry instanceof PersistFileEntry) { + persistFileFromEntry((PersistFileEntry) entry); } else if (entry instanceof SetPinnedEntry) { setPinnedFromEntry((SetPinnedEntry) entry); } else if (entry instanceof DeleteFileEntry) { @@ -237,22 +235,22 @@ public void stop() throws IOException { } /** - * Adds a file checkpoint in ufs. Called via RPC. + * Persists a file in UFS. * - * @param fileId the file id associated with the ufs checkpoint + * @param fileId the file id * @param length the length of the file * @return true on success * @throws SuspectedFileSizeException * @throws BlockInfoException * @throws FileDoesNotExistException */ - public boolean addCheckpoint(long fileId, long length) throws SuspectedFileSizeException, + public boolean persistFile(long fileId, long length) throws SuspectedFileSizeException, BlockInfoException, FileDoesNotExistException { synchronized (mInodeTree) { long opTimeMs = System.currentTimeMillis(); - if (addCheckpointInternal(fileId, length, opTimeMs)) { + if (persistFileInternal(fileId, length, opTimeMs)) { writeJournalEntry( - new AddCheckpointEntry(fileId, length, opTimeMs)); + new PersistFileEntry(fileId, length, opTimeMs)); flushJournal(); } } @@ -260,11 +258,11 @@ public boolean addCheckpoint(long fileId, long length) throws SuspectedFileSizeE } /** - * Internal implementation of completing the ufs checkpoint of the file. + * Internal implementation of persisting a file to ufs * * @return true if the operation should be written to the journal */ - boolean addCheckpointInternal(long fileId, long length, long opTimeMs) + boolean persistFileInternal(long fileId, long length, long opTimeMs) throws SuspectedFileSizeException, BlockInfoException, FileDoesNotExistException { Inode inode = mInodeTree.getInodeById(fileId); @@ -314,9 +312,9 @@ boolean addCheckpointInternal(long fileId, long length, long opTimeMs) return needLog; } - private void addCheckpointFromEntry(AddCheckpointEntry entry) { + private void persistFileFromEntry(PersistFileEntry entry) { try { - addCheckpointInternal(entry.getFileId(), entry.getFileLength(), entry.getOperationTimeMs()); + persistFileInternal(entry.getFileId(), entry.getFileLength(), entry.getOperationTimeMs()); } catch (FileDoesNotExistException fdnee) { throw new RuntimeException(fdnee); } catch (SuspectedFileSizeException sfse) { @@ -470,18 +468,25 @@ void completeFileInternal(List blockIds, long fileId, long fileLength, lon propagatePersisted(inodeFile); } + /** + * Propagates the persisted status to all parents of the given inode. + * + * @param inode the inode to start the propagation at + * @throws FileDoesNotExistException if a non-existent file is encountered + * @throws InvalidPathException if an invalid path is encountered + */ private void propagatePersisted(Inode inode) throws FileDoesNotExistException, InvalidPathException { if (!inode.isPersisted()) { return; } Inode handle = inode; - while (handle.getParentId() != -1) { + while (handle.getParentId() != InodeTree.NO_PARENT) { handle = mInodeTree.getInodeById(handle.getParentId()); handle.setPersisted(true); TachyonURI path = mInodeTree.getPath(handle); if (mMountTable.isMountPoint(path)) { - // Stop propagating the persisted status at mountpoints. + // Stop propagating the persisted status at mount points. break; } } @@ -599,11 +604,12 @@ public int getNumberOfPinnedFiles() { * @param fileId the file id to delete * @param recursive if true, will delete all its children. * @return true if the file was deleted, false otherwise. - * @throws TachyonException - * @throws FileDoesNotExistException + * @throws FileDoesNotExistException if a non-existent file is encountered + * @throws InvalidPathException if an invalid path is encountered + * @throws IOException if an I/O error is encountered */ public boolean deleteFile(long fileId, boolean recursive) throws FileDoesNotExistException, - TachyonException { + InvalidPathException, IOException { MasterContext.getMasterSource().incDeleteFileOps(); synchronized (mInodeTree) { long opTimeMs = System.currentTimeMillis(); @@ -625,20 +631,26 @@ private void deleteFileFromEntry(DeleteFileEntry entry) { } } - boolean deleteFileInternal(long fileId, boolean recursive, boolean propagate, - long opTimeMs) throws TachyonException, FileDoesNotExistException { + /** + * Implements file deletion. + * + * @param fileId the file id + * @param recursive if the file id identifies a directory, this flag specifies whether the + * directory content should be deleted recursively + * @param persisted whether the operation should be persisted to UFS + * @param opTimeMs the time of the operation + * @return + * @throws FileDoesNotExistException if a non-existent file is encountered + * @throws InvalidPathException if an invalid path is encountered + * @throws IOException if an I/O error is encountered + */ + boolean deleteFileInternal(long fileId, boolean recursive, boolean persisted, + long opTimeMs) throws FileDoesNotExistException, InvalidPathException, IOException { + // This function should only be called from within synchronized (mInodeTree) blocks. + // + // TODO(jiri): A crash after any UFS object is deleted and before the delete operation is + // journaled will result in an inconsistency between Tachyon and UFS. Inode inode = mInodeTree.getInodeById(fileId); - TachyonURI path = mInodeTree.getPath(inode); - LOG.debug("Deleting " + path); - return deleteInodeInternal(inode, recursive, propagate, opTimeMs); - } - - // This function should only be called from within synchronized (mInodeTree) blocks. - // - // TODO(jiri): A crash after any UFS object is deleted and before the delete operation is - // journaled will result in an inconsistency between Tachyon and UFS. - private boolean deleteInodeInternal(Inode inode, boolean recursive, boolean propagate, - long opTimeMs) throws TachyonException, FileDoesNotExistException { if (inode == null) { return true; } @@ -665,24 +677,15 @@ private boolean deleteInodeInternal(Inode inode, boolean recursive, boolean prop // TODO(jiri): What should the Tachyon behavior be when a UFS delete operation fails? // Currently, it will result in an inconsistency between Tachyon and UFS. - if (propagate && delInode.isPersisted()) { + if (persisted && delInode.isPersisted()) { // Delete the file in the under file system. - String ufsPath; - try { - ufsPath = mMountTable.resolve(mInodeTree.getPath(delInode)).toString(); - } catch (InvalidPathException e) { - throw new TachyonException(e.getMessage()); - } + String ufsPath = mMountTable.resolve(mInodeTree.getPath(delInode)).toString(); UnderFileSystem ufs = UnderFileSystem.get(ufsPath, MasterContext.getConf()); - try { - if (!ufs.exists(ufsPath)) { - LOG.warn("File does not exist the underfs: " + ufsPath); - } else if (!ufs.delete(ufsPath, true)) { - LOG.error("Failed to delete " + ufsPath); - return false; - } - } catch (IOException e) { - throw new TachyonException(e.getMessage()); + if (!ufs.exists(ufsPath)) { + LOG.warn("File does not exist the underfs: " + ufsPath); + } else if (!ufs.delete(ufsPath, true)) { + LOG.error("Failed to delete " + ufsPath); + return false; } } @@ -949,11 +952,12 @@ private void journalCreatePathResult(InodeTree.CreatePathResult createResult) { * @param fileId the source file to rename. * @param dstPath the destination path to rename the file to. * @return true if the rename was successful - * @throws InvalidPathException - * @throws FileDoesNotExistException + * @throws FileDoesNotExistException if a non-existent file is encountered + * @throws InvalidPathException if an invalid path is encountered + * @throws IOException if an I/O error occurs */ public boolean rename(long fileId, TachyonURI dstPath) - throws InvalidPathException, FileDoesNotExistException, IOException { + throws FileDoesNotExistException, InvalidPathException, IOException { MasterContext.getMasterSource().incRenameOps(); synchronized (mInodeTree) { Inode srcInode = mInodeTree.getInodeById(fileId); @@ -1031,16 +1035,28 @@ public boolean rename(long fileId, TachyonURI dstPath) } } - // This function should only be called from within synchronized (mInodeTree) blocks. - boolean renameInternal(long fileId, TachyonURI dstPath, boolean propagate, long opTimeMs) + /** + * Implements renaming. + * + * @param fileId the file id of the rename source + * @param dstPath the path to the rename destionation + * @param persisted whether the operation should be persisted to UFS + * @param opTimeMs the time of the operation + * @return + * @throws FileDoesNotExistException if a non-existent file is encountered + * @throws InvalidPathException if an invalid path is encountered + * @throws IOException if an I/O error is encountered + */ + boolean renameInternal(long fileId, TachyonURI dstPath, boolean persisted, long opTimeMs) throws FileDoesNotExistException, InvalidPathException, IOException { + // This function should only be called from within synchronized (mInodeTree) blocks. Inode srcInode = mInodeTree.getInodeById(fileId); TachyonURI srcPath = mInodeTree.getPath(srcInode); LOG.debug("Renaming " + srcPath + " to " + dstPath); // If the source file is persisted, rename it in the UFS. FileInfo fileInfo = getFileInfoInternal(srcInode); - if (propagate && fileInfo.isPersisted) { + if (persisted && fileInfo.isPersisted) { String ufsSrcPath = mMountTable.resolve(srcPath).toString(); String ufsDstPath = mMountTable.resolve(dstPath).toString(); UnderFileSystem ufs = UnderFileSystem.get(ufsSrcPath, MasterContext.getConf()); @@ -1249,10 +1265,9 @@ public long loadFileInfoFromUfs(TachyonURI path, boolean recursive) try { long ufsBlockSizeByte = ufs.getBlockSizeByte(ufsPath.toString()); long fileSizeByte = ufs.getFileSize(ufsPath.toString()); - long fileId = createFile(path, ufsBlockSizeByte, recursive); - if (fileId != -1) { - addCheckpoint(fileId, fileSizeByte); - } + // Metadata loaded from UFS has no TTL set. + long fileId = createFile(path, ufsBlockSizeByte, recursive, Constants.NO_TTL); + persistFile(fileId, fileSizeByte); return fileId; } catch (IOException e) { LOG.error(ExceptionUtils.getStackTrace(e)); @@ -1290,7 +1305,7 @@ boolean mountInternal(TachyonURI tachyonPath, TachyonURI ufsPath) throws Invalid } public boolean unmount(TachyonURI tachyonPath) throws FileDoesNotExistException, - InvalidPathException, TachyonException { + InvalidPathException, IOException { synchronized (mInodeTree) { if (unmountInternal(tachyonPath)) { Inode inode = mInodeTree.getInodeByPath(tachyonPath); @@ -1338,8 +1353,10 @@ public void heartbeat() { deleteFile(iFile.getId(), false); } catch (FileDoesNotExistException e) { LOG.error("file does not exit " + iFile.toString()); - } catch (TachyonException e) { - LOG.error("tachyon exception for ttl check" + iFile.toString()); + } catch (InvalidPathException e) { + LOG.error("invalid path for ttl check " + iFile.toString()); + } catch (IOException e) { + LOG.error("IO exception for ttl check" + iFile.toString()); } } } diff --git a/servers/src/main/java/tachyon/master/file/FileSystemMasterServiceHandler.java b/servers/src/main/java/tachyon/master/file/FileSystemMasterServiceHandler.java index e7341a12623c..e4402d68536c 100644 --- a/servers/src/main/java/tachyon/master/file/FileSystemMasterServiceHandler.java +++ b/servers/src/main/java/tachyon/master/file/FileSystemMasterServiceHandler.java @@ -52,9 +52,9 @@ public List workerGetPriorityDependencyList() { } @Override - public boolean addCheckpoint(long fileId, long length) + public boolean persistFile(long fileId, long length) throws BlockInfoException, FileDoesNotExistException, SuspectedFileSizeException { - return mFileSystemMaster.addCheckpoint(fileId, length); + return mFileSystemMaster.persistFile(fileId, length); } @Override @@ -109,9 +109,13 @@ public void completeFile(long fileId) throws BlockInfoException, FileDoesNotExis } @Override - public boolean deleteFile(long fileId, boolean recursive) throws TachyonException, - FileDoesNotExistException { - return mFileSystemMaster.deleteFile(fileId, recursive); + public boolean deleteFile(long fileId, boolean recursive) throws FileDoesNotExistException, + InvalidPathException, TachyonException { + try { + return mFileSystemMaster.deleteFile(fileId, recursive); + } catch (IOException e) { + throw new TachyonException(e.getMessage()); + } } @Override @@ -176,12 +180,12 @@ public long loadFileInfoFromUfs(String tachyonPath, boolean recursive) public boolean mount(String tachyonPath, String ufsPath, MountOpts opts) throws TachyonException { try { return mFileSystemMaster.mount(new TachyonURI(tachyonPath), new TachyonURI(ufsPath)); - } catch (FileAlreadyExistException faee) { - throw new TachyonException(faee.getMessage()); - } catch (InvalidPathException ipe) { - throw new TachyonException(ipe.getMessage()); - } catch (IOException ioe) { - throw new TachyonException(ioe.getMessage()); + } catch (FileAlreadyExistException e) { + throw new TachyonException(e.getMessage()); + } catch (InvalidPathException e) { + throw new TachyonException(e.getMessage()); + } catch (IOException e) { + throw new TachyonException(e.getMessage()); } } @@ -189,10 +193,12 @@ public boolean mount(String tachyonPath, String ufsPath, MountOpts opts) throws public boolean unmount(String tachyonPath) throws TachyonException { try { return mFileSystemMaster.unmount(new TachyonURI(tachyonPath)); - } catch (FileDoesNotExistException fdnee) { - throw new TachyonException(fdnee.getMessage()); - } catch (InvalidPathException ipe) { - throw new TachyonException(ipe.getMessage()); + } catch (FileDoesNotExistException e) { + throw new TachyonException(e.getMessage()); + } catch (InvalidPathException e) { + throw new TachyonException(e.getMessage()); + } catch (IOException e) { + throw new TachyonException(e.getMessage()); } } } diff --git a/servers/src/main/java/tachyon/master/file/journal/AddCheckpointEntry.java b/servers/src/main/java/tachyon/master/file/journal/PersistFileEntry.java similarity index 93% rename from servers/src/main/java/tachyon/master/file/journal/AddCheckpointEntry.java rename to servers/src/main/java/tachyon/master/file/journal/PersistFileEntry.java index ae766698fd86..3992da726873 100644 --- a/servers/src/main/java/tachyon/master/file/journal/AddCheckpointEntry.java +++ b/servers/src/main/java/tachyon/master/file/journal/PersistFileEntry.java @@ -23,12 +23,12 @@ import tachyon.master.journal.JournalEntry; import tachyon.master.journal.JournalEntryType; -public class AddCheckpointEntry implements JournalEntry { +public class PersistFileEntry implements JournalEntry { private final long mFileId; private final long mLength; private final long mOpTimeMs; - public AddCheckpointEntry(long fileId, long length, long opTimeMs) { + public PersistFileEntry(long fileId, long length, long opTimeMs) { mFileId = fileId; mLength = length; mOpTimeMs = opTimeMs; diff --git a/servers/src/main/java/tachyon/master/file/meta/InodeFile.java b/servers/src/main/java/tachyon/master/file/meta/InodeFile.java index c9e5878e63f1..3d1e6a1dfd76 100644 --- a/servers/src/main/java/tachyon/master/file/meta/InodeFile.java +++ b/servers/src/main/java/tachyon/master/file/meta/InodeFile.java @@ -73,13 +73,13 @@ public FileInfo generateClientFileInfo(String path) { ret.fileId = getId(); ret.name = getName(); ret.path = path; - ret.length = mLength; - ret.blockSizeBytes = mBlockSizeBytes; + ret.length = getLength(); + ret.blockSizeBytes = getBlockSizeBytes(); ret.creationTimeMs = getCreationTimeMs(); - ret.isCacheable = mCacheable; + ret.isCacheable = isCacheable(); ret.isFolder = false; ret.isPinned = isPinned(); - ret.isCompleted = mCompleted; + ret.isCompleted = isCompleted(); ret.isPersisted = isPersisted(); ret.blockIds = getBlockIds(); ret.lastModificationTimeMs = getLastModificationTimeMs(); diff --git a/servers/src/main/java/tachyon/master/file/meta/InodeTree.java b/servers/src/main/java/tachyon/master/file/meta/InodeTree.java index ee40fa023632..dd2abb3e403a 100644 --- a/servers/src/main/java/tachyon/master/file/meta/InodeTree.java +++ b/servers/src/main/java/tachyon/master/file/meta/InodeTree.java @@ -49,6 +49,9 @@ import tachyon.util.io.PathUtils; public final class InodeTree implements JournalCheckpointStreamable { + /** Value to be used for an inode with no parent. */ + public static final long NO_PARENT = -1; + private static final Logger LOG = LoggerFactory.getLogger(Constants.LOGGER_TYPE); /** Only the root inode should have the empty string as its name. */ private static final String ROOT_INODE_NAME = ""; @@ -97,8 +100,9 @@ public InodeTree(ContainerIdGenerable containerIdGenerator, public void initializeRoot() { if (mRoot == null) { - mRoot = new InodeDirectory(ROOT_INODE_NAME, mDirectoryIdGenerator.getNewDirectoryId(), -1, - System.currentTimeMillis()); + mRoot = + new InodeDirectory(ROOT_INODE_NAME, mDirectoryIdGenerator.getNewDirectoryId(), NO_PARENT, + System.currentTimeMillis()); mInodes.add(mRoot); mCachedInode = mRoot; diff --git a/servers/src/main/java/tachyon/master/journal/JsonJournalFormatter.java b/servers/src/main/java/tachyon/master/journal/JsonJournalFormatter.java index a9f0d68a8b6c..c68b7dbb6492 100644 --- a/servers/src/main/java/tachyon/master/journal/JsonJournalFormatter.java +++ b/servers/src/main/java/tachyon/master/journal/JsonJournalFormatter.java @@ -42,7 +42,7 @@ import tachyon.TachyonURI; import tachyon.master.block.journal.BlockContainerIdGeneratorEntry; import tachyon.master.block.journal.BlockInfoEntry; -import tachyon.master.file.journal.AddCheckpointEntry; +import tachyon.master.file.journal.PersistFileEntry; import tachyon.master.file.journal.AddMountPointEntry; import tachyon.master.file.journal.CompleteFileEntry; import tachyon.master.file.journal.DeleteFileEntry; @@ -290,7 +290,7 @@ public JournalEntry getNextEntry() throws IOException { entry.getBoolean("persisted")); } case ADD_CHECKPOINT: { - return new AddCheckpointEntry( + return new PersistFileEntry( entry.getLong("fileId"), entry.getLong("length"), entry.getLong("operationTimeMs")); diff --git a/servers/src/main/java/tachyon/worker/block/BlockDataManager.java b/servers/src/main/java/tachyon/worker/block/BlockDataManager.java index 0e240632357f..8d0adb30b2bf 100644 --- a/servers/src/main/java/tachyon/worker/block/BlockDataManager.java +++ b/servers/src/main/java/tachyon/worker/block/BlockDataManager.java @@ -61,7 +61,7 @@ public final class BlockDataManager implements Testable { /** WorkerBlockMasterClient, only used to inform the master of a new block in commitBlock */ private WorkerBlockMasterClient mBlockMasterClient; - /** WorkerFileSystemMasterClient, only used to inform master of a new file in addCheckpoint */ + /** WorkerFileSystemMasterClient, only used to inform master of a new file in persistFile */ private WorkerFileSystemMasterClient mFileSystemMasterClient; /** Session metadata, used to keep track of session heartbeats */ private Sessions mSessions; @@ -181,7 +181,7 @@ public void addCheckpoint(long fileId, long nonce) throws TException, IOExceptio } catch (IOException ioe) { throw new FailedToCheckpointException("Failed to getFileSize " + dstPath); } - mFileSystemMasterClient.addCheckpoint(fileId, fileSize); + mFileSystemMasterClient.persistFile(fileId, fileSize); } /** diff --git a/servers/src/test/java/tachyon/master/journal/JournalFormatterTestBase.java b/servers/src/test/java/tachyon/master/journal/JournalFormatterTestBase.java index 58aeb4c94971..417626c9e8e0 100644 --- a/servers/src/test/java/tachyon/master/journal/JournalFormatterTestBase.java +++ b/servers/src/test/java/tachyon/master/journal/JournalFormatterTestBase.java @@ -39,7 +39,7 @@ import tachyon.Constants; import tachyon.master.block.journal.BlockContainerIdGeneratorEntry; import tachyon.master.block.journal.BlockInfoEntry; -import tachyon.master.file.journal.AddCheckpointEntry; +import tachyon.master.file.journal.PersistFileEntry; import tachyon.master.file.journal.CompleteFileEntry; import tachyon.master.file.journal.DeleteFileEntry; import tachyon.master.file.journal.DependencyEntry; @@ -163,7 +163,7 @@ public void inodePersistedEntryTest() throws IOException { @Test public void addCheckpointEntryTest() throws IOException { - entryTest(new AddCheckpointEntry(TEST_FILE_ID, TEST_LENGTH_BYTES, TEST_OP_TIME_MS)); + entryTest(new PersistFileEntry(TEST_FILE_ID, TEST_LENGTH_BYTES, TEST_OP_TIME_MS)); } @Test diff --git a/servers/src/test/java/tachyon/worker/block/BlockDataManagerTest.java b/servers/src/test/java/tachyon/worker/block/BlockDataManagerTest.java index ca17d272ffaf..b9b75e6054a1 100644 --- a/servers/src/test/java/tachyon/worker/block/BlockDataManagerTest.java +++ b/servers/src/test/java/tachyon/worker/block/BlockDataManagerTest.java @@ -28,7 +28,6 @@ import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; -import tachyon.Constants; import tachyon.Sessions; import tachyon.client.WorkerBlockMasterClient; import tachyon.client.WorkerFileSystemMasterClient; @@ -136,7 +135,7 @@ public void addCheckpointTest() throws Exception { Mockito.when(ufs.rename(srcPath,dstPath)).thenReturn(true); Mockito.when(ufs.getFileSize(dstPath)).thenReturn(fileSize); mHarness.mManager.addCheckpoint(fileId, nonce); - Mockito.verify(mHarness.mFileSystemMasterClient).addCheckpoint(fileId, fileSize); + Mockito.verify(mHarness.mFileSystemMasterClient).persistFile(fileId, fileSize); } @Test