From 191095c4660f71b4d9dcfbf9c8db298ebc7adfb3 Mon Sep 17 00:00:00 2001 From: Manu Goyal Date: Fri, 25 Sep 2015 17:53:29 -0700 Subject: [PATCH] [TACHYON-1061] Throw detailed exceptions isolated from RPC framework The bulk of this commit is renaming/refactors, so below we detail the important things to look at In tachyon.thrift, we deleted all the thrift exceptions, and replaced them with two exceptions, TachyonTException and ThriftIOException, which are general containers for Tachyon exceptions and IOExceptions, respectively. Also modified the service interfaces to only throw those exceptions. In tacyhon/exception/, we defined the TachyonException class as a superclass of all Tachyon exceptions, which can convert back and forth between TachyonTException using error codes. We then defined an exception subclass for each of the error code values, which will be the specific exceptions that we throw around in Tachyon everywhere except the thrift layer. Finally, in the client code, whenever we make an RPC call, we immediately convert the TachyonTException to a TachyonException and the ThriftIOException to an IOException, and propagate that up to the top layer of the client. At any user-facing boundary of the client (like TachyonFileSystem), we'll unwrap the TachyonException with any specific ones we think it might throw. Otherwise, we'll throw the general TachyonException as-is, as a catch-all for exceptions we didn't expect, or might add later. By including the TachyonException in all the 'throws' clauses of the function signatures, we allow for backwards compatibility by ensuring that newly added exceptions won't cause a compile-time error in user code. --- .../main/java/tachyon/client/TachyonFS.java | 42 +- .../client/block/BlockMasterClientPool.java | 1 - .../client/block/BlockWorkerClientPool.java | 2 - .../file/AbstractTachyonFileSystem.java | 103 +- .../tachyon/client/file/FileOutStream.java | 9 +- .../client/file/TachyonFileSystem.java | 69 +- .../client/file/TachyonFileSystemCore.java | 58 +- .../client/lineage/AbstractLineageClient.java | 20 +- .../tachyon/client/lineage/LineageClient.java | 29 +- .../client/lineage/LineageMasterClient.java | 19 +- .../client/lineage/TachyonLineage.java | 9 +- .../lineage/TachyonLineageFileSystem.java | 8 +- .../client/FileSystemMasterClient.java | 162 +- .../client/WorkerFileSystemMasterClient.java | 15 +- ....java => BlockAlreadyExistsException.java} | 30 +- .../exception/BlockDoesNotExistException.java | 37 + .../tachyon/exception/BlockInfoException.java | 36 + .../DependencyDoesNotExistException.java | 38 + .../FailedToCheckpointException.java | 37 + .../exception/FileAlreadyExistsException.java | 37 + .../exception/FileDoesNotExistException.java | 37 + .../exception/InvalidPathException.java | 36 + .../exception/InvalidStateException.java | 45 - .../InvalidWorkerStateException.java | 37 + ...ion.java => LineageDeletionException.java} | 20 +- .../LineageDoesNotExistException.java | 37 + ...dException.java => NoWorkerException.java} | 23 +- .../exception/SuspectedFileSizeException.java | 37 + .../exception/TableColumnException.java | 36 + .../exception/TableDoesNotExistException.java | 37 + ...ption.java => TableMetadataException.java} | 24 +- .../tachyon/exception/TachyonException.java | 49 +- .../exception/TachyonExceptionType.java | 14 +- .../exception/WorkerOutOfSpaceException.java | 37 + .../main/java/tachyon/thrift/BlockInfo.java | 2 +- .../java/tachyon/thrift/BlockLocation.java | 2 +- .../tachyon/thrift/BlockMasterService.java | 7150 +++--- .../java/tachyon/thrift/CheckpointFile.java | 2 +- .../src/main/java/tachyon/thrift/Command.java | 2 +- .../tachyon/thrift/CommandLineJobInfo.java | 2 +- .../java/tachyon/thrift/DependencyInfo.java | 2 +- .../java/tachyon/thrift/FileBlockInfo.java | 2 +- .../main/java/tachyon/thrift/FileInfo.java | 2 +- .../thrift/FileSystemMasterService.java | 20847 +++++++--------- .../main/java/tachyon/thrift/JobConfInfo.java | 2 +- .../java/tachyon/thrift/LineageCommand.java | 2 +- .../java/tachyon/thrift/LineageFileInfo.java | 2 +- .../main/java/tachyon/thrift/LineageInfo.java | 2 +- .../tachyon/thrift/LineageMasterService.java | 1264 +- .../main/java/tachyon/thrift/NetAddress.java | 2 +- .../java/tachyon/thrift/RawTableInfo.java | 2 +- .../tachyon/thrift/RawTableMasterService.java | 2378 +- .../tachyon/thrift/TachyonTException.java | 503 + .../tachyon/thrift/ThriftIOException.java | 398 + .../main/java/tachyon/thrift/WorkerInfo.java | 2 +- .../java/tachyon/thrift/WorkerService.java | 5143 ++-- .../main/java/tachyon/util/io/FileUtils.java | 2 +- .../main/java/tachyon/util/io/PathUtils.java | 2 +- .../java/tachyon/worker/WorkerClient.java | 52 +- .../java/tachyon/util/io/PathUtilsTest.java | 2 +- common/src/thrift/tachyon.thrift | 169 +- .../examples/BasicRawTableOperations.java | 2 +- integration-tests/pom.xml | 2 +- .../TachyonFileSystemIntegrationTest.java | 2 +- ...FileSystemMasterClientIntegrationTest.java | 10 +- .../master/JournalIntegrationTest.java | 7 +- .../JournalShutdownIntegrationTest.java | 6 +- .../file/FileSystemMasterIntegrationTest.java | 140 +- .../RawTableMasterIntegrationTest.java | 24 +- .../BlockServiceHandlerIntegrationTest.java | 13 +- .../worker/DataServerIntegrationTest.java | 1 - .../main/java/tachyon/master/MasterInfo.java | 6 +- .../tachyon/master/block/BlockMaster.java | 10 +- .../block/BlockMasterServiceHandler.java | 33 +- .../tachyon/master/file/FileSystemMaster.java | 196 +- .../file/FileSystemMasterServiceHandler.java | 187 +- .../tachyon/master/file/meta/InodeFile.java | 4 +- .../tachyon/master/file/meta/InodeTree.java | 42 +- .../tachyon/master/file/meta/MountTable.java | 2 +- .../tachyon/master/lineage/LineageMaster.java | 16 +- .../lineage/LineageMasterServiceHandler.java | 55 +- .../master/lineage/meta/LineageStore.java | 2 +- .../lineage/recompute/RecomputeExecutor.java | 2 +- .../master/rawtable/RawTableMaster.java | 37 +- .../RawTableMasterServiceHandler.java | 62 +- .../master/rawtable/meta/RawTables.java | 2 +- .../web/WebInterfaceBrowseServlet.java | 4 +- .../web/WebInterfaceDependencyServlet.java | 4 +- .../web/WebInterfaceDownloadServlet.java | 4 +- .../web/WebInterfaceMemoryServlet.java | 4 +- .../WebInterfaceWorkerBlockInfoServlet.java | 19 +- .../worker/block/BlockDataManager.java | 192 +- .../worker/block/BlockLockManager.java | 39 +- .../tachyon/worker/block/BlockMasterSync.java | 8 +- .../worker/block/BlockMetadataManager.java | 78 +- .../block/BlockMetadataManagerView.java | 6 +- .../worker/block/BlockServiceHandler.java | 145 +- .../java/tachyon/worker/block/BlockStore.java | 188 +- .../tachyon/worker/block/SpaceReserver.java | 16 +- .../worker/block/TieredBlockStore.java | 216 +- .../worker/block/evictor/EvictorBase.java | 8 +- .../tachyon/worker/block/meta/StorageDir.java | 82 +- .../worker/block/meta/StorageTier.java | 14 +- .../worker/lineage/LineageDataManager.java | 28 +- .../worker/netty/DataServerHandler.java | 12 +- .../tachyon/worker/nio/NIODataServer.java | 4 +- .../tachyon/master/block/BlockMasterTest.java | 2 +- .../master/file/FileSystemMasterTest.java | 5 +- .../master/file/meta/InodeFileTest.java | 4 +- .../master/file/meta/InodeTreeTest.java | 12 +- .../master/file/meta/MountTableTest.java | 9 +- .../worker/block/BlockLockManagerTest.java | 14 +- .../block/BlockMetadataManagerTest.java | 18 +- .../block/BlockMetadataManagerViewTest.java | 6 +- .../worker/block/TieredBlockStoreTests.java | 46 +- .../block/evictor/EvictorTestUtils.java | 18 +- .../worker/block/meta/StorageDirTest.java | 30 +- .../src/main/java/tachyon/shell/TfsShell.java | 6 +- .../java/tachyon/shell/TfsShellUtils.java | 2 - .../java/tachyon/shell/TfsShellUtilsTest.java | 1 - 120 files changed, 19728 insertions(+), 21549 deletions(-) rename common/src/main/java/tachyon/exception/{OutOfSpaceException.java => BlockAlreadyExistsException.java} (52%) create mode 100644 common/src/main/java/tachyon/exception/BlockDoesNotExistException.java create mode 100644 common/src/main/java/tachyon/exception/BlockInfoException.java create mode 100644 common/src/main/java/tachyon/exception/DependencyDoesNotExistException.java create mode 100644 common/src/main/java/tachyon/exception/FailedToCheckpointException.java create mode 100644 common/src/main/java/tachyon/exception/FileAlreadyExistsException.java create mode 100644 common/src/main/java/tachyon/exception/FileDoesNotExistException.java create mode 100644 common/src/main/java/tachyon/exception/InvalidPathException.java delete mode 100644 common/src/main/java/tachyon/exception/InvalidStateException.java create mode 100644 common/src/main/java/tachyon/exception/InvalidWorkerStateException.java rename common/src/main/java/tachyon/exception/{AbstractTachyonException.java => LineageDeletionException.java} (66%) create mode 100644 common/src/main/java/tachyon/exception/LineageDoesNotExistException.java rename common/src/main/java/tachyon/exception/{NotFoundException.java => NoWorkerException.java} (59%) create mode 100644 common/src/main/java/tachyon/exception/SuspectedFileSizeException.java create mode 100644 common/src/main/java/tachyon/exception/TableColumnException.java create mode 100644 common/src/main/java/tachyon/exception/TableDoesNotExistException.java rename common/src/main/java/tachyon/exception/{AlreadyExistsException.java => TableMetadataException.java} (58%) create mode 100644 common/src/main/java/tachyon/exception/WorkerOutOfSpaceException.java create mode 100644 common/src/main/java/tachyon/thrift/TachyonTException.java create mode 100644 common/src/main/java/tachyon/thrift/ThriftIOException.java diff --git a/clients/unshaded/src/main/java/tachyon/client/TachyonFS.java b/clients/unshaded/src/main/java/tachyon/client/TachyonFS.java index fe2b770a5379..2b543d2d28d7 100644 --- a/clients/unshaded/src/main/java/tachyon/client/TachyonFS.java +++ b/clients/unshaded/src/main/java/tachyon/client/TachyonFS.java @@ -27,7 +27,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.thrift.TException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,15 +40,12 @@ import tachyon.client.file.FileSystemContext; import tachyon.client.table.RawTable; import tachyon.conf.TachyonConf; -import tachyon.thrift.DependencyDoesNotExistException; +import tachyon.exception.TachyonException; import tachyon.thrift.DependencyInfo; import tachyon.thrift.FileBlockInfo; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; import tachyon.thrift.RawTableInfo; import tachyon.thrift.WorkerInfo; -import tachyon.underfs.UnderFileSystem; import tachyon.util.ThreadFactoryUtils; import tachyon.util.io.FileUtils; import tachyon.util.network.NetworkAddressUtils; @@ -276,7 +272,7 @@ public synchronized void close() throws IOException { synchronized void completeFile(long fid) throws IOException { try { mFSMasterClient.completeFile(fid); - } catch (TException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -325,7 +321,7 @@ public synchronized long createFile(TachyonURI path, TachyonURI ufsPath, long bl } else { return mFSMasterClient.loadFileInfoFromUfs(path.getPath(), recursive); } - } catch (TException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -382,13 +378,13 @@ public synchronized boolean delete(long fileId, TachyonURI path, boolean recursi if (fileId == -1) { try { fileId = mFSMasterClient.getFileId(path.getPath()); - } catch (InvalidPathException e) { + } catch (TachyonException e) { throw new IOException(e); } } try { return mFSMasterClient.deleteFile(fileId, recursive); - } catch (TException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -432,7 +428,7 @@ public synchronized long getBlockId(long fileId, int blockIndex) throws IOExcept try { return mFSMasterClient.getFileBlockInfo(fileId, blockIndex).blockInfo.getBlockId(); - } catch (TException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -552,7 +548,7 @@ public synchronized List getFileBlocks(long fid) throws IOExcepti // TODO(hy) Should add timeout to improve this. try { return mFSMasterClient.getFileBlockInfoList(fid); - } catch (FileDoesNotExistException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -596,7 +592,7 @@ private synchronized FileInfo getFileStatus(Map cache, K key, l if (fileId == -1) { try { fileId = mFSMasterClient.getFileId(path); - } catch (InvalidPathException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -606,7 +602,7 @@ private synchronized FileInfo getFileStatus(Map cache, K key, l } try { info = mFSMasterClient.getFileInfo(fileId); - } catch (FileDoesNotExistException e) { + } catch (TachyonException e) { throw new IOException(e); } path = info.getPath(); @@ -634,7 +630,7 @@ public synchronized FileInfo getFileStatus(long fileId, TachyonURI path, if (fileId == -1) { try { fileId = mFSMasterClient.getFileId(path.getPath()); - } catch (InvalidPathException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -803,7 +799,7 @@ public synchronized List listStatus(TachyonURI path) throws IOExceptio validateUri(path); try { return mFSMasterClient.getFileInfoList(getFileStatus(-1, path).getFileId()); - } catch (FileDoesNotExistException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -855,7 +851,7 @@ public synchronized boolean mkdirs(TachyonURI path, boolean recursive) throws IO validateUri(path); try { return mFSMasterClient.createDirectory(path.getPath(), recursive); - } catch (TException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -888,13 +884,13 @@ public synchronized boolean freepath(long fileId, TachyonURI path, boolean recur if (fileId == -1) { try { fileId = mFSMasterClient.getFileId(path.getPath()); - } catch (InvalidPathException e) { + } catch (TachyonException e) { throw new IOException(e); } } try { return mFSMasterClient.free(fileId, recursive); - } catch (FileDoesNotExistException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -931,13 +927,13 @@ public synchronized boolean rename(long fileId, TachyonURI srcPath, TachyonURI d if (fileId == -1) { try { fileId = mFSMasterClient.getFileId(srcPath.getPath()); - } catch (InvalidPathException e) { + } catch (TachyonException e) { throw new IOException(e); } } try { return mFSMasterClient.renameFile(fileId, dstPath.getPath()); - } catch (FileDoesNotExistException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -951,7 +947,7 @@ public synchronized boolean rename(long fileId, TachyonURI srcPath, TachyonURI d public synchronized void reportLostFile(long fileId) throws IOException { try { mFSMasterClient.reportLostFile(fileId); - } catch (FileDoesNotExistException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -965,7 +961,7 @@ public synchronized void reportLostFile(long fileId) throws IOException { public synchronized void requestFilesInDependency(int depId) throws IOException { try { mFSMasterClient.requestFilesInDependency(depId); - } catch (DependencyDoesNotExistException e) { + } catch (TachyonException e) { throw new IOException(e); } } @@ -1008,7 +1004,7 @@ public synchronized long requestSpace(long blockId, long requestSpaceBytes) thro public synchronized void setPinned(long fid, boolean pinned) throws IOException { try { mFSMasterClient.setPinned(fid, pinned); - } catch (FileDoesNotExistException e) { + } catch (TachyonException e) { throw new IOException(e); } } diff --git a/clients/unshaded/src/main/java/tachyon/client/block/BlockMasterClientPool.java b/clients/unshaded/src/main/java/tachyon/client/block/BlockMasterClientPool.java index b6bdc1c01133..de8d77cd478e 100644 --- a/clients/unshaded/src/main/java/tachyon/client/block/BlockMasterClientPool.java +++ b/clients/unshaded/src/main/java/tachyon/client/block/BlockMasterClientPool.java @@ -23,7 +23,6 @@ import tachyon.client.BlockMasterClient; import tachyon.client.ClientContext; import tachyon.resource.ResourcePool; -import tachyon.conf.TachyonConf; import tachyon.util.ThreadFactoryUtils; /** diff --git a/clients/unshaded/src/main/java/tachyon/client/block/BlockWorkerClientPool.java b/clients/unshaded/src/main/java/tachyon/client/block/BlockWorkerClientPool.java index 80d84481831c..7276905f7b63 100644 --- a/clients/unshaded/src/main/java/tachyon/client/block/BlockWorkerClientPool.java +++ b/clients/unshaded/src/main/java/tachyon/client/block/BlockWorkerClientPool.java @@ -25,10 +25,8 @@ import tachyon.Constants; import tachyon.client.ClientContext; import tachyon.resource.ResourcePool; -import tachyon.conf.TachyonConf; import tachyon.thrift.NetAddress; import tachyon.util.ThreadFactoryUtils; -import tachyon.worker.ClientMetrics; import tachyon.worker.WorkerClient; /** 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 90b481d88331..a13839be78b7 100644 --- a/clients/unshaded/src/main/java/tachyon/client/file/AbstractTachyonFileSystem.java +++ b/clients/unshaded/src/main/java/tachyon/client/file/AbstractTachyonFileSystem.java @@ -37,13 +37,12 @@ import tachyon.client.file.options.RenameOptions; import tachyon.client.file.options.SetStateOptions; import tachyon.client.file.options.UnmountOptions; +import tachyon.exception.FileAlreadyExistsException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.exception.TachyonException; import tachyon.exception.TachyonExceptionType; -import tachyon.thrift.BlockInfoException; -import tachyon.thrift.FileAlreadyExistException; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; /** * Tachyon File System client. This class should be used to interface with the Tachyon File @@ -66,19 +65,20 @@ protected AbstractTachyonFileSystem() { } @Override - public long create(TachyonURI path, CreateOptions options) throws IOException, TachyonException { + public long create(TachyonURI path, CreateOptions options) + throws FileAlreadyExistsException, IOException, InvalidPathException, TachyonException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { - long fileId = - masterClient.createFile(path.getPath(), options.getBlockSize(), options.isRecursive(), - options.getTTL()); - return fileId; - } catch (BlockInfoException e) { - throw new TachyonException(e, TachyonExceptionType.FILE_ALREADY_EXISTS); - } catch (FileAlreadyExistException e) { - throw new TachyonException(e, TachyonExceptionType.FILE_ALREADY_EXISTS); - } catch (InvalidPathException e) { - throw new TachyonException(e, TachyonExceptionType.INVALID_PATH); + return masterClient.createFile(path.getPath(), options.getBlockSize(), options.isRecursive(), + options.getTTL()); + } catch (TachyonException e) { + if (e.getType() == TachyonExceptionType.BLOCK_INFO) { + throw new FileAlreadyExistsException(e.getMessage(), e); + } else { + TachyonException.unwrap(e, FileAlreadyExistsException.class); + TachyonException.unwrap(e, InvalidPathException.class); + throw e; + } } finally { mContext.releaseMasterClient(masterClient); } @@ -94,14 +94,16 @@ public long create(TachyonURI path, CreateOptions options) throws IOException, T * current readers have relinquished their locks. */ @Override - public void delete(TachyonFile file, DeleteOptions options) throws IOException, TachyonException { + public void delete(TachyonFile file, DeleteOptions options) throws IOException, + FileDoesNotExistException, TachyonException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { masterClient.deleteFile(file.getFileId(), options.isRecursive()); - LOG.info( - "Deleted file " + file.getFileId() + " from both Tachyon Storage and under file system"); - } catch (FileDoesNotExistException e) { - throw new TachyonException(e, TachyonExceptionType.FILE_DOES_NOT_EXIST); + LOG.info("Deleted file " + file.getFileId() + + " from both Tachyon Storage and under file system"); + } catch (TachyonException e) { + TachyonException.unwrap(e, FileDoesNotExistException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } @@ -113,13 +115,15 @@ public void delete(TachyonFile file, DeleteOptions options) throws IOException, * This method is asynchronous and will be propagated to the workers through their heartbeats. */ @Override - public void free(TachyonFile file, FreeOptions options) throws IOException, TachyonException { + public void free(TachyonFile file, FreeOptions options) throws IOException, + FileDoesNotExistException, TachyonException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { masterClient.free(file.getFileId(), options.isRecursive()); LOG.info("Removed file " + file.getFileId() + " from Tachyon Storage"); - } catch (FileDoesNotExistException e) { - throw new TachyonException(e, TachyonExceptionType.FILE_DOES_NOT_EXIST); + } catch (TachyonException e) { + TachyonException.unwrap(e, FileDoesNotExistException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } @@ -137,8 +141,11 @@ public FileInfo getInfo(TachyonFile file, GetInfoOptions options) throws IOExcep FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { return masterClient.getFileInfo(file.getFileId()); - } catch (FileDoesNotExistException e) { - return null; + } catch (TachyonException e) { + if (e.getType() == TachyonExceptionType.FILE_DOES_NOT_EXIST) { + return null; + } + throw e; } finally { mContext.releaseMasterClient(masterClient); } @@ -152,12 +159,13 @@ public FileInfo getInfo(TachyonFile file, GetInfoOptions options) throws IOExcep */ @Override public List listStatus(TachyonFile file, ListStatusOptions options) throws IOException, - TachyonException { + FileDoesNotExistException, TachyonException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { return masterClient.getFileInfoList(file.getFileId()); - } catch (FileDoesNotExistException e) { - throw new TachyonException(e, TachyonExceptionType.FILE_DOES_NOT_EXIST); + } catch (TachyonException e) { + TachyonException.unwrap(e, FileDoesNotExistException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } @@ -165,22 +173,24 @@ public List listStatus(TachyonFile file, ListStatusOptions options) th @Override public long loadMetadata(TachyonURI path, LoadMetadataOptions options) - throws IOException, TachyonException { + throws IOException, FileDoesNotExistException, TachyonException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { long fileId = masterClient.loadFileInfoFromUfs(path.getPath(), options.isRecursive()); LOG.info("Loaded file " + path.getPath() + (options.isRecursive() ? " recursively" : "")); return fileId; - } catch (FileDoesNotExistException e) { - throw new TachyonException(e, TachyonExceptionType.FILE_DOES_NOT_EXIST); + } catch (TachyonException e) { + TachyonException.unwrap(e, FileDoesNotExistException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } } @Override - public boolean mkdir(TachyonURI path, MkdirOptions options) throws IOException, TachyonException { + public boolean mkdir(TachyonURI path, MkdirOptions options) throws IOException, + FileAlreadyExistsException, InvalidPathException, TachyonException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { boolean result = masterClient.createDirectory(path.getPath(), options.isRecursive()); @@ -188,10 +198,10 @@ public boolean mkdir(TachyonURI path, MkdirOptions options) throws IOException, LOG.info("Created directory " + path.getPath()); } return result; - } catch (FileAlreadyExistException e) { - throw new TachyonException(e, TachyonExceptionType.FILE_ALREADY_EXISTS); - } catch (InvalidPathException e) { - throw new TachyonException(e, TachyonExceptionType.INVALID_PATH); + } catch (TachyonException e) { + TachyonException.unwrap(e, FileAlreadyExistsException.class); + TachyonException.unwrap(e, InvalidPathException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } @@ -210,12 +220,13 @@ public boolean mount(TachyonURI tachyonPath, TachyonURI ufsPath, MountOptions op @Override public TachyonFile open(TachyonURI path, OpenOptions openOptions) throws IOException, - TachyonException { + InvalidPathException, TachyonException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { return new TachyonFile(masterClient.getFileId(path.getPath())); - } catch (InvalidPathException e) { - throw new TachyonException(e, TachyonExceptionType.INVALID_PATH); + } catch (TachyonException e) { + TachyonException.unwrap(e, InvalidPathException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } @@ -223,7 +234,7 @@ public TachyonFile open(TachyonURI path, OpenOptions openOptions) throws IOExcep @Override public boolean rename(TachyonFile src, TachyonURI dst, RenameOptions options) throws IOException, - TachyonException { + FileDoesNotExistException, TachyonException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { boolean result = masterClient.renameFile(src.getFileId(), dst.getPath()); @@ -231,8 +242,9 @@ public boolean rename(TachyonFile src, TachyonURI dst, RenameOptions options) th LOG.info("Renamed file " + src.getFileId() + " to " + dst.getPath()); } return result; - } catch (FileDoesNotExistException e) { - throw new TachyonException(e, TachyonExceptionType.FILE_DOES_NOT_EXIST); + } catch (TachyonException e) { + TachyonException.unwrap(e, FileDoesNotExistException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } @@ -240,7 +252,7 @@ public boolean rename(TachyonFile src, TachyonURI dst, RenameOptions options) th @Override public void setState(TachyonFile file, SetStateOptions options) throws IOException, - TachyonException { + FileDoesNotExistException, TachyonException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); Boolean pinned = options.getPinned(); try { @@ -248,8 +260,9 @@ public void setState(TachyonFile file, SetStateOptions options) throws IOExcepti masterClient.setPinned(file.getFileId(), pinned); LOG.info(pinned ? "Pinned" : "Unpinned" + " file " + file.getFileId()); } - } catch (FileDoesNotExistException e) { - throw new TachyonException(e, TachyonExceptionType.FILE_DOES_NOT_EXIST); + } catch (TachyonException e) { + TachyonException.unwrap(e, FileDoesNotExistException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } 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 e30210a93d8d..0a0d959b18a7 100644 --- a/clients/unshaded/src/main/java/tachyon/client/file/FileOutStream.java +++ b/clients/unshaded/src/main/java/tachyon/client/file/FileOutStream.java @@ -20,7 +20,6 @@ import java.util.LinkedList; import java.util.List; -import org.apache.thrift.TException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -37,7 +36,7 @@ import tachyon.client.block.BlockStoreContext; import tachyon.client.block.BufferedBlockOutStream; import tachyon.client.file.options.OutStreamOptions; -import tachyon.thrift.FileDoesNotExistException; +import tachyon.exception.TachyonException; import tachyon.thrift.FileInfo; import tachyon.underfs.UnderFileSystem; import tachyon.util.io.PathUtils; @@ -170,7 +169,7 @@ public void close() throws IOException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { masterClient.completeFile(mFileId); - } catch (TException e) { + } catch (TachyonException e) { throw new IOException(e); } finally { mContext.releaseMasterClient(masterClient); @@ -264,7 +263,7 @@ private long getNextBlockId() throws IOException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { return masterClient.getNewBlockIdForFile(mFileId); - } catch (TException e) { + } catch (TachyonException e) { throw new IOException(e); } finally { mContext.releaseMasterClient(masterClient); @@ -288,7 +287,7 @@ private FileInfo getFileInfo() throws IOException { FileSystemMasterClient client = mContext.acquireMasterClient(); try { return client.getFileInfo(mFileId); - } catch (FileDoesNotExistException e) { + } catch (TachyonException e) { throw new IOException(e.getMessage()); } finally { mContext.releaseMasterClient(client); diff --git a/clients/unshaded/src/main/java/tachyon/client/file/TachyonFileSystem.java b/clients/unshaded/src/main/java/tachyon/client/file/TachyonFileSystem.java index 331d5e55329e..956da7c0f05d 100644 --- a/clients/unshaded/src/main/java/tachyon/client/file/TachyonFileSystem.java +++ b/clients/unshaded/src/main/java/tachyon/client/file/TachyonFileSystem.java @@ -40,10 +40,11 @@ import tachyon.client.file.options.SetStateOptions; import tachyon.client.file.options.UnmountOptions; import tachyon.client.lineage.TachyonLineageFileSystem; +import tachyon.exception.DependencyDoesNotExistException; +import tachyon.exception.FileAlreadyExistsException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.exception.TachyonException; -import tachyon.exception.TachyonExceptionType; -import tachyon.thrift.DependencyDoesNotExistException; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; /** @@ -75,36 +76,40 @@ protected TachyonFileSystem() { /** * Convenience method for {@link #create(TachyonURI, CreateOptions)} with default options. */ - public long create(TachyonURI path) throws IOException, TachyonException { + public long create(TachyonURI path) throws IOException, TachyonException, + FileAlreadyExistsException, InvalidPathException { return create(path, CreateOptions.defaults()); } /** * Convenience method for {@link #delete(TachyonFile, DeleteOptions)} with default options. */ - public void delete(TachyonFile file) throws IOException, TachyonException { + public void delete(TachyonFile file) throws IOException, TachyonException, + FileDoesNotExistException { delete(file, DeleteOptions.defaults()); } /** * Convenience method for {@link #free(TachyonFile, FreeOptions)} with default options. */ - public void free(TachyonFile file) throws IOException, TachyonException { + public void free(TachyonFile file) throws IOException, TachyonException, + FileDoesNotExistException { free(file, FreeOptions.defaults()); } /** - * Convenience method for {@link #getInfo(TachyonFile, GetInfoOptions)} with default options. + * Convenience method for {@link TachyonFileSystemCore#getInfo(TachyonFile, GetInfoOptions)} with + * default options. */ public FileInfo getInfo(TachyonFile file) throws IOException, TachyonException { return getInfo(file, GetInfoOptions.defaults()); } /** - * Convenience method for {@link #getInStream(TachyonFile, InStreamOptions)} with default - * options. + * Convenience method for {@link #getInStream(TachyonFile, InStreamOptions)} with default options. */ - public FileInStream getInStream(TachyonFile file) throws IOException, TachyonException { + public FileInStream getInStream(TachyonFile file) throws IOException, TachyonException, + FileDoesNotExistException { return getInStream(file, InStreamOptions.defaults()); } @@ -117,10 +122,11 @@ public FileInStream getInStream(TachyonFile file) throws IOException, TachyonExc * @param options the set of options specific to this operation. * @return an input stream to read the file * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws TachyonException if an unexpected tachyon exception is thrown + * @throws FileDoesNotExistException if the given file does not exist */ public FileInStream getInStream(TachyonFile file, InStreamOptions options) throws IOException, - TachyonException { + TachyonException, FileDoesNotExistException { FileInfo info = getInfo(file, GetInfoOptions.defaults()); Preconditions.checkState(!info.isIsFolder(), "Cannot read from a folder"); return new FileInStream(info, options); @@ -130,7 +136,8 @@ public FileInStream getInStream(TachyonFile file, InStreamOptions options) throw * Convenience method for {@link #getOutStream(TachyonURI, OutStreamOptions)} with default * options. */ - public FileOutStream getOutStream(TachyonURI path) throws IOException, TachyonException { + public FileOutStream getOutStream(TachyonURI path) throws IOException, + TachyonException, FileAlreadyExistsException, InvalidPathException { return getOutStream(path, OutStreamOptions.defaults()); } @@ -144,10 +151,12 @@ public FileOutStream getOutStream(TachyonURI path) throws IOException, TachyonEx * @param options the set of options specific to this operation * @return an output stream to write the file * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws TachyonException if an unexpected tachyon exception is thrown + * @throws FileAlreadyExistsException if there is already a file at the given path + * @throws InvalidPathException if the path is invalid */ public FileOutStream getOutStream(TachyonURI path, OutStreamOptions options) throws IOException, - TachyonException { + TachyonException, FileAlreadyExistsException, InvalidPathException { CreateOptions createOptions = (new CreateOptions.Builder(ClientContext.getConf())).setBlockSize(options.getBlockSize()) .setRecursive(true).setTTL(options.getTTL()).build(); @@ -171,7 +180,8 @@ public FileOutStream getOutStream(long fileId, OutStreamOptions options) throws * Convenience method for {@link #listStatus(TachyonFile, ListStatusOptions)} with default * options. */ - public List listStatus(TachyonFile file) throws IOException, TachyonException { + public List listStatus(TachyonFile file) throws IOException, + TachyonException, FileDoesNotExistException { return listStatus(file, ListStatusOptions.defaults()); } @@ -180,14 +190,15 @@ public List listStatus(TachyonFile file) throws IOException, TachyonEx * default options. */ public long loadMetadata(TachyonURI path) throws IOException, - TachyonException { + TachyonException, FileDoesNotExistException { return loadMetadata(path, LoadMetadataOptions.defaults()); } /** * Convenience method for {@link #mkdir(TachyonURI, MkdirOptions)} with default options. */ - public boolean mkdir(TachyonURI path) throws IOException, TachyonException { + public boolean mkdir(TachyonURI path) throws IOException, TachyonException, + FileAlreadyExistsException, InvalidPathException { return mkdir(path, MkdirOptions.defaults()); } @@ -203,7 +214,8 @@ public boolean mount(TachyonURI tachyonPath, TachyonURI ufsPath) throws IOExcept /** * Convenience method for {@link #open(TachyonURI, OpenOptions)} with default options. */ - public TachyonFile open(TachyonURI path) throws IOException, TachyonException { + public TachyonFile open(TachyonURI path) throws IOException, InvalidPathException, + TachyonException { return open(path, OpenOptions.defaults()); } @@ -211,7 +223,8 @@ public TachyonFile open(TachyonURI path) throws IOException, TachyonException { * Convenience method for {@link #rename(TachyonFile, TachyonURI, RenameOptions)} with default * options. */ - public boolean rename(TachyonFile src, TachyonURI dst) throws IOException, TachyonException { + public boolean rename(TachyonFile src, TachyonURI dst) throws IOException, + TachyonException, FileDoesNotExistException { return rename(src, dst, RenameOptions.defaults()); } @@ -230,24 +243,28 @@ public boolean unmount(TachyonURI tachyonPath) throws IOException, TachyonExcept } // TODO: Move this to lineage client - public void reportLostFile(TachyonFile file) throws IOException, TachyonException { + public void reportLostFile(TachyonFile file) throws IOException, FileDoesNotExistException, + TachyonException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { masterClient.reportLostFile(file.getFileId()); - } catch (FileDoesNotExistException e) { - throw new TachyonException(e, TachyonExceptionType.FILE_DOES_NOT_EXIST); + } catch (TachyonException e) { + TachyonException.unwrap(e, FileDoesNotExistException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } } // TODO: Move this to lineage client - public void requestFilesInDependency(int depId) throws IOException, TachyonException { + public void requestFilesInDependency(int depId) throws IOException, + DependencyDoesNotExistException, TachyonException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { masterClient.requestFilesInDependency(depId); - } catch (DependencyDoesNotExistException e) { - throw new TachyonException(e, TachyonExceptionType.DEPENDENCY_DOES_NOT_EXIST); + } catch (TachyonException e) { + TachyonException.unwrap(e, DependencyDoesNotExistException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } 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 ce5307cc99f8..960b3bcd33f3 100644 --- a/clients/unshaded/src/main/java/tachyon/client/file/TachyonFileSystemCore.java +++ b/clients/unshaded/src/main/java/tachyon/client/file/TachyonFileSystemCore.java @@ -32,6 +32,9 @@ import tachyon.client.file.options.RenameOptions; import tachyon.client.file.options.SetStateOptions; import tachyon.client.file.options.UnmountOptions; +import tachyon.exception.FileAlreadyExistsException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.exception.TachyonException; import tachyon.thrift.FileInfo; @@ -49,9 +52,12 @@ interface TachyonFileSystemCore { * @param options method options * @return the file id that identifies the newly created file * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws FileAlreadyExistsException if there is already a file at the given path + * @throws InvalidPathException if the path is invalid + * @throws TachyonException if an unexpected tachyon exception is thrown */ - long create(TachyonURI path, CreateOptions options) throws IOException, TachyonException; + long create(TachyonURI path, CreateOptions options) throws IOException, + FileAlreadyExistsException, InvalidPathException, TachyonException; /** * Deletes a file or a directory. @@ -59,9 +65,11 @@ interface TachyonFileSystemCore { * @param file the handler of the file to delete * @param options method options * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws FileDoesNotExistException if the given file does not exist + * @throws TachyonException if an unexpected tachyon exception is thrown */ - void delete(TachyonFile file, DeleteOptions options) throws IOException, TachyonException; + void delete(TachyonFile file, DeleteOptions options) throws IOException, + FileDoesNotExistException, TachyonException; /** * Removes the file from Tachyon, but not from UFS in case it exists there. @@ -69,9 +77,11 @@ interface TachyonFileSystemCore { * @param file the handler for the file * @param options method options * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws FileDoesNotExistException if the given file does not exist + * @throws TachyonException if an unexpected tachyon exception is thrown */ - void free(TachyonFile file, FreeOptions options) throws IOException, TachyonException; + void free(TachyonFile file, FreeOptions options) throws IOException, FileDoesNotExistException, + TachyonException; /** * Gets the {@link FileInfo} object that represents the metadata of a Tachyon file. @@ -80,7 +90,7 @@ interface TachyonFileSystemCore { * @param options method options * @return the FileInfo of the file, null if the file does not exist. * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws TachyonException if an unexpected tachyon exception is thrown */ FileInfo getInfo(TachyonFile file, GetInfoOptions options) throws IOException, TachyonException; @@ -92,10 +102,11 @@ interface TachyonFileSystemCore { * @param options method options * @return a list of FileInfos representing the files which are children of the given file * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws FileDoesNotExistException if the given file does not exist + * @throws TachyonException if an unexpected tachyon exception is thrown */ List listStatus(TachyonFile file, ListStatusOptions options) throws IOException, - TachyonException; + FileDoesNotExistException, TachyonException; /** * Loads metadata about a file in UFS to Tachyon. No data will be transferred. @@ -104,10 +115,11 @@ List listStatus(TachyonFile file, ListStatusOptions options) throws IO * @param options method options * @return the file id of the resulting file in Tachyon * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws FileDoesNotExistException if the given file does not exist + * @throws TachyonException if an unexpected tachyon exception is thrown */ long loadMetadata(TachyonURI path, LoadMetadataOptions options) - throws IOException, TachyonException; + throws IOException, FileDoesNotExistException, TachyonException; /** * Creates a directory. @@ -116,9 +128,12 @@ long loadMetadata(TachyonURI path, LoadMetadataOptions options) * @param options method options * @return true if the directory is created successfully or already existing, false otherwise * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws FileAlreadyExistsException if there is already a file at the given path + * @throws InvalidPathException if the path is invalid + * @throws TachyonException if an unexpected tachyon exception is thrown */ - boolean mkdir(TachyonURI path, MkdirOptions options) throws IOException, TachyonException; + boolean mkdir(TachyonURI path, MkdirOptions options) throws IOException, + FileAlreadyExistsException, InvalidPathException, TachyonException; /** * Mounts a UFS subtree to the given Tachyon path. The Tachyon path is expected not to exist as @@ -143,9 +158,11 @@ boolean mount(TachyonURI tachyonPath, TachyonURI ufsPath, MountOptions options) * @param options method options * @return a TachyonFile which acts as a file handler for the path * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws InvalidPathException if the path is invalid + * @throws TachyonException if an unexpected tachyon exception is thrown */ - TachyonFile open(TachyonURI path, OpenOptions options) throws IOException, TachyonException; + TachyonFile open(TachyonURI path, OpenOptions options) throws IOException, InvalidPathException, + TachyonException; /** * Renames an existing Tachyon file to another Tachyon path in Tachyon. @@ -155,10 +172,11 @@ boolean mount(TachyonURI tachyonPath, TachyonURI ufsPath, MountOptions options) * @param options method options * @return true if successful, false otherwise * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws FileDoesNotExistException if the given file does not exist + * @throws TachyonException if an unexpected tachyon exception is thrown */ boolean rename(TachyonFile src, TachyonURI dst, RenameOptions options) throws IOException, - TachyonException; + FileDoesNotExistException, TachyonException; /** * Sets the state of a file. @@ -166,9 +184,11 @@ boolean rename(TachyonFile src, TachyonURI dst, RenameOptions options) throws IO * @param file the file handler for the file to pin * @param options method options * @throws IOException if a non-Tachyon exception occurs - * @throws TachyonException if a Tachyon exception occurs + * @throws FileDoesNotExistException if the given file does not exist + * @throws TachyonException if an unexpected tachyon exception is thrown */ - void setState(TachyonFile file, SetStateOptions options) throws IOException, TachyonException; + void setState(TachyonFile file, SetStateOptions options) throws IOException, + FileDoesNotExistException, TachyonException; /** * Unmounts a UFS subtree identified by the given Tachyon path. The Tachyon path match a diff --git a/clients/unshaded/src/main/java/tachyon/client/lineage/AbstractLineageClient.java b/clients/unshaded/src/main/java/tachyon/client/lineage/AbstractLineageClient.java index a8af350a74e3..9ef3dc748115 100644 --- a/clients/unshaded/src/main/java/tachyon/client/lineage/AbstractLineageClient.java +++ b/clients/unshaded/src/main/java/tachyon/client/lineage/AbstractLineageClient.java @@ -27,11 +27,12 @@ import tachyon.TachyonURI; import tachyon.annotation.PublicApi; import tachyon.client.lineage.options.DeleteLineageOptions; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.LineageDeletionException; +import tachyon.exception.LineageDoesNotExistException; +import tachyon.exception.TachyonException; import tachyon.job.CommandLineJob; import tachyon.job.Job; -import tachyon.thrift.FileDoesNotExistException; -import tachyon.thrift.LineageDeletionException; -import tachyon.thrift.LineageDoesNotExistException; import tachyon.thrift.LineageInfo; /** @@ -45,7 +46,7 @@ public abstract class AbstractLineageClient implements LineageClient { @Override public long createLineage(List inputFiles, List outputFiles, Job job) - throws FileDoesNotExistException, IOException { + throws FileDoesNotExistException, TachyonException, IOException { // TODO(yupeng): relax this to support other type of jobs Preconditions.checkState(job instanceof CommandLineJob, "only command line job supported"); @@ -54,19 +55,26 @@ public long createLineage(List inputFiles, List outputFi long lineageId = masterClient.createLineage(inputFiles, outputFiles, (CommandLineJob) job); LOG.info("Created lineage " + lineageId); return lineageId; + } catch (TachyonException e) { + TachyonException.unwrap(e, FileDoesNotExistException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } } @Override - public boolean deleteLineage(long lineageId, DeleteLineageOptions options) - throws IOException, LineageDoesNotExistException, LineageDeletionException { + public boolean deleteLineage(long lineageId, DeleteLineageOptions options) throws IOException, + LineageDoesNotExistException, LineageDeletionException, TachyonException { LineageMasterClient masterClient = mContext.acquireMasterClient(); try { boolean result = masterClient.deleteLineage(lineageId, options.isCascade()); LOG.info(result ? "Succeeded to " : "Failed to " + "delete lineage " + lineageId); return result; + } catch (TachyonException e) { + TachyonException.unwrap(e, LineageDoesNotExistException.class); + TachyonException.unwrap(e, LineageDeletionException.class); + throw e; } finally { mContext.releaseMasterClient(masterClient); } diff --git a/clients/unshaded/src/main/java/tachyon/client/lineage/LineageClient.java b/clients/unshaded/src/main/java/tachyon/client/lineage/LineageClient.java index c31f7f71ccc1..1867dc574691 100644 --- a/clients/unshaded/src/main/java/tachyon/client/lineage/LineageClient.java +++ b/clients/unshaded/src/main/java/tachyon/client/lineage/LineageClient.java @@ -21,10 +21,11 @@ import tachyon.TachyonURI; import tachyon.annotation.PublicApi; import tachyon.client.lineage.options.DeleteLineageOptions; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.LineageDeletionException; +import tachyon.exception.LineageDoesNotExistException; +import tachyon.exception.TachyonException; import tachyon.job.Job; -import tachyon.thrift.FileDoesNotExistException; -import tachyon.thrift.LineageDeletionException; -import tachyon.thrift.LineageDoesNotExistException; import tachyon.thrift.LineageInfo; @@ -45,9 +46,18 @@ interface LineageClient { * @throws IOException if the master cannot create the lineage * @throws FileDoesNotExistException an input file does not exist in Tachyon storage, nor is added * as an output file of an existing lineage + * @throws TachyonException if an unexpected tachyon error occurs */ long createLineage(List inputFiles, List outputFiles, Job job) - throws FileDoesNotExistException, IOException; + throws FileDoesNotExistException, IOException, TachyonException; + + /** + * Lists all the lineages. + * + * @return the information about lineages + * @throws IOException if the master cannot list the lineage info + */ + public List getLineageInfoList() throws IOException; /** * Deletes a lineage identified by a given id. If the delete is cascade, it will delete all the @@ -61,15 +71,8 @@ long createLineage(List inputFiles, List outputFiles, Jo * @throws IOException if the master cannot delete the lineage * @throws LineageDeletionException if the deletion is cascade but the lineage has children * @throws LineageDoesNotExistException if the lineage does not exist + * @throws TachyonException if an unexpected tachyon error occurs */ public boolean deleteLineage(long lineageId, DeleteLineageOptions options) - throws IOException, LineageDoesNotExistException, LineageDeletionException; - - /** - * Lists all the lineages. - * - * @return the information about lineages - * @throws IOException if the master cannot list the lineage info - */ - public List getLineageInfoList() throws IOException; + throws IOException, LineageDoesNotExistException, LineageDeletionException, TachyonException; } diff --git a/clients/unshaded/src/main/java/tachyon/client/lineage/LineageMasterClient.java b/clients/unshaded/src/main/java/tachyon/client/lineage/LineageMasterClient.java index 3155d06bb4b6..531e839238d3 100644 --- a/clients/unshaded/src/main/java/tachyon/client/lineage/LineageMasterClient.java +++ b/clients/unshaded/src/main/java/tachyon/client/lineage/LineageMasterClient.java @@ -30,12 +30,11 @@ import tachyon.MasterClientBase; import tachyon.TachyonURI; import tachyon.conf.TachyonConf; +import tachyon.exception.TachyonException; import tachyon.job.CommandLineJob; -import tachyon.thrift.FileDoesNotExistException; -import tachyon.thrift.LineageDeletionException; -import tachyon.thrift.LineageDoesNotExistException; import tachyon.thrift.LineageInfo; import tachyon.thrift.LineageMasterService; +import tachyon.thrift.TachyonTException; /** * A wrapper for the thrift client to interact with the lineage master, used by tachyon clients. @@ -71,7 +70,7 @@ protected void afterConnect() { } public synchronized long createLineage(List inputFiles, List outputFiles, - CommandLineJob job) throws IOException, FileDoesNotExistException { + CommandLineJob job) throws IOException, TachyonException { // prepare for RPC List inputFileStrings = Lists.newArrayList(); for (TachyonURI inputFile : inputFiles) { @@ -88,8 +87,8 @@ public synchronized long createLineage(List inputFiles, List inputFiles, List getFileInfoList(long fileId) throws IOException, - FileDoesNotExistException { + TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.getFileInfoList(fileId); - } catch (FileDoesNotExistException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -145,22 +143,19 @@ public synchronized List getFileInfoList(long fileId) throws IOExcepti * @param fileId the file id * @param fileBlockIndex the file block index * @return the file block information - * @throws FileDoesNotExistException if the file does not exist - * @throws BlockInfoException if the block index is invalid * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ // TODO(calvin): Not sure if this is necessary. public synchronized FileBlockInfo getFileBlockInfo(long fileId, int fileBlockIndex) - throws IOException, FileDoesNotExistException, BlockInfoException { + throws IOException, TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.getFileBlockInfo(fileId, fileBlockIndex); - } catch (FileDoesNotExistException e) { - throw e; - } catch (BlockInfoException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -172,19 +167,19 @@ public synchronized FileBlockInfo getFileBlockInfo(long fileId, int fileBlockInd /** * @param fileId the file id * @return the list of file block information for the given file id - * @throws FileDoesNotExistException if the file does not exist * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ // TODO(calvin): Not sure if this is necessary. public synchronized List getFileBlockInfoList(long fileId) throws IOException, - FileDoesNotExistException { + TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.getFileBlockInfoList(fileId); - } catch (FileDoesNotExistException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -196,18 +191,17 @@ public synchronized List getFileBlockInfoList(long fileId) throws /** * @param fileId the file id * @return a new block id for the given file id - * @throws FileDoesNotExistException if the file does not exist - * @throws IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ - public synchronized long getNewBlockIdForFile(long fileId) throws IOException, - FileDoesNotExistException { + public synchronized long getNewBlockIdForFile(long fileId) throws IOException, TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.getNewBlockIdForFile(fileId); - } catch (FileDoesNotExistException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -242,24 +236,18 @@ public synchronized String getUfsAddress() throws IOException { * @param recursive whether parent directories should be created if not present yet * @param ttl TTL for file expiration * @return the file id - * @throws InvalidPathException if the given path is invalid - * @throws BlockInfoException if the block index is invalid - * @throws FileAlreadyExistException if the file already exists * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ public synchronized long createFile(String path, long blockSizeBytes, boolean recursive, long ttl) - throws IOException, BlockInfoException, InvalidPathException, FileAlreadyExistException { + throws IOException, TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.createFile(path, blockSizeBytes, recursive, ttl); - } catch (BlockInfoException e) { - throw e; - } catch (InvalidPathException e) { - throw e; - } catch (FileAlreadyExistException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -272,22 +260,18 @@ public synchronized long createFile(String path, long blockSizeBytes, boolean re * Marks a file as completed. * * @param fileId the file id - * @throws FileDoesNotExistException if the file does not exist - * @throws BlockInfoException if the block index is invalid * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ - public synchronized void completeFile(long fileId) throws IOException, FileDoesNotExistException, - BlockInfoException { + public synchronized void completeFile(long fileId) throws IOException, TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { mClient.completeFile(fileId); return; - } catch (FileDoesNotExistException e) { - throw e; - } catch (BlockInfoException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -302,18 +286,20 @@ public synchronized void completeFile(long fileId) throws IOException, FileDoesN * @param fileId the file id * @param recursive whether to delete the file recursively (when it is a directory) * @return whether operation succeeded or not - * @throws FileDoesNotExistException if the file does not exist * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ public synchronized boolean deleteFile(long fileId, boolean recursive) throws IOException, - FileDoesNotExistException { + TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.deleteFile(fileId, recursive); - } catch (FileDoesNotExistException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); + } catch (ThriftIOException e) { + throw new IOException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -328,18 +314,18 @@ public synchronized boolean deleteFile(long fileId, boolean recursive) throws IO * @param fileId the file id * @param dstPath new file path * @return whether operation succeeded or not - * @throws FileDoesNotExistException if the file does not exist * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ public synchronized boolean renameFile(long fileId, String dstPath) throws IOException, - FileDoesNotExistException { + TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.renameFile(fileId, dstPath); - } catch (FileDoesNotExistException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -353,19 +339,19 @@ public synchronized boolean renameFile(long fileId, String dstPath) throws IOExc * * @param fileId the file id * @param pinned the pinned status to use - * @throws FileDoesNotExistException if the file does not exist * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ public synchronized void setPinned(long fileId, boolean pinned) throws IOException, - FileDoesNotExistException { + TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { mClient.setPinned(fileId, pinned); return; - } catch (FileDoesNotExistException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -380,21 +366,18 @@ public synchronized void setPinned(long fileId, boolean pinned) throws IOExcepti * @param path the directory path * @param recursive whether parent directories should be created if they don't exist yet * @return whether operation succeeded or not - * @throws InvalidPathException if the given path is invalid - * @throws FileAlreadyExistException if the file already exists * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ public synchronized boolean createDirectory(String path, boolean recursive) throws IOException, - FileAlreadyExistException, InvalidPathException { + TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.createDirectory(path, recursive); - } catch (InvalidPathException e) { - throw e; - } catch (FileAlreadyExistException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -409,18 +392,18 @@ public synchronized boolean createDirectory(String path, boolean recursive) thro * @param fileId the file id * @param recursive whether free the file recursively (when it is a directory) * @return whether operation succeeded or not - * @throws FileDoesNotExistException if the file does not exist * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ public synchronized boolean free(long fileId, boolean recursive) throws IOException, - FileDoesNotExistException { + TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.free(fileId, recursive); - } catch (FileDoesNotExistException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -433,20 +416,17 @@ public synchronized boolean free(long fileId, boolean recursive) throws IOExcept * Reports a lost file. * * @param fileId the file id - * @throws FileDoesNotExistException if the file does not exist * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ - public synchronized void reportLostFile(long fileId) throws IOException, - FileDoesNotExistException { + public synchronized void reportLostFile(long fileId) throws IOException, TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { mClient.reportLostFile(fileId); - return; - } catch (FileDoesNotExistException e) { - LOG.error(e.getMessage(), e); - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -459,18 +439,18 @@ public synchronized void reportLostFile(long fileId) throws IOException, * Requests files in a dependency. * * @param depId the dependency id - * @throws DependencyDoesNotExistException if the dependency does not exist * @throws IOException if an I/O error occurs + * @throws TachyonException if a Tachyon error occurs */ - public synchronized void requestFilesInDependency(int depId) throws IOException, - DependencyDoesNotExistException { + public synchronized void requestFilesInDependency(int depId) + throws IOException, TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { mClient.requestFilesInDependency(depId); - } catch (DependencyDoesNotExistException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -521,18 +501,18 @@ public synchronized DependencyInfo getDependencyInfo(int dependencyId) throws IO * @param path the Tachyon path of the file * @param recursive whether parent directories should be loaded if not present yet * @return the file id - * @throws FileDoesNotExistException if the file does not exist + * @throws TachyonException if a tachyon error occurs * @throws IOException if an I/O error occurs */ public synchronized long loadFileInfoFromUfs(String path, boolean recursive) - throws IOException, FileDoesNotExistException { + throws IOException, TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.loadFileInfoFromUfs(path, recursive); - } catch (FileDoesNotExistException e) { - throw e; + } catch (TachyonTException e) { + throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; diff --git a/common/src/main/java/tachyon/client/WorkerFileSystemMasterClient.java b/common/src/main/java/tachyon/client/WorkerFileSystemMasterClient.java index e5d5e68b9a0e..9793fb29563b 100644 --- a/common/src/main/java/tachyon/client/WorkerFileSystemMasterClient.java +++ b/common/src/main/java/tachyon/client/WorkerFileSystemMasterClient.java @@ -27,10 +27,9 @@ import tachyon.Constants; import tachyon.MasterClientBase; import tachyon.conf.TachyonConf; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; import tachyon.thrift.FileSystemMasterService; -import tachyon.thrift.InvalidPathException; +import tachyon.thrift.TachyonTException; /** * A wrapper for the thrift client to interact with the file system master, used by tachyon worker. @@ -79,7 +78,7 @@ public synchronized boolean persistFile(long fileId, long length) throws IOExcep connect(); try { return mClient.persistFile(fileId, length); - } catch (FileDoesNotExistException e) { + } catch (TachyonTException e) { throw new IOException(e); } catch (TException e) { LOG.error(e.getMessage(), e); @@ -92,19 +91,17 @@ public synchronized boolean persistFile(long fileId, long length) throws IOExcep /** * @param fileId the file id * @return the file info for the given file id - * @throws FileDoesNotExistException if the file does not exist * @throws IOException if an I/O error occurs */ // TODO(jiri): Factor this method out to a common client. - public synchronized FileInfo getFileInfo(long fileId) throws IOException, - FileDoesNotExistException { + public synchronized FileInfo getFileInfo(long fileId) throws IOException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.getFileInfo(fileId); - } catch (FileDoesNotExistException e) { - throw e; + } catch (TachyonTException e) { + throw new IOException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; @@ -123,7 +120,7 @@ public synchronized Set getPinList() throws IOException { connect(); try { return mClient.workerGetPinIdList(); - } catch (InvalidPathException e) { + } catch (TachyonTException e) { throw new IOException(e); } catch (TException e) { LOG.error(e.getMessage(), e); diff --git a/common/src/main/java/tachyon/exception/OutOfSpaceException.java b/common/src/main/java/tachyon/exception/BlockAlreadyExistsException.java similarity index 52% rename from common/src/main/java/tachyon/exception/OutOfSpaceException.java rename to common/src/main/java/tachyon/exception/BlockAlreadyExistsException.java index fcafc32388a8..2c8f7b766b30 100644 --- a/common/src/main/java/tachyon/exception/OutOfSpaceException.java +++ b/common/src/main/java/tachyon/exception/BlockAlreadyExistsException.java @@ -15,31 +15,23 @@ package tachyon.exception; -/** - * Exception used when storage space is insufficient. - * - * For example: - *
    - *
  • worker cannot satisfy the requested space
  • - *
  • evictor cannot satisfy the space to be available after eviction
  • - *
- */ -public final class OutOfSpaceException extends AbstractTachyonException { - private static final long serialVersionUID = -5000240143940942071L; +public class BlockAlreadyExistsException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = + TachyonExceptionType.BLOCK_ALREADY_EXISTS; - public OutOfSpaceException(String message) { - super(message); + public BlockAlreadyExistsException(String message) { + super(EXCEPTION_TYPE, message); } - public OutOfSpaceException(String message, Throwable cause) { - super(message, cause); + public BlockAlreadyExistsException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); } - public OutOfSpaceException(ExceptionMessage message, Object... params) { - super(message, params); + public BlockAlreadyExistsException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); } - public OutOfSpaceException(ExceptionMessage message, Throwable cause, Object... params) { - super(message, cause, params); + public BlockAlreadyExistsException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); } } diff --git a/common/src/main/java/tachyon/exception/BlockDoesNotExistException.java b/common/src/main/java/tachyon/exception/BlockDoesNotExistException.java new file mode 100644 index 000000000000..ab76f1c15b12 --- /dev/null +++ b/common/src/main/java/tachyon/exception/BlockDoesNotExistException.java @@ -0,0 +1,37 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class BlockDoesNotExistException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = + TachyonExceptionType.BLOCK_DOES_NOT_EXIST; + + public BlockDoesNotExistException(String message) { + super(EXCEPTION_TYPE, message); + } + + public BlockDoesNotExistException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public BlockDoesNotExistException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public BlockDoesNotExistException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/BlockInfoException.java b/common/src/main/java/tachyon/exception/BlockInfoException.java new file mode 100644 index 000000000000..d98bb92dae17 --- /dev/null +++ b/common/src/main/java/tachyon/exception/BlockInfoException.java @@ -0,0 +1,36 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class BlockInfoException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = TachyonExceptionType.BLOCK_INFO; + + public BlockInfoException(String message) { + super(EXCEPTION_TYPE, message); + } + + public BlockInfoException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public BlockInfoException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public BlockInfoException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/DependencyDoesNotExistException.java b/common/src/main/java/tachyon/exception/DependencyDoesNotExistException.java new file mode 100644 index 000000000000..41277649990b --- /dev/null +++ b/common/src/main/java/tachyon/exception/DependencyDoesNotExistException.java @@ -0,0 +1,38 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class DependencyDoesNotExistException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = + TachyonExceptionType.DEPENDENCY_DOES_NOT_EXIST; + + public DependencyDoesNotExistException(String message) { + super(EXCEPTION_TYPE, message); + } + + public DependencyDoesNotExistException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public DependencyDoesNotExistException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public DependencyDoesNotExistException(ExceptionMessage message, Throwable cause, + Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/FailedToCheckpointException.java b/common/src/main/java/tachyon/exception/FailedToCheckpointException.java new file mode 100644 index 000000000000..72d8e8c4c648 --- /dev/null +++ b/common/src/main/java/tachyon/exception/FailedToCheckpointException.java @@ -0,0 +1,37 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class FailedToCheckpointException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = + TachyonExceptionType.FAILED_TO_CHECKPOINT; + + public FailedToCheckpointException(String message) { + super(EXCEPTION_TYPE, message); + } + + public FailedToCheckpointException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public FailedToCheckpointException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public FailedToCheckpointException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/FileAlreadyExistsException.java b/common/src/main/java/tachyon/exception/FileAlreadyExistsException.java new file mode 100644 index 000000000000..9e2e0571f196 --- /dev/null +++ b/common/src/main/java/tachyon/exception/FileAlreadyExistsException.java @@ -0,0 +1,37 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class FileAlreadyExistsException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = + TachyonExceptionType.FILE_ALREADY_EXISTS; + + public FileAlreadyExistsException(String message) { + super(EXCEPTION_TYPE, message); + } + + public FileAlreadyExistsException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public FileAlreadyExistsException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public FileAlreadyExistsException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/FileDoesNotExistException.java b/common/src/main/java/tachyon/exception/FileDoesNotExistException.java new file mode 100644 index 000000000000..a4f98fb11149 --- /dev/null +++ b/common/src/main/java/tachyon/exception/FileDoesNotExistException.java @@ -0,0 +1,37 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class FileDoesNotExistException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = + TachyonExceptionType.FILE_DOES_NOT_EXIST; + + public FileDoesNotExistException(String message) { + super(EXCEPTION_TYPE, message); + } + + public FileDoesNotExistException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public FileDoesNotExistException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public FileDoesNotExistException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/InvalidPathException.java b/common/src/main/java/tachyon/exception/InvalidPathException.java new file mode 100644 index 000000000000..ecff8f039705 --- /dev/null +++ b/common/src/main/java/tachyon/exception/InvalidPathException.java @@ -0,0 +1,36 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class InvalidPathException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = TachyonExceptionType.INVALID_PATH; + + public InvalidPathException(String message) { + super(EXCEPTION_TYPE, message); + } + + public InvalidPathException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public InvalidPathException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public InvalidPathException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/InvalidStateException.java b/common/src/main/java/tachyon/exception/InvalidStateException.java deleted file mode 100644 index 751e3ecae309..000000000000 --- a/common/src/main/java/tachyon/exception/InvalidStateException.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the University of California, Berkeley under one or more contributor license - * agreements. See the NOTICE file distributed with this work for additional information regarding - * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. You may obtain a - * copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -package tachyon.exception; - -/** - * Exception used when the system is not in a state required for the operation. - * - * For example: - *
    - *
  • sessionId or blockId does not correspond to that in the record of lockId
  • - *
  • session A wants to commit a temp block owned by session B
  • - *
- */ -public final class InvalidStateException extends AbstractTachyonException { - private static final long serialVersionUID = -7966393090688326795L; - - public InvalidStateException(String message) { - super(message); - } - - public InvalidStateException(String message, Throwable cause) { - super(message, cause); - } - - public InvalidStateException(ExceptionMessage message, Object... params) { - super(message, params); - } - - public InvalidStateException(ExceptionMessage message, Throwable cause, Object... params) { - super(message, cause, params); - } -} diff --git a/common/src/main/java/tachyon/exception/InvalidWorkerStateException.java b/common/src/main/java/tachyon/exception/InvalidWorkerStateException.java new file mode 100644 index 000000000000..a57eb0b0c664 --- /dev/null +++ b/common/src/main/java/tachyon/exception/InvalidWorkerStateException.java @@ -0,0 +1,37 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class InvalidWorkerStateException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = + TachyonExceptionType.INVALID_WORKER_STATE; + + public InvalidWorkerStateException(String message) { + super(EXCEPTION_TYPE, message); + } + + public InvalidWorkerStateException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public InvalidWorkerStateException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public InvalidWorkerStateException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/AbstractTachyonException.java b/common/src/main/java/tachyon/exception/LineageDeletionException.java similarity index 66% rename from common/src/main/java/tachyon/exception/AbstractTachyonException.java rename to common/src/main/java/tachyon/exception/LineageDeletionException.java index f69a9a403a79..c9ae5a39ef50 100644 --- a/common/src/main/java/tachyon/exception/AbstractTachyonException.java +++ b/common/src/main/java/tachyon/exception/LineageDeletionException.java @@ -15,26 +15,22 @@ package tachyon.exception; -/** - * Abstract class for Tachyon exceptions. - * - */ -@SuppressWarnings("serial") -public abstract class AbstractTachyonException extends Exception { +public class LineageDeletionException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = TachyonExceptionType.LINEAGE_DELETION; - public AbstractTachyonException(String message) { - super(message); + public LineageDeletionException(String message) { + super(EXCEPTION_TYPE, message); } - public AbstractTachyonException(String message, Throwable cause) { - super(message, cause); + public LineageDeletionException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); } - public AbstractTachyonException(ExceptionMessage message, Object... params) { + public LineageDeletionException(ExceptionMessage message, Object... params) { this(message.getMessage(params)); } - public AbstractTachyonException(ExceptionMessage message, Throwable cause, Object... params) { + public LineageDeletionException(ExceptionMessage message, Throwable cause, Object... params) { this(message.getMessage(params), cause); } } diff --git a/common/src/main/java/tachyon/exception/LineageDoesNotExistException.java b/common/src/main/java/tachyon/exception/LineageDoesNotExistException.java new file mode 100644 index 000000000000..f20887bb65f8 --- /dev/null +++ b/common/src/main/java/tachyon/exception/LineageDoesNotExistException.java @@ -0,0 +1,37 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class LineageDoesNotExistException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = + TachyonExceptionType.LINEAGE_DOES_NOT_EXIST; + + public LineageDoesNotExistException(String message) { + super(EXCEPTION_TYPE, message); + } + + public LineageDoesNotExistException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public LineageDoesNotExistException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public LineageDoesNotExistException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/NotFoundException.java b/common/src/main/java/tachyon/exception/NoWorkerException.java similarity index 59% rename from common/src/main/java/tachyon/exception/NotFoundException.java rename to common/src/main/java/tachyon/exception/NoWorkerException.java index b50827011317..f8babad3c865 100644 --- a/common/src/main/java/tachyon/exception/NotFoundException.java +++ b/common/src/main/java/tachyon/exception/NoWorkerException.java @@ -15,25 +15,22 @@ package tachyon.exception; -/** - * Exception used when some requested entity (e.g., block, file, directory or lock) was not found. - */ -public final class NotFoundException extends AbstractTachyonException { - private static final long serialVersionUID = 6901397458237323517L; +public class NoWorkerException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = TachyonExceptionType.NO_WORKER; - public NotFoundException(String message) { - super(message); + public NoWorkerException(String message) { + super(EXCEPTION_TYPE, message); } - public NotFoundException(String message, Throwable cause) { - super(message, cause); + public NoWorkerException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); } - public NotFoundException(ExceptionMessage message, Object... params) { - super(message, params); + public NoWorkerException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); } - public NotFoundException(ExceptionMessage message, Throwable cause, Object... params) { - super(message, cause, params); + public NoWorkerException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); } } diff --git a/common/src/main/java/tachyon/exception/SuspectedFileSizeException.java b/common/src/main/java/tachyon/exception/SuspectedFileSizeException.java new file mode 100644 index 000000000000..e24d244aded5 --- /dev/null +++ b/common/src/main/java/tachyon/exception/SuspectedFileSizeException.java @@ -0,0 +1,37 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class SuspectedFileSizeException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = + TachyonExceptionType.SUSPECTED_FILE_SIZE; + + public SuspectedFileSizeException(String message) { + super(EXCEPTION_TYPE, message); + } + + public SuspectedFileSizeException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public SuspectedFileSizeException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public SuspectedFileSizeException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/TableColumnException.java b/common/src/main/java/tachyon/exception/TableColumnException.java new file mode 100644 index 000000000000..cd7a4379fb34 --- /dev/null +++ b/common/src/main/java/tachyon/exception/TableColumnException.java @@ -0,0 +1,36 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class TableColumnException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = TachyonExceptionType.TABLE_COLUMN; + + public TableColumnException(String message) { + super(EXCEPTION_TYPE, message); + } + + public TableColumnException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public TableColumnException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public TableColumnException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/TableDoesNotExistException.java b/common/src/main/java/tachyon/exception/TableDoesNotExistException.java new file mode 100644 index 000000000000..c10a5667f834 --- /dev/null +++ b/common/src/main/java/tachyon/exception/TableDoesNotExistException.java @@ -0,0 +1,37 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class TableDoesNotExistException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = + TachyonExceptionType.TABLE_DOES_NOT_EXIST; + + public TableDoesNotExistException(String message) { + super(EXCEPTION_TYPE, message); + } + + public TableDoesNotExistException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public TableDoesNotExistException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public TableDoesNotExistException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/exception/AlreadyExistsException.java b/common/src/main/java/tachyon/exception/TableMetadataException.java similarity index 58% rename from common/src/main/java/tachyon/exception/AlreadyExistsException.java rename to common/src/main/java/tachyon/exception/TableMetadataException.java index dcf585f9d7ff..84abf8b3d4b7 100644 --- a/common/src/main/java/tachyon/exception/AlreadyExistsException.java +++ b/common/src/main/java/tachyon/exception/TableMetadataException.java @@ -15,26 +15,22 @@ package tachyon.exception; -/** - * Exception used when some entity that we attempted to create (e.g., block, file, directory or - * lock) already exists. - */ -public final class AlreadyExistsException extends AbstractTachyonException { - private static final long serialVersionUID = -8538037207176988241L; +public class TableMetadataException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = TachyonExceptionType.TABLE_METADATA; - public AlreadyExistsException(String message) { - super(message); + public TableMetadataException(String message) { + super(EXCEPTION_TYPE, message); } - public AlreadyExistsException(String message, Throwable cause) { - super(message, cause); + public TableMetadataException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); } - public AlreadyExistsException(ExceptionMessage message, Object... params) { - super(message, params); + public TableMetadataException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); } - public AlreadyExistsException(ExceptionMessage message, Throwable cause, Object... params) { - super(message, cause, params); + public TableMetadataException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); } } diff --git a/common/src/main/java/tachyon/exception/TachyonException.java b/common/src/main/java/tachyon/exception/TachyonException.java index c5fbf2a3c861..95c742393486 100644 --- a/common/src/main/java/tachyon/exception/TachyonException.java +++ b/common/src/main/java/tachyon/exception/TachyonException.java @@ -15,15 +15,60 @@ package tachyon.exception; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import tachyon.Constants; +import tachyon.thrift.TachyonTException; + +/** + * General TachyonException used throughout the system. It must be able serialize itself to the RPC + * framework and convert back without losing any necessary information. + */ public class TachyonException extends Exception { private TachyonExceptionType mType; + private static final Logger LOG = LoggerFactory.getLogger(Constants.LOGGER_TYPE); + + public TachyonException(TachyonTException te) { + super(te.getMessage()); + mType = TachyonExceptionType.valueOf(te.type); + } + + protected TachyonException(TachyonExceptionType type, Throwable cause) { + super(cause); + mType = type; + } - public TachyonException(Exception e, TachyonExceptionType type) { - super(e.getMessage()); + protected TachyonException(TachyonExceptionType type, String message) { + super(message); + mType = type; + } + + protected TachyonException(TachyonExceptionType type, String message, Throwable cause) { + super(message, cause); mType = type; } public TachyonExceptionType getType() { return mType; } + + public TachyonTException toTachyonTException() { + return new TachyonTException(mType.name(), getMessage()); + } + + public static void unwrap(TachyonException e, Class throwClass) + throws T { + try { + T throwInstance = + throwClass.getConstructor(String.class, Throwable.class).newInstance(e.getMessage(), e); + if (e.getType() == throwInstance.getType()) { + throw throwInstance; + } + } catch (ReflectiveOperationException roe) { + // They passed us an exception class that couldn't be instantiated with a string and + // throwable, so we can ignore it + LOG.error("Class passed to unwrap is invalid: ", throwClass.getName()); + } + } } diff --git a/common/src/main/java/tachyon/exception/TachyonExceptionType.java b/common/src/main/java/tachyon/exception/TachyonExceptionType.java index 12da3e5ce2dc..3d6fe6d8a44a 100644 --- a/common/src/main/java/tachyon/exception/TachyonExceptionType.java +++ b/common/src/main/java/tachyon/exception/TachyonExceptionType.java @@ -16,9 +16,21 @@ package tachyon.exception; public enum TachyonExceptionType { + BLOCK_ALREADY_EXISTS, + BLOCK_DOES_NOT_EXIST, BLOCK_INFO, DEPENDENCY_DOES_NOT_EXIST, - FILE_DOES_NOT_EXIST, + FAILED_TO_CHECKPOINT, FILE_ALREADY_EXISTS, + FILE_DOES_NOT_EXIST, INVALID_PATH, + INVALID_WORKER_STATE, + LINEAGE_DELETION, + LINEAGE_DOES_NOT_EXIST, + NO_WORKER, + SUSPECTED_FILE_SIZE, + TABLE_COLUMN, + TABLE_DOES_NOT_EXIST, + TABLE_METADATA, + WORKER_OUT_OF_SPACE, } diff --git a/common/src/main/java/tachyon/exception/WorkerOutOfSpaceException.java b/common/src/main/java/tachyon/exception/WorkerOutOfSpaceException.java new file mode 100644 index 000000000000..5d15690ff0f0 --- /dev/null +++ b/common/src/main/java/tachyon/exception/WorkerOutOfSpaceException.java @@ -0,0 +1,37 @@ +/* + * Licensed to the University of California, Berkeley under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package tachyon.exception; + +public class WorkerOutOfSpaceException extends TachyonException { + private static final TachyonExceptionType EXCEPTION_TYPE = + TachyonExceptionType.WORKER_OUT_OF_SPACE; + + public WorkerOutOfSpaceException(String message) { + super(EXCEPTION_TYPE, message); + } + + public WorkerOutOfSpaceException(String message, Throwable cause) { + super(EXCEPTION_TYPE, message, cause); + } + + public WorkerOutOfSpaceException(ExceptionMessage message, Object... params) { + this(message.getMessage(params)); + } + + public WorkerOutOfSpaceException(ExceptionMessage message, Throwable cause, Object... params) { + this(message.getMessage(params), cause); + } +} diff --git a/common/src/main/java/tachyon/thrift/BlockInfo.java b/common/src/main/java/tachyon/thrift/BlockInfo.java index 2af398114fb3..6e0292ce69c6 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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") 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/BlockLocation.java b/common/src/main/java/tachyon/thrift/BlockLocation.java index b9960893c21c..c3f46ae720ba 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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") 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 7ba39f88c4e9..759a0fdc7ba5 100644 --- a/common/src/main/java/tachyon/thrift/BlockMasterService.java +++ b/common/src/main/java/tachyon/thrift/BlockMasterService.java @@ -34,46 +34,46 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") public class BlockMasterService { public interface Iface { - public long workerGetWorkerId(NetAddress workerNetAddress) throws org.apache.thrift.TException; - - public void workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers) throws TachyonException, org.apache.thrift.TException; + public BlockInfo getBlockInfo(long blockId) throws TachyonTException, org.apache.thrift.TException; - public Command workerHeartbeat(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers) throws BlockInfoException, org.apache.thrift.TException; + public long getCapacityBytes() throws org.apache.thrift.TException; - public void workerCommitBlock(long workerId, long usedBytesOnTier, int tier, long blockId, long length) throws BlockInfoException, org.apache.thrift.TException; + public long getUsedBytes() throws org.apache.thrift.TException; public List getWorkerInfoList() throws org.apache.thrift.TException; - public long getCapacityBytes() throws org.apache.thrift.TException; + public void workerCommitBlock(long workerId, long usedBytesOnTier, int tier, long blockId, long length) throws TachyonTException, org.apache.thrift.TException; - public long getUsedBytes() throws org.apache.thrift.TException; + public long workerGetWorkerId(NetAddress workerNetAddress) throws org.apache.thrift.TException; + + public Command workerHeartbeat(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers) throws TachyonTException, org.apache.thrift.TException; - public BlockInfo getBlockInfo(long blockId) throws BlockInfoException, org.apache.thrift.TException; + public void workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers) throws TachyonTException, org.apache.thrift.TException; } public interface AsyncIface { - public void workerGetWorkerId(NetAddress workerNetAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getBlockInfo(long blockId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void workerHeartbeat(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getCapacityBytes(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void workerCommitBlock(long workerId, long usedBytesOnTier, int tier, long blockId, long length, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getUsedBytes(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getWorkerInfoList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getCapacityBytes(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void workerCommitBlock(long workerId, long usedBytesOnTier, int tier, long blockId, long length, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getUsedBytes(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void workerGetWorkerId(NetAddress workerNetAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getBlockInfo(long blockId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void workerHeartbeat(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } @@ -97,85 +97,99 @@ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.prot super(iprot, oprot); } - public long workerGetWorkerId(NetAddress workerNetAddress) throws org.apache.thrift.TException + public BlockInfo getBlockInfo(long blockId) throws TachyonTException, org.apache.thrift.TException { - send_workerGetWorkerId(workerNetAddress); - return recv_workerGetWorkerId(); + send_getBlockInfo(blockId); + return recv_getBlockInfo(); } - public void send_workerGetWorkerId(NetAddress workerNetAddress) throws org.apache.thrift.TException + public void send_getBlockInfo(long blockId) throws org.apache.thrift.TException { - workerGetWorkerId_args args = new workerGetWorkerId_args(); - args.setWorkerNetAddress(workerNetAddress); - sendBase("workerGetWorkerId", args); + getBlockInfo_args args = new getBlockInfo_args(); + args.setBlockId(blockId); + sendBase("getBlockInfo", args); } - public long recv_workerGetWorkerId() throws org.apache.thrift.TException + public BlockInfo recv_getBlockInfo() throws TachyonTException, org.apache.thrift.TException { - workerGetWorkerId_result result = new workerGetWorkerId_result(); - receiveBase(result, "workerGetWorkerId"); + getBlockInfo_result result = new getBlockInfo_result(); + receiveBase(result, "getBlockInfo"); if (result.isSetSuccess()) { return result.success; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "workerGetWorkerId failed: unknown result"); + if (result.e != null) { + throw result.e; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBlockInfo failed: unknown result"); } - public void workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers) throws TachyonException, org.apache.thrift.TException + public long getCapacityBytes() throws org.apache.thrift.TException { - send_workerRegister(workerId, totalBytesOnTiers, usedBytesOnTiers, currentBlocksOnTiers); - recv_workerRegister(); + send_getCapacityBytes(); + return recv_getCapacityBytes(); } - public void send_workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers) throws org.apache.thrift.TException + public void send_getCapacityBytes() throws org.apache.thrift.TException { - workerRegister_args args = new workerRegister_args(); - args.setWorkerId(workerId); - args.setTotalBytesOnTiers(totalBytesOnTiers); - args.setUsedBytesOnTiers(usedBytesOnTiers); - args.setCurrentBlocksOnTiers(currentBlocksOnTiers); - sendBase("workerRegister", args); + getCapacityBytes_args args = new getCapacityBytes_args(); + sendBase("getCapacityBytes", args); } - public void recv_workerRegister() throws TachyonException, org.apache.thrift.TException + public long recv_getCapacityBytes() throws org.apache.thrift.TException { - workerRegister_result result = new workerRegister_result(); - receiveBase(result, "workerRegister"); - if (result.te != null) { - throw result.te; + getCapacityBytes_result result = new getCapacityBytes_result(); + receiveBase(result, "getCapacityBytes"); + if (result.isSetSuccess()) { + return result.success; } - return; + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCapacityBytes failed: unknown result"); } - public Command workerHeartbeat(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers) throws BlockInfoException, org.apache.thrift.TException + public long getUsedBytes() throws org.apache.thrift.TException { - send_workerHeartbeat(workerId, usedBytesOnTiers, removedBlockIds, addedBlocksOnTiers); - return recv_workerHeartbeat(); + send_getUsedBytes(); + return recv_getUsedBytes(); } - public void send_workerHeartbeat(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers) throws org.apache.thrift.TException + public void send_getUsedBytes() throws org.apache.thrift.TException { - workerHeartbeat_args args = new workerHeartbeat_args(); - args.setWorkerId(workerId); - args.setUsedBytesOnTiers(usedBytesOnTiers); - args.setRemovedBlockIds(removedBlockIds); - args.setAddedBlocksOnTiers(addedBlocksOnTiers); - sendBase("workerHeartbeat", args); + getUsedBytes_args args = new getUsedBytes_args(); + sendBase("getUsedBytes", args); } - public Command recv_workerHeartbeat() throws BlockInfoException, org.apache.thrift.TException + public long recv_getUsedBytes() throws org.apache.thrift.TException { - workerHeartbeat_result result = new workerHeartbeat_result(); - receiveBase(result, "workerHeartbeat"); + getUsedBytes_result result = new getUsedBytes_result(); + receiveBase(result, "getUsedBytes"); if (result.isSetSuccess()) { return result.success; } - if (result.bie != null) { - throw result.bie; + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsedBytes failed: unknown result"); + } + + public List getWorkerInfoList() throws org.apache.thrift.TException + { + send_getWorkerInfoList(); + return recv_getWorkerInfoList(); + } + + public void send_getWorkerInfoList() throws org.apache.thrift.TException + { + getWorkerInfoList_args args = new getWorkerInfoList_args(); + sendBase("getWorkerInfoList", args); + } + + public List recv_getWorkerInfoList() throws org.apache.thrift.TException + { + getWorkerInfoList_result result = new getWorkerInfoList_result(); + receiveBase(result, "getWorkerInfoList"); + if (result.isSetSuccess()) { + return result.success; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "workerHeartbeat failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getWorkerInfoList failed: unknown result"); } - public void workerCommitBlock(long workerId, long usedBytesOnTier, int tier, long blockId, long length) throws BlockInfoException, org.apache.thrift.TException + public void workerCommitBlock(long workerId, long usedBytesOnTier, int tier, long blockId, long length) throws TachyonTException, org.apache.thrift.TException { send_workerCommitBlock(workerId, usedBytesOnTier, tier, blockId, length); recv_workerCommitBlock(); @@ -192,106 +206,92 @@ public void send_workerCommitBlock(long workerId, long usedBytesOnTier, int tier sendBase("workerCommitBlock", args); } - public void recv_workerCommitBlock() throws BlockInfoException, org.apache.thrift.TException + public void recv_workerCommitBlock() throws TachyonTException, org.apache.thrift.TException { workerCommitBlock_result result = new workerCommitBlock_result(); receiveBase(result, "workerCommitBlock"); - if (result.bie != null) { - throw result.bie; + if (result.e != null) { + throw result.e; } return; } - public List getWorkerInfoList() throws org.apache.thrift.TException + public long workerGetWorkerId(NetAddress workerNetAddress) throws org.apache.thrift.TException { - send_getWorkerInfoList(); - return recv_getWorkerInfoList(); + send_workerGetWorkerId(workerNetAddress); + return recv_workerGetWorkerId(); } - public void send_getWorkerInfoList() throws org.apache.thrift.TException + public void send_workerGetWorkerId(NetAddress workerNetAddress) throws org.apache.thrift.TException { - getWorkerInfoList_args args = new getWorkerInfoList_args(); - sendBase("getWorkerInfoList", args); + workerGetWorkerId_args args = new workerGetWorkerId_args(); + args.setWorkerNetAddress(workerNetAddress); + sendBase("workerGetWorkerId", args); } - public List recv_getWorkerInfoList() throws org.apache.thrift.TException + public long recv_workerGetWorkerId() throws org.apache.thrift.TException { - getWorkerInfoList_result result = new getWorkerInfoList_result(); - receiveBase(result, "getWorkerInfoList"); + workerGetWorkerId_result result = new workerGetWorkerId_result(); + receiveBase(result, "workerGetWorkerId"); if (result.isSetSuccess()) { return result.success; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getWorkerInfoList failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "workerGetWorkerId failed: unknown result"); } - public long getCapacityBytes() throws org.apache.thrift.TException + public Command workerHeartbeat(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers) throws TachyonTException, org.apache.thrift.TException { - send_getCapacityBytes(); - return recv_getCapacityBytes(); + send_workerHeartbeat(workerId, usedBytesOnTiers, removedBlockIds, addedBlocksOnTiers); + return recv_workerHeartbeat(); } - public void send_getCapacityBytes() throws org.apache.thrift.TException + public void send_workerHeartbeat(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers) throws org.apache.thrift.TException { - getCapacityBytes_args args = new getCapacityBytes_args(); - sendBase("getCapacityBytes", args); + workerHeartbeat_args args = new workerHeartbeat_args(); + args.setWorkerId(workerId); + args.setUsedBytesOnTiers(usedBytesOnTiers); + args.setRemovedBlockIds(removedBlockIds); + args.setAddedBlocksOnTiers(addedBlocksOnTiers); + sendBase("workerHeartbeat", args); } - public long recv_getCapacityBytes() throws org.apache.thrift.TException + public Command recv_workerHeartbeat() throws TachyonTException, org.apache.thrift.TException { - getCapacityBytes_result result = new getCapacityBytes_result(); - receiveBase(result, "getCapacityBytes"); + workerHeartbeat_result result = new workerHeartbeat_result(); + receiveBase(result, "workerHeartbeat"); if (result.isSetSuccess()) { return result.success; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCapacityBytes failed: unknown result"); - } - - public long getUsedBytes() throws org.apache.thrift.TException - { - send_getUsedBytes(); - return recv_getUsedBytes(); - } - - public void send_getUsedBytes() throws org.apache.thrift.TException - { - getUsedBytes_args args = new getUsedBytes_args(); - sendBase("getUsedBytes", args); - } - - public long recv_getUsedBytes() throws org.apache.thrift.TException - { - getUsedBytes_result result = new getUsedBytes_result(); - receiveBase(result, "getUsedBytes"); - if (result.isSetSuccess()) { - return result.success; + if (result.e != null) { + throw result.e; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsedBytes failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "workerHeartbeat failed: unknown result"); } - public BlockInfo getBlockInfo(long blockId) throws BlockInfoException, org.apache.thrift.TException + public void workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers) throws TachyonTException, org.apache.thrift.TException { - send_getBlockInfo(blockId); - return recv_getBlockInfo(); + send_workerRegister(workerId, totalBytesOnTiers, usedBytesOnTiers, currentBlocksOnTiers); + recv_workerRegister(); } - public void send_getBlockInfo(long blockId) throws org.apache.thrift.TException + public void send_workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers) throws org.apache.thrift.TException { - getBlockInfo_args args = new getBlockInfo_args(); - args.setBlockId(blockId); - sendBase("getBlockInfo", args); + workerRegister_args args = new workerRegister_args(); + args.setWorkerId(workerId); + args.setTotalBytesOnTiers(totalBytesOnTiers); + args.setUsedBytesOnTiers(usedBytesOnTiers); + args.setCurrentBlocksOnTiers(currentBlocksOnTiers); + sendBase("workerRegister", args); } - public BlockInfo recv_getBlockInfo() throws BlockInfoException, org.apache.thrift.TException + public void recv_workerRegister() throws TachyonTException, org.apache.thrift.TException { - getBlockInfo_result result = new getBlockInfo_result(); - receiveBase(result, "getBlockInfo"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.bie != null) { - throw result.bie; + workerRegister_result result = new workerRegister_result(); + receiveBase(result, "workerRegister"); + if (result.e != null) { + throw result.e; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBlockInfo failed: unknown result"); + return; } } @@ -312,117 +312,122 @@ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, super(protocolFactory, clientManager, transport); } - public void workerGetWorkerId(NetAddress workerNetAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getBlockInfo(long blockId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - workerGetWorkerId_call method_call = new workerGetWorkerId_call(workerNetAddress, resultHandler, this, ___protocolFactory, ___transport); + getBlockInfo_call method_call = new getBlockInfo_call(blockId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class workerGetWorkerId_call extends org.apache.thrift.async.TAsyncMethodCall { - private NetAddress workerNetAddress; - public workerGetWorkerId_call(NetAddress workerNetAddress, 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 static class getBlockInfo_call extends org.apache.thrift.async.TAsyncMethodCall { + private long blockId; + public getBlockInfo_call(long blockId, 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.workerNetAddress = workerNetAddress; + this.blockId = blockId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("workerGetWorkerId", org.apache.thrift.protocol.TMessageType.CALL, 0)); - workerGetWorkerId_args args = new workerGetWorkerId_args(); - args.setWorkerNetAddress(workerNetAddress); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getBlockInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getBlockInfo_args args = new getBlockInfo_args(); + args.setBlockId(blockId); args.write(prot); prot.writeMessageEnd(); } - public long getResult() throws org.apache.thrift.TException { + public BlockInfo getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_workerGetWorkerId(); + return (new Client(prot)).recv_getBlockInfo(); } } - public void workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getCapacityBytes(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - workerRegister_call method_call = new workerRegister_call(workerId, totalBytesOnTiers, usedBytesOnTiers, currentBlocksOnTiers, resultHandler, this, ___protocolFactory, ___transport); + getCapacityBytes_call method_call = new getCapacityBytes_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class workerRegister_call extends org.apache.thrift.async.TAsyncMethodCall { - private long workerId; - private List totalBytesOnTiers; - private List usedBytesOnTiers; - private Map> currentBlocksOnTiers; - public workerRegister_call(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers, 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 static class getCapacityBytes_call extends org.apache.thrift.async.TAsyncMethodCall { + public getCapacityBytes_call(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.workerId = workerId; - this.totalBytesOnTiers = totalBytesOnTiers; - this.usedBytesOnTiers = usedBytesOnTiers; - this.currentBlocksOnTiers = currentBlocksOnTiers; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("workerRegister", org.apache.thrift.protocol.TMessageType.CALL, 0)); - workerRegister_args args = new workerRegister_args(); - args.setWorkerId(workerId); - args.setTotalBytesOnTiers(totalBytesOnTiers); - args.setUsedBytesOnTiers(usedBytesOnTiers); - args.setCurrentBlocksOnTiers(currentBlocksOnTiers); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCapacityBytes", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getCapacityBytes_args args = new getCapacityBytes_args(); args.write(prot); prot.writeMessageEnd(); } - public void getResult() throws TachyonException, org.apache.thrift.TException { + public long getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_workerRegister(); + return (new Client(prot)).recv_getCapacityBytes(); } } - public void workerHeartbeat(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getUsedBytes(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - workerHeartbeat_call method_call = new workerHeartbeat_call(workerId, usedBytesOnTiers, removedBlockIds, addedBlocksOnTiers, resultHandler, this, ___protocolFactory, ___transport); + getUsedBytes_call method_call = new getUsedBytes_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class workerHeartbeat_call extends org.apache.thrift.async.TAsyncMethodCall { - private long workerId; - private List usedBytesOnTiers; - private List removedBlockIds; - private Map> addedBlocksOnTiers; - public workerHeartbeat_call(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers, 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 static class getUsedBytes_call extends org.apache.thrift.async.TAsyncMethodCall { + public getUsedBytes_call(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.workerId = workerId; - this.usedBytesOnTiers = usedBytesOnTiers; - this.removedBlockIds = removedBlockIds; - this.addedBlocksOnTiers = addedBlocksOnTiers; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("workerHeartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0)); - workerHeartbeat_args args = new workerHeartbeat_args(); - args.setWorkerId(workerId); - args.setUsedBytesOnTiers(usedBytesOnTiers); - args.setRemovedBlockIds(removedBlockIds); - args.setAddedBlocksOnTiers(addedBlocksOnTiers); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUsedBytes", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getUsedBytes_args args = new getUsedBytes_args(); args.write(prot); prot.writeMessageEnd(); } - public Command getResult() throws BlockInfoException, org.apache.thrift.TException { + public long getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_workerHeartbeat(); + return (new Client(prot)).recv_getUsedBytes(); + } + } + + public void getWorkerInfoList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getWorkerInfoList_call method_call = new getWorkerInfoList_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getWorkerInfoList_call extends org.apache.thrift.async.TAsyncMethodCall { + public getWorkerInfoList_call(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); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getWorkerInfoList", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getWorkerInfoList_args args = new getWorkerInfoList_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + 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_getWorkerInfoList(); } } @@ -460,7 +465,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws BlockInfoException, org.apache.thrift.TException { + public void getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -470,50 +475,24 @@ public void getResult() throws BlockInfoException, org.apache.thrift.TException } } - public void getWorkerInfoList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getWorkerInfoList_call method_call = new getWorkerInfoList_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getWorkerInfoList_call extends org.apache.thrift.async.TAsyncMethodCall { - public getWorkerInfoList_call(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); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getWorkerInfoList", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getWorkerInfoList_args args = new getWorkerInfoList_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - 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_getWorkerInfoList(); - } - } - - public void getCapacityBytes(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void workerGetWorkerId(NetAddress workerNetAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getCapacityBytes_call method_call = new getCapacityBytes_call(resultHandler, this, ___protocolFactory, ___transport); + workerGetWorkerId_call method_call = new workerGetWorkerId_call(workerNetAddress, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getCapacityBytes_call extends org.apache.thrift.async.TAsyncMethodCall { - public getCapacityBytes_call(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 static class workerGetWorkerId_call extends org.apache.thrift.async.TAsyncMethodCall { + private NetAddress workerNetAddress; + public workerGetWorkerId_call(NetAddress workerNetAddress, 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.workerNetAddress = workerNetAddress; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCapacityBytes", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getCapacityBytes_args args = new getCapacityBytes_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("workerGetWorkerId", org.apache.thrift.protocol.TMessageType.CALL, 0)); + workerGetWorkerId_args args = new workerGetWorkerId_args(); + args.setWorkerNetAddress(workerNetAddress); args.write(prot); prot.writeMessageEnd(); } @@ -524,68 +503,89 @@ public long getResult() throws org.apache.thrift.TException { } 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_getCapacityBytes(); + return (new Client(prot)).recv_workerGetWorkerId(); } } - public void getUsedBytes(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void workerHeartbeat(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getUsedBytes_call method_call = new getUsedBytes_call(resultHandler, this, ___protocolFactory, ___transport); + workerHeartbeat_call method_call = new workerHeartbeat_call(workerId, usedBytesOnTiers, removedBlockIds, addedBlocksOnTiers, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getUsedBytes_call extends org.apache.thrift.async.TAsyncMethodCall { - public getUsedBytes_call(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 static class workerHeartbeat_call extends org.apache.thrift.async.TAsyncMethodCall { + private long workerId; + private List usedBytesOnTiers; + private List removedBlockIds; + private Map> addedBlocksOnTiers; + public workerHeartbeat_call(long workerId, List usedBytesOnTiers, List removedBlockIds, Map> addedBlocksOnTiers, 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.workerId = workerId; + this.usedBytesOnTiers = usedBytesOnTiers; + this.removedBlockIds = removedBlockIds; + this.addedBlocksOnTiers = addedBlocksOnTiers; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUsedBytes", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getUsedBytes_args args = new getUsedBytes_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("workerHeartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0)); + workerHeartbeat_args args = new workerHeartbeat_args(); + args.setWorkerId(workerId); + args.setUsedBytesOnTiers(usedBytesOnTiers); + args.setRemovedBlockIds(removedBlockIds); + args.setAddedBlocksOnTiers(addedBlocksOnTiers); args.write(prot); prot.writeMessageEnd(); } - public long getResult() throws org.apache.thrift.TException { + public Command getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getUsedBytes(); + return (new Client(prot)).recv_workerHeartbeat(); } } - public void getBlockInfo(long blockId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getBlockInfo_call method_call = new getBlockInfo_call(blockId, resultHandler, this, ___protocolFactory, ___transport); + workerRegister_call method_call = new workerRegister_call(workerId, totalBytesOnTiers, usedBytesOnTiers, currentBlocksOnTiers, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getBlockInfo_call extends org.apache.thrift.async.TAsyncMethodCall { - private long blockId; - public getBlockInfo_call(long blockId, 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 static class workerRegister_call extends org.apache.thrift.async.TAsyncMethodCall { + private long workerId; + private List totalBytesOnTiers; + private List usedBytesOnTiers; + private Map> currentBlocksOnTiers; + public workerRegister_call(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers, 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.blockId = blockId; + this.workerId = workerId; + this.totalBytesOnTiers = totalBytesOnTiers; + this.usedBytesOnTiers = usedBytesOnTiers; + this.currentBlocksOnTiers = currentBlocksOnTiers; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getBlockInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getBlockInfo_args args = new getBlockInfo_args(); - args.setBlockId(blockId); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("workerRegister", org.apache.thrift.protocol.TMessageType.CALL, 0)); + workerRegister_args args = new workerRegister_args(); + args.setWorkerId(workerId); + args.setTotalBytesOnTiers(totalBytesOnTiers); + args.setUsedBytesOnTiers(usedBytesOnTiers); + args.setCurrentBlocksOnTiers(currentBlocksOnTiers); args.write(prot); prot.writeMessageEnd(); } - public BlockInfo getResult() throws BlockInfoException, org.apache.thrift.TException { + public void getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getBlockInfo(); + (new Client(prot)).recv_workerRegister(); } } @@ -602,82 +602,99 @@ protected Processor(I iface, Map Map> getProcessMap(Map> processMap) { - processMap.put("workerGetWorkerId", new workerGetWorkerId()); - processMap.put("workerRegister", new workerRegister()); - processMap.put("workerHeartbeat", new workerHeartbeat()); - processMap.put("workerCommitBlock", new workerCommitBlock()); - processMap.put("getWorkerInfoList", new getWorkerInfoList()); + processMap.put("getBlockInfo", new getBlockInfo()); processMap.put("getCapacityBytes", new getCapacityBytes()); processMap.put("getUsedBytes", new getUsedBytes()); - processMap.put("getBlockInfo", new getBlockInfo()); + processMap.put("getWorkerInfoList", new getWorkerInfoList()); + processMap.put("workerCommitBlock", new workerCommitBlock()); + processMap.put("workerGetWorkerId", new workerGetWorkerId()); + processMap.put("workerHeartbeat", new workerHeartbeat()); + processMap.put("workerRegister", new workerRegister()); return processMap; } - public static class workerGetWorkerId extends org.apache.thrift.ProcessFunction { - public workerGetWorkerId() { - super("workerGetWorkerId"); + public static class getBlockInfo extends org.apache.thrift.ProcessFunction { + public getBlockInfo() { + super("getBlockInfo"); } - public workerGetWorkerId_args getEmptyArgsInstance() { - return new workerGetWorkerId_args(); + public getBlockInfo_args getEmptyArgsInstance() { + return new getBlockInfo_args(); } protected boolean isOneway() { return false; } - public workerGetWorkerId_result getResult(I iface, workerGetWorkerId_args args) throws org.apache.thrift.TException { - workerGetWorkerId_result result = new workerGetWorkerId_result(); - result.success = iface.workerGetWorkerId(args.workerNetAddress); + public getBlockInfo_result getResult(I iface, getBlockInfo_args args) throws org.apache.thrift.TException { + getBlockInfo_result result = new getBlockInfo_result(); + try { + result.success = iface.getBlockInfo(args.blockId); + } catch (TachyonTException e) { + result.e = e; + } + return result; + } + } + + public static class getCapacityBytes extends org.apache.thrift.ProcessFunction { + public getCapacityBytes() { + super("getCapacityBytes"); + } + + public getCapacityBytes_args getEmptyArgsInstance() { + return new getCapacityBytes_args(); + } + + protected boolean isOneway() { + return false; + } + + public getCapacityBytes_result getResult(I iface, getCapacityBytes_args args) throws org.apache.thrift.TException { + getCapacityBytes_result result = new getCapacityBytes_result(); + result.success = iface.getCapacityBytes(); result.setSuccessIsSet(true); return result; } } - public static class workerRegister extends org.apache.thrift.ProcessFunction { - public workerRegister() { - super("workerRegister"); + public static class getUsedBytes extends org.apache.thrift.ProcessFunction { + public getUsedBytes() { + super("getUsedBytes"); } - public workerRegister_args getEmptyArgsInstance() { - return new workerRegister_args(); + public getUsedBytes_args getEmptyArgsInstance() { + return new getUsedBytes_args(); } protected boolean isOneway() { return false; } - public workerRegister_result getResult(I iface, workerRegister_args args) throws org.apache.thrift.TException { - workerRegister_result result = new workerRegister_result(); - try { - iface.workerRegister(args.workerId, args.totalBytesOnTiers, args.usedBytesOnTiers, args.currentBlocksOnTiers); - } catch (TachyonException te) { - result.te = te; - } + public getUsedBytes_result getResult(I iface, getUsedBytes_args args) throws org.apache.thrift.TException { + getUsedBytes_result result = new getUsedBytes_result(); + result.success = iface.getUsedBytes(); + result.setSuccessIsSet(true); return result; } } - public static class workerHeartbeat extends org.apache.thrift.ProcessFunction { - public workerHeartbeat() { - super("workerHeartbeat"); + public static class getWorkerInfoList extends org.apache.thrift.ProcessFunction { + public getWorkerInfoList() { + super("getWorkerInfoList"); } - public workerHeartbeat_args getEmptyArgsInstance() { - return new workerHeartbeat_args(); + public getWorkerInfoList_args getEmptyArgsInstance() { + return new getWorkerInfoList_args(); } protected boolean isOneway() { return false; } - public workerHeartbeat_result getResult(I iface, workerHeartbeat_args args) throws org.apache.thrift.TException { - workerHeartbeat_result result = new workerHeartbeat_result(); - try { - result.success = iface.workerHeartbeat(args.workerId, args.usedBytesOnTiers, args.removedBlockIds, args.addedBlocksOnTiers); - } catch (BlockInfoException bie) { - result.bie = bie; - } + public getWorkerInfoList_result getResult(I iface, getWorkerInfoList_args args) throws org.apache.thrift.TException { + getWorkerInfoList_result result = new getWorkerInfoList_result(); + result.success = iface.getWorkerInfoList(); return result; } } @@ -699,94 +716,77 @@ public workerCommitBlock_result getResult(I iface, workerCommitBlock_args args) workerCommitBlock_result result = new workerCommitBlock_result(); try { iface.workerCommitBlock(args.workerId, args.usedBytesOnTier, args.tier, args.blockId, args.length); - } catch (BlockInfoException bie) { - result.bie = bie; + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class getWorkerInfoList extends org.apache.thrift.ProcessFunction { - public getWorkerInfoList() { - super("getWorkerInfoList"); + public static class workerGetWorkerId extends org.apache.thrift.ProcessFunction { + public workerGetWorkerId() { + super("workerGetWorkerId"); } - public getWorkerInfoList_args getEmptyArgsInstance() { - return new getWorkerInfoList_args(); + public workerGetWorkerId_args getEmptyArgsInstance() { + return new workerGetWorkerId_args(); } protected boolean isOneway() { return false; } - public getWorkerInfoList_result getResult(I iface, getWorkerInfoList_args args) throws org.apache.thrift.TException { - getWorkerInfoList_result result = new getWorkerInfoList_result(); - result.success = iface.getWorkerInfoList(); + public workerGetWorkerId_result getResult(I iface, workerGetWorkerId_args args) throws org.apache.thrift.TException { + workerGetWorkerId_result result = new workerGetWorkerId_result(); + result.success = iface.workerGetWorkerId(args.workerNetAddress); + result.setSuccessIsSet(true); return result; } } - public static class getCapacityBytes extends org.apache.thrift.ProcessFunction { - public getCapacityBytes() { - super("getCapacityBytes"); - } - - public getCapacityBytes_args getEmptyArgsInstance() { - return new getCapacityBytes_args(); - } - - protected boolean isOneway() { - return false; - } - - public getCapacityBytes_result getResult(I iface, getCapacityBytes_args args) throws org.apache.thrift.TException { - getCapacityBytes_result result = new getCapacityBytes_result(); - result.success = iface.getCapacityBytes(); - result.setSuccessIsSet(true); - return result; - } - } - - public static class getUsedBytes extends org.apache.thrift.ProcessFunction { - public getUsedBytes() { - super("getUsedBytes"); + public static class workerHeartbeat extends org.apache.thrift.ProcessFunction { + public workerHeartbeat() { + super("workerHeartbeat"); } - public getUsedBytes_args getEmptyArgsInstance() { - return new getUsedBytes_args(); + public workerHeartbeat_args getEmptyArgsInstance() { + return new workerHeartbeat_args(); } protected boolean isOneway() { return false; } - public getUsedBytes_result getResult(I iface, getUsedBytes_args args) throws org.apache.thrift.TException { - getUsedBytes_result result = new getUsedBytes_result(); - result.success = iface.getUsedBytes(); - result.setSuccessIsSet(true); + public workerHeartbeat_result getResult(I iface, workerHeartbeat_args args) throws org.apache.thrift.TException { + workerHeartbeat_result result = new workerHeartbeat_result(); + try { + result.success = iface.workerHeartbeat(args.workerId, args.usedBytesOnTiers, args.removedBlockIds, args.addedBlocksOnTiers); + } catch (TachyonTException e) { + result.e = e; + } return result; } } - public static class getBlockInfo extends org.apache.thrift.ProcessFunction { - public getBlockInfo() { - super("getBlockInfo"); + public static class workerRegister extends org.apache.thrift.ProcessFunction { + public workerRegister() { + super("workerRegister"); } - public getBlockInfo_args getEmptyArgsInstance() { - return new getBlockInfo_args(); + public workerRegister_args getEmptyArgsInstance() { + return new workerRegister_args(); } protected boolean isOneway() { return false; } - public getBlockInfo_result getResult(I iface, getBlockInfo_args args) throws org.apache.thrift.TException { - getBlockInfo_result result = new getBlockInfo_result(); + public workerRegister_result getResult(I iface, workerRegister_args args) throws org.apache.thrift.TException { + workerRegister_result result = new workerRegister_result(); try { - result.success = iface.getBlockInfo(args.blockId); - } catch (BlockInfoException bie) { - result.bie = bie; + iface.workerRegister(args.workerId, args.totalBytesOnTiers, args.usedBytesOnTiers, args.currentBlocksOnTiers); + } catch (TachyonTException e) { + result.e = e; } return result; } @@ -805,33 +805,32 @@ protected AsyncProcessor(I iface, Map Map> getProcessMap(Map> processMap) { - processMap.put("workerGetWorkerId", new workerGetWorkerId()); - processMap.put("workerRegister", new workerRegister()); - processMap.put("workerHeartbeat", new workerHeartbeat()); - processMap.put("workerCommitBlock", new workerCommitBlock()); - processMap.put("getWorkerInfoList", new getWorkerInfoList()); + processMap.put("getBlockInfo", new getBlockInfo()); processMap.put("getCapacityBytes", new getCapacityBytes()); processMap.put("getUsedBytes", new getUsedBytes()); - processMap.put("getBlockInfo", new getBlockInfo()); + processMap.put("getWorkerInfoList", new getWorkerInfoList()); + processMap.put("workerCommitBlock", new workerCommitBlock()); + processMap.put("workerGetWorkerId", new workerGetWorkerId()); + processMap.put("workerHeartbeat", new workerHeartbeat()); + processMap.put("workerRegister", new workerRegister()); return processMap; } - public static class workerGetWorkerId extends org.apache.thrift.AsyncProcessFunction { - public workerGetWorkerId() { - super("workerGetWorkerId"); + public static class getBlockInfo extends org.apache.thrift.AsyncProcessFunction { + public getBlockInfo() { + super("getBlockInfo"); } - public workerGetWorkerId_args getEmptyArgsInstance() { - return new workerGetWorkerId_args(); + public getBlockInfo_args getEmptyArgsInstance() { + return new getBlockInfo_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Long o) { - workerGetWorkerId_result result = new workerGetWorkerId_result(); + return new AsyncMethodCallback() { + public void onComplete(BlockInfo o) { + getBlockInfo_result result = new getBlockInfo_result(); result.success = o; - result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -843,7 +842,13 @@ public void onComplete(Long o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - workerGetWorkerId_result result = new workerGetWorkerId_result(); + getBlockInfo_result result = new getBlockInfo_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); + msg = result; + } + 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()); @@ -863,25 +868,27 @@ protected boolean isOneway() { return false; } - public void start(I iface, workerGetWorkerId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.workerGetWorkerId(args.workerNetAddress,resultHandler); + public void start(I iface, getBlockInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getBlockInfo(args.blockId,resultHandler); } } - public static class workerRegister extends org.apache.thrift.AsyncProcessFunction { - public workerRegister() { - super("workerRegister"); + public static class getCapacityBytes extends org.apache.thrift.AsyncProcessFunction { + public getCapacityBytes() { + super("getCapacityBytes"); } - public workerRegister_args getEmptyArgsInstance() { - return new workerRegister_args(); + public getCapacityBytes_args getEmptyArgsInstance() { + return new getCapacityBytes_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - workerRegister_result result = new workerRegister_result(); + return new AsyncMethodCallback() { + public void onComplete(Long o) { + getCapacityBytes_result result = new getCapacityBytes_result(); + result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -893,13 +900,7 @@ public void onComplete(Void o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - workerRegister_result result = new workerRegister_result(); - if (e instanceof TachyonException) { - result.te = (TachyonException) e; - result.setTeIsSet(true); - msg = result; - } - else + getCapacityBytes_result result = new getCapacityBytes_result(); { 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()); @@ -919,26 +920,27 @@ protected boolean isOneway() { return false; } - public void start(I iface, workerRegister_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.workerRegister(args.workerId, args.totalBytesOnTiers, args.usedBytesOnTiers, args.currentBlocksOnTiers,resultHandler); + public void start(I iface, getCapacityBytes_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getCapacityBytes(resultHandler); } } - public static class workerHeartbeat extends org.apache.thrift.AsyncProcessFunction { - public workerHeartbeat() { - super("workerHeartbeat"); + public static class getUsedBytes extends org.apache.thrift.AsyncProcessFunction { + public getUsedBytes() { + super("getUsedBytes"); } - public workerHeartbeat_args getEmptyArgsInstance() { - return new workerHeartbeat_args(); + public getUsedBytes_args getEmptyArgsInstance() { + return new getUsedBytes_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Command o) { - workerHeartbeat_result result = new workerHeartbeat_result(); + return new AsyncMethodCallback() { + public void onComplete(Long o) { + getUsedBytes_result result = new getUsedBytes_result(); result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -950,13 +952,7 @@ public void onComplete(Command o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - workerHeartbeat_result result = new workerHeartbeat_result(); - if (e instanceof BlockInfoException) { - result.bie = (BlockInfoException) e; - result.setBieIsSet(true); - msg = result; - } - else + getUsedBytes_result result = new getUsedBytes_result(); { 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()); @@ -976,25 +972,26 @@ protected boolean isOneway() { return false; } - public void start(I iface, workerHeartbeat_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.workerHeartbeat(args.workerId, args.usedBytesOnTiers, args.removedBlockIds, args.addedBlocksOnTiers,resultHandler); + public void start(I iface, getUsedBytes_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getUsedBytes(resultHandler); } } - public static class workerCommitBlock extends org.apache.thrift.AsyncProcessFunction { - public workerCommitBlock() { - super("workerCommitBlock"); + public static class getWorkerInfoList extends org.apache.thrift.AsyncProcessFunction> { + public getWorkerInfoList() { + super("getWorkerInfoList"); } - public workerCommitBlock_args getEmptyArgsInstance() { - return new workerCommitBlock_args(); + public getWorkerInfoList_args getEmptyArgsInstance() { + return new getWorkerInfoList_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - workerCommitBlock_result result = new workerCommitBlock_result(); + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getWorkerInfoList_result result = new getWorkerInfoList_result(); + result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -1006,13 +1003,7 @@ public void onComplete(Void o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - workerCommitBlock_result result = new workerCommitBlock_result(); - if (e instanceof BlockInfoException) { - result.bie = (BlockInfoException) e; - result.setBieIsSet(true); - msg = result; - } - else + getWorkerInfoList_result result = new getWorkerInfoList_result(); { 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()); @@ -1032,26 +1023,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, workerCommitBlock_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.workerCommitBlock(args.workerId, args.usedBytesOnTier, args.tier, args.blockId, args.length,resultHandler); + public void start(I iface, getWorkerInfoList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getWorkerInfoList(resultHandler); } } - public static class getWorkerInfoList extends org.apache.thrift.AsyncProcessFunction> { - public getWorkerInfoList() { - super("getWorkerInfoList"); + public static class workerCommitBlock extends org.apache.thrift.AsyncProcessFunction { + public workerCommitBlock() { + super("workerCommitBlock"); } - public getWorkerInfoList_args getEmptyArgsInstance() { - return new getWorkerInfoList_args(); + public workerCommitBlock_args getEmptyArgsInstance() { + return new workerCommitBlock_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getWorkerInfoList_result result = new getWorkerInfoList_result(); - result.success = o; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + workerCommitBlock_result result = new workerCommitBlock_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -1063,7 +1053,13 @@ public void onComplete(List o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getWorkerInfoList_result result = new getWorkerInfoList_result(); + workerCommitBlock_result result = new workerCommitBlock_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); + msg = result; + } + 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()); @@ -1083,25 +1079,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getWorkerInfoList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.getWorkerInfoList(resultHandler); + public void start(I iface, workerCommitBlock_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.workerCommitBlock(args.workerId, args.usedBytesOnTier, args.tier, args.blockId, args.length,resultHandler); } } - public static class getCapacityBytes extends org.apache.thrift.AsyncProcessFunction { - public getCapacityBytes() { - super("getCapacityBytes"); + public static class workerGetWorkerId extends org.apache.thrift.AsyncProcessFunction { + public workerGetWorkerId() { + super("workerGetWorkerId"); } - public getCapacityBytes_args getEmptyArgsInstance() { - return new getCapacityBytes_args(); + public workerGetWorkerId_args getEmptyArgsInstance() { + return new workerGetWorkerId_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Long o) { - getCapacityBytes_result result = new getCapacityBytes_result(); + workerGetWorkerId_result result = new workerGetWorkerId_result(); result.success = o; result.setSuccessIsSet(true); try { @@ -1115,7 +1111,7 @@ public void onComplete(Long o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getCapacityBytes_result result = new getCapacityBytes_result(); + workerGetWorkerId_result result = new workerGetWorkerId_result(); { 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()); @@ -1135,27 +1131,26 @@ protected boolean isOneway() { return false; } - public void start(I iface, getCapacityBytes_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getCapacityBytes(resultHandler); + public void start(I iface, workerGetWorkerId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.workerGetWorkerId(args.workerNetAddress,resultHandler); } } - public static class getUsedBytes extends org.apache.thrift.AsyncProcessFunction { - public getUsedBytes() { - super("getUsedBytes"); + public static class workerHeartbeat extends org.apache.thrift.AsyncProcessFunction { + public workerHeartbeat() { + super("workerHeartbeat"); } - public getUsedBytes_args getEmptyArgsInstance() { - return new getUsedBytes_args(); + public workerHeartbeat_args getEmptyArgsInstance() { + return new workerHeartbeat_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Long o) { - getUsedBytes_result result = new getUsedBytes_result(); + return new AsyncMethodCallback() { + public void onComplete(Command o) { + workerHeartbeat_result result = new workerHeartbeat_result(); result.success = o; - result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -1167,7 +1162,13 @@ public void onComplete(Long o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getUsedBytes_result result = new getUsedBytes_result(); + workerHeartbeat_result result = new workerHeartbeat_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); + msg = result; + } + 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()); @@ -1187,26 +1188,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getUsedBytes_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getUsedBytes(resultHandler); + public void start(I iface, workerHeartbeat_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.workerHeartbeat(args.workerId, args.usedBytesOnTiers, args.removedBlockIds, args.addedBlocksOnTiers,resultHandler); } } - public static class getBlockInfo extends org.apache.thrift.AsyncProcessFunction { - public getBlockInfo() { - super("getBlockInfo"); + public static class workerRegister extends org.apache.thrift.AsyncProcessFunction { + public workerRegister() { + super("workerRegister"); } - public getBlockInfo_args getEmptyArgsInstance() { - return new getBlockInfo_args(); + public workerRegister_args getEmptyArgsInstance() { + return new workerRegister_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(BlockInfo o) { - getBlockInfo_result result = new getBlockInfo_result(); - result.success = o; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + workerRegister_result result = new workerRegister_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -1218,10 +1218,10 @@ public void onComplete(BlockInfo o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getBlockInfo_result result = new getBlockInfo_result(); - if (e instanceof BlockInfoException) { - result.bie = (BlockInfoException) e; - result.setBieIsSet(true); + workerRegister_result result = new workerRegister_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -1244,29 +1244,29 @@ protected boolean isOneway() { return false; } - public void start(I iface, getBlockInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getBlockInfo(args.blockId,resultHandler); + public void start(I iface, workerRegister_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.workerRegister(args.workerId, args.totalBytesOnTiers, args.usedBytesOnTiers, args.currentBlocksOnTiers,resultHandler); } } } - public static class workerGetWorkerId_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("workerGetWorkerId_args"); + public static class getBlockInfo_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("getBlockInfo_args"); - private static final org.apache.thrift.protocol.TField WORKER_NET_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("workerNetAddress", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new workerGetWorkerId_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerGetWorkerId_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getBlockInfo_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getBlockInfo_argsTupleSchemeFactory()); } - public NetAddress workerNetAddress; // required + public long blockId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - WORKER_NET_ADDRESS((short)1, "workerNetAddress"); + BLOCK_ID((short)1, "blockId"); private static final Map byName = new HashMap(); @@ -1281,8 +1281,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // WORKER_NET_ADDRESS - return WORKER_NET_ADDRESS; + case 1: // BLOCK_ID + return BLOCK_ID; default: return null; } @@ -1323,74 +1323,76 @@ public String getFieldName() { } // isset id assignments + private static final int __BLOCKID_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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.WORKER_NET_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("workerNetAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NetAddress.class))); + 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(workerGetWorkerId_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBlockInfo_args.class, metaDataMap); } - public workerGetWorkerId_args() { + public getBlockInfo_args() { } - public workerGetWorkerId_args( - NetAddress workerNetAddress) + public getBlockInfo_args( + long blockId) { this(); - this.workerNetAddress = workerNetAddress; + this.blockId = blockId; + setBlockIdIsSet(true); } /** * Performs a deep copy on other. */ - public workerGetWorkerId_args(workerGetWorkerId_args other) { - if (other.isSetWorkerNetAddress()) { - this.workerNetAddress = new NetAddress(other.workerNetAddress); - } + public getBlockInfo_args(getBlockInfo_args other) { + __isset_bitfield = other.__isset_bitfield; + this.blockId = other.blockId; } - public workerGetWorkerId_args deepCopy() { - return new workerGetWorkerId_args(this); + public getBlockInfo_args deepCopy() { + return new getBlockInfo_args(this); } @Override public void clear() { - this.workerNetAddress = null; + setBlockIdIsSet(false); + this.blockId = 0; } - public NetAddress getWorkerNetAddress() { - return this.workerNetAddress; + public long getBlockId() { + return this.blockId; } - public workerGetWorkerId_args setWorkerNetAddress(NetAddress workerNetAddress) { - this.workerNetAddress = workerNetAddress; + public getBlockInfo_args setBlockId(long blockId) { + this.blockId = blockId; + setBlockIdIsSet(true); return this; } - public void unsetWorkerNetAddress() { - this.workerNetAddress = null; + public void unsetBlockId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID); } - /** Returns true if field workerNetAddress is set (has been assigned a value) and false otherwise */ - public boolean isSetWorkerNetAddress() { - return this.workerNetAddress != null; + /** Returns true if field blockId is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockId() { + return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID); } - public void setWorkerNetAddressIsSet(boolean value) { - if (!value) { - this.workerNetAddress = null; - } + public void setBlockIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case WORKER_NET_ADDRESS: + case BLOCK_ID: if (value == null) { - unsetWorkerNetAddress(); + unsetBlockId(); } else { - setWorkerNetAddress((NetAddress)value); + setBlockId((Long)value); } break; @@ -1399,8 +1401,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case WORKER_NET_ADDRESS: - return getWorkerNetAddress(); + case BLOCK_ID: + return Long.valueOf(getBlockId()); } throw new IllegalStateException(); @@ -1413,8 +1415,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case WORKER_NET_ADDRESS: - return isSetWorkerNetAddress(); + case BLOCK_ID: + return isSetBlockId(); } throw new IllegalStateException(); } @@ -1423,21 +1425,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof workerGetWorkerId_args) - return this.equals((workerGetWorkerId_args)that); + if (that instanceof getBlockInfo_args) + return this.equals((getBlockInfo_args)that); return false; } - public boolean equals(workerGetWorkerId_args that) { + public boolean equals(getBlockInfo_args that) { if (that == null) return false; - boolean this_present_workerNetAddress = true && this.isSetWorkerNetAddress(); - boolean that_present_workerNetAddress = true && that.isSetWorkerNetAddress(); - if (this_present_workerNetAddress || that_present_workerNetAddress) { - if (!(this_present_workerNetAddress && that_present_workerNetAddress)) + boolean this_present_blockId = true; + boolean that_present_blockId = true; + if (this_present_blockId || that_present_blockId) { + if (!(this_present_blockId && that_present_blockId)) return false; - if (!this.workerNetAddress.equals(that.workerNetAddress)) + if (this.blockId != that.blockId) return false; } @@ -1448,28 +1450,28 @@ public boolean equals(workerGetWorkerId_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_workerNetAddress = true && (isSetWorkerNetAddress()); - list.add(present_workerNetAddress); - if (present_workerNetAddress) - list.add(workerNetAddress); + boolean present_blockId = true; + list.add(present_blockId); + if (present_blockId) + list.add(blockId); return list.hashCode(); } @Override - public int compareTo(workerGetWorkerId_args other) { + public int compareTo(getBlockInfo_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetWorkerNetAddress()).compareTo(other.isSetWorkerNetAddress()); + lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(other.isSetBlockId()); if (lastComparison != 0) { return lastComparison; } - if (isSetWorkerNetAddress()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerNetAddress, other.workerNetAddress); + if (isSetBlockId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, other.blockId); if (lastComparison != 0) { return lastComparison; } @@ -1491,15 +1493,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("workerGetWorkerId_args("); + StringBuilder sb = new StringBuilder("getBlockInfo_args("); boolean first = true; - sb.append("workerNetAddress:"); - if (this.workerNetAddress == null) { - sb.append("null"); - } else { - sb.append(this.workerNetAddress); - } + sb.append("blockId:"); + sb.append(this.blockId); first = false; sb.append(")"); return sb.toString(); @@ -1508,9 +1506,6 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (workerNetAddress != null) { - workerNetAddress.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1523,21 +1518,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class workerGetWorkerId_argsStandardSchemeFactory implements SchemeFactory { - public workerGetWorkerId_argsStandardScheme getScheme() { - return new workerGetWorkerId_argsStandardScheme(); + private static class getBlockInfo_argsStandardSchemeFactory implements SchemeFactory { + public getBlockInfo_argsStandardScheme getScheme() { + return new getBlockInfo_argsStandardScheme(); } } - private static class workerGetWorkerId_argsStandardScheme extends StandardScheme { + private static class getBlockInfo_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetWorkerId_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getBlockInfo_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -1547,11 +1544,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetWorkerId_a break; } switch (schemeField.id) { - case 1: // WORKER_NET_ADDRESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.workerNetAddress = new NetAddress(); - struct.workerNetAddress.read(iprot); - struct.setWorkerNetAddressIsSet(true); + case 1: // BLOCK_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.blockId = iprot.readI64(); + struct.setBlockIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1567,72 +1563,72 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetWorkerId_a struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetWorkerId_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getBlockInfo_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.workerNetAddress != null) { - oprot.writeFieldBegin(WORKER_NET_ADDRESS_FIELD_DESC); - struct.workerNetAddress.write(oprot); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC); + oprot.writeI64(struct.blockId); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class workerGetWorkerId_argsTupleSchemeFactory implements SchemeFactory { - public workerGetWorkerId_argsTupleScheme getScheme() { - return new workerGetWorkerId_argsTupleScheme(); + private static class getBlockInfo_argsTupleSchemeFactory implements SchemeFactory { + public getBlockInfo_argsTupleScheme getScheme() { + return new getBlockInfo_argsTupleScheme(); } } - private static class workerGetWorkerId_argsTupleScheme extends TupleScheme { + private static class getBlockInfo_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerGetWorkerId_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getBlockInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetWorkerNetAddress()) { + if (struct.isSetBlockId()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetWorkerNetAddress()) { - struct.workerNetAddress.write(oprot); + if (struct.isSetBlockId()) { + oprot.writeI64(struct.blockId); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerGetWorkerId_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getBlockInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.workerNetAddress = new NetAddress(); - struct.workerNetAddress.read(iprot); - struct.setWorkerNetAddressIsSet(true); + struct.blockId = iprot.readI64(); + struct.setBlockIdIsSet(true); } } } } - public static class workerGetWorkerId_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("workerGetWorkerId_result"); + public static class getBlockInfo_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("getBlockInfo_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new workerGetWorkerId_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerGetWorkerId_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getBlockInfo_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getBlockInfo_resultTupleSchemeFactory()); } - public long success; // required + public BlockInfo success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -1649,6 +1645,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; + case 1: // E + return E; default: return null; } @@ -1689,67 +1687,97 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BlockInfo.class))); + 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(workerGetWorkerId_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBlockInfo_result.class, metaDataMap); } - public workerGetWorkerId_result() { + public getBlockInfo_result() { } - public workerGetWorkerId_result( - long success) + public getBlockInfo_result( + BlockInfo success, + TachyonTException e) { this(); this.success = success; - setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public workerGetWorkerId_result(workerGetWorkerId_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; + public getBlockInfo_result(getBlockInfo_result other) { + if (other.isSetSuccess()) { + this.success = new BlockInfo(other.success); + } + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public workerGetWorkerId_result deepCopy() { - return new workerGetWorkerId_result(this); + public getBlockInfo_result deepCopy() { + return new getBlockInfo_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = 0; + this.success = null; + this.e = null; } - public long getSuccess() { + public BlockInfo getSuccess() { return this.success; } - public workerGetWorkerId_result setSuccess(long success) { + public getBlockInfo_result setSuccess(BlockInfo success) { this.success = success; - setSuccessIsSet(true); return this; } public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + if (!value) { + this.success = null; + } + } + + public TachyonTException getE() { + return this.e; + } + + public getBlockInfo_result setE(TachyonTException e) { + this.e = e; + return this; + } + + public void unsetE() { + this.e = null; + } + + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; + } + + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { @@ -1758,7 +1786,15 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((Long)value); + setSuccess((BlockInfo)value); + } + break; + + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); } break; @@ -1768,7 +1804,10 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return Long.valueOf(getSuccess()); + return getSuccess(); + + case E: + return getE(); } throw new IllegalStateException(); @@ -1783,6 +1822,8 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -1791,21 +1832,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof workerGetWorkerId_result) - return this.equals((workerGetWorkerId_result)that); + if (that instanceof getBlockInfo_result) + return this.equals((getBlockInfo_result)that); return false; } - public boolean equals(workerGetWorkerId_result that) { + public boolean equals(getBlockInfo_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (this.success != that.success) + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) return false; } @@ -1816,16 +1866,21 @@ public boolean equals(workerGetWorkerId_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; + boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); + return list.hashCode(); } @Override - public int compareTo(workerGetWorkerId_result other) { + public int compareTo(getBlockInfo_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -1842,6 +1897,16 @@ public int compareTo(workerGetWorkerId_result other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1859,11 +1924,23 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("workerGetWorkerId_result("); + StringBuilder sb = new StringBuilder("getBlockInfo_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -1872,6 +1949,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1884,23 +1964,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class workerGetWorkerId_resultStandardSchemeFactory implements SchemeFactory { - public workerGetWorkerId_resultStandardScheme getScheme() { - return new workerGetWorkerId_resultStandardScheme(); + private static class getBlockInfo_resultStandardSchemeFactory implements SchemeFactory { + public getBlockInfo_resultStandardScheme getScheme() { + return new getBlockInfo_resultStandardScheme(); } } - private static class workerGetWorkerId_resultStandardScheme extends StandardScheme { + private static class getBlockInfo_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetWorkerId_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getBlockInfo_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -1911,13 +1989,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetWorkerId_r } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new BlockInfo(); + struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1929,13 +2017,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetWorkerId_r struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetWorkerId_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getBlockInfo_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { + if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -1944,65 +2037,66 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetWorkerId_ } - private static class workerGetWorkerId_resultTupleSchemeFactory implements SchemeFactory { - public workerGetWorkerId_resultTupleScheme getScheme() { - return new workerGetWorkerId_resultTupleScheme(); + private static class getBlockInfo_resultTupleSchemeFactory implements SchemeFactory { + public getBlockInfo_resultTupleScheme getScheme() { + return new getBlockInfo_resultTupleScheme(); } } - private static class workerGetWorkerId_resultTupleScheme extends TupleScheme { + private static class getBlockInfo_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerGetWorkerId_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getBlockInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetE()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); + struct.success.write(oprot); + } + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerGetWorkerId_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getBlockInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readI64(); + struct.success = new BlockInfo(); + struct.success.read(iprot); struct.setSuccessIsSet(true); } + if (incoming.get(1)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } } } } - public static class workerRegister_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("workerRegister_args"); + public static class getCapacityBytes_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("getCapacityBytes_args"); - private static final org.apache.thrift.protocol.TField WORKER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField TOTAL_BYTES_ON_TIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("totalBytesOnTiers", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField USED_BYTES_ON_TIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("usedBytesOnTiers", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField CURRENT_BLOCKS_ON_TIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("currentBlocksOnTiers", org.apache.thrift.protocol.TType.MAP, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new workerRegister_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerRegister_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getCapacityBytes_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getCapacityBytes_argsTupleSchemeFactory()); } - public long workerId; // required - public List totalBytesOnTiers; // required - public List usedBytesOnTiers; // required - public Map> currentBlocksOnTiers; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - WORKER_ID((short)1, "workerId"), - TOTAL_BYTES_ON_TIERS((short)2, "totalBytesOnTiers"), - USED_BYTES_ON_TIERS((short)3, "usedBytesOnTiers"), - CURRENT_BLOCKS_ON_TIERS((short)4, "currentBlocksOnTiers"); +; private static final Map byName = new HashMap(); @@ -2017,14 +2111,6 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // WORKER_ID - return WORKER_ID; - case 2: // TOTAL_BYTES_ON_TIERS - return TOTAL_BYTES_ON_TIERS; - case 3: // USED_BYTES_ON_TIERS - return USED_BYTES_ON_TIERS; - case 4: // CURRENT_BLOCKS_ON_TIERS - return CURRENT_BLOCKS_ON_TIERS; default: return null; } @@ -2063,350 +2149,65 @@ public String getFieldName() { return _fieldName; } } - - // isset id assignments - private static final int __WORKERID_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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.WORKER_ID, new org.apache.thrift.meta_data.FieldMetaData("workerId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TOTAL_BYTES_ON_TIERS, new org.apache.thrift.meta_data.FieldMetaData("totalBytesOnTiers", 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)))); - tmpMap.put(_Fields.USED_BYTES_ON_TIERS, new org.apache.thrift.meta_data.FieldMetaData("usedBytesOnTiers", 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)))); - tmpMap.put(_Fields.CURRENT_BLOCKS_ON_TIERS, new org.apache.thrift.meta_data.FieldMetaData("currentBlocksOnTiers", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), - 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(workerRegister_args.class, metaDataMap); - } - - public workerRegister_args() { + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCapacityBytes_args.class, metaDataMap); } - public workerRegister_args( - long workerId, - List totalBytesOnTiers, - List usedBytesOnTiers, - Map> currentBlocksOnTiers) - { - this(); - this.workerId = workerId; - setWorkerIdIsSet(true); - this.totalBytesOnTiers = totalBytesOnTiers; - this.usedBytesOnTiers = usedBytesOnTiers; - this.currentBlocksOnTiers = currentBlocksOnTiers; + public getCapacityBytes_args() { } /** * Performs a deep copy on other. */ - public workerRegister_args(workerRegister_args other) { - __isset_bitfield = other.__isset_bitfield; - this.workerId = other.workerId; - if (other.isSetTotalBytesOnTiers()) { - List __this__totalBytesOnTiers = new ArrayList(other.totalBytesOnTiers); - this.totalBytesOnTiers = __this__totalBytesOnTiers; - } - if (other.isSetUsedBytesOnTiers()) { - List __this__usedBytesOnTiers = new ArrayList(other.usedBytesOnTiers); - this.usedBytesOnTiers = __this__usedBytesOnTiers; - } - if (other.isSetCurrentBlocksOnTiers()) { - Map> __this__currentBlocksOnTiers = new HashMap>(other.currentBlocksOnTiers.size()); - for (Map.Entry> other_element : other.currentBlocksOnTiers.entrySet()) { - - Long other_element_key = other_element.getKey(); - List other_element_value = other_element.getValue(); - - Long __this__currentBlocksOnTiers_copy_key = other_element_key; - - List __this__currentBlocksOnTiers_copy_value = new ArrayList(other_element_value); - - __this__currentBlocksOnTiers.put(__this__currentBlocksOnTiers_copy_key, __this__currentBlocksOnTiers_copy_value); - } - this.currentBlocksOnTiers = __this__currentBlocksOnTiers; - } + public getCapacityBytes_args(getCapacityBytes_args other) { } - public workerRegister_args deepCopy() { - return new workerRegister_args(this); + public getCapacityBytes_args deepCopy() { + return new getCapacityBytes_args(this); } @Override public void clear() { - setWorkerIdIsSet(false); - this.workerId = 0; - this.totalBytesOnTiers = null; - this.usedBytesOnTiers = null; - this.currentBlocksOnTiers = null; } - public long getWorkerId() { - return this.workerId; + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } } - public workerRegister_args setWorkerId(long workerId) { - this.workerId = workerId; - setWorkerIdIsSet(true); - return this; + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); } - public void unsetWorkerId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WORKERID_ISSET_ID); - } - - /** Returns true if field workerId is set (has been assigned a value) and false otherwise */ - public boolean isSetWorkerId() { - return EncodingUtils.testBit(__isset_bitfield, __WORKERID_ISSET_ID); - } - - public void setWorkerIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WORKERID_ISSET_ID, value); - } - - public int getTotalBytesOnTiersSize() { - return (this.totalBytesOnTiers == null) ? 0 : this.totalBytesOnTiers.size(); - } - - public java.util.Iterator getTotalBytesOnTiersIterator() { - return (this.totalBytesOnTiers == null) ? null : this.totalBytesOnTiers.iterator(); - } - - public void addToTotalBytesOnTiers(long elem) { - if (this.totalBytesOnTiers == null) { - this.totalBytesOnTiers = new ArrayList(); - } - this.totalBytesOnTiers.add(elem); - } - - public List getTotalBytesOnTiers() { - return this.totalBytesOnTiers; - } - - public workerRegister_args setTotalBytesOnTiers(List totalBytesOnTiers) { - this.totalBytesOnTiers = totalBytesOnTiers; - return this; - } - - public void unsetTotalBytesOnTiers() { - this.totalBytesOnTiers = null; - } - - /** Returns true if field totalBytesOnTiers is set (has been assigned a value) and false otherwise */ - public boolean isSetTotalBytesOnTiers() { - return this.totalBytesOnTiers != null; - } - - public void setTotalBytesOnTiersIsSet(boolean value) { - if (!value) { - this.totalBytesOnTiers = null; - } - } - - public int getUsedBytesOnTiersSize() { - return (this.usedBytesOnTiers == null) ? 0 : this.usedBytesOnTiers.size(); - } - - public java.util.Iterator getUsedBytesOnTiersIterator() { - return (this.usedBytesOnTiers == null) ? null : this.usedBytesOnTiers.iterator(); - } - - public void addToUsedBytesOnTiers(long elem) { - if (this.usedBytesOnTiers == null) { - this.usedBytesOnTiers = new ArrayList(); - } - this.usedBytesOnTiers.add(elem); - } - - public List getUsedBytesOnTiers() { - return this.usedBytesOnTiers; - } - - public workerRegister_args setUsedBytesOnTiers(List usedBytesOnTiers) { - this.usedBytesOnTiers = usedBytesOnTiers; - return this; - } - - public void unsetUsedBytesOnTiers() { - this.usedBytesOnTiers = null; - } - - /** Returns true if field usedBytesOnTiers is set (has been assigned a value) and false otherwise */ - public boolean isSetUsedBytesOnTiers() { - return this.usedBytesOnTiers != null; - } - - public void setUsedBytesOnTiersIsSet(boolean value) { - if (!value) { - this.usedBytesOnTiers = null; - } - } - - public int getCurrentBlocksOnTiersSize() { - return (this.currentBlocksOnTiers == null) ? 0 : this.currentBlocksOnTiers.size(); - } - - public void putToCurrentBlocksOnTiers(long key, List val) { - if (this.currentBlocksOnTiers == null) { - this.currentBlocksOnTiers = new HashMap>(); - } - this.currentBlocksOnTiers.put(key, val); - } - - public Map> getCurrentBlocksOnTiers() { - return this.currentBlocksOnTiers; - } - - public workerRegister_args setCurrentBlocksOnTiers(Map> currentBlocksOnTiers) { - this.currentBlocksOnTiers = currentBlocksOnTiers; - return this; - } - - public void unsetCurrentBlocksOnTiers() { - this.currentBlocksOnTiers = null; - } - - /** Returns true if field currentBlocksOnTiers is set (has been assigned a value) and false otherwise */ - public boolean isSetCurrentBlocksOnTiers() { - return this.currentBlocksOnTiers != null; - } - - public void setCurrentBlocksOnTiersIsSet(boolean value) { - if (!value) { - this.currentBlocksOnTiers = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case WORKER_ID: - if (value == null) { - unsetWorkerId(); - } else { - setWorkerId((Long)value); - } - break; - - case TOTAL_BYTES_ON_TIERS: - if (value == null) { - unsetTotalBytesOnTiers(); - } else { - setTotalBytesOnTiers((List)value); - } - break; - - case USED_BYTES_ON_TIERS: - if (value == null) { - unsetUsedBytesOnTiers(); - } else { - setUsedBytesOnTiers((List)value); - } - break; - - case CURRENT_BLOCKS_ON_TIERS: - if (value == null) { - unsetCurrentBlocksOnTiers(); - } else { - setCurrentBlocksOnTiers((Map>)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case WORKER_ID: - return Long.valueOf(getWorkerId()); - - case TOTAL_BYTES_ON_TIERS: - return getTotalBytesOnTiers(); - - case USED_BYTES_ON_TIERS: - return getUsedBytesOnTiers(); - - case CURRENT_BLOCKS_ON_TIERS: - return getCurrentBlocksOnTiers(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case WORKER_ID: - return isSetWorkerId(); - case TOTAL_BYTES_ON_TIERS: - return isSetTotalBytesOnTiers(); - case USED_BYTES_ON_TIERS: - return isSetUsedBytesOnTiers(); - case CURRENT_BLOCKS_ON_TIERS: - return isSetCurrentBlocksOnTiers(); - } - throw new IllegalStateException(); + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; - if (that instanceof workerRegister_args) - return this.equals((workerRegister_args)that); + if (that instanceof getCapacityBytes_args) + return this.equals((getCapacityBytes_args)that); return false; } - public boolean equals(workerRegister_args that) { + public boolean equals(getCapacityBytes_args that) { if (that == null) return false; - boolean this_present_workerId = true; - boolean that_present_workerId = true; - if (this_present_workerId || that_present_workerId) { - if (!(this_present_workerId && that_present_workerId)) - return false; - if (this.workerId != that.workerId) - return false; - } - - boolean this_present_totalBytesOnTiers = true && this.isSetTotalBytesOnTiers(); - boolean that_present_totalBytesOnTiers = true && that.isSetTotalBytesOnTiers(); - if (this_present_totalBytesOnTiers || that_present_totalBytesOnTiers) { - if (!(this_present_totalBytesOnTiers && that_present_totalBytesOnTiers)) - return false; - if (!this.totalBytesOnTiers.equals(that.totalBytesOnTiers)) - return false; - } - - boolean this_present_usedBytesOnTiers = true && this.isSetUsedBytesOnTiers(); - boolean that_present_usedBytesOnTiers = true && that.isSetUsedBytesOnTiers(); - if (this_present_usedBytesOnTiers || that_present_usedBytesOnTiers) { - if (!(this_present_usedBytesOnTiers && that_present_usedBytesOnTiers)) - return false; - if (!this.usedBytesOnTiers.equals(that.usedBytesOnTiers)) - return false; - } - - boolean this_present_currentBlocksOnTiers = true && this.isSetCurrentBlocksOnTiers(); - boolean that_present_currentBlocksOnTiers = true && that.isSetCurrentBlocksOnTiers(); - if (this_present_currentBlocksOnTiers || that_present_currentBlocksOnTiers) { - if (!(this_present_currentBlocksOnTiers && that_present_currentBlocksOnTiers)) - return false; - if (!this.currentBlocksOnTiers.equals(that.currentBlocksOnTiers)) - return false; - } - return true; } @@ -2414,77 +2215,17 @@ public boolean equals(workerRegister_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_workerId = true; - list.add(present_workerId); - if (present_workerId) - list.add(workerId); - - boolean present_totalBytesOnTiers = true && (isSetTotalBytesOnTiers()); - list.add(present_totalBytesOnTiers); - if (present_totalBytesOnTiers) - list.add(totalBytesOnTiers); - - boolean present_usedBytesOnTiers = true && (isSetUsedBytesOnTiers()); - list.add(present_usedBytesOnTiers); - if (present_usedBytesOnTiers) - list.add(usedBytesOnTiers); - - boolean present_currentBlocksOnTiers = true && (isSetCurrentBlocksOnTiers()); - list.add(present_currentBlocksOnTiers); - if (present_currentBlocksOnTiers) - list.add(currentBlocksOnTiers); - return list.hashCode(); } @Override - public int compareTo(workerRegister_args other) { + public int compareTo(getCapacityBytes_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetWorkerId()).compareTo(other.isSetWorkerId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWorkerId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerId, other.workerId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTotalBytesOnTiers()).compareTo(other.isSetTotalBytesOnTiers()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTotalBytesOnTiers()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalBytesOnTiers, other.totalBytesOnTiers); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUsedBytesOnTiers()).compareTo(other.isSetUsedBytesOnTiers()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUsedBytesOnTiers()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.usedBytesOnTiers, other.usedBytesOnTiers); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCurrentBlocksOnTiers()).compareTo(other.isSetCurrentBlocksOnTiers()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCurrentBlocksOnTiers()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.currentBlocksOnTiers, other.currentBlocksOnTiers); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -2502,36 +2243,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("workerRegister_args("); + StringBuilder sb = new StringBuilder("getCapacityBytes_args("); boolean first = true; - sb.append("workerId:"); - sb.append(this.workerId); - first = false; - if (!first) sb.append(", "); - sb.append("totalBytesOnTiers:"); - if (this.totalBytesOnTiers == null) { - sb.append("null"); - } else { - sb.append(this.totalBytesOnTiers); - } - first = false; - if (!first) sb.append(", "); - sb.append("usedBytesOnTiers:"); - if (this.usedBytesOnTiers == null) { - sb.append("null"); - } else { - sb.append(this.usedBytesOnTiers); - } - first = false; - if (!first) sb.append(", "); - sb.append("currentBlocksOnTiers:"); - if (this.currentBlocksOnTiers == null) { - sb.append("null"); - } else { - sb.append(this.currentBlocksOnTiers); - } - first = false; sb.append(")"); return sb.toString(); } @@ -2545,112 +2259,36 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class workerRegister_argsStandardSchemeFactory implements SchemeFactory { - public workerRegister_argsStandardScheme getScheme() { - return new workerRegister_argsStandardScheme(); - } - } - - private static class workerRegister_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, workerRegister_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // WORKER_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.workerId = iprot.readI64(); - struct.setWorkerIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TOTAL_BYTES_ON_TIERS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list104 = iprot.readListBegin(); - struct.totalBytesOnTiers = new ArrayList(_list104.size); - long _elem105; - for (int _i106 = 0; _i106 < _list104.size; ++_i106) - { - _elem105 = iprot.readI64(); - struct.totalBytesOnTiers.add(_elem105); - } - iprot.readListEnd(); - } - struct.setTotalBytesOnTiersIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // USED_BYTES_ON_TIERS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list107 = iprot.readListBegin(); - struct.usedBytesOnTiers = new ArrayList(_list107.size); - long _elem108; - for (int _i109 = 0; _i109 < _list107.size; ++_i109) - { - _elem108 = iprot.readI64(); - struct.usedBytesOnTiers.add(_elem108); - } - iprot.readListEnd(); - } - struct.setUsedBytesOnTiersIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // CURRENT_BLOCKS_ON_TIERS - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map110 = iprot.readMapBegin(); - struct.currentBlocksOnTiers = new HashMap>(2*_map110.size); - long _key111; - List _val112; - for (int _i113 = 0; _i113 < _map110.size; ++_i113) - { - _key111 = iprot.readI64(); - { - org.apache.thrift.protocol.TList _list114 = iprot.readListBegin(); - _val112 = new ArrayList(_list114.size); - long _elem115; - for (int _i116 = 0; _i116 < _list114.size; ++_i116) - { - _elem115 = iprot.readI64(); - _val112.add(_elem115); - } - iprot.readListEnd(); - } - struct.currentBlocksOnTiers.put(_key111, _val112); - } - iprot.readMapEnd(); - } - struct.setCurrentBlocksOnTiersIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getCapacityBytes_argsStandardSchemeFactory implements SchemeFactory { + public getCapacityBytes_argsStandardScheme getScheme() { + return new getCapacityBytes_argsStandardScheme(); + } + } + + private static class getCapacityBytes_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getCapacityBytes_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2662,206 +2300,53 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerRegister_args struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerRegister_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getCapacityBytes_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(WORKER_ID_FIELD_DESC); - oprot.writeI64(struct.workerId); - oprot.writeFieldEnd(); - if (struct.totalBytesOnTiers != null) { - oprot.writeFieldBegin(TOTAL_BYTES_ON_TIERS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.totalBytesOnTiers.size())); - for (long _iter117 : struct.totalBytesOnTiers) - { - oprot.writeI64(_iter117); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.usedBytesOnTiers != null) { - oprot.writeFieldBegin(USED_BYTES_ON_TIERS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.usedBytesOnTiers.size())); - for (long _iter118 : struct.usedBytesOnTiers) - { - oprot.writeI64(_iter118); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.currentBlocksOnTiers != null) { - oprot.writeFieldBegin(CURRENT_BLOCKS_ON_TIERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.LIST, struct.currentBlocksOnTiers.size())); - for (Map.Entry> _iter119 : struct.currentBlocksOnTiers.entrySet()) - { - oprot.writeI64(_iter119.getKey()); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, _iter119.getValue().size())); - for (long _iter120 : _iter119.getValue()) - { - oprot.writeI64(_iter120); - } - oprot.writeListEnd(); - } - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class workerRegister_argsTupleSchemeFactory implements SchemeFactory { - public workerRegister_argsTupleScheme getScheme() { - return new workerRegister_argsTupleScheme(); + private static class getCapacityBytes_argsTupleSchemeFactory implements SchemeFactory { + public getCapacityBytes_argsTupleScheme getScheme() { + return new getCapacityBytes_argsTupleScheme(); } } - private static class workerRegister_argsTupleScheme extends TupleScheme { + private static class getCapacityBytes_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerRegister_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getCapacityBytes_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetWorkerId()) { - optionals.set(0); - } - if (struct.isSetTotalBytesOnTiers()) { - optionals.set(1); - } - if (struct.isSetUsedBytesOnTiers()) { - optionals.set(2); - } - if (struct.isSetCurrentBlocksOnTiers()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetWorkerId()) { - oprot.writeI64(struct.workerId); - } - if (struct.isSetTotalBytesOnTiers()) { - { - oprot.writeI32(struct.totalBytesOnTiers.size()); - for (long _iter121 : struct.totalBytesOnTiers) - { - oprot.writeI64(_iter121); - } - } - } - if (struct.isSetUsedBytesOnTiers()) { - { - oprot.writeI32(struct.usedBytesOnTiers.size()); - for (long _iter122 : struct.usedBytesOnTiers) - { - oprot.writeI64(_iter122); - } - } - } - if (struct.isSetCurrentBlocksOnTiers()) { - { - oprot.writeI32(struct.currentBlocksOnTiers.size()); - for (Map.Entry> _iter123 : struct.currentBlocksOnTiers.entrySet()) - { - oprot.writeI64(_iter123.getKey()); - { - oprot.writeI32(_iter123.getValue().size()); - for (long _iter124 : _iter123.getValue()) - { - oprot.writeI64(_iter124); - } - } - } - } - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerRegister_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getCapacityBytes_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.workerId = iprot.readI64(); - struct.setWorkerIdIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list125 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.totalBytesOnTiers = new ArrayList(_list125.size); - long _elem126; - for (int _i127 = 0; _i127 < _list125.size; ++_i127) - { - _elem126 = iprot.readI64(); - struct.totalBytesOnTiers.add(_elem126); - } - } - struct.setTotalBytesOnTiersIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list128 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.usedBytesOnTiers = new ArrayList(_list128.size); - long _elem129; - for (int _i130 = 0; _i130 < _list128.size; ++_i130) - { - _elem129 = iprot.readI64(); - struct.usedBytesOnTiers.add(_elem129); - } - } - struct.setUsedBytesOnTiersIsSet(true); - } - if (incoming.get(3)) { - { - org.apache.thrift.protocol.TMap _map131 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); - struct.currentBlocksOnTiers = new HashMap>(2*_map131.size); - long _key132; - List _val133; - for (int _i134 = 0; _i134 < _map131.size; ++_i134) - { - _key132 = iprot.readI64(); - { - org.apache.thrift.protocol.TList _list135 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - _val133 = new ArrayList(_list135.size); - long _elem136; - for (int _i137 = 0; _i137 < _list135.size; ++_i137) - { - _elem136 = iprot.readI64(); - _val133.add(_elem136); - } - } - struct.currentBlocksOnTiers.put(_key132, _val133); - } - } - struct.setCurrentBlocksOnTiersIsSet(true); - } } } } - public static class workerRegister_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("workerRegister_result"); + public static class getCapacityBytes_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("getCapacityBytes_result"); - private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new workerRegister_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerRegister_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getCapacityBytes_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getCapacityBytes_resultTupleSchemeFactory()); } - public TachyonException te; // required + public long success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TE((short)1, "te"); + SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -2876,8 +2361,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TE - return TE; + case 0: // SUCCESS + return SUCCESS; default: return null; } @@ -2918,74 +2403,76 @@ public String getFieldName() { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + 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.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerRegister_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCapacityBytes_result.class, metaDataMap); } - public workerRegister_result() { + public getCapacityBytes_result() { } - public workerRegister_result( - TachyonException te) + public getCapacityBytes_result( + long success) { this(); - this.te = te; + this.success = success; + setSuccessIsSet(true); } /** * Performs a deep copy on other. */ - public workerRegister_result(workerRegister_result other) { - if (other.isSetTe()) { - this.te = new TachyonException(other.te); - } + public getCapacityBytes_result(getCapacityBytes_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; } - public workerRegister_result deepCopy() { - return new workerRegister_result(this); + public getCapacityBytes_result deepCopy() { + return new getCapacityBytes_result(this); } @Override public void clear() { - this.te = null; + setSuccessIsSet(false); + this.success = 0; } - public TachyonException getTe() { - return this.te; + public long getSuccess() { + return this.success; } - public workerRegister_result setTe(TachyonException te) { - this.te = te; + public getCapacityBytes_result setSuccess(long success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetTe() { - this.te = null; + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field te is set (has been assigned a value) and false otherwise */ - public boolean isSetTe() { - return this.te != null; + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setTeIsSet(boolean value) { - if (!value) { - this.te = null; - } + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TE: + case SUCCESS: if (value == null) { - unsetTe(); + unsetSuccess(); } else { - setTe((TachyonException)value); + setSuccess((Long)value); } break; @@ -2994,8 +2481,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case TE: - return getTe(); + case SUCCESS: + return Long.valueOf(getSuccess()); } throw new IllegalStateException(); @@ -3008,8 +2495,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case TE: - return isSetTe(); + case SUCCESS: + return isSetSuccess(); } throw new IllegalStateException(); } @@ -3018,21 +2505,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof workerRegister_result) - return this.equals((workerRegister_result)that); + if (that instanceof getCapacityBytes_result) + return this.equals((getCapacityBytes_result)that); return false; } - public boolean equals(workerRegister_result that) { + public boolean equals(getCapacityBytes_result that) { if (that == null) return false; - boolean this_present_te = true && this.isSetTe(); - boolean that_present_te = true && that.isSetTe(); - if (this_present_te || that_present_te) { - if (!(this_present_te && that_present_te)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.te.equals(that.te)) + if (this.success != that.success) return false; } @@ -3043,28 +2530,28 @@ public boolean equals(workerRegister_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_te = true && (isSetTe()); - list.add(present_te); - if (present_te) - list.add(te); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); return list.hashCode(); } @Override - public int compareTo(workerRegister_result other) { + public int compareTo(getCapacityBytes_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTe()).compareTo(other.isSetTe()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetTe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, other.te); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -3086,15 +2573,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("workerRegister_result("); + StringBuilder sb = new StringBuilder("getCapacityBytes_result("); boolean first = true; - sb.append("te:"); - if (this.te == null) { - sb.append("null"); - } else { - sb.append(this.te); - } + sb.append("success:"); + sb.append(this.success); first = false; sb.append(")"); return sb.toString(); @@ -3115,21 +2598,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class workerRegister_resultStandardSchemeFactory implements SchemeFactory { - public workerRegister_resultStandardScheme getScheme() { - return new workerRegister_resultStandardScheme(); + private static class getCapacityBytes_resultStandardSchemeFactory implements SchemeFactory { + public getCapacityBytes_resultStandardScheme getScheme() { + return new getCapacityBytes_resultStandardScheme(); } } - private static class workerRegister_resultStandardScheme extends StandardScheme { + private static class getCapacityBytes_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, workerRegister_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getCapacityBytes_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -3139,11 +2624,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerRegister_resu break; } switch (schemeField.id) { - case 1: // TE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -3159,13 +2643,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerRegister_resu struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerRegister_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getCapacityBytes_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.te != null) { - oprot.writeFieldBegin(TE_FIELD_DESC); - struct.te.write(oprot); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI64(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -3174,66 +2658,54 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, workerRegister_res } - private static class workerRegister_resultTupleSchemeFactory implements SchemeFactory { - public workerRegister_resultTupleScheme getScheme() { - return new workerRegister_resultTupleScheme(); + private static class getCapacityBytes_resultTupleSchemeFactory implements SchemeFactory { + public getCapacityBytes_resultTupleScheme getScheme() { + return new getCapacityBytes_resultTupleScheme(); } } - private static class workerRegister_resultTupleScheme extends TupleScheme { + private static class getCapacityBytes_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerRegister_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getCapacityBytes_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetTe()) { + if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetTe()) { - struct.te.write(oprot); + if (struct.isSetSuccess()) { + oprot.writeI64(struct.success); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerRegister_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getCapacityBytes_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); } } } } - public static class workerHeartbeat_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("workerHeartbeat_args"); + public static class getUsedBytes_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("getUsedBytes_args"); - private static final org.apache.thrift.protocol.TField WORKER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField USED_BYTES_ON_TIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("usedBytesOnTiers", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField REMOVED_BLOCK_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("removedBlockIds", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField ADDED_BLOCKS_ON_TIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("addedBlocksOnTiers", org.apache.thrift.protocol.TType.MAP, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new workerHeartbeat_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerHeartbeat_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getUsedBytes_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getUsedBytes_argsTupleSchemeFactory()); } - public long workerId; // required - public List usedBytesOnTiers; // required - public List removedBlockIds; // required - public Map> addedBlocksOnTiers; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - WORKER_ID((short)1, "workerId"), - USED_BYTES_ON_TIERS((short)2, "usedBytesOnTiers"), - REMOVED_BLOCK_IDS((short)3, "removedBlockIds"), - ADDED_BLOCKS_ON_TIERS((short)4, "addedBlocksOnTiers"); +; private static final Map byName = new HashMap(); @@ -3248,14 +2720,6 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // WORKER_ID - return WORKER_ID; - case 2: // USED_BYTES_ON_TIERS - return USED_BYTES_ON_TIERS; - case 3: // REMOVED_BLOCK_IDS - return REMOVED_BLOCK_IDS; - case 4: // ADDED_BLOCKS_ON_TIERS - return ADDED_BLOCKS_ON_TIERS; default: return null; } @@ -3294,278 +2758,37 @@ public String getFieldName() { return _fieldName; } } - - // isset id assignments - private static final int __WORKERID_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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.WORKER_ID, new org.apache.thrift.meta_data.FieldMetaData("workerId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.USED_BYTES_ON_TIERS, new org.apache.thrift.meta_data.FieldMetaData("usedBytesOnTiers", 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)))); - tmpMap.put(_Fields.REMOVED_BLOCK_IDS, new org.apache.thrift.meta_data.FieldMetaData("removedBlockIds", 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)))); - tmpMap.put(_Fields.ADDED_BLOCKS_ON_TIERS, new org.apache.thrift.meta_data.FieldMetaData("addedBlocksOnTiers", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), - 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(workerHeartbeat_args.class, metaDataMap); - } - - public workerHeartbeat_args() { + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUsedBytes_args.class, metaDataMap); } - public workerHeartbeat_args( - long workerId, - List usedBytesOnTiers, - List removedBlockIds, - Map> addedBlocksOnTiers) - { - this(); - this.workerId = workerId; - setWorkerIdIsSet(true); - this.usedBytesOnTiers = usedBytesOnTiers; - this.removedBlockIds = removedBlockIds; - this.addedBlocksOnTiers = addedBlocksOnTiers; + public getUsedBytes_args() { } /** * Performs a deep copy on other. */ - public workerHeartbeat_args(workerHeartbeat_args other) { - __isset_bitfield = other.__isset_bitfield; - this.workerId = other.workerId; - if (other.isSetUsedBytesOnTiers()) { - List __this__usedBytesOnTiers = new ArrayList(other.usedBytesOnTiers); - this.usedBytesOnTiers = __this__usedBytesOnTiers; - } - if (other.isSetRemovedBlockIds()) { - List __this__removedBlockIds = new ArrayList(other.removedBlockIds); - this.removedBlockIds = __this__removedBlockIds; - } - if (other.isSetAddedBlocksOnTiers()) { - Map> __this__addedBlocksOnTiers = new HashMap>(other.addedBlocksOnTiers.size()); - for (Map.Entry> other_element : other.addedBlocksOnTiers.entrySet()) { - - Long other_element_key = other_element.getKey(); - List other_element_value = other_element.getValue(); - - Long __this__addedBlocksOnTiers_copy_key = other_element_key; - - List __this__addedBlocksOnTiers_copy_value = new ArrayList(other_element_value); - - __this__addedBlocksOnTiers.put(__this__addedBlocksOnTiers_copy_key, __this__addedBlocksOnTiers_copy_value); - } - this.addedBlocksOnTiers = __this__addedBlocksOnTiers; - } - } - - public workerHeartbeat_args deepCopy() { - return new workerHeartbeat_args(this); - } - - @Override - public void clear() { - setWorkerIdIsSet(false); - this.workerId = 0; - this.usedBytesOnTiers = null; - this.removedBlockIds = null; - this.addedBlocksOnTiers = null; - } - - public long getWorkerId() { - return this.workerId; - } - - public workerHeartbeat_args setWorkerId(long workerId) { - this.workerId = workerId; - setWorkerIdIsSet(true); - return this; - } - - public void unsetWorkerId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WORKERID_ISSET_ID); - } - - /** Returns true if field workerId is set (has been assigned a value) and false otherwise */ - public boolean isSetWorkerId() { - return EncodingUtils.testBit(__isset_bitfield, __WORKERID_ISSET_ID); - } - - public void setWorkerIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WORKERID_ISSET_ID, value); - } - - public int getUsedBytesOnTiersSize() { - return (this.usedBytesOnTiers == null) ? 0 : this.usedBytesOnTiers.size(); - } - - public java.util.Iterator getUsedBytesOnTiersIterator() { - return (this.usedBytesOnTiers == null) ? null : this.usedBytesOnTiers.iterator(); - } - - public void addToUsedBytesOnTiers(long elem) { - if (this.usedBytesOnTiers == null) { - this.usedBytesOnTiers = new ArrayList(); - } - this.usedBytesOnTiers.add(elem); - } - - public List getUsedBytesOnTiers() { - return this.usedBytesOnTiers; - } - - public workerHeartbeat_args setUsedBytesOnTiers(List usedBytesOnTiers) { - this.usedBytesOnTiers = usedBytesOnTiers; - return this; - } - - public void unsetUsedBytesOnTiers() { - this.usedBytesOnTiers = null; - } - - /** Returns true if field usedBytesOnTiers is set (has been assigned a value) and false otherwise */ - public boolean isSetUsedBytesOnTiers() { - return this.usedBytesOnTiers != null; - } - - public void setUsedBytesOnTiersIsSet(boolean value) { - if (!value) { - this.usedBytesOnTiers = null; - } - } - - public int getRemovedBlockIdsSize() { - return (this.removedBlockIds == null) ? 0 : this.removedBlockIds.size(); - } - - public java.util.Iterator getRemovedBlockIdsIterator() { - return (this.removedBlockIds == null) ? null : this.removedBlockIds.iterator(); - } - - public void addToRemovedBlockIds(long elem) { - if (this.removedBlockIds == null) { - this.removedBlockIds = new ArrayList(); - } - this.removedBlockIds.add(elem); - } - - public List getRemovedBlockIds() { - return this.removedBlockIds; - } - - public workerHeartbeat_args setRemovedBlockIds(List removedBlockIds) { - this.removedBlockIds = removedBlockIds; - return this; - } - - public void unsetRemovedBlockIds() { - this.removedBlockIds = null; - } - - /** Returns true if field removedBlockIds is set (has been assigned a value) and false otherwise */ - public boolean isSetRemovedBlockIds() { - return this.removedBlockIds != null; - } - - public void setRemovedBlockIdsIsSet(boolean value) { - if (!value) { - this.removedBlockIds = null; - } - } - - public int getAddedBlocksOnTiersSize() { - return (this.addedBlocksOnTiers == null) ? 0 : this.addedBlocksOnTiers.size(); - } - - public void putToAddedBlocksOnTiers(long key, List val) { - if (this.addedBlocksOnTiers == null) { - this.addedBlocksOnTiers = new HashMap>(); - } - this.addedBlocksOnTiers.put(key, val); - } - - public Map> getAddedBlocksOnTiers() { - return this.addedBlocksOnTiers; - } - - public workerHeartbeat_args setAddedBlocksOnTiers(Map> addedBlocksOnTiers) { - this.addedBlocksOnTiers = addedBlocksOnTiers; - return this; - } - - public void unsetAddedBlocksOnTiers() { - this.addedBlocksOnTiers = null; + public getUsedBytes_args(getUsedBytes_args other) { } - - /** Returns true if field addedBlocksOnTiers is set (has been assigned a value) and false otherwise */ - public boolean isSetAddedBlocksOnTiers() { - return this.addedBlocksOnTiers != null; + + public getUsedBytes_args deepCopy() { + return new getUsedBytes_args(this); } - public void setAddedBlocksOnTiersIsSet(boolean value) { - if (!value) { - this.addedBlocksOnTiers = null; - } + @Override + public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { - case WORKER_ID: - if (value == null) { - unsetWorkerId(); - } else { - setWorkerId((Long)value); - } - break; - - case USED_BYTES_ON_TIERS: - if (value == null) { - unsetUsedBytesOnTiers(); - } else { - setUsedBytesOnTiers((List)value); - } - break; - - case REMOVED_BLOCK_IDS: - if (value == null) { - unsetRemovedBlockIds(); - } else { - setRemovedBlockIds((List)value); - } - break; - - case ADDED_BLOCKS_ON_TIERS: - if (value == null) { - unsetAddedBlocksOnTiers(); - } else { - setAddedBlocksOnTiers((Map>)value); - } - break; - } } public Object getFieldValue(_Fields field) { switch (field) { - case WORKER_ID: - return Long.valueOf(getWorkerId()); - - case USED_BYTES_ON_TIERS: - return getUsedBytesOnTiers(); - - case REMOVED_BLOCK_IDS: - return getRemovedBlockIds(); - - case ADDED_BLOCKS_ON_TIERS: - return getAddedBlocksOnTiers(); - } throw new IllegalStateException(); } @@ -3577,14 +2800,6 @@ public boolean isSet(_Fields field) { } switch (field) { - case WORKER_ID: - return isSetWorkerId(); - case USED_BYTES_ON_TIERS: - return isSetUsedBytesOnTiers(); - case REMOVED_BLOCK_IDS: - return isSetRemovedBlockIds(); - case ADDED_BLOCKS_ON_TIERS: - return isSetAddedBlocksOnTiers(); } throw new IllegalStateException(); } @@ -3593,51 +2808,15 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof workerHeartbeat_args) - return this.equals((workerHeartbeat_args)that); + if (that instanceof getUsedBytes_args) + return this.equals((getUsedBytes_args)that); return false; } - public boolean equals(workerHeartbeat_args that) { + public boolean equals(getUsedBytes_args that) { if (that == null) return false; - boolean this_present_workerId = true; - boolean that_present_workerId = true; - if (this_present_workerId || that_present_workerId) { - if (!(this_present_workerId && that_present_workerId)) - return false; - if (this.workerId != that.workerId) - return false; - } - - boolean this_present_usedBytesOnTiers = true && this.isSetUsedBytesOnTiers(); - boolean that_present_usedBytesOnTiers = true && that.isSetUsedBytesOnTiers(); - if (this_present_usedBytesOnTiers || that_present_usedBytesOnTiers) { - if (!(this_present_usedBytesOnTiers && that_present_usedBytesOnTiers)) - return false; - if (!this.usedBytesOnTiers.equals(that.usedBytesOnTiers)) - return false; - } - - boolean this_present_removedBlockIds = true && this.isSetRemovedBlockIds(); - boolean that_present_removedBlockIds = true && that.isSetRemovedBlockIds(); - if (this_present_removedBlockIds || that_present_removedBlockIds) { - if (!(this_present_removedBlockIds && that_present_removedBlockIds)) - return false; - if (!this.removedBlockIds.equals(that.removedBlockIds)) - return false; - } - - boolean this_present_addedBlocksOnTiers = true && this.isSetAddedBlocksOnTiers(); - boolean that_present_addedBlocksOnTiers = true && that.isSetAddedBlocksOnTiers(); - if (this_present_addedBlocksOnTiers || that_present_addedBlocksOnTiers) { - if (!(this_present_addedBlocksOnTiers && that_present_addedBlocksOnTiers)) - return false; - if (!this.addedBlocksOnTiers.equals(that.addedBlocksOnTiers)) - return false; - } - return true; } @@ -3645,77 +2824,17 @@ public boolean equals(workerHeartbeat_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_workerId = true; - list.add(present_workerId); - if (present_workerId) - list.add(workerId); - - boolean present_usedBytesOnTiers = true && (isSetUsedBytesOnTiers()); - list.add(present_usedBytesOnTiers); - if (present_usedBytesOnTiers) - list.add(usedBytesOnTiers); - - boolean present_removedBlockIds = true && (isSetRemovedBlockIds()); - list.add(present_removedBlockIds); - if (present_removedBlockIds) - list.add(removedBlockIds); - - boolean present_addedBlocksOnTiers = true && (isSetAddedBlocksOnTiers()); - list.add(present_addedBlocksOnTiers); - if (present_addedBlocksOnTiers) - list.add(addedBlocksOnTiers); - return list.hashCode(); } @Override - public int compareTo(workerHeartbeat_args other) { + public int compareTo(getUsedBytes_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetWorkerId()).compareTo(other.isSetWorkerId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWorkerId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerId, other.workerId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUsedBytesOnTiers()).compareTo(other.isSetUsedBytesOnTiers()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUsedBytesOnTiers()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.usedBytesOnTiers, other.usedBytesOnTiers); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRemovedBlockIds()).compareTo(other.isSetRemovedBlockIds()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRemovedBlockIds()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.removedBlockIds, other.removedBlockIds); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAddedBlocksOnTiers()).compareTo(other.isSetAddedBlocksOnTiers()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAddedBlocksOnTiers()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addedBlocksOnTiers, other.addedBlocksOnTiers); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -3733,36 +2852,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("workerHeartbeat_args("); + StringBuilder sb = new StringBuilder("getUsedBytes_args("); boolean first = true; - sb.append("workerId:"); - sb.append(this.workerId); - first = false; - if (!first) sb.append(", "); - sb.append("usedBytesOnTiers:"); - if (this.usedBytesOnTiers == null) { - sb.append("null"); - } else { - sb.append(this.usedBytesOnTiers); - } - first = false; - if (!first) sb.append(", "); - sb.append("removedBlockIds:"); - if (this.removedBlockIds == null) { - sb.append("null"); - } else { - sb.append(this.removedBlockIds); - } - first = false; - if (!first) sb.append(", "); - sb.append("addedBlocksOnTiers:"); - if (this.addedBlocksOnTiers == null) { - sb.append("null"); - } else { - sb.append(this.addedBlocksOnTiers); - } - first = false; sb.append(")"); return sb.toString(); } @@ -3782,23 +2874,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class workerHeartbeat_argsStandardSchemeFactory implements SchemeFactory { - public workerHeartbeat_argsStandardScheme getScheme() { - return new workerHeartbeat_argsStandardScheme(); + private static class getUsedBytes_argsStandardSchemeFactory implements SchemeFactory { + public getUsedBytes_argsStandardScheme getScheme() { + return new getUsedBytes_argsStandardScheme(); } } - private static class workerHeartbeat_argsStandardScheme extends StandardScheme { + private static class getUsedBytes_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, workerHeartbeat_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getUsedBytes_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -3807,81 +2897,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerHeartbeat_arg if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } - switch (schemeField.id) { - case 1: // WORKER_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.workerId = iprot.readI64(); - struct.setWorkerIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // USED_BYTES_ON_TIERS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list138 = iprot.readListBegin(); - struct.usedBytesOnTiers = new ArrayList(_list138.size); - long _elem139; - for (int _i140 = 0; _i140 < _list138.size; ++_i140) - { - _elem139 = iprot.readI64(); - struct.usedBytesOnTiers.add(_elem139); - } - iprot.readListEnd(); - } - struct.setUsedBytesOnTiersIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // REMOVED_BLOCK_IDS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list141 = iprot.readListBegin(); - struct.removedBlockIds = new ArrayList(_list141.size); - long _elem142; - for (int _i143 = 0; _i143 < _list141.size; ++_i143) - { - _elem142 = iprot.readI64(); - struct.removedBlockIds.add(_elem142); - } - iprot.readListEnd(); - } - struct.setRemovedBlockIdsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // ADDED_BLOCKS_ON_TIERS - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map144 = iprot.readMapBegin(); - struct.addedBlocksOnTiers = new HashMap>(2*_map144.size); - long _key145; - List _val146; - for (int _i147 = 0; _i147 < _map144.size; ++_i147) - { - _key145 = iprot.readI64(); - { - org.apache.thrift.protocol.TList _list148 = iprot.readListBegin(); - _val146 = new ArrayList(_list148.size); - long _elem149; - for (int _i150 = 0; _i150 < _list148.size; ++_i150) - { - _elem149 = iprot.readI64(); - _val146.add(_elem149); - } - iprot.readListEnd(); - } - struct.addedBlocksOnTiers.put(_key145, _val146); - } - iprot.readMapEnd(); - } - struct.setAddedBlocksOnTiersIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; + switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -3893,209 +2909,53 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerHeartbeat_arg struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerHeartbeat_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getUsedBytes_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(WORKER_ID_FIELD_DESC); - oprot.writeI64(struct.workerId); - oprot.writeFieldEnd(); - if (struct.usedBytesOnTiers != null) { - oprot.writeFieldBegin(USED_BYTES_ON_TIERS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.usedBytesOnTiers.size())); - for (long _iter151 : struct.usedBytesOnTiers) - { - oprot.writeI64(_iter151); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.removedBlockIds != null) { - oprot.writeFieldBegin(REMOVED_BLOCK_IDS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.removedBlockIds.size())); - for (long _iter152 : struct.removedBlockIds) - { - oprot.writeI64(_iter152); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.addedBlocksOnTiers != null) { - oprot.writeFieldBegin(ADDED_BLOCKS_ON_TIERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.LIST, struct.addedBlocksOnTiers.size())); - for (Map.Entry> _iter153 : struct.addedBlocksOnTiers.entrySet()) - { - oprot.writeI64(_iter153.getKey()); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, _iter153.getValue().size())); - for (long _iter154 : _iter153.getValue()) - { - oprot.writeI64(_iter154); - } - oprot.writeListEnd(); - } - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class workerHeartbeat_argsTupleSchemeFactory implements SchemeFactory { - public workerHeartbeat_argsTupleScheme getScheme() { - return new workerHeartbeat_argsTupleScheme(); + private static class getUsedBytes_argsTupleSchemeFactory implements SchemeFactory { + public getUsedBytes_argsTupleScheme getScheme() { + return new getUsedBytes_argsTupleScheme(); } } - private static class workerHeartbeat_argsTupleScheme extends TupleScheme { + private static class getUsedBytes_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerHeartbeat_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getUsedBytes_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetWorkerId()) { - optionals.set(0); - } - if (struct.isSetUsedBytesOnTiers()) { - optionals.set(1); - } - if (struct.isSetRemovedBlockIds()) { - optionals.set(2); - } - if (struct.isSetAddedBlocksOnTiers()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetWorkerId()) { - oprot.writeI64(struct.workerId); - } - if (struct.isSetUsedBytesOnTiers()) { - { - oprot.writeI32(struct.usedBytesOnTiers.size()); - for (long _iter155 : struct.usedBytesOnTiers) - { - oprot.writeI64(_iter155); - } - } - } - if (struct.isSetRemovedBlockIds()) { - { - oprot.writeI32(struct.removedBlockIds.size()); - for (long _iter156 : struct.removedBlockIds) - { - oprot.writeI64(_iter156); - } - } - } - if (struct.isSetAddedBlocksOnTiers()) { - { - oprot.writeI32(struct.addedBlocksOnTiers.size()); - for (Map.Entry> _iter157 : struct.addedBlocksOnTiers.entrySet()) - { - oprot.writeI64(_iter157.getKey()); - { - oprot.writeI32(_iter157.getValue().size()); - for (long _iter158 : _iter157.getValue()) - { - oprot.writeI64(_iter158); - } - } - } - } - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerHeartbeat_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getUsedBytes_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.workerId = iprot.readI64(); - struct.setWorkerIdIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list159 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.usedBytesOnTiers = new ArrayList(_list159.size); - long _elem160; - for (int _i161 = 0; _i161 < _list159.size; ++_i161) - { - _elem160 = iprot.readI64(); - struct.usedBytesOnTiers.add(_elem160); - } - } - struct.setUsedBytesOnTiersIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list162 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.removedBlockIds = new ArrayList(_list162.size); - long _elem163; - for (int _i164 = 0; _i164 < _list162.size; ++_i164) - { - _elem163 = iprot.readI64(); - struct.removedBlockIds.add(_elem163); - } - } - struct.setRemovedBlockIdsIsSet(true); - } - if (incoming.get(3)) { - { - org.apache.thrift.protocol.TMap _map165 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); - struct.addedBlocksOnTiers = new HashMap>(2*_map165.size); - long _key166; - List _val167; - for (int _i168 = 0; _i168 < _map165.size; ++_i168) - { - _key166 = iprot.readI64(); - { - org.apache.thrift.protocol.TList _list169 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - _val167 = new ArrayList(_list169.size); - long _elem170; - for (int _i171 = 0; _i171 < _list169.size; ++_i171) - { - _elem170 = iprot.readI64(); - _val167.add(_elem170); - } - } - struct.addedBlocksOnTiers.put(_key166, _val167); - } - } - struct.setAddedBlocksOnTiersIsSet(true); - } } } } - public static class workerHeartbeat_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("workerHeartbeat_result"); + public static class getUsedBytes_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("getUsedBytes_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField BIE_FIELD_DESC = new org.apache.thrift.protocol.TField("bie", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new workerHeartbeat_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerHeartbeat_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getUsedBytes_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getUsedBytes_resultTupleSchemeFactory()); } - public Command success; // required - public BlockInfoException bie; // required + public long success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - BIE((short)1, "bie"); + SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -4112,8 +2972,6 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // BIE - return BIE; default: return null; } @@ -4154,97 +3012,67 @@ public String getFieldName() { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Command.class))); - tmpMap.put(_Fields.BIE, new org.apache.thrift.meta_data.FieldMetaData("bie", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerHeartbeat_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUsedBytes_result.class, metaDataMap); } - public workerHeartbeat_result() { + public getUsedBytes_result() { } - public workerHeartbeat_result( - Command success, - BlockInfoException bie) + public getUsedBytes_result( + long success) { this(); this.success = success; - this.bie = bie; + setSuccessIsSet(true); } /** * Performs a deep copy on other. */ - public workerHeartbeat_result(workerHeartbeat_result other) { - if (other.isSetSuccess()) { - this.success = new Command(other.success); - } - if (other.isSetBie()) { - this.bie = new BlockInfoException(other.bie); - } + public getUsedBytes_result(getUsedBytes_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; } - public workerHeartbeat_result deepCopy() { - return new workerHeartbeat_result(this); + public getUsedBytes_result deepCopy() { + return new getUsedBytes_result(this); } @Override public void clear() { - this.success = null; - this.bie = null; + setSuccessIsSet(false); + this.success = 0; } - public Command getSuccess() { + public long getSuccess() { return this.success; } - public workerHeartbeat_result setSuccess(Command success) { + public getUsedBytes_result setSuccess(long success) { this.success = success; + setSuccessIsSet(true); return this; } public void unsetSuccess() { - this.success = null; + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.success != null; + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public BlockInfoException getBie() { - return this.bie; - } - - public workerHeartbeat_result setBie(BlockInfoException bie) { - this.bie = bie; - return this; - } - - public void unsetBie() { - this.bie = null; - } - - /** Returns true if field bie is set (has been assigned a value) and false otherwise */ - public boolean isSetBie() { - return this.bie != null; - } - - public void setBieIsSet(boolean value) { - if (!value) { - this.bie = null; - } + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -4253,15 +3081,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((Command)value); - } - break; - - case BIE: - if (value == null) { - unsetBie(); - } else { - setBie((BlockInfoException)value); + setSuccess((Long)value); } break; @@ -4271,10 +3091,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); - - case BIE: - return getBie(); + return Long.valueOf(getSuccess()); } throw new IllegalStateException(); @@ -4289,8 +3106,6 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); - case BIE: - return isSetBie(); } throw new IllegalStateException(); } @@ -4299,30 +3114,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof workerHeartbeat_result) - return this.equals((workerHeartbeat_result)that); + if (that instanceof getUsedBytes_result) + return this.equals((getUsedBytes_result)that); return false; } - public boolean equals(workerHeartbeat_result that) { + public boolean equals(getUsedBytes_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_bie = true && this.isSetBie(); - boolean that_present_bie = true && that.isSetBie(); - if (this_present_bie || that_present_bie) { - if (!(this_present_bie && that_present_bie)) - return false; - if (!this.bie.equals(that.bie)) + if (this.success != that.success) return false; } @@ -4333,21 +3139,16 @@ public boolean equals(workerHeartbeat_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); + boolean present_success = true; list.add(present_success); if (present_success) list.add(success); - boolean present_bie = true && (isSetBie()); - list.add(present_bie); - if (present_bie) - list.add(bie); - return list.hashCode(); } @Override - public int compareTo(workerHeartbeat_result other) { + public int compareTo(getUsedBytes_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -4364,16 +3165,6 @@ public int compareTo(workerHeartbeat_result other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetBie()).compareTo(other.isSetBie()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBie()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bie, other.bie); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -4391,23 +3182,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("workerHeartbeat_result("); + StringBuilder sb = new StringBuilder("getUsedBytes_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("bie:"); - if (this.bie == null) { - sb.append("null"); - } else { - sb.append(this.bie); - } + sb.append(this.success); first = false; sb.append(")"); return sb.toString(); @@ -4416,9 +3195,6 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -4431,21 +3207,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class workerHeartbeat_resultStandardSchemeFactory implements SchemeFactory { - public workerHeartbeat_resultStandardScheme getScheme() { - return new workerHeartbeat_resultStandardScheme(); + private static class getUsedBytes_resultStandardSchemeFactory implements SchemeFactory { + public getUsedBytes_resultStandardScheme getScheme() { + return new getUsedBytes_resultStandardScheme(); } } - private static class workerHeartbeat_resultStandardScheme extends StandardScheme { + private static class getUsedBytes_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, workerHeartbeat_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getUsedBytes_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4456,23 +3234,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerHeartbeat_res } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new Command(); - struct.success.read(iprot); + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // BIE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -4484,18 +3252,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerHeartbeat_res struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerHeartbeat_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getUsedBytes_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { + if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.bie != null) { - oprot.writeFieldBegin(BIE_FIELD_DESC); - struct.bie.write(oprot); + oprot.writeI64(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -4504,80 +3267,54 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, workerHeartbeat_re } - private static class workerHeartbeat_resultTupleSchemeFactory implements SchemeFactory { - public workerHeartbeat_resultTupleScheme getScheme() { - return new workerHeartbeat_resultTupleScheme(); + private static class getUsedBytes_resultTupleSchemeFactory implements SchemeFactory { + public getUsedBytes_resultTupleScheme getScheme() { + return new getUsedBytes_resultTupleScheme(); } } - private static class workerHeartbeat_resultTupleScheme extends TupleScheme { + private static class getUsedBytes_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerHeartbeat_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getUsedBytes_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetBie()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); + oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetBie()) { - struct.bie.write(oprot); + oprot.writeI64(struct.success); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerHeartbeat_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getUsedBytes_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new Command(); - struct.success.read(iprot); + struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } - if (incoming.get(1)) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } } } } - public static class workerCommitBlock_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("workerCommitBlock_args"); + public static class getWorkerInfoList_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("getWorkerInfoList_args"); - private static final org.apache.thrift.protocol.TField WORKER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField USED_BYTES_ON_TIER_FIELD_DESC = new org.apache.thrift.protocol.TField("usedBytesOnTier", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField TIER_FIELD_DESC = new org.apache.thrift.protocol.TField("tier", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)4); - 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)5); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new workerCommitBlock_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerCommitBlock_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getWorkerInfoList_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getWorkerInfoList_argsTupleSchemeFactory()); } - public long workerId; // required - public long usedBytesOnTier; // required - public int tier; // required - public long blockId; // required - public long length; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - WORKER_ID((short)1, "workerId"), - USED_BYTES_ON_TIER((short)2, "usedBytesOnTier"), - TIER((short)3, "tier"), - BLOCK_ID((short)4, "blockId"), - LENGTH((short)5, "length"); +; private static final Map byName = new HashMap(); @@ -4592,16 +3329,6 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // WORKER_ID - return WORKER_ID; - case 2: // USED_BYTES_ON_TIER - return USED_BYTES_ON_TIER; - case 3: // TIER - return TIER; - case 4: // BLOCK_ID - return BLOCK_ID; - case 5: // LENGTH - return LENGTH; default: return null; } @@ -4638,263 +3365,39 @@ public short getThriftFieldId() { public String getFieldName() { return _fieldName; - } - } - - // isset id assignments - private static final int __WORKERID_ISSET_ID = 0; - private static final int __USEDBYTESONTIER_ISSET_ID = 1; - private static final int __TIER_ISSET_ID = 2; - private static final int __BLOCKID_ISSET_ID = 3; - private static final int __LENGTH_ISSET_ID = 4; - private byte __isset_bitfield = 0; - 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.WORKER_ID, new org.apache.thrift.meta_data.FieldMetaData("workerId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.USED_BYTES_ON_TIER, new org.apache.thrift.meta_data.FieldMetaData("usedBytesOnTier", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TIER, new org.apache.thrift.meta_data.FieldMetaData("tier", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - 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.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(workerCommitBlock_args.class, metaDataMap); - } - - public workerCommitBlock_args() { - } - - public workerCommitBlock_args( - long workerId, - long usedBytesOnTier, - int tier, - long blockId, - long length) - { - this(); - this.workerId = workerId; - setWorkerIdIsSet(true); - this.usedBytesOnTier = usedBytesOnTier; - setUsedBytesOnTierIsSet(true); - this.tier = tier; - setTierIsSet(true); - this.blockId = blockId; - setBlockIdIsSet(true); - this.length = length; - setLengthIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public workerCommitBlock_args(workerCommitBlock_args other) { - __isset_bitfield = other.__isset_bitfield; - this.workerId = other.workerId; - this.usedBytesOnTier = other.usedBytesOnTier; - this.tier = other.tier; - this.blockId = other.blockId; - this.length = other.length; - } - - public workerCommitBlock_args deepCopy() { - return new workerCommitBlock_args(this); - } - - @Override - public void clear() { - setWorkerIdIsSet(false); - this.workerId = 0; - setUsedBytesOnTierIsSet(false); - this.usedBytesOnTier = 0; - setTierIsSet(false); - this.tier = 0; - setBlockIdIsSet(false); - this.blockId = 0; - setLengthIsSet(false); - this.length = 0; - } - - public long getWorkerId() { - return this.workerId; - } - - public workerCommitBlock_args setWorkerId(long workerId) { - this.workerId = workerId; - setWorkerIdIsSet(true); - return this; - } - - public void unsetWorkerId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WORKERID_ISSET_ID); - } - - /** Returns true if field workerId is set (has been assigned a value) and false otherwise */ - public boolean isSetWorkerId() { - return EncodingUtils.testBit(__isset_bitfield, __WORKERID_ISSET_ID); - } - - public void setWorkerIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WORKERID_ISSET_ID, value); - } - - public long getUsedBytesOnTier() { - return this.usedBytesOnTier; - } - - public workerCommitBlock_args setUsedBytesOnTier(long usedBytesOnTier) { - this.usedBytesOnTier = usedBytesOnTier; - setUsedBytesOnTierIsSet(true); - return this; - } - - public void unsetUsedBytesOnTier() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USEDBYTESONTIER_ISSET_ID); - } - - /** Returns true if field usedBytesOnTier is set (has been assigned a value) and false otherwise */ - public boolean isSetUsedBytesOnTier() { - return EncodingUtils.testBit(__isset_bitfield, __USEDBYTESONTIER_ISSET_ID); - } - - public void setUsedBytesOnTierIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USEDBYTESONTIER_ISSET_ID, value); - } - - public int getTier() { - return this.tier; - } - - public workerCommitBlock_args setTier(int tier) { - this.tier = tier; - setTierIsSet(true); - return this; - } - - public void unsetTier() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIER_ISSET_ID); - } - - /** Returns true if field tier is set (has been assigned a value) and false otherwise */ - public boolean isSetTier() { - return EncodingUtils.testBit(__isset_bitfield, __TIER_ISSET_ID); - } - - public void setTierIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIER_ISSET_ID, value); - } - - public long getBlockId() { - return this.blockId; - } - - public workerCommitBlock_args setBlockId(long blockId) { - this.blockId = blockId; - setBlockIdIsSet(true); - return this; - } - - public void unsetBlockId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID); - } - - /** Returns true if field blockId is set (has been assigned a value) and false otherwise */ - public boolean isSetBlockId() { - return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID); - } - - public void setBlockIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value); - } - - public long getLength() { - return this.length; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getWorkerInfoList_args.class, metaDataMap); } - public workerCommitBlock_args setLength(long length) { - this.length = length; - setLengthIsSet(true); - return this; + public getWorkerInfoList_args() { } - public void unsetLength() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LENGTH_ISSET_ID); + /** + * Performs a deep copy on other. + */ + public getWorkerInfoList_args(getWorkerInfoList_args other) { } - /** Returns true if field length is set (has been assigned a value) and false otherwise */ - public boolean isSetLength() { - return EncodingUtils.testBit(__isset_bitfield, __LENGTH_ISSET_ID); + public getWorkerInfoList_args deepCopy() { + return new getWorkerInfoList_args(this); } - public void setLengthIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LENGTH_ISSET_ID, value); + @Override + public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { - case WORKER_ID: - if (value == null) { - unsetWorkerId(); - } else { - setWorkerId((Long)value); - } - break; - - case USED_BYTES_ON_TIER: - if (value == null) { - unsetUsedBytesOnTier(); - } else { - setUsedBytesOnTier((Long)value); - } - break; - - case TIER: - if (value == null) { - unsetTier(); - } else { - setTier((Integer)value); - } - break; - - case BLOCK_ID: - if (value == null) { - unsetBlockId(); - } else { - setBlockId((Long)value); - } - break; - - case LENGTH: - if (value == null) { - unsetLength(); - } else { - setLength((Long)value); - } - break; - } } public Object getFieldValue(_Fields field) { switch (field) { - case WORKER_ID: - return Long.valueOf(getWorkerId()); - - case USED_BYTES_ON_TIER: - return Long.valueOf(getUsedBytesOnTier()); - - case TIER: - return Integer.valueOf(getTier()); - - case BLOCK_ID: - return Long.valueOf(getBlockId()); - - case LENGTH: - return Long.valueOf(getLength()); - } throw new IllegalStateException(); } @@ -4906,16 +3409,6 @@ public boolean isSet(_Fields field) { } switch (field) { - case WORKER_ID: - return isSetWorkerId(); - case USED_BYTES_ON_TIER: - return isSetUsedBytesOnTier(); - case TIER: - return isSetTier(); - case BLOCK_ID: - return isSetBlockId(); - case LENGTH: - return isSetLength(); } throw new IllegalStateException(); } @@ -4924,60 +3417,15 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof workerCommitBlock_args) - return this.equals((workerCommitBlock_args)that); + if (that instanceof getWorkerInfoList_args) + return this.equals((getWorkerInfoList_args)that); return false; } - public boolean equals(workerCommitBlock_args that) { + public boolean equals(getWorkerInfoList_args that) { if (that == null) return false; - boolean this_present_workerId = true; - boolean that_present_workerId = true; - if (this_present_workerId || that_present_workerId) { - if (!(this_present_workerId && that_present_workerId)) - return false; - if (this.workerId != that.workerId) - return false; - } - - boolean this_present_usedBytesOnTier = true; - boolean that_present_usedBytesOnTier = true; - if (this_present_usedBytesOnTier || that_present_usedBytesOnTier) { - if (!(this_present_usedBytesOnTier && that_present_usedBytesOnTier)) - return false; - if (this.usedBytesOnTier != that.usedBytesOnTier) - return false; - } - - boolean this_present_tier = true; - boolean that_present_tier = true; - if (this_present_tier || that_present_tier) { - if (!(this_present_tier && that_present_tier)) - return false; - if (this.tier != that.tier) - return false; - } - - boolean this_present_blockId = true; - boolean that_present_blockId = true; - if (this_present_blockId || that_present_blockId) { - if (!(this_present_blockId && that_present_blockId)) - return false; - if (this.blockId != that.blockId) - return false; - } - - boolean this_present_length = true; - boolean that_present_length = true; - if (this_present_length || that_present_length) { - if (!(this_present_length && that_present_length)) - return false; - if (this.length != that.length) - return false; - } - return true; } @@ -4985,131 +3433,37 @@ public boolean equals(workerCommitBlock_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_workerId = true; - list.add(present_workerId); - if (present_workerId) - list.add(workerId); - - boolean present_usedBytesOnTier = true; - list.add(present_usedBytesOnTier); - if (present_usedBytesOnTier) - list.add(usedBytesOnTier); - - boolean present_tier = true; - list.add(present_tier); - if (present_tier) - list.add(tier); - - boolean present_blockId = true; - list.add(present_blockId); - if (present_blockId) - list.add(blockId); - - boolean present_length = true; - list.add(present_length); - if (present_length) - list.add(length); - return list.hashCode(); } @Override - public int compareTo(workerCommitBlock_args other) { + public int compareTo(getWorkerInfoList_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetWorkerId()).compareTo(other.isSetWorkerId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWorkerId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerId, other.workerId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUsedBytesOnTier()).compareTo(other.isSetUsedBytesOnTier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUsedBytesOnTier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.usedBytesOnTier, other.usedBytesOnTier); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTier()).compareTo(other.isSetTier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tier, other.tier); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(other.isSetBlockId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBlockId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, other.blockId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLength()).compareTo(other.isSetLength()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLength()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.length, other.length); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("workerCommitBlock_args("); - boolean first = true; - - sb.append("workerId:"); - sb.append(this.workerId); - first = false; - if (!first) sb.append(", "); - sb.append("usedBytesOnTier:"); - sb.append(this.usedBytesOnTier); - first = false; - if (!first) sb.append(", "); - sb.append("tier:"); - sb.append(this.tier); - first = false; - if (!first) sb.append(", "); - sb.append("blockId:"); - sb.append(this.blockId); - first = false; - if (!first) sb.append(", "); - sb.append("length:"); - sb.append(this.length); - first = false; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getWorkerInfoList_args("); + boolean first = true; + sb.append(")"); return sb.toString(); } @@ -5129,23 +3483,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class workerCommitBlock_argsStandardSchemeFactory implements SchemeFactory { - public workerCommitBlock_argsStandardScheme getScheme() { - return new workerCommitBlock_argsStandardScheme(); + private static class getWorkerInfoList_argsStandardSchemeFactory implements SchemeFactory { + public getWorkerInfoList_argsStandardScheme getScheme() { + return new getWorkerInfoList_argsStandardScheme(); } } - private static class workerCommitBlock_argsStandardScheme extends StandardScheme { + private static class getWorkerInfoList_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, workerCommitBlock_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getWorkerInfoList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5155,46 +3507,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerCommitBlock_a break; } switch (schemeField.id) { - case 1: // WORKER_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.workerId = iprot.readI64(); - struct.setWorkerIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // USED_BYTES_ON_TIER - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.usedBytesOnTier = iprot.readI64(); - struct.setUsedBytesOnTierIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TIER - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.tier = iprot.readI32(); - struct.setTierIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // BLOCK_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.blockId = iprot.readI64(); - struct.setBlockIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // LENGTH - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.length = iprot.readI64(); - struct.setLengthIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5206,121 +3518,53 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerCommitBlock_a struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerCommitBlock_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getWorkerInfoList_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(WORKER_ID_FIELD_DESC); - oprot.writeI64(struct.workerId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(USED_BYTES_ON_TIER_FIELD_DESC); - oprot.writeI64(struct.usedBytesOnTier); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TIER_FIELD_DESC); - oprot.writeI32(struct.tier); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC); - oprot.writeI64(struct.blockId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LENGTH_FIELD_DESC); - oprot.writeI64(struct.length); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class workerCommitBlock_argsTupleSchemeFactory implements SchemeFactory { - public workerCommitBlock_argsTupleScheme getScheme() { - return new workerCommitBlock_argsTupleScheme(); + private static class getWorkerInfoList_argsTupleSchemeFactory implements SchemeFactory { + public getWorkerInfoList_argsTupleScheme getScheme() { + return new getWorkerInfoList_argsTupleScheme(); } } - private static class workerCommitBlock_argsTupleScheme extends TupleScheme { + private static class getWorkerInfoList_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerCommitBlock_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getWorkerInfoList_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetWorkerId()) { - optionals.set(0); - } - if (struct.isSetUsedBytesOnTier()) { - optionals.set(1); - } - if (struct.isSetTier()) { - optionals.set(2); - } - if (struct.isSetBlockId()) { - optionals.set(3); - } - if (struct.isSetLength()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetWorkerId()) { - oprot.writeI64(struct.workerId); - } - if (struct.isSetUsedBytesOnTier()) { - oprot.writeI64(struct.usedBytesOnTier); - } - if (struct.isSetTier()) { - oprot.writeI32(struct.tier); - } - if (struct.isSetBlockId()) { - oprot.writeI64(struct.blockId); - } - if (struct.isSetLength()) { - oprot.writeI64(struct.length); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerCommitBlock_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getWorkerInfoList_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.workerId = iprot.readI64(); - struct.setWorkerIdIsSet(true); - } - if (incoming.get(1)) { - struct.usedBytesOnTier = iprot.readI64(); - struct.setUsedBytesOnTierIsSet(true); - } - if (incoming.get(2)) { - struct.tier = iprot.readI32(); - struct.setTierIsSet(true); - } - if (incoming.get(3)) { - struct.blockId = iprot.readI64(); - struct.setBlockIdIsSet(true); - } - if (incoming.get(4)) { - struct.length = iprot.readI64(); - struct.setLengthIsSet(true); - } } } } - public static class workerCommitBlock_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("workerCommitBlock_result"); + public static class getWorkerInfoList_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("getWorkerInfoList_result"); - private static final org.apache.thrift.protocol.TField BIE_FIELD_DESC = new org.apache.thrift.protocol.TField("bie", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new workerCommitBlock_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerCommitBlock_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getWorkerInfoList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getWorkerInfoList_resultTupleSchemeFactory()); } - public BlockInfoException bie; // required + public List success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - BIE((short)1, "bie"); + SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -5335,8 +3579,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // BIE - return BIE; + case 0: // SUCCESS + return SUCCESS; default: return null; } @@ -5380,71 +3624,91 @@ 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.BIE, new org.apache.thrift.meta_data.FieldMetaData("bie", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkerInfo.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerCommitBlock_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getWorkerInfoList_result.class, metaDataMap); } - public workerCommitBlock_result() { + public getWorkerInfoList_result() { } - public workerCommitBlock_result( - BlockInfoException bie) + public getWorkerInfoList_result( + List success) { this(); - this.bie = bie; + this.success = success; } /** * Performs a deep copy on other. */ - public workerCommitBlock_result(workerCommitBlock_result other) { - if (other.isSetBie()) { - this.bie = new BlockInfoException(other.bie); + public getWorkerInfoList_result(getWorkerInfoList_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (WorkerInfo other_element : other.success) { + __this__success.add(new WorkerInfo(other_element)); + } + this.success = __this__success; } } - public workerCommitBlock_result deepCopy() { - return new workerCommitBlock_result(this); + public getWorkerInfoList_result deepCopy() { + return new getWorkerInfoList_result(this); } @Override public void clear() { - this.bie = null; + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(WorkerInfo elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - public BlockInfoException getBie() { - return this.bie; + public List getSuccess() { + return this.success; } - public workerCommitBlock_result setBie(BlockInfoException bie) { - this.bie = bie; + public getWorkerInfoList_result setSuccess(List success) { + this.success = success; return this; } - public void unsetBie() { - this.bie = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field bie is set (has been assigned a value) and false otherwise */ - public boolean isSetBie() { - return this.bie != null; + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setBieIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.bie = null; + this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case BIE: + case SUCCESS: if (value == null) { - unsetBie(); + unsetSuccess(); } else { - setBie((BlockInfoException)value); + setSuccess((List)value); } break; @@ -5453,8 +3717,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case BIE: - return getBie(); + case SUCCESS: + return getSuccess(); } throw new IllegalStateException(); @@ -5467,8 +3731,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case BIE: - return isSetBie(); + case SUCCESS: + return isSetSuccess(); } throw new IllegalStateException(); } @@ -5477,21 +3741,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof workerCommitBlock_result) - return this.equals((workerCommitBlock_result)that); + if (that instanceof getWorkerInfoList_result) + return this.equals((getWorkerInfoList_result)that); return false; } - public boolean equals(workerCommitBlock_result that) { + public boolean equals(getWorkerInfoList_result that) { if (that == null) return false; - boolean this_present_bie = true && this.isSetBie(); - boolean that_present_bie = true && that.isSetBie(); - if (this_present_bie || that_present_bie) { - if (!(this_present_bie && that_present_bie)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.bie.equals(that.bie)) + if (!this.success.equals(that.success)) return false; } @@ -5502,28 +3766,28 @@ public boolean equals(workerCommitBlock_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_bie = true && (isSetBie()); - list.add(present_bie); - if (present_bie) - list.add(bie); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); return list.hashCode(); } @Override - public int compareTo(workerCommitBlock_result other) { + public int compareTo(getWorkerInfoList_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetBie()).compareTo(other.isSetBie()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetBie()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bie, other.bie); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -5545,14 +3809,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("workerCommitBlock_result("); + StringBuilder sb = new StringBuilder("getWorkerInfoList_result("); boolean first = true; - sb.append("bie:"); - if (this.bie == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.bie); + sb.append(this.success); } first = false; sb.append(")"); @@ -5580,15 +3844,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class workerCommitBlock_resultStandardSchemeFactory implements SchemeFactory { - public workerCommitBlock_resultStandardScheme getScheme() { - return new workerCommitBlock_resultStandardScheme(); + private static class getWorkerInfoList_resultStandardSchemeFactory implements SchemeFactory { + public getWorkerInfoList_resultStandardScheme getScheme() { + return new getWorkerInfoList_resultStandardScheme(); } } - private static class workerCommitBlock_resultStandardScheme extends StandardScheme { + private static class getWorkerInfoList_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, workerCommitBlock_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getWorkerInfoList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5598,11 +3862,21 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerCommitBlock_r break; } switch (schemeField.id) { - case 1: // BIE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list104 = iprot.readListBegin(); + struct.success = new ArrayList(_list104.size); + WorkerInfo _elem105; + for (int _i106 = 0; _i106 < _list104.size; ++_i106) + { + _elem105 = new WorkerInfo(); + _elem105.read(iprot); + struct.success.add(_elem105); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5618,13 +3892,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerCommitBlock_r struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerCommitBlock_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getWorkerInfoList_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.bie != null) { - oprot.writeFieldBegin(BIE_FIELD_DESC); - struct.bie.write(oprot); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (WorkerInfo _iter107 : struct.success) + { + _iter107.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -5633,55 +3914,84 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, workerCommitBlock_ } - private static class workerCommitBlock_resultTupleSchemeFactory implements SchemeFactory { - public workerCommitBlock_resultTupleScheme getScheme() { - return new workerCommitBlock_resultTupleScheme(); + private static class getWorkerInfoList_resultTupleSchemeFactory implements SchemeFactory { + public getWorkerInfoList_resultTupleScheme getScheme() { + return new getWorkerInfoList_resultTupleScheme(); } } - private static class workerCommitBlock_resultTupleScheme extends TupleScheme { + private static class getWorkerInfoList_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerCommitBlock_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getWorkerInfoList_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetBie()) { + if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetBie()) { - struct.bie.write(oprot); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (WorkerInfo _iter108 : struct.success) + { + _iter108.write(oprot); + } + } } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerCommitBlock_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getWorkerInfoList_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); + { + org.apache.thrift.protocol.TList _list109 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list109.size); + WorkerInfo _elem110; + for (int _i111 = 0; _i111 < _list109.size; ++_i111) + { + _elem110 = new WorkerInfo(); + _elem110.read(iprot); + struct.success.add(_elem110); + } + } + struct.setSuccessIsSet(true); } } } } - public static class getWorkerInfoList_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("getWorkerInfoList_args"); + public static class workerCommitBlock_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("workerCommitBlock_args"); + private static final org.apache.thrift.protocol.TField WORKER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField USED_BYTES_ON_TIER_FIELD_DESC = new org.apache.thrift.protocol.TField("usedBytesOnTier", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField TIER_FIELD_DESC = new org.apache.thrift.protocol.TField("tier", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)4); + 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)5); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getWorkerInfoList_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getWorkerInfoList_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new workerCommitBlock_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerCommitBlock_argsTupleSchemeFactory()); } + public long workerId; // required + public long usedBytesOnTier; // required + public int tier; // required + public long blockId; // required + public long length; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + WORKER_ID((short)1, "workerId"), + USED_BYTES_ON_TIER((short)2, "usedBytesOnTier"), + TIER((short)3, "tier"), + BLOCK_ID((short)4, "blockId"), + LENGTH((short)5, "length"); private static final Map byName = new HashMap(); @@ -5696,75 +4006,309 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 1: // WORKER_ID + return WORKER_ID; + case 2: // USED_BYTES_ON_TIER + return USED_BYTES_ON_TIER; + case 3: // TIER + return TIER; + case 4: // BLOCK_ID + return BLOCK_ID; + case 5: // LENGTH + return LENGTH; default: return null; } } - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __WORKERID_ISSET_ID = 0; + private static final int __USEDBYTESONTIER_ISSET_ID = 1; + private static final int __TIER_ISSET_ID = 2; + private static final int __BLOCKID_ISSET_ID = 3; + private static final int __LENGTH_ISSET_ID = 4; + private byte __isset_bitfield = 0; + 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.WORKER_ID, new org.apache.thrift.meta_data.FieldMetaData("workerId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.USED_BYTES_ON_TIER, new org.apache.thrift.meta_data.FieldMetaData("usedBytesOnTier", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.TIER, new org.apache.thrift.meta_data.FieldMetaData("tier", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + 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.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(workerCommitBlock_args.class, metaDataMap); + } + + public workerCommitBlock_args() { + } + + public workerCommitBlock_args( + long workerId, + long usedBytesOnTier, + int tier, + long blockId, + long length) + { + this(); + this.workerId = workerId; + setWorkerIdIsSet(true); + this.usedBytesOnTier = usedBytesOnTier; + setUsedBytesOnTierIsSet(true); + this.tier = tier; + setTierIsSet(true); + this.blockId = blockId; + setBlockIdIsSet(true); + this.length = length; + setLengthIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public workerCommitBlock_args(workerCommitBlock_args other) { + __isset_bitfield = other.__isset_bitfield; + this.workerId = other.workerId; + this.usedBytesOnTier = other.usedBytesOnTier; + this.tier = other.tier; + this.blockId = other.blockId; + this.length = other.length; + } + + public workerCommitBlock_args deepCopy() { + return new workerCommitBlock_args(this); + } + + @Override + public void clear() { + setWorkerIdIsSet(false); + this.workerId = 0; + setUsedBytesOnTierIsSet(false); + this.usedBytesOnTier = 0; + setTierIsSet(false); + this.tier = 0; + setBlockIdIsSet(false); + this.blockId = 0; + setLengthIsSet(false); + this.length = 0; + } + + public long getWorkerId() { + return this.workerId; + } + + public workerCommitBlock_args setWorkerId(long workerId) { + this.workerId = workerId; + setWorkerIdIsSet(true); + return this; + } + + public void unsetWorkerId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WORKERID_ISSET_ID); + } + + /** Returns true if field workerId is set (has been assigned a value) and false otherwise */ + public boolean isSetWorkerId() { + return EncodingUtils.testBit(__isset_bitfield, __WORKERID_ISSET_ID); + } + + public void setWorkerIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WORKERID_ISSET_ID, value); + } + + public long getUsedBytesOnTier() { + return this.usedBytesOnTier; + } + + public workerCommitBlock_args setUsedBytesOnTier(long usedBytesOnTier) { + this.usedBytesOnTier = usedBytesOnTier; + setUsedBytesOnTierIsSet(true); + return this; + } + + public void unsetUsedBytesOnTier() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USEDBYTESONTIER_ISSET_ID); + } + + /** Returns true if field usedBytesOnTier is set (has been assigned a value) and false otherwise */ + public boolean isSetUsedBytesOnTier() { + return EncodingUtils.testBit(__isset_bitfield, __USEDBYTESONTIER_ISSET_ID); + } + + public void setUsedBytesOnTierIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USEDBYTESONTIER_ISSET_ID, value); + } + + public int getTier() { + return this.tier; + } + + public workerCommitBlock_args setTier(int tier) { + this.tier = tier; + setTierIsSet(true); + return this; + } + + public void unsetTier() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIER_ISSET_ID); + } + + /** Returns true if field tier is set (has been assigned a value) and false otherwise */ + public boolean isSetTier() { + return EncodingUtils.testBit(__isset_bitfield, __TIER_ISSET_ID); + } + + public void setTierIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIER_ISSET_ID, value); + } - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } + public long getBlockId() { + return this.blockId; + } - private final short _thriftId; - private final String _fieldName; + public workerCommitBlock_args setBlockId(long blockId) { + this.blockId = blockId; + setBlockIdIsSet(true); + return this; + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } + public void unsetBlockId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID); + } - public short getThriftFieldId() { - return _thriftId; - } + /** Returns true if field blockId is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockId() { + return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID); + } - public String getFieldName() { - return _fieldName; - } + public void setBlockIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value); } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getWorkerInfoList_args.class, metaDataMap); + + public long getLength() { + return this.length; } - public getWorkerInfoList_args() { + public workerCommitBlock_args setLength(long length) { + this.length = length; + setLengthIsSet(true); + return this; } - /** - * Performs a deep copy on other. - */ - public getWorkerInfoList_args(getWorkerInfoList_args other) { + public void unsetLength() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LENGTH_ISSET_ID); } - public getWorkerInfoList_args deepCopy() { - return new getWorkerInfoList_args(this); + /** Returns true if field length is set (has been assigned a value) and false otherwise */ + public boolean isSetLength() { + return EncodingUtils.testBit(__isset_bitfield, __LENGTH_ISSET_ID); } - @Override - public void clear() { + public void setLengthIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LENGTH_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { + case WORKER_ID: + if (value == null) { + unsetWorkerId(); + } else { + setWorkerId((Long)value); + } + break; + + case USED_BYTES_ON_TIER: + if (value == null) { + unsetUsedBytesOnTier(); + } else { + setUsedBytesOnTier((Long)value); + } + break; + + case TIER: + if (value == null) { + unsetTier(); + } else { + setTier((Integer)value); + } + break; + + case BLOCK_ID: + if (value == null) { + unsetBlockId(); + } else { + setBlockId((Long)value); + } + break; + + case LENGTH: + if (value == null) { + unsetLength(); + } else { + setLength((Long)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case WORKER_ID: + return Long.valueOf(getWorkerId()); + + case USED_BYTES_ON_TIER: + return Long.valueOf(getUsedBytesOnTier()); + + case TIER: + return Integer.valueOf(getTier()); + + case BLOCK_ID: + return Long.valueOf(getBlockId()); + + case LENGTH: + return Long.valueOf(getLength()); + } throw new IllegalStateException(); } @@ -5776,6 +4320,16 @@ public boolean isSet(_Fields field) { } switch (field) { + case WORKER_ID: + return isSetWorkerId(); + case USED_BYTES_ON_TIER: + return isSetUsedBytesOnTier(); + case TIER: + return isSetTier(); + case BLOCK_ID: + return isSetBlockId(); + case LENGTH: + return isSetLength(); } throw new IllegalStateException(); } @@ -5784,15 +4338,60 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getWorkerInfoList_args) - return this.equals((getWorkerInfoList_args)that); + if (that instanceof workerCommitBlock_args) + return this.equals((workerCommitBlock_args)that); return false; } - public boolean equals(getWorkerInfoList_args that) { + public boolean equals(workerCommitBlock_args that) { if (that == null) return false; + boolean this_present_workerId = true; + boolean that_present_workerId = true; + if (this_present_workerId || that_present_workerId) { + if (!(this_present_workerId && that_present_workerId)) + return false; + if (this.workerId != that.workerId) + return false; + } + + boolean this_present_usedBytesOnTier = true; + boolean that_present_usedBytesOnTier = true; + if (this_present_usedBytesOnTier || that_present_usedBytesOnTier) { + if (!(this_present_usedBytesOnTier && that_present_usedBytesOnTier)) + return false; + if (this.usedBytesOnTier != that.usedBytesOnTier) + return false; + } + + boolean this_present_tier = true; + boolean that_present_tier = true; + if (this_present_tier || that_present_tier) { + if (!(this_present_tier && that_present_tier)) + return false; + if (this.tier != that.tier) + return false; + } + + boolean this_present_blockId = true; + boolean that_present_blockId = true; + if (this_present_blockId || that_present_blockId) { + if (!(this_present_blockId && that_present_blockId)) + return false; + if (this.blockId != that.blockId) + return false; + } + + boolean this_present_length = true; + boolean that_present_length = true; + if (this_present_length || that_present_length) { + if (!(this_present_length && that_present_length)) + return false; + if (this.length != that.length) + return false; + } + return true; } @@ -5800,17 +4399,92 @@ public boolean equals(getWorkerInfoList_args that) { public int hashCode() { List list = new ArrayList(); + boolean present_workerId = true; + list.add(present_workerId); + if (present_workerId) + list.add(workerId); + + boolean present_usedBytesOnTier = true; + list.add(present_usedBytesOnTier); + if (present_usedBytesOnTier) + list.add(usedBytesOnTier); + + boolean present_tier = true; + list.add(present_tier); + if (present_tier) + list.add(tier); + + boolean present_blockId = true; + list.add(present_blockId); + if (present_blockId) + list.add(blockId); + + boolean present_length = true; + list.add(present_length); + if (present_length) + list.add(length); + return list.hashCode(); } @Override - public int compareTo(getWorkerInfoList_args other) { + public int compareTo(workerCommitBlock_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } - - int lastComparison = 0; - + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetWorkerId()).compareTo(other.isSetWorkerId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetWorkerId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerId, other.workerId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUsedBytesOnTier()).compareTo(other.isSetUsedBytesOnTier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUsedBytesOnTier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.usedBytesOnTier, other.usedBytesOnTier); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTier()).compareTo(other.isSetTier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tier, other.tier); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(other.isSetBlockId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBlockId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, other.blockId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLength()).compareTo(other.isSetLength()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLength()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.length, other.length); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -5828,9 +4502,28 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getWorkerInfoList_args("); + StringBuilder sb = new StringBuilder("workerCommitBlock_args("); boolean first = true; + sb.append("workerId:"); + sb.append(this.workerId); + first = false; + if (!first) sb.append(", "); + sb.append("usedBytesOnTier:"); + sb.append(this.usedBytesOnTier); + first = false; + if (!first) sb.append(", "); + sb.append("tier:"); + sb.append(this.tier); + first = false; + if (!first) sb.append(", "); + sb.append("blockId:"); + sb.append(this.blockId); + first = false; + if (!first) sb.append(", "); + sb.append("length:"); + sb.append(this.length); + first = false; sb.append(")"); return sb.toString(); } @@ -5850,21 +4543,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getWorkerInfoList_argsStandardSchemeFactory implements SchemeFactory { - public getWorkerInfoList_argsStandardScheme getScheme() { - return new getWorkerInfoList_argsStandardScheme(); + private static class workerCommitBlock_argsStandardSchemeFactory implements SchemeFactory { + public workerCommitBlock_argsStandardScheme getScheme() { + return new workerCommitBlock_argsStandardScheme(); } } - private static class getWorkerInfoList_argsStandardScheme extends StandardScheme { + private static class workerCommitBlock_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getWorkerInfoList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerCommitBlock_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5874,6 +4569,46 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getWorkerInfoList_a break; } switch (schemeField.id) { + case 1: // WORKER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.workerId = iprot.readI64(); + struct.setWorkerIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // USED_BYTES_ON_TIER + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.usedBytesOnTier = iprot.readI64(); + struct.setUsedBytesOnTierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TIER + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.tier = iprot.readI32(); + struct.setTierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // BLOCK_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.blockId = iprot.readI64(); + struct.setBlockIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LENGTH + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.length = iprot.readI64(); + struct.setLengthIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5885,53 +4620,121 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getWorkerInfoList_a struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getWorkerInfoList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, workerCommitBlock_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(WORKER_ID_FIELD_DESC); + oprot.writeI64(struct.workerId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(USED_BYTES_ON_TIER_FIELD_DESC); + oprot.writeI64(struct.usedBytesOnTier); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(TIER_FIELD_DESC); + oprot.writeI32(struct.tier); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC); + oprot.writeI64(struct.blockId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LENGTH_FIELD_DESC); + oprot.writeI64(struct.length); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getWorkerInfoList_argsTupleSchemeFactory implements SchemeFactory { - public getWorkerInfoList_argsTupleScheme getScheme() { - return new getWorkerInfoList_argsTupleScheme(); + private static class workerCommitBlock_argsTupleSchemeFactory implements SchemeFactory { + public workerCommitBlock_argsTupleScheme getScheme() { + return new workerCommitBlock_argsTupleScheme(); } } - private static class getWorkerInfoList_argsTupleScheme extends TupleScheme { + private static class workerCommitBlock_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getWorkerInfoList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, workerCommitBlock_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetWorkerId()) { + optionals.set(0); + } + if (struct.isSetUsedBytesOnTier()) { + optionals.set(1); + } + if (struct.isSetTier()) { + optionals.set(2); + } + if (struct.isSetBlockId()) { + optionals.set(3); + } + if (struct.isSetLength()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetWorkerId()) { + oprot.writeI64(struct.workerId); + } + if (struct.isSetUsedBytesOnTier()) { + oprot.writeI64(struct.usedBytesOnTier); + } + if (struct.isSetTier()) { + oprot.writeI32(struct.tier); + } + if (struct.isSetBlockId()) { + oprot.writeI64(struct.blockId); + } + if (struct.isSetLength()) { + oprot.writeI64(struct.length); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getWorkerInfoList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, workerCommitBlock_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.workerId = iprot.readI64(); + struct.setWorkerIdIsSet(true); + } + if (incoming.get(1)) { + struct.usedBytesOnTier = iprot.readI64(); + struct.setUsedBytesOnTierIsSet(true); + } + if (incoming.get(2)) { + struct.tier = iprot.readI32(); + struct.setTierIsSet(true); + } + if (incoming.get(3)) { + struct.blockId = iprot.readI64(); + struct.setBlockIdIsSet(true); + } + if (incoming.get(4)) { + struct.length = iprot.readI64(); + struct.setLengthIsSet(true); + } } } } - public static class getWorkerInfoList_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("getWorkerInfoList_result"); + public static class workerCommitBlock_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("workerCommitBlock_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getWorkerInfoList_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getWorkerInfoList_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new workerCommitBlock_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerCommitBlock_resultTupleSchemeFactory()); } - public List success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -5946,8 +4749,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; + case 1: // E + return E; default: return null; } @@ -5991,91 +4794,71 @@ 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, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkerInfo.class)))); + 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(getWorkerInfoList_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerCommitBlock_result.class, metaDataMap); } - public getWorkerInfoList_result() { + public workerCommitBlock_result() { } - public getWorkerInfoList_result( - List success) + public workerCommitBlock_result( + TachyonTException e) { this(); - this.success = success; + this.e = e; } /** * Performs a deep copy on other. */ - public getWorkerInfoList_result(getWorkerInfoList_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (WorkerInfo other_element : other.success) { - __this__success.add(new WorkerInfo(other_element)); - } - this.success = __this__success; + public workerCommitBlock_result(workerCommitBlock_result other) { + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public getWorkerInfoList_result deepCopy() { - return new getWorkerInfoList_result(this); + public workerCommitBlock_result deepCopy() { + return new workerCommitBlock_result(this); } @Override public void clear() { - this.success = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(WorkerInfo elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + this.e = null; } - public List getSuccess() { - return this.success; + public TachyonTException getE() { + return this.e; } - public getWorkerInfoList_result setSuccess(List success) { - this.success = success; + public workerCommitBlock_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetSuccess() { - this.success = null; + public void unsetE() { + this.e = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setSuccessIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.success = null; + this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case E: if (value == null) { - unsetSuccess(); + unsetE(); } else { - setSuccess((List)value); + setE((TachyonTException)value); } break; @@ -6084,8 +4867,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case E: + return getE(); } throw new IllegalStateException(); @@ -6098,8 +4881,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -6108,21 +4891,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getWorkerInfoList_result) - return this.equals((getWorkerInfoList_result)that); + if (that instanceof workerCommitBlock_result) + return this.equals((workerCommitBlock_result)that); return false; } - public boolean equals(getWorkerInfoList_result that) { + public boolean equals(workerCommitBlock_result that) { if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + return false; + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.success.equals(that.success)) + if (!this.e.equals(that.e)) return false; } @@ -6133,28 +4916,28 @@ public boolean equals(getWorkerInfoList_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(getWorkerInfoList_result other) { + public int compareTo(workerCommitBlock_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -6176,14 +4959,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getWorkerInfoList_result("); + StringBuilder sb = new StringBuilder("workerCommitBlock_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.e); } first = false; sb.append(")"); @@ -6211,15 +4994,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getWorkerInfoList_resultStandardSchemeFactory implements SchemeFactory { - public getWorkerInfoList_resultStandardScheme getScheme() { - return new getWorkerInfoList_resultStandardScheme(); + private static class workerCommitBlock_resultStandardSchemeFactory implements SchemeFactory { + public workerCommitBlock_resultStandardScheme getScheme() { + return new workerCommitBlock_resultStandardScheme(); } } - private static class getWorkerInfoList_resultStandardScheme extends StandardScheme { + private static class workerCommitBlock_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getWorkerInfoList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerCommitBlock_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6229,21 +5012,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getWorkerInfoList_r break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list172 = iprot.readListBegin(); - struct.success = new ArrayList(_list172.size); - WorkerInfo _elem173; - for (int _i174 = 0; _i174 < _list172.size; ++_i174) - { - _elem173 = new WorkerInfo(); - _elem173.read(iprot); - struct.success.add(_elem173); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -6259,20 +5032,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getWorkerInfoList_r struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getWorkerInfoList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, workerCommitBlock_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (WorkerInfo _iter175 : struct.success) - { - _iter175.write(oprot); - } - oprot.writeListEnd(); - } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -6281,70 +5047,57 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getWorkerInfoList_ } - private static class getWorkerInfoList_resultTupleSchemeFactory implements SchemeFactory { - public getWorkerInfoList_resultTupleScheme getScheme() { - return new getWorkerInfoList_resultTupleScheme(); + private static class workerCommitBlock_resultTupleSchemeFactory implements SchemeFactory { + public workerCommitBlock_resultTupleScheme getScheme() { + return new workerCommitBlock_resultTupleScheme(); } } - private static class getWorkerInfoList_resultTupleScheme extends TupleScheme { + private static class workerCommitBlock_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getWorkerInfoList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, workerCommitBlock_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (WorkerInfo _iter176 : struct.success) - { - _iter176.write(oprot); - } - } + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getWorkerInfoList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, workerCommitBlock_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list177 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list177.size); - WorkerInfo _elem178; - for (int _i179 = 0; _i179 < _list177.size; ++_i179) - { - _elem178 = new WorkerInfo(); - _elem178.read(iprot); - struct.success.add(_elem178); - } - } - struct.setSuccessIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class getCapacityBytes_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("getCapacityBytes_args"); + public static class workerGetWorkerId_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("workerGetWorkerId_args"); + private static final org.apache.thrift.protocol.TField WORKER_NET_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("workerNetAddress", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getCapacityBytes_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getCapacityBytes_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new workerGetWorkerId_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerGetWorkerId_argsTupleSchemeFactory()); } + public NetAddress workerNetAddress; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + WORKER_NET_ADDRESS((short)1, "workerNetAddress"); private static final Map byName = new HashMap(); @@ -6359,6 +5112,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 1: // WORKER_NET_ADDRESS + return WORKER_NET_ADDRESS; default: return null; } @@ -6397,37 +5152,87 @@ public String getFieldName() { return _fieldName; } } + + // isset id assignments 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.WORKER_NET_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("workerNetAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NetAddress.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCapacityBytes_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerGetWorkerId_args.class, metaDataMap); } - public getCapacityBytes_args() { + public workerGetWorkerId_args() { + } + + public workerGetWorkerId_args( + NetAddress workerNetAddress) + { + this(); + this.workerNetAddress = workerNetAddress; } /** * Performs a deep copy on other. */ - public getCapacityBytes_args(getCapacityBytes_args other) { + public workerGetWorkerId_args(workerGetWorkerId_args other) { + if (other.isSetWorkerNetAddress()) { + this.workerNetAddress = new NetAddress(other.workerNetAddress); + } } - public getCapacityBytes_args deepCopy() { - return new getCapacityBytes_args(this); + public workerGetWorkerId_args deepCopy() { + return new workerGetWorkerId_args(this); } @Override public void clear() { + this.workerNetAddress = null; + } + + public NetAddress getWorkerNetAddress() { + return this.workerNetAddress; + } + + public workerGetWorkerId_args setWorkerNetAddress(NetAddress workerNetAddress) { + this.workerNetAddress = workerNetAddress; + return this; + } + + public void unsetWorkerNetAddress() { + this.workerNetAddress = null; + } + + /** Returns true if field workerNetAddress is set (has been assigned a value) and false otherwise */ + public boolean isSetWorkerNetAddress() { + return this.workerNetAddress != null; + } + + public void setWorkerNetAddressIsSet(boolean value) { + if (!value) { + this.workerNetAddress = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { + case WORKER_NET_ADDRESS: + if (value == null) { + unsetWorkerNetAddress(); + } else { + setWorkerNetAddress((NetAddress)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case WORKER_NET_ADDRESS: + return getWorkerNetAddress(); + } throw new IllegalStateException(); } @@ -6439,6 +5244,8 @@ public boolean isSet(_Fields field) { } switch (field) { + case WORKER_NET_ADDRESS: + return isSetWorkerNetAddress(); } throw new IllegalStateException(); } @@ -6447,15 +5254,24 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getCapacityBytes_args) - return this.equals((getCapacityBytes_args)that); + if (that instanceof workerGetWorkerId_args) + return this.equals((workerGetWorkerId_args)that); return false; } - public boolean equals(getCapacityBytes_args that) { + public boolean equals(workerGetWorkerId_args that) { if (that == null) return false; + boolean this_present_workerNetAddress = true && this.isSetWorkerNetAddress(); + boolean that_present_workerNetAddress = true && that.isSetWorkerNetAddress(); + if (this_present_workerNetAddress || that_present_workerNetAddress) { + if (!(this_present_workerNetAddress && that_present_workerNetAddress)) + return false; + if (!this.workerNetAddress.equals(that.workerNetAddress)) + return false; + } + return true; } @@ -6463,17 +5279,32 @@ public boolean equals(getCapacityBytes_args that) { public int hashCode() { List list = new ArrayList(); + boolean present_workerNetAddress = true && (isSetWorkerNetAddress()); + list.add(present_workerNetAddress); + if (present_workerNetAddress) + list.add(workerNetAddress); + return list.hashCode(); } @Override - public int compareTo(getCapacityBytes_args other) { + public int compareTo(workerGetWorkerId_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetWorkerNetAddress()).compareTo(other.isSetWorkerNetAddress()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetWorkerNetAddress()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerNetAddress, other.workerNetAddress); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -6491,9 +5322,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getCapacityBytes_args("); + StringBuilder sb = new StringBuilder("workerGetWorkerId_args("); boolean first = true; + sb.append("workerNetAddress:"); + if (this.workerNetAddress == null) { + sb.append("null"); + } else { + sb.append(this.workerNetAddress); + } + first = false; sb.append(")"); return sb.toString(); } @@ -6501,6 +5339,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity + if (workerNetAddress != null) { + workerNetAddress.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -6519,15 +5360,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getCapacityBytes_argsStandardSchemeFactory implements SchemeFactory { - public getCapacityBytes_argsStandardScheme getScheme() { - return new getCapacityBytes_argsStandardScheme(); + private static class workerGetWorkerId_argsStandardSchemeFactory implements SchemeFactory { + public workerGetWorkerId_argsStandardScheme getScheme() { + return new workerGetWorkerId_argsStandardScheme(); } } - private static class getCapacityBytes_argsStandardScheme extends StandardScheme { + private static class workerGetWorkerId_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getCapacityBytes_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetWorkerId_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6537,6 +5378,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getCapacityBytes_ar break; } switch (schemeField.id) { + case 1: // WORKER_NET_ADDRESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.workerNetAddress = new NetAddress(); + struct.workerNetAddress.read(iprot); + struct.setWorkerNetAddressIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -6548,46 +5398,65 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getCapacityBytes_ar struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getCapacityBytes_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetWorkerId_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.workerNetAddress != null) { + oprot.writeFieldBegin(WORKER_NET_ADDRESS_FIELD_DESC); + struct.workerNetAddress.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getCapacityBytes_argsTupleSchemeFactory implements SchemeFactory { - public getCapacityBytes_argsTupleScheme getScheme() { - return new getCapacityBytes_argsTupleScheme(); + private static class workerGetWorkerId_argsTupleSchemeFactory implements SchemeFactory { + public workerGetWorkerId_argsTupleScheme getScheme() { + return new workerGetWorkerId_argsTupleScheme(); } } - private static class getCapacityBytes_argsTupleScheme extends TupleScheme { + private static class workerGetWorkerId_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getCapacityBytes_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, workerGetWorkerId_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetWorkerNetAddress()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetWorkerNetAddress()) { + struct.workerNetAddress.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getCapacityBytes_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, workerGetWorkerId_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.workerNetAddress = new NetAddress(); + struct.workerNetAddress.read(iprot); + struct.setWorkerNetAddressIsSet(true); + } } } } - public static class getCapacityBytes_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("getCapacityBytes_result"); + public static class workerGetWorkerId_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("workerGetWorkerId_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getCapacityBytes_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getCapacityBytes_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new workerGetWorkerId_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerGetWorkerId_resultTupleSchemeFactory()); } public long success; // required @@ -6659,13 +5528,13 @@ public String getFieldName() { 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.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCapacityBytes_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerGetWorkerId_result.class, metaDataMap); } - public getCapacityBytes_result() { + public workerGetWorkerId_result() { } - public getCapacityBytes_result( + public workerGetWorkerId_result( long success) { this(); @@ -6676,13 +5545,13 @@ public getCapacityBytes_result( /** * Performs a deep copy on other. */ - public getCapacityBytes_result(getCapacityBytes_result other) { + public workerGetWorkerId_result(workerGetWorkerId_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } - public getCapacityBytes_result deepCopy() { - return new getCapacityBytes_result(this); + public workerGetWorkerId_result deepCopy() { + return new workerGetWorkerId_result(this); } @Override @@ -6695,7 +5564,7 @@ public long getSuccess() { return this.success; } - public getCapacityBytes_result setSuccess(long success) { + public workerGetWorkerId_result setSuccess(long success) { this.success = success; setSuccessIsSet(true); return this; @@ -6753,12 +5622,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getCapacityBytes_result) - return this.equals((getCapacityBytes_result)that); + if (that instanceof workerGetWorkerId_result) + return this.equals((workerGetWorkerId_result)that); return false; } - public boolean equals(getCapacityBytes_result that) { + public boolean equals(workerGetWorkerId_result that) { if (that == null) return false; @@ -6787,7 +5656,7 @@ public int hashCode() { } @Override - public int compareTo(getCapacityBytes_result other) { + public int compareTo(workerGetWorkerId_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -6821,7 +5690,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getCapacityBytes_result("); + StringBuilder sb = new StringBuilder("workerGetWorkerId_result("); boolean first = true; sb.append("success:"); @@ -6854,15 +5723,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getCapacityBytes_resultStandardSchemeFactory implements SchemeFactory { - public getCapacityBytes_resultStandardScheme getScheme() { - return new getCapacityBytes_resultStandardScheme(); + private static class workerGetWorkerId_resultStandardSchemeFactory implements SchemeFactory { + public workerGetWorkerId_resultStandardScheme getScheme() { + return new workerGetWorkerId_resultStandardScheme(); } } - private static class getCapacityBytes_resultStandardScheme extends StandardScheme { + private static class workerGetWorkerId_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getCapacityBytes_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetWorkerId_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6891,7 +5760,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getCapacityBytes_re struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getCapacityBytes_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetWorkerId_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -6906,137 +5775,397 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getCapacityBytes_r } - private static class getCapacityBytes_resultTupleSchemeFactory implements SchemeFactory { - public getCapacityBytes_resultTupleScheme getScheme() { - return new getCapacityBytes_resultTupleScheme(); + private static class workerGetWorkerId_resultTupleSchemeFactory implements SchemeFactory { + public workerGetWorkerId_resultTupleScheme getScheme() { + return new workerGetWorkerId_resultTupleScheme(); + } + } + + private static class workerGetWorkerId_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, workerGetWorkerId_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeI64(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, workerGetWorkerId_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class workerHeartbeat_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("workerHeartbeat_args"); + + private static final org.apache.thrift.protocol.TField WORKER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField USED_BYTES_ON_TIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("usedBytesOnTiers", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField REMOVED_BLOCK_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("removedBlockIds", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField ADDED_BLOCKS_ON_TIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("addedBlocksOnTiers", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new workerHeartbeat_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerHeartbeat_argsTupleSchemeFactory()); + } + + public long workerId; // required + public List usedBytesOnTiers; // required + public List removedBlockIds; // required + public Map> addedBlocksOnTiers; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + WORKER_ID((short)1, "workerId"), + USED_BYTES_ON_TIERS((short)2, "usedBytesOnTiers"), + REMOVED_BLOCK_IDS((short)3, "removedBlockIds"), + ADDED_BLOCKS_ON_TIERS((short)4, "addedBlocksOnTiers"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // WORKER_ID + return WORKER_ID; + case 2: // USED_BYTES_ON_TIERS + return USED_BYTES_ON_TIERS; + case 3: // REMOVED_BLOCK_IDS + return REMOVED_BLOCK_IDS; + case 4: // ADDED_BLOCKS_ON_TIERS + return ADDED_BLOCKS_ON_TIERS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __WORKERID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + 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.WORKER_ID, new org.apache.thrift.meta_data.FieldMetaData("workerId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.USED_BYTES_ON_TIERS, new org.apache.thrift.meta_data.FieldMetaData("usedBytesOnTiers", 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)))); + tmpMap.put(_Fields.REMOVED_BLOCK_IDS, new org.apache.thrift.meta_data.FieldMetaData("removedBlockIds", 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)))); + tmpMap.put(_Fields.ADDED_BLOCKS_ON_TIERS, new org.apache.thrift.meta_data.FieldMetaData("addedBlocksOnTiers", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), + 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(workerHeartbeat_args.class, metaDataMap); + } + + public workerHeartbeat_args() { + } + + public workerHeartbeat_args( + long workerId, + List usedBytesOnTiers, + List removedBlockIds, + Map> addedBlocksOnTiers) + { + this(); + this.workerId = workerId; + setWorkerIdIsSet(true); + this.usedBytesOnTiers = usedBytesOnTiers; + this.removedBlockIds = removedBlockIds; + this.addedBlocksOnTiers = addedBlocksOnTiers; + } + + /** + * Performs a deep copy on other. + */ + public workerHeartbeat_args(workerHeartbeat_args other) { + __isset_bitfield = other.__isset_bitfield; + this.workerId = other.workerId; + if (other.isSetUsedBytesOnTiers()) { + List __this__usedBytesOnTiers = new ArrayList(other.usedBytesOnTiers); + this.usedBytesOnTiers = __this__usedBytesOnTiers; + } + if (other.isSetRemovedBlockIds()) { + List __this__removedBlockIds = new ArrayList(other.removedBlockIds); + this.removedBlockIds = __this__removedBlockIds; + } + if (other.isSetAddedBlocksOnTiers()) { + Map> __this__addedBlocksOnTiers = new HashMap>(other.addedBlocksOnTiers.size()); + for (Map.Entry> other_element : other.addedBlocksOnTiers.entrySet()) { + + Long other_element_key = other_element.getKey(); + List other_element_value = other_element.getValue(); + + Long __this__addedBlocksOnTiers_copy_key = other_element_key; + + List __this__addedBlocksOnTiers_copy_value = new ArrayList(other_element_value); + + __this__addedBlocksOnTiers.put(__this__addedBlocksOnTiers_copy_key, __this__addedBlocksOnTiers_copy_value); + } + this.addedBlocksOnTiers = __this__addedBlocksOnTiers; } } - private static class getCapacityBytes_resultTupleScheme extends TupleScheme { + public workerHeartbeat_args deepCopy() { + return new workerHeartbeat_args(this); + } + + @Override + public void clear() { + setWorkerIdIsSet(false); + this.workerId = 0; + this.usedBytesOnTiers = null; + this.removedBlockIds = null; + this.addedBlocksOnTiers = null; + } + + public long getWorkerId() { + return this.workerId; + } + + public workerHeartbeat_args setWorkerId(long workerId) { + this.workerId = workerId; + setWorkerIdIsSet(true); + return this; + } + + public void unsetWorkerId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WORKERID_ISSET_ID); + } + + /** Returns true if field workerId is set (has been assigned a value) and false otherwise */ + public boolean isSetWorkerId() { + return EncodingUtils.testBit(__isset_bitfield, __WORKERID_ISSET_ID); + } + + public void setWorkerIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WORKERID_ISSET_ID, value); + } + + public int getUsedBytesOnTiersSize() { + return (this.usedBytesOnTiers == null) ? 0 : this.usedBytesOnTiers.size(); + } - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getCapacityBytes_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); - } - } + public java.util.Iterator getUsedBytesOnTiersIterator() { + return (this.usedBytesOnTiers == null) ? null : this.usedBytesOnTiers.iterator(); + } - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getCapacityBytes_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } + public void addToUsedBytesOnTiers(long elem) { + if (this.usedBytesOnTiers == null) { + this.usedBytesOnTiers = new ArrayList(); } + this.usedBytesOnTiers.add(elem); } - } + public List getUsedBytesOnTiers() { + return this.usedBytesOnTiers; + } - public static class getUsedBytes_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("getUsedBytes_args"); + public workerHeartbeat_args setUsedBytesOnTiers(List usedBytesOnTiers) { + this.usedBytesOnTiers = usedBytesOnTiers; + return this; + } + public void unsetUsedBytesOnTiers() { + this.usedBytesOnTiers = null; + } - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getUsedBytes_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getUsedBytes_argsTupleSchemeFactory()); + /** Returns true if field usedBytesOnTiers is set (has been assigned a value) and false otherwise */ + public boolean isSetUsedBytesOnTiers() { + return this.usedBytesOnTiers != null; } + public void setUsedBytesOnTiersIsSet(boolean value) { + if (!value) { + this.usedBytesOnTiers = null; + } + } - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + public int getRemovedBlockIdsSize() { + return (this.removedBlockIds == null) ? 0 : this.removedBlockIds.size(); + } - private static final Map byName = new HashMap(); + public java.util.Iterator getRemovedBlockIdsIterator() { + return (this.removedBlockIds == null) ? null : this.removedBlockIds.iterator(); + } - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } + public void addToRemovedBlockIds(long elem) { + if (this.removedBlockIds == null) { + this.removedBlockIds = new ArrayList(); } + this.removedBlockIds.add(elem); + } - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } + public List getRemovedBlockIds() { + return this.removedBlockIds; + } - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } + public workerHeartbeat_args setRemovedBlockIds(List removedBlockIds) { + this.removedBlockIds = removedBlockIds; + return this; + } - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } + public void unsetRemovedBlockIds() { + this.removedBlockIds = null; + } - private final short _thriftId; - private final String _fieldName; + /** Returns true if field removedBlockIds is set (has been assigned a value) and false otherwise */ + public boolean isSetRemovedBlockIds() { + return this.removedBlockIds != null; + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; + public void setRemovedBlockIdsIsSet(boolean value) { + if (!value) { + this.removedBlockIds = null; } + } - public short getThriftFieldId() { - return _thriftId; - } + public int getAddedBlocksOnTiersSize() { + return (this.addedBlocksOnTiers == null) ? 0 : this.addedBlocksOnTiers.size(); + } - public String getFieldName() { - return _fieldName; + public void putToAddedBlocksOnTiers(long key, List val) { + if (this.addedBlocksOnTiers == null) { + this.addedBlocksOnTiers = new HashMap>(); } + this.addedBlocksOnTiers.put(key, val); } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUsedBytes_args.class, metaDataMap); + + public Map> getAddedBlocksOnTiers() { + return this.addedBlocksOnTiers; } - public getUsedBytes_args() { + public workerHeartbeat_args setAddedBlocksOnTiers(Map> addedBlocksOnTiers) { + this.addedBlocksOnTiers = addedBlocksOnTiers; + return this; } - /** - * Performs a deep copy on other. - */ - public getUsedBytes_args(getUsedBytes_args other) { + public void unsetAddedBlocksOnTiers() { + this.addedBlocksOnTiers = null; } - public getUsedBytes_args deepCopy() { - return new getUsedBytes_args(this); + /** Returns true if field addedBlocksOnTiers is set (has been assigned a value) and false otherwise */ + public boolean isSetAddedBlocksOnTiers() { + return this.addedBlocksOnTiers != null; } - @Override - public void clear() { + public void setAddedBlocksOnTiersIsSet(boolean value) { + if (!value) { + this.addedBlocksOnTiers = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { + case WORKER_ID: + if (value == null) { + unsetWorkerId(); + } else { + setWorkerId((Long)value); + } + break; + + case USED_BYTES_ON_TIERS: + if (value == null) { + unsetUsedBytesOnTiers(); + } else { + setUsedBytesOnTiers((List)value); + } + break; + + case REMOVED_BLOCK_IDS: + if (value == null) { + unsetRemovedBlockIds(); + } else { + setRemovedBlockIds((List)value); + } + break; + + case ADDED_BLOCKS_ON_TIERS: + if (value == null) { + unsetAddedBlocksOnTiers(); + } else { + setAddedBlocksOnTiers((Map>)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case WORKER_ID: + return Long.valueOf(getWorkerId()); + + case USED_BYTES_ON_TIERS: + return getUsedBytesOnTiers(); + + case REMOVED_BLOCK_IDS: + return getRemovedBlockIds(); + + case ADDED_BLOCKS_ON_TIERS: + return getAddedBlocksOnTiers(); + } throw new IllegalStateException(); } @@ -7048,6 +6177,14 @@ public boolean isSet(_Fields field) { } switch (field) { + case WORKER_ID: + return isSetWorkerId(); + case USED_BYTES_ON_TIERS: + return isSetUsedBytesOnTiers(); + case REMOVED_BLOCK_IDS: + return isSetRemovedBlockIds(); + case ADDED_BLOCKS_ON_TIERS: + return isSetAddedBlocksOnTiers(); } throw new IllegalStateException(); } @@ -7056,15 +6193,51 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getUsedBytes_args) - return this.equals((getUsedBytes_args)that); + if (that instanceof workerHeartbeat_args) + return this.equals((workerHeartbeat_args)that); return false; } - public boolean equals(getUsedBytes_args that) { + public boolean equals(workerHeartbeat_args that) { if (that == null) return false; + boolean this_present_workerId = true; + boolean that_present_workerId = true; + if (this_present_workerId || that_present_workerId) { + if (!(this_present_workerId && that_present_workerId)) + return false; + if (this.workerId != that.workerId) + return false; + } + + boolean this_present_usedBytesOnTiers = true && this.isSetUsedBytesOnTiers(); + boolean that_present_usedBytesOnTiers = true && that.isSetUsedBytesOnTiers(); + if (this_present_usedBytesOnTiers || that_present_usedBytesOnTiers) { + if (!(this_present_usedBytesOnTiers && that_present_usedBytesOnTiers)) + return false; + if (!this.usedBytesOnTiers.equals(that.usedBytesOnTiers)) + return false; + } + + boolean this_present_removedBlockIds = true && this.isSetRemovedBlockIds(); + boolean that_present_removedBlockIds = true && that.isSetRemovedBlockIds(); + if (this_present_removedBlockIds || that_present_removedBlockIds) { + if (!(this_present_removedBlockIds && that_present_removedBlockIds)) + return false; + if (!this.removedBlockIds.equals(that.removedBlockIds)) + return false; + } + + boolean this_present_addedBlocksOnTiers = true && this.isSetAddedBlocksOnTiers(); + boolean that_present_addedBlocksOnTiers = true && that.isSetAddedBlocksOnTiers(); + if (this_present_addedBlocksOnTiers || that_present_addedBlocksOnTiers) { + if (!(this_present_addedBlocksOnTiers && that_present_addedBlocksOnTiers)) + return false; + if (!this.addedBlocksOnTiers.equals(that.addedBlocksOnTiers)) + return false; + } + return true; } @@ -7072,17 +6245,77 @@ public boolean equals(getUsedBytes_args that) { public int hashCode() { List list = new ArrayList(); + boolean present_workerId = true; + list.add(present_workerId); + if (present_workerId) + list.add(workerId); + + boolean present_usedBytesOnTiers = true && (isSetUsedBytesOnTiers()); + list.add(present_usedBytesOnTiers); + if (present_usedBytesOnTiers) + list.add(usedBytesOnTiers); + + boolean present_removedBlockIds = true && (isSetRemovedBlockIds()); + list.add(present_removedBlockIds); + if (present_removedBlockIds) + list.add(removedBlockIds); + + boolean present_addedBlocksOnTiers = true && (isSetAddedBlocksOnTiers()); + list.add(present_addedBlocksOnTiers); + if (present_addedBlocksOnTiers) + list.add(addedBlocksOnTiers); + return list.hashCode(); } @Override - public int compareTo(getUsedBytes_args other) { + public int compareTo(workerHeartbeat_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetWorkerId()).compareTo(other.isSetWorkerId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetWorkerId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerId, other.workerId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUsedBytesOnTiers()).compareTo(other.isSetUsedBytesOnTiers()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUsedBytesOnTiers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.usedBytesOnTiers, other.usedBytesOnTiers); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRemovedBlockIds()).compareTo(other.isSetRemovedBlockIds()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRemovedBlockIds()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.removedBlockIds, other.removedBlockIds); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAddedBlocksOnTiers()).compareTo(other.isSetAddedBlocksOnTiers()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAddedBlocksOnTiers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addedBlocksOnTiers, other.addedBlocksOnTiers); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -7100,9 +6333,36 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getUsedBytes_args("); + StringBuilder sb = new StringBuilder("workerHeartbeat_args("); boolean first = true; + sb.append("workerId:"); + sb.append(this.workerId); + first = false; + if (!first) sb.append(", "); + sb.append("usedBytesOnTiers:"); + if (this.usedBytesOnTiers == null) { + sb.append("null"); + } else { + sb.append(this.usedBytesOnTiers); + } + first = false; + if (!first) sb.append(", "); + sb.append("removedBlockIds:"); + if (this.removedBlockIds == null) { + sb.append("null"); + } else { + sb.append(this.removedBlockIds); + } + first = false; + if (!first) sb.append(", "); + sb.append("addedBlocksOnTiers:"); + if (this.addedBlocksOnTiers == null) { + sb.append("null"); + } else { + sb.append(this.addedBlocksOnTiers); + } + first = false; sb.append(")"); return sb.toString(); } @@ -7122,21 +6382,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getUsedBytes_argsStandardSchemeFactory implements SchemeFactory { - public getUsedBytes_argsStandardScheme getScheme() { - return new getUsedBytes_argsStandardScheme(); + private static class workerHeartbeat_argsStandardSchemeFactory implements SchemeFactory { + public workerHeartbeat_argsStandardScheme getScheme() { + return new workerHeartbeat_argsStandardScheme(); } } - private static class getUsedBytes_argsStandardScheme extends StandardScheme { + private static class workerHeartbeat_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getUsedBytes_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerHeartbeat_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -7146,64 +6408,294 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getUsedBytes_args s break; } switch (schemeField.id) { + case 1: // WORKER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.workerId = iprot.readI64(); + struct.setWorkerIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // USED_BYTES_ON_TIERS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list112 = iprot.readListBegin(); + struct.usedBytesOnTiers = new ArrayList(_list112.size); + long _elem113; + for (int _i114 = 0; _i114 < _list112.size; ++_i114) + { + _elem113 = iprot.readI64(); + struct.usedBytesOnTiers.add(_elem113); + } + iprot.readListEnd(); + } + struct.setUsedBytesOnTiersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // REMOVED_BLOCK_IDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list115 = iprot.readListBegin(); + struct.removedBlockIds = new ArrayList(_list115.size); + long _elem116; + for (int _i117 = 0; _i117 < _list115.size; ++_i117) + { + _elem116 = iprot.readI64(); + struct.removedBlockIds.add(_elem116); + } + iprot.readListEnd(); + } + struct.setRemovedBlockIdsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ADDED_BLOCKS_ON_TIERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map118 = iprot.readMapBegin(); + struct.addedBlocksOnTiers = new HashMap>(2*_map118.size); + long _key119; + List _val120; + for (int _i121 = 0; _i121 < _map118.size; ++_i121) + { + _key119 = iprot.readI64(); + { + org.apache.thrift.protocol.TList _list122 = iprot.readListBegin(); + _val120 = new ArrayList(_list122.size); + long _elem123; + for (int _i124 = 0; _i124 < _list122.size; ++_i124) + { + _elem123 = iprot.readI64(); + _val120.add(_elem123); + } + iprot.readListEnd(); + } + struct.addedBlocksOnTiers.put(_key119, _val120); + } + iprot.readMapEnd(); + } + struct.setAddedBlocksOnTiersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } - iprot.readFieldEnd(); + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, workerHeartbeat_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(WORKER_ID_FIELD_DESC); + oprot.writeI64(struct.workerId); + oprot.writeFieldEnd(); + if (struct.usedBytesOnTiers != null) { + oprot.writeFieldBegin(USED_BYTES_ON_TIERS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.usedBytesOnTiers.size())); + for (long _iter125 : struct.usedBytesOnTiers) + { + oprot.writeI64(_iter125); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.removedBlockIds != null) { + oprot.writeFieldBegin(REMOVED_BLOCK_IDS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.removedBlockIds.size())); + for (long _iter126 : struct.removedBlockIds) + { + oprot.writeI64(_iter126); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.addedBlocksOnTiers != null) { + oprot.writeFieldBegin(ADDED_BLOCKS_ON_TIERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.LIST, struct.addedBlocksOnTiers.size())); + for (Map.Entry> _iter127 : struct.addedBlocksOnTiers.entrySet()) + { + oprot.writeI64(_iter127.getKey()); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, _iter127.getValue().size())); + for (long _iter128 : _iter127.getValue()) + { + oprot.writeI64(_iter128); + } + oprot.writeListEnd(); + } + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class workerHeartbeat_argsTupleSchemeFactory implements SchemeFactory { + public workerHeartbeat_argsTupleScheme getScheme() { + return new workerHeartbeat_argsTupleScheme(); + } + } + + private static class workerHeartbeat_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, workerHeartbeat_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetWorkerId()) { + optionals.set(0); + } + if (struct.isSetUsedBytesOnTiers()) { + optionals.set(1); + } + if (struct.isSetRemovedBlockIds()) { + optionals.set(2); + } + if (struct.isSetAddedBlocksOnTiers()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetWorkerId()) { + oprot.writeI64(struct.workerId); + } + if (struct.isSetUsedBytesOnTiers()) { + { + oprot.writeI32(struct.usedBytesOnTiers.size()); + for (long _iter129 : struct.usedBytesOnTiers) + { + oprot.writeI64(_iter129); + } + } + } + if (struct.isSetRemovedBlockIds()) { + { + oprot.writeI32(struct.removedBlockIds.size()); + for (long _iter130 : struct.removedBlockIds) + { + oprot.writeI64(_iter130); + } + } + } + if (struct.isSetAddedBlocksOnTiers()) { + { + oprot.writeI32(struct.addedBlocksOnTiers.size()); + for (Map.Entry> _iter131 : struct.addedBlocksOnTiers.entrySet()) + { + oprot.writeI64(_iter131.getKey()); + { + oprot.writeI32(_iter131.getValue().size()); + for (long _iter132 : _iter131.getValue()) + { + oprot.writeI64(_iter132); + } + } + } + } } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getUsedBytes_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getUsedBytes_argsTupleSchemeFactory implements SchemeFactory { - public getUsedBytes_argsTupleScheme getScheme() { - return new getUsedBytes_argsTupleScheme(); - } - } - - private static class getUsedBytes_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getUsedBytes_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getUsedBytes_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, workerHeartbeat_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.workerId = iprot.readI64(); + struct.setWorkerIdIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list133 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.usedBytesOnTiers = new ArrayList(_list133.size); + long _elem134; + for (int _i135 = 0; _i135 < _list133.size; ++_i135) + { + _elem134 = iprot.readI64(); + struct.usedBytesOnTiers.add(_elem134); + } + } + struct.setUsedBytesOnTiersIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list136 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.removedBlockIds = new ArrayList(_list136.size); + long _elem137; + for (int _i138 = 0; _i138 < _list136.size; ++_i138) + { + _elem137 = iprot.readI64(); + struct.removedBlockIds.add(_elem137); + } + } + struct.setRemovedBlockIdsIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map139 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.addedBlocksOnTiers = new HashMap>(2*_map139.size); + long _key140; + List _val141; + for (int _i142 = 0; _i142 < _map139.size; ++_i142) + { + _key140 = iprot.readI64(); + { + org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + _val141 = new ArrayList(_list143.size); + long _elem144; + for (int _i145 = 0; _i145 < _list143.size; ++_i145) + { + _elem144 = iprot.readI64(); + _val141.add(_elem144); + } + } + struct.addedBlocksOnTiers.put(_key140, _val141); + } + } + struct.setAddedBlocksOnTiersIsSet(true); + } } } } - public static class getUsedBytes_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("getUsedBytes_result"); + public static class workerHeartbeat_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("workerHeartbeat_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getUsedBytes_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getUsedBytes_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new workerHeartbeat_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerHeartbeat_resultTupleSchemeFactory()); } - public long success; // required + public Command success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -7220,6 +6712,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; + case 1: // E + return E; default: return null; } @@ -7260,67 +6754,97 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Command.class))); + 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(getUsedBytes_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerHeartbeat_result.class, metaDataMap); } - public getUsedBytes_result() { + public workerHeartbeat_result() { } - public getUsedBytes_result( - long success) + public workerHeartbeat_result( + Command success, + TachyonTException e) { this(); this.success = success; - setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public getUsedBytes_result(getUsedBytes_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; + public workerHeartbeat_result(workerHeartbeat_result other) { + if (other.isSetSuccess()) { + this.success = new Command(other.success); + } + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public getUsedBytes_result deepCopy() { - return new getUsedBytes_result(this); + public workerHeartbeat_result deepCopy() { + return new workerHeartbeat_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = 0; + this.success = null; + this.e = null; } - public long getSuccess() { + public Command getSuccess() { return this.success; } - public getUsedBytes_result setSuccess(long success) { + public workerHeartbeat_result setSuccess(Command success) { this.success = success; - setSuccessIsSet(true); return this; } public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + if (!value) { + this.success = null; + } + } + + public TachyonTException getE() { + return this.e; + } + + public workerHeartbeat_result setE(TachyonTException e) { + this.e = e; + return this; + } + + public void unsetE() { + this.e = null; + } + + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; + } + + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { @@ -7329,7 +6853,15 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((Long)value); + setSuccess((Command)value); + } + break; + + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); } break; @@ -7339,7 +6871,10 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return Long.valueOf(getSuccess()); + return getSuccess(); + + case E: + return getE(); } throw new IllegalStateException(); @@ -7354,6 +6889,8 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -7362,21 +6899,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getUsedBytes_result) - return this.equals((getUsedBytes_result)that); + if (that instanceof workerHeartbeat_result) + return this.equals((workerHeartbeat_result)that); return false; } - public boolean equals(getUsedBytes_result that) { + public boolean equals(workerHeartbeat_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (this.success != that.success) + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) return false; } @@ -7387,16 +6933,21 @@ public boolean equals(getUsedBytes_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; + boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); + return list.hashCode(); } @Override - public int compareTo(getUsedBytes_result other) { + public int compareTo(workerHeartbeat_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -7413,6 +6964,16 @@ public int compareTo(getUsedBytes_result other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -7430,11 +6991,23 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getUsedBytes_result("); + StringBuilder sb = new StringBuilder("workerHeartbeat_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -7443,6 +7016,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -7455,23 +7031,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getUsedBytes_resultStandardSchemeFactory implements SchemeFactory { - public getUsedBytes_resultStandardScheme getScheme() { - return new getUsedBytes_resultStandardScheme(); + private static class workerHeartbeat_resultStandardSchemeFactory implements SchemeFactory { + public workerHeartbeat_resultStandardScheme getScheme() { + return new workerHeartbeat_resultStandardScheme(); } } - private static class getUsedBytes_resultStandardScheme extends StandardScheme { + private static class workerHeartbeat_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getUsedBytes_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerHeartbeat_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -7482,13 +7056,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getUsedBytes_result } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Command(); + struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -7500,13 +7084,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getUsedBytes_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getUsedBytes_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, workerHeartbeat_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { + if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -7515,56 +7104,77 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getUsedBytes_resul } - private static class getUsedBytes_resultTupleSchemeFactory implements SchemeFactory { - public getUsedBytes_resultTupleScheme getScheme() { - return new getUsedBytes_resultTupleScheme(); + private static class workerHeartbeat_resultTupleSchemeFactory implements SchemeFactory { + public workerHeartbeat_resultTupleScheme getScheme() { + return new workerHeartbeat_resultTupleScheme(); } } - private static class getUsedBytes_resultTupleScheme extends TupleScheme { + private static class workerHeartbeat_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getUsedBytes_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, workerHeartbeat_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetE()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); + struct.success.write(oprot); + } + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getUsedBytes_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, workerHeartbeat_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readI64(); + struct.success = new Command(); + struct.success.read(iprot); struct.setSuccessIsSet(true); } + if (incoming.get(1)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } } } } - public static class getBlockInfo_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("getBlockInfo_args"); + public static class workerRegister_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("workerRegister_args"); - private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField WORKER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField TOTAL_BYTES_ON_TIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("totalBytesOnTiers", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField USED_BYTES_ON_TIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("usedBytesOnTiers", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField CURRENT_BLOCKS_ON_TIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("currentBlocksOnTiers", org.apache.thrift.protocol.TType.MAP, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getBlockInfo_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getBlockInfo_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new workerRegister_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerRegister_argsTupleSchemeFactory()); } - public long blockId; // required + public long workerId; // required + public List totalBytesOnTiers; // required + public List usedBytesOnTiers; // required + public Map> currentBlocksOnTiers; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - BLOCK_ID((short)1, "blockId"); + WORKER_ID((short)1, "workerId"), + TOTAL_BYTES_ON_TIERS((short)2, "totalBytesOnTiers"), + USED_BYTES_ON_TIERS((short)3, "usedBytesOnTiers"), + CURRENT_BLOCKS_ON_TIERS((short)4, "currentBlocksOnTiers"); private static final Map byName = new HashMap(); @@ -7579,8 +7189,14 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // BLOCK_ID - return BLOCK_ID; + case 1: // WORKER_ID + return WORKER_ID; + case 2: // TOTAL_BYTES_ON_TIERS + return TOTAL_BYTES_ON_TIERS; + case 3: // USED_BYTES_ON_TIERS + return USED_BYTES_ON_TIERS; + case 4: // CURRENT_BLOCKS_ON_TIERS + return CURRENT_BLOCKS_ON_TIERS; default: return null; } @@ -7621,76 +7237,256 @@ public String getFieldName() { } // isset id assignments - private static final int __BLOCKID_ISSET_ID = 0; + private static final int __WORKERID_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.WORKER_ID, new org.apache.thrift.meta_data.FieldMetaData("workerId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.TOTAL_BYTES_ON_TIERS, new org.apache.thrift.meta_data.FieldMetaData("totalBytesOnTiers", 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)))); + tmpMap.put(_Fields.USED_BYTES_ON_TIERS, new org.apache.thrift.meta_data.FieldMetaData("usedBytesOnTiers", 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)))); + tmpMap.put(_Fields.CURRENT_BLOCKS_ON_TIERS, new org.apache.thrift.meta_data.FieldMetaData("currentBlocksOnTiers", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), + 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(getBlockInfo_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerRegister_args.class, metaDataMap); } - public getBlockInfo_args() { + public workerRegister_args() { } - public getBlockInfo_args( - long blockId) + public workerRegister_args( + long workerId, + List totalBytesOnTiers, + List usedBytesOnTiers, + Map> currentBlocksOnTiers) { this(); - this.blockId = blockId; - setBlockIdIsSet(true); + this.workerId = workerId; + setWorkerIdIsSet(true); + this.totalBytesOnTiers = totalBytesOnTiers; + this.usedBytesOnTiers = usedBytesOnTiers; + this.currentBlocksOnTiers = currentBlocksOnTiers; } /** * Performs a deep copy on other. */ - public getBlockInfo_args(getBlockInfo_args other) { + public workerRegister_args(workerRegister_args other) { __isset_bitfield = other.__isset_bitfield; - this.blockId = other.blockId; + this.workerId = other.workerId; + if (other.isSetTotalBytesOnTiers()) { + List __this__totalBytesOnTiers = new ArrayList(other.totalBytesOnTiers); + this.totalBytesOnTiers = __this__totalBytesOnTiers; + } + if (other.isSetUsedBytesOnTiers()) { + List __this__usedBytesOnTiers = new ArrayList(other.usedBytesOnTiers); + this.usedBytesOnTiers = __this__usedBytesOnTiers; + } + if (other.isSetCurrentBlocksOnTiers()) { + Map> __this__currentBlocksOnTiers = new HashMap>(other.currentBlocksOnTiers.size()); + for (Map.Entry> other_element : other.currentBlocksOnTiers.entrySet()) { + + Long other_element_key = other_element.getKey(); + List other_element_value = other_element.getValue(); + + Long __this__currentBlocksOnTiers_copy_key = other_element_key; + + List __this__currentBlocksOnTiers_copy_value = new ArrayList(other_element_value); + + __this__currentBlocksOnTiers.put(__this__currentBlocksOnTiers_copy_key, __this__currentBlocksOnTiers_copy_value); + } + this.currentBlocksOnTiers = __this__currentBlocksOnTiers; + } } - public getBlockInfo_args deepCopy() { - return new getBlockInfo_args(this); + public workerRegister_args deepCopy() { + return new workerRegister_args(this); } @Override public void clear() { - setBlockIdIsSet(false); - this.blockId = 0; + setWorkerIdIsSet(false); + this.workerId = 0; + this.totalBytesOnTiers = null; + this.usedBytesOnTiers = null; + this.currentBlocksOnTiers = null; } - public long getBlockId() { - return this.blockId; + public long getWorkerId() { + return this.workerId; } - public getBlockInfo_args setBlockId(long blockId) { - this.blockId = blockId; - setBlockIdIsSet(true); + public workerRegister_args setWorkerId(long workerId) { + this.workerId = workerId; + setWorkerIdIsSet(true); return this; } - public void unsetBlockId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID); + public void unsetWorkerId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WORKERID_ISSET_ID); } - /** Returns true if field blockId is set (has been assigned a value) and false otherwise */ - public boolean isSetBlockId() { - return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID); + /** Returns true if field workerId is set (has been assigned a value) and false otherwise */ + public boolean isSetWorkerId() { + return EncodingUtils.testBit(__isset_bitfield, __WORKERID_ISSET_ID); } - public void setBlockIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value); + public void setWorkerIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WORKERID_ISSET_ID, value); + } + + public int getTotalBytesOnTiersSize() { + return (this.totalBytesOnTiers == null) ? 0 : this.totalBytesOnTiers.size(); + } + + public java.util.Iterator getTotalBytesOnTiersIterator() { + return (this.totalBytesOnTiers == null) ? null : this.totalBytesOnTiers.iterator(); + } + + public void addToTotalBytesOnTiers(long elem) { + if (this.totalBytesOnTiers == null) { + this.totalBytesOnTiers = new ArrayList(); + } + this.totalBytesOnTiers.add(elem); + } + + public List getTotalBytesOnTiers() { + return this.totalBytesOnTiers; + } + + public workerRegister_args setTotalBytesOnTiers(List totalBytesOnTiers) { + this.totalBytesOnTiers = totalBytesOnTiers; + return this; + } + + public void unsetTotalBytesOnTiers() { + this.totalBytesOnTiers = null; + } + + /** Returns true if field totalBytesOnTiers is set (has been assigned a value) and false otherwise */ + public boolean isSetTotalBytesOnTiers() { + return this.totalBytesOnTiers != null; + } + + public void setTotalBytesOnTiersIsSet(boolean value) { + if (!value) { + this.totalBytesOnTiers = null; + } + } + + public int getUsedBytesOnTiersSize() { + return (this.usedBytesOnTiers == null) ? 0 : this.usedBytesOnTiers.size(); + } + + public java.util.Iterator getUsedBytesOnTiersIterator() { + return (this.usedBytesOnTiers == null) ? null : this.usedBytesOnTiers.iterator(); + } + + public void addToUsedBytesOnTiers(long elem) { + if (this.usedBytesOnTiers == null) { + this.usedBytesOnTiers = new ArrayList(); + } + this.usedBytesOnTiers.add(elem); + } + + public List getUsedBytesOnTiers() { + return this.usedBytesOnTiers; + } + + public workerRegister_args setUsedBytesOnTiers(List usedBytesOnTiers) { + this.usedBytesOnTiers = usedBytesOnTiers; + return this; + } + + public void unsetUsedBytesOnTiers() { + this.usedBytesOnTiers = null; + } + + /** Returns true if field usedBytesOnTiers is set (has been assigned a value) and false otherwise */ + public boolean isSetUsedBytesOnTiers() { + return this.usedBytesOnTiers != null; + } + + public void setUsedBytesOnTiersIsSet(boolean value) { + if (!value) { + this.usedBytesOnTiers = null; + } + } + + public int getCurrentBlocksOnTiersSize() { + return (this.currentBlocksOnTiers == null) ? 0 : this.currentBlocksOnTiers.size(); + } + + public void putToCurrentBlocksOnTiers(long key, List val) { + if (this.currentBlocksOnTiers == null) { + this.currentBlocksOnTiers = new HashMap>(); + } + this.currentBlocksOnTiers.put(key, val); + } + + public Map> getCurrentBlocksOnTiers() { + return this.currentBlocksOnTiers; + } + + public workerRegister_args setCurrentBlocksOnTiers(Map> currentBlocksOnTiers) { + this.currentBlocksOnTiers = currentBlocksOnTiers; + return this; + } + + public void unsetCurrentBlocksOnTiers() { + this.currentBlocksOnTiers = null; + } + + /** Returns true if field currentBlocksOnTiers is set (has been assigned a value) and false otherwise */ + public boolean isSetCurrentBlocksOnTiers() { + return this.currentBlocksOnTiers != null; + } + + public void setCurrentBlocksOnTiersIsSet(boolean value) { + if (!value) { + this.currentBlocksOnTiers = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case BLOCK_ID: + case WORKER_ID: + if (value == null) { + unsetWorkerId(); + } else { + setWorkerId((Long)value); + } + break; + + case TOTAL_BYTES_ON_TIERS: + if (value == null) { + unsetTotalBytesOnTiers(); + } else { + setTotalBytesOnTiers((List)value); + } + break; + + case USED_BYTES_ON_TIERS: + if (value == null) { + unsetUsedBytesOnTiers(); + } else { + setUsedBytesOnTiers((List)value); + } + break; + + case CURRENT_BLOCKS_ON_TIERS: if (value == null) { - unsetBlockId(); + unsetCurrentBlocksOnTiers(); } else { - setBlockId((Long)value); + setCurrentBlocksOnTiers((Map>)value); } break; @@ -7699,8 +7495,17 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case BLOCK_ID: - return Long.valueOf(getBlockId()); + case WORKER_ID: + return Long.valueOf(getWorkerId()); + + case TOTAL_BYTES_ON_TIERS: + return getTotalBytesOnTiers(); + + case USED_BYTES_ON_TIERS: + return getUsedBytesOnTiers(); + + case CURRENT_BLOCKS_ON_TIERS: + return getCurrentBlocksOnTiers(); } throw new IllegalStateException(); @@ -7713,8 +7518,14 @@ public boolean isSet(_Fields field) { } switch (field) { - case BLOCK_ID: - return isSetBlockId(); + case WORKER_ID: + return isSetWorkerId(); + case TOTAL_BYTES_ON_TIERS: + return isSetTotalBytesOnTiers(); + case USED_BYTES_ON_TIERS: + return isSetUsedBytesOnTiers(); + case CURRENT_BLOCKS_ON_TIERS: + return isSetCurrentBlocksOnTiers(); } throw new IllegalStateException(); } @@ -7723,21 +7534,48 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getBlockInfo_args) - return this.equals((getBlockInfo_args)that); + if (that instanceof workerRegister_args) + return this.equals((workerRegister_args)that); return false; } - public boolean equals(getBlockInfo_args that) { + public boolean equals(workerRegister_args that) { if (that == null) return false; - boolean this_present_blockId = true; - boolean that_present_blockId = true; - if (this_present_blockId || that_present_blockId) { - if (!(this_present_blockId && that_present_blockId)) + boolean this_present_workerId = true; + boolean that_present_workerId = true; + if (this_present_workerId || that_present_workerId) { + if (!(this_present_workerId && that_present_workerId)) return false; - if (this.blockId != that.blockId) + if (this.workerId != that.workerId) + return false; + } + + boolean this_present_totalBytesOnTiers = true && this.isSetTotalBytesOnTiers(); + boolean that_present_totalBytesOnTiers = true && that.isSetTotalBytesOnTiers(); + if (this_present_totalBytesOnTiers || that_present_totalBytesOnTiers) { + if (!(this_present_totalBytesOnTiers && that_present_totalBytesOnTiers)) + return false; + if (!this.totalBytesOnTiers.equals(that.totalBytesOnTiers)) + return false; + } + + boolean this_present_usedBytesOnTiers = true && this.isSetUsedBytesOnTiers(); + boolean that_present_usedBytesOnTiers = true && that.isSetUsedBytesOnTiers(); + if (this_present_usedBytesOnTiers || that_present_usedBytesOnTiers) { + if (!(this_present_usedBytesOnTiers && that_present_usedBytesOnTiers)) + return false; + if (!this.usedBytesOnTiers.equals(that.usedBytesOnTiers)) + return false; + } + + boolean this_present_currentBlocksOnTiers = true && this.isSetCurrentBlocksOnTiers(); + boolean that_present_currentBlocksOnTiers = true && that.isSetCurrentBlocksOnTiers(); + if (this_present_currentBlocksOnTiers || that_present_currentBlocksOnTiers) { + if (!(this_present_currentBlocksOnTiers && that_present_currentBlocksOnTiers)) + return false; + if (!this.currentBlocksOnTiers.equals(that.currentBlocksOnTiers)) return false; } @@ -7748,28 +7586,73 @@ public boolean equals(getBlockInfo_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_blockId = true; - list.add(present_blockId); - if (present_blockId) - list.add(blockId); + boolean present_workerId = true; + list.add(present_workerId); + if (present_workerId) + list.add(workerId); + + boolean present_totalBytesOnTiers = true && (isSetTotalBytesOnTiers()); + list.add(present_totalBytesOnTiers); + if (present_totalBytesOnTiers) + list.add(totalBytesOnTiers); + + boolean present_usedBytesOnTiers = true && (isSetUsedBytesOnTiers()); + list.add(present_usedBytesOnTiers); + if (present_usedBytesOnTiers) + list.add(usedBytesOnTiers); + + boolean present_currentBlocksOnTiers = true && (isSetCurrentBlocksOnTiers()); + list.add(present_currentBlocksOnTiers); + if (present_currentBlocksOnTiers) + list.add(currentBlocksOnTiers); return list.hashCode(); } @Override - public int compareTo(getBlockInfo_args other) { + public int compareTo(workerRegister_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(other.isSetBlockId()); + lastComparison = Boolean.valueOf(isSetWorkerId()).compareTo(other.isSetWorkerId()); if (lastComparison != 0) { return lastComparison; } - if (isSetBlockId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, other.blockId); + if (isSetWorkerId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerId, other.workerId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTotalBytesOnTiers()).compareTo(other.isSetTotalBytesOnTiers()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTotalBytesOnTiers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalBytesOnTiers, other.totalBytesOnTiers); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUsedBytesOnTiers()).compareTo(other.isSetUsedBytesOnTiers()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUsedBytesOnTiers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.usedBytesOnTiers, other.usedBytesOnTiers); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCurrentBlocksOnTiers()).compareTo(other.isSetCurrentBlocksOnTiers()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCurrentBlocksOnTiers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.currentBlocksOnTiers, other.currentBlocksOnTiers); if (lastComparison != 0) { return lastComparison; } @@ -7791,11 +7674,35 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getBlockInfo_args("); + StringBuilder sb = new StringBuilder("workerRegister_args("); boolean first = true; - sb.append("blockId:"); - sb.append(this.blockId); + sb.append("workerId:"); + sb.append(this.workerId); + first = false; + if (!first) sb.append(", "); + sb.append("totalBytesOnTiers:"); + if (this.totalBytesOnTiers == null) { + sb.append("null"); + } else { + sb.append(this.totalBytesOnTiers); + } + first = false; + if (!first) sb.append(", "); + sb.append("usedBytesOnTiers:"); + if (this.usedBytesOnTiers == null) { + sb.append("null"); + } else { + sb.append(this.usedBytesOnTiers); + } + first = false; + if (!first) sb.append(", "); + sb.append("currentBlocksOnTiers:"); + if (this.currentBlocksOnTiers == null) { + sb.append("null"); + } else { + sb.append(this.currentBlocksOnTiers); + } first = false; sb.append(")"); return sb.toString(); @@ -7824,15 +7731,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getBlockInfo_argsStandardSchemeFactory implements SchemeFactory { - public getBlockInfo_argsStandardScheme getScheme() { - return new getBlockInfo_argsStandardScheme(); + private static class workerRegister_argsStandardSchemeFactory implements SchemeFactory { + public workerRegister_argsStandardScheme getScheme() { + return new workerRegister_argsStandardScheme(); } } - private static class getBlockInfo_argsStandardScheme extends StandardScheme { + private static class workerRegister_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getBlockInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerRegister_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -7842,10 +7749,76 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getBlockInfo_args s break; } switch (schemeField.id) { - case 1: // BLOCK_ID + case 1: // WORKER_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.blockId = iprot.readI64(); - struct.setBlockIdIsSet(true); + struct.workerId = iprot.readI64(); + struct.setWorkerIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TOTAL_BYTES_ON_TIERS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list146 = iprot.readListBegin(); + struct.totalBytesOnTiers = new ArrayList(_list146.size); + long _elem147; + for (int _i148 = 0; _i148 < _list146.size; ++_i148) + { + _elem147 = iprot.readI64(); + struct.totalBytesOnTiers.add(_elem147); + } + iprot.readListEnd(); + } + struct.setTotalBytesOnTiersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // USED_BYTES_ON_TIERS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list149 = iprot.readListBegin(); + struct.usedBytesOnTiers = new ArrayList(_list149.size); + long _elem150; + for (int _i151 = 0; _i151 < _list149.size; ++_i151) + { + _elem150 = iprot.readI64(); + struct.usedBytesOnTiers.add(_elem150); + } + iprot.readListEnd(); + } + struct.setUsedBytesOnTiersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // CURRENT_BLOCKS_ON_TIERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map152 = iprot.readMapBegin(); + struct.currentBlocksOnTiers = new HashMap>(2*_map152.size); + long _key153; + List _val154; + for (int _i155 = 0; _i155 < _map152.size; ++_i155) + { + _key153 = iprot.readI64(); + { + org.apache.thrift.protocol.TList _list156 = iprot.readListBegin(); + _val154 = new ArrayList(_list156.size); + long _elem157; + for (int _i158 = 0; _i158 < _list156.size; ++_i158) + { + _elem157 = iprot.readI64(); + _val154.add(_elem157); + } + iprot.readListEnd(); + } + struct.currentBlocksOnTiers.put(_key153, _val154); + } + iprot.readMapEnd(); + } + struct.setCurrentBlocksOnTiersIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -7861,72 +7834,206 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getBlockInfo_args s struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getBlockInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, workerRegister_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC); - oprot.writeI64(struct.blockId); + oprot.writeFieldBegin(WORKER_ID_FIELD_DESC); + oprot.writeI64(struct.workerId); oprot.writeFieldEnd(); + if (struct.totalBytesOnTiers != null) { + oprot.writeFieldBegin(TOTAL_BYTES_ON_TIERS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.totalBytesOnTiers.size())); + for (long _iter159 : struct.totalBytesOnTiers) + { + oprot.writeI64(_iter159); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.usedBytesOnTiers != null) { + oprot.writeFieldBegin(USED_BYTES_ON_TIERS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.usedBytesOnTiers.size())); + for (long _iter160 : struct.usedBytesOnTiers) + { + oprot.writeI64(_iter160); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.currentBlocksOnTiers != null) { + oprot.writeFieldBegin(CURRENT_BLOCKS_ON_TIERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.LIST, struct.currentBlocksOnTiers.size())); + for (Map.Entry> _iter161 : struct.currentBlocksOnTiers.entrySet()) + { + oprot.writeI64(_iter161.getKey()); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, _iter161.getValue().size())); + for (long _iter162 : _iter161.getValue()) + { + oprot.writeI64(_iter162); + } + oprot.writeListEnd(); + } + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getBlockInfo_argsTupleSchemeFactory implements SchemeFactory { - public getBlockInfo_argsTupleScheme getScheme() { - return new getBlockInfo_argsTupleScheme(); + private static class workerRegister_argsTupleSchemeFactory implements SchemeFactory { + public workerRegister_argsTupleScheme getScheme() { + return new workerRegister_argsTupleScheme(); } } - private static class getBlockInfo_argsTupleScheme extends TupleScheme { + private static class workerRegister_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getBlockInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, workerRegister_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetBlockId()) { + if (struct.isSetWorkerId()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetBlockId()) { - oprot.writeI64(struct.blockId); + if (struct.isSetTotalBytesOnTiers()) { + optionals.set(1); + } + if (struct.isSetUsedBytesOnTiers()) { + optionals.set(2); + } + if (struct.isSetCurrentBlocksOnTiers()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetWorkerId()) { + oprot.writeI64(struct.workerId); + } + if (struct.isSetTotalBytesOnTiers()) { + { + oprot.writeI32(struct.totalBytesOnTiers.size()); + for (long _iter163 : struct.totalBytesOnTiers) + { + oprot.writeI64(_iter163); + } + } + } + if (struct.isSetUsedBytesOnTiers()) { + { + oprot.writeI32(struct.usedBytesOnTiers.size()); + for (long _iter164 : struct.usedBytesOnTiers) + { + oprot.writeI64(_iter164); + } + } + } + if (struct.isSetCurrentBlocksOnTiers()) { + { + oprot.writeI32(struct.currentBlocksOnTiers.size()); + for (Map.Entry> _iter165 : struct.currentBlocksOnTiers.entrySet()) + { + oprot.writeI64(_iter165.getKey()); + { + oprot.writeI32(_iter165.getValue().size()); + for (long _iter166 : _iter165.getValue()) + { + oprot.writeI64(_iter166); + } + } + } + } } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getBlockInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, workerRegister_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { - struct.blockId = iprot.readI64(); - struct.setBlockIdIsSet(true); + struct.workerId = iprot.readI64(); + struct.setWorkerIdIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list167 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.totalBytesOnTiers = new ArrayList(_list167.size); + long _elem168; + for (int _i169 = 0; _i169 < _list167.size; ++_i169) + { + _elem168 = iprot.readI64(); + struct.totalBytesOnTiers.add(_elem168); + } + } + struct.setTotalBytesOnTiersIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list170 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.usedBytesOnTiers = new ArrayList(_list170.size); + long _elem171; + for (int _i172 = 0; _i172 < _list170.size; ++_i172) + { + _elem171 = iprot.readI64(); + struct.usedBytesOnTiers.add(_elem171); + } + } + struct.setUsedBytesOnTiersIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map173 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.currentBlocksOnTiers = new HashMap>(2*_map173.size); + long _key174; + List _val175; + for (int _i176 = 0; _i176 < _map173.size; ++_i176) + { + _key174 = iprot.readI64(); + { + org.apache.thrift.protocol.TList _list177 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + _val175 = new ArrayList(_list177.size); + long _elem178; + for (int _i179 = 0; _i179 < _list177.size; ++_i179) + { + _elem178 = iprot.readI64(); + _val175.add(_elem178); + } + } + struct.currentBlocksOnTiers.put(_key174, _val175); + } + } + struct.setCurrentBlocksOnTiersIsSet(true); } } } } - public static class getBlockInfo_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("getBlockInfo_result"); + public static class workerRegister_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("workerRegister_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField BIE_FIELD_DESC = new org.apache.thrift.protocol.TField("bie", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getBlockInfo_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getBlockInfo_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new workerRegister_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerRegister_resultTupleSchemeFactory()); } - public BlockInfo success; // required - public BlockInfoException bie; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - BIE((short)1, "bie"); + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -7941,10 +8048,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // BIE - return BIE; + case 1: // E + return E; default: return null; } @@ -7988,111 +8093,71 @@ 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, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BlockInfo.class))); - tmpMap.put(_Fields.BIE, new org.apache.thrift.meta_data.FieldMetaData("bie", 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(getBlockInfo_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerRegister_result.class, metaDataMap); } - public getBlockInfo_result() { + public workerRegister_result() { } - public getBlockInfo_result( - BlockInfo success, - BlockInfoException bie) + public workerRegister_result( + TachyonTException e) { this(); - this.success = success; - this.bie = bie; + this.e = e; } /** * Performs a deep copy on other. */ - public getBlockInfo_result(getBlockInfo_result other) { - if (other.isSetSuccess()) { - this.success = new BlockInfo(other.success); - } - if (other.isSetBie()) { - this.bie = new BlockInfoException(other.bie); + public workerRegister_result(workerRegister_result other) { + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public getBlockInfo_result deepCopy() { - return new getBlockInfo_result(this); + public workerRegister_result deepCopy() { + return new workerRegister_result(this); } @Override public void clear() { - this.success = null; - this.bie = null; - } - - public BlockInfo getSuccess() { - return this.success; - } - - public getBlockInfo_result setSuccess(BlockInfo success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + this.e = null; } - public BlockInfoException getBie() { - return this.bie; + public TachyonTException getE() { + return this.e; } - public getBlockInfo_result setBie(BlockInfoException bie) { - this.bie = bie; + public workerRegister_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetBie() { - this.bie = null; + public void unsetE() { + this.e = null; } - /** Returns true if field bie is set (has been assigned a value) and false otherwise */ - public boolean isSetBie() { - return this.bie != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setBieIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.bie = null; + this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((BlockInfo)value); - } - break; - - case BIE: + case E: if (value == null) { - unsetBie(); + unsetE(); } else { - setBie((BlockInfoException)value); + setE((TachyonTException)value); } break; @@ -8101,11 +8166,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case BIE: - return getBie(); + case E: + return getE(); } throw new IllegalStateException(); @@ -8118,10 +8180,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case BIE: - return isSetBie(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -8130,30 +8190,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getBlockInfo_result) - return this.equals((getBlockInfo_result)that); + if (that instanceof workerRegister_result) + return this.equals((workerRegister_result)that); return false; } - public boolean equals(getBlockInfo_result that) { + public boolean equals(workerRegister_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_bie = true && this.isSetBie(); - boolean that_present_bie = true && that.isSetBie(); - if (this_present_bie || that_present_bie) { - if (!(this_present_bie && that_present_bie)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.bie.equals(that.bie)) + if (!this.e.equals(that.e)) return false; } @@ -8164,43 +8215,28 @@ public boolean equals(getBlockInfo_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_bie = true && (isSetBie()); - list.add(present_bie); - if (present_bie) - list.add(bie); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(getBlockInfo_result other) { + public int compareTo(workerRegister_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBie()).compareTo(other.isSetBie()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetBie()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bie, other.bie); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -8222,22 +8258,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getBlockInfo_result("); + StringBuilder sb = new StringBuilder("workerRegister_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("bie:"); - if (this.bie == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.bie); + sb.append(this.e); } first = false; sb.append(")"); @@ -8247,9 +8275,6 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -8268,15 +8293,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getBlockInfo_resultStandardSchemeFactory implements SchemeFactory { - public getBlockInfo_resultStandardScheme getScheme() { - return new getBlockInfo_resultStandardScheme(); + private static class workerRegister_resultStandardSchemeFactory implements SchemeFactory { + public workerRegister_resultStandardScheme getScheme() { + return new workerRegister_resultStandardScheme(); } } - private static class getBlockInfo_resultStandardScheme extends StandardScheme { + private static class workerRegister_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getBlockInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerRegister_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -8286,20 +8311,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getBlockInfo_result break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new BlockInfo(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // BIE + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -8315,18 +8331,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getBlockInfo_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getBlockInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, workerRegister_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.bie != null) { - oprot.writeFieldBegin(BIE_FIELD_DESC); - struct.bie.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -8335,46 +8346,35 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getBlockInfo_resul } - private static class getBlockInfo_resultTupleSchemeFactory implements SchemeFactory { - public getBlockInfo_resultTupleScheme getScheme() { - return new getBlockInfo_resultTupleScheme(); + private static class workerRegister_resultTupleSchemeFactory implements SchemeFactory { + public workerRegister_resultTupleScheme getScheme() { + return new workerRegister_resultTupleScheme(); } } - private static class getBlockInfo_resultTupleScheme extends TupleScheme { + private static class workerRegister_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getBlockInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, workerRegister_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetE()) { optionals.set(0); } - if (struct.isSetBie()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetBie()) { - struct.bie.write(oprot); + oprot.writeBitSet(optionals, 1); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getBlockInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, workerRegister_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new BlockInfo(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } diff --git a/common/src/main/java/tachyon/thrift/CheckpointFile.java b/common/src/main/java/tachyon/thrift/CheckpointFile.java index 8ba75107a32b..e34e99b75761 100644 --- a/common/src/main/java/tachyon/thrift/CheckpointFile.java +++ b/common/src/main/java/tachyon/thrift/CheckpointFile.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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") public class CheckpointFile 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("CheckpointFile"); diff --git a/common/src/main/java/tachyon/thrift/Command.java b/common/src/main/java/tachyon/thrift/Command.java index b6e95f699142..73206ef0757c 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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") 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/CommandLineJobInfo.java b/common/src/main/java/tachyon/thrift/CommandLineJobInfo.java index 796703efe51a..f2bc9911c576 100644 --- a/common/src/main/java/tachyon/thrift/CommandLineJobInfo.java +++ b/common/src/main/java/tachyon/thrift/CommandLineJobInfo.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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") public class CommandLineJobInfo 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("CommandLineJobInfo"); diff --git a/common/src/main/java/tachyon/thrift/DependencyInfo.java b/common/src/main/java/tachyon/thrift/DependencyInfo.java index 90a15c766653..0850fa502cae 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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") 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/FileBlockInfo.java b/common/src/main/java/tachyon/thrift/FileBlockInfo.java index 1b4f20d0ba75..9f80a20a2f36 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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") 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/FileInfo.java b/common/src/main/java/tachyon/thrift/FileInfo.java index 8867648b2d09..6fb509df1eb5 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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") 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 b549e7f8a3ff..fd41ed9c71fe 100644 --- a/common/src/main/java/tachyon/thrift/FileSystemMasterService.java +++ b/common/src/main/java/tachyon/thrift/FileSystemMasterService.java @@ -34,44 +34,38 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") public class FileSystemMasterService { public interface Iface { - public Set workerGetPinIdList() throws org.apache.thrift.TException; - - public List workerGetPriorityDependencyList() throws org.apache.thrift.TException; - - public long getFileId(String path) throws InvalidPathException, org.apache.thrift.TException; + public void completeFile(long fileId) throws TachyonTException, org.apache.thrift.TException; - public FileInfo getFileInfo(long fileId) throws FileDoesNotExistException, org.apache.thrift.TException; + public int createDependency(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte) throws TachyonTException, org.apache.thrift.TException; - public List getFileInfoList(long fileId) throws FileDoesNotExistException, org.apache.thrift.TException; + public boolean createDirectory(String path, boolean recursive) throws TachyonTException, org.apache.thrift.TException; - public FileBlockInfo getFileBlockInfo(long fileId, int fileBlockIndex) throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException; + public long createFile(String path, long blockSizeBytes, boolean recursive, long ttl) throws TachyonTException, org.apache.thrift.TException; - public List getFileBlockInfoList(long fileId) throws FileDoesNotExistException, org.apache.thrift.TException; + public boolean deleteFile(long fileId, boolean recursive) throws TachyonTException, org.apache.thrift.TException; - public long getNewBlockIdForFile(long fileId) throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException; + public boolean free(long fileId, boolean recursive) throws TachyonTException, org.apache.thrift.TException; - public String getUfsAddress() throws org.apache.thrift.TException; - - public long createFile(String path, long blockSizeBytes, boolean recursive, long ttl) throws FileAlreadyExistException, BlockInfoException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException; + public DependencyInfo getDependencyInfo(int dependencyId) throws TachyonTException, org.apache.thrift.TException; - public void completeFile(long fileId) throws BlockInfoException, FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException; + public FileBlockInfo getFileBlockInfo(long fileId, int fileBlockIndex) throws TachyonTException, org.apache.thrift.TException; - public boolean deleteFile(long fileId, boolean recursive) throws TachyonException, org.apache.thrift.TException; + public List getFileBlockInfoList(long fileId) throws TachyonTException, org.apache.thrift.TException; - public boolean renameFile(long fileId, String dstPath) throws FileAlreadyExistException, FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException; + public long getFileId(String path) throws TachyonTException, org.apache.thrift.TException; - public void setPinned(long fileId, boolean pinned) throws FileDoesNotExistException, org.apache.thrift.TException; + public FileInfo getFileInfo(long fileId) throws TachyonTException, org.apache.thrift.TException; - public boolean createDirectory(String path, boolean recursive) throws FileAlreadyExistException, InvalidPathException, org.apache.thrift.TException; + public List getFileInfoList(long fileId) throws TachyonTException, org.apache.thrift.TException; - public boolean free(long fileId, boolean recursive) throws FileDoesNotExistException, org.apache.thrift.TException; + public long getNewBlockIdForFile(long fileId) throws TachyonTException, org.apache.thrift.TException; - public boolean persistFile(long fileId, long length) throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException; + public String getUfsAddress() throws org.apache.thrift.TException; /** * Loads metadata for the file identified by the given Tachyon path from UFS into Tachyon. @@ -79,7 +73,7 @@ public interface Iface { * @param ufsPath * @param recursive */ - public long loadFileInfoFromUfs(String ufsPath, boolean recursive) throws BlockInfoException, FileDoesNotExistException, FileAlreadyExistException, InvalidPathException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException; + public long loadFileInfoFromUfs(String ufsPath, boolean recursive) throws TachyonTException, org.apache.thrift.TException; /** * Creates a new "mount point", mounts the given UFS path in the Tachyon namespace at the given @@ -88,7 +82,17 @@ public interface Iface { * @param tachyonPath * @param ufsPath */ - public boolean mount(String tachyonPath, String ufsPath) throws TachyonException, org.apache.thrift.TException; + public boolean mount(String tachyonPath, String ufsPath) throws TachyonTException, ThriftIOException, org.apache.thrift.TException; + + public boolean persistFile(long fileId, long length) throws TachyonTException, org.apache.thrift.TException; + + public boolean renameFile(long fileId, String dstPath) throws TachyonTException, org.apache.thrift.TException; + + public void reportLostFile(long fileId) throws TachyonTException, org.apache.thrift.TException; + + public void requestFilesInDependency(int depId) throws TachyonTException, org.apache.thrift.TException; + + public void setPinned(long fileId, boolean pinned) throws TachyonTException, org.apache.thrift.TException; /** * Deletes an existing "mount point", voiding the Tachyon namespace at the given path. The path @@ -97,67 +101,63 @@ public interface Iface { * * @param tachyonPath */ - public boolean unmount(String tachyonPath) throws TachyonException, org.apache.thrift.TException; + public boolean unmount(String tachyonPath) throws TachyonTException, ThriftIOException, org.apache.thrift.TException; - public int createDependency(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte) throws InvalidPathException, FileDoesNotExistException, FileAlreadyExistException, BlockInfoException, TachyonException, org.apache.thrift.TException; - - public DependencyInfo getDependencyInfo(int dependencyId) throws DependencyDoesNotExistException, org.apache.thrift.TException; - - public void reportLostFile(long fileId) throws FileDoesNotExistException, org.apache.thrift.TException; + public Set workerGetPinIdList() throws org.apache.thrift.TException; - public void requestFilesInDependency(int depId) throws DependencyDoesNotExistException, org.apache.thrift.TException; + public List workerGetPriorityDependencyList() throws org.apache.thrift.TException; } public interface AsyncIface { - public void workerGetPinIdList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void completeFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void workerGetPriorityDependencyList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void createDependency(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getFileId(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void createDirectory(String path, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getFileInfo(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void createFile(String path, long blockSizeBytes, boolean recursive, long ttl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getFileInfoList(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void deleteFile(long fileId, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getFileBlockInfo(long fileId, int fileBlockIndex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void free(long fileId, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getFileBlockInfoList(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getDependencyInfo(int dependencyId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getNewBlockIdForFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getFileBlockInfo(long fileId, int fileBlockIndex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getUfsAddress(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getFileBlockInfoList(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void createFile(String path, long blockSizeBytes, boolean recursive, long ttl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getFileId(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void completeFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getFileInfo(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void deleteFile(long fileId, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getFileInfoList(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void renameFile(long fileId, String dstPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getNewBlockIdForFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void setPinned(long fileId, boolean pinned, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getUfsAddress(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void createDirectory(String path, boolean recursive, 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; - public void free(long fileId, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void mount(String tachyonPath, String ufsPath, 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; + public void renameFile(long fileId, String dstPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void mount(String tachyonPath, String ufsPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void reportLostFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void unmount(String tachyonPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void requestFilesInDependency(int depId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void createDependency(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void setPinned(long fileId, boolean pinned, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getDependencyInfo(int dependencyId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void unmount(String tachyonPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void reportLostFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void workerGetPinIdList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void requestFilesInDependency(int depId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void workerGetPriorityDependencyList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } @@ -181,129 +181,200 @@ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.prot super(iprot, oprot); } - public Set workerGetPinIdList() throws org.apache.thrift.TException + public void completeFile(long fileId) throws TachyonTException, org.apache.thrift.TException { - send_workerGetPinIdList(); - return recv_workerGetPinIdList(); + send_completeFile(fileId); + recv_completeFile(); } - public void send_workerGetPinIdList() throws org.apache.thrift.TException + public void send_completeFile(long fileId) throws org.apache.thrift.TException { - workerGetPinIdList_args args = new workerGetPinIdList_args(); - sendBase("workerGetPinIdList", args); + completeFile_args args = new completeFile_args(); + args.setFileId(fileId); + sendBase("completeFile", args); } - public Set recv_workerGetPinIdList() throws org.apache.thrift.TException + public void recv_completeFile() throws TachyonTException, org.apache.thrift.TException { - workerGetPinIdList_result result = new workerGetPinIdList_result(); - receiveBase(result, "workerGetPinIdList"); + completeFile_result result = new completeFile_result(); + receiveBase(result, "completeFile"); + if (result.e != null) { + throw result.e; + } + return; + } + + public int createDependency(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte) throws TachyonTException, org.apache.thrift.TException + { + send_createDependency(parents, children, commandPrefix, data, comment, framework, frameworkVersion, dependencyType, childrenBlockSizeByte); + return recv_createDependency(); + } + + public void send_createDependency(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte) throws org.apache.thrift.TException + { + createDependency_args args = new createDependency_args(); + args.setParents(parents); + args.setChildren(children); + args.setCommandPrefix(commandPrefix); + args.setData(data); + args.setComment(comment); + args.setFramework(framework); + args.setFrameworkVersion(frameworkVersion); + args.setDependencyType(dependencyType); + args.setChildrenBlockSizeByte(childrenBlockSizeByte); + sendBase("createDependency", args); + } + + public int recv_createDependency() throws TachyonTException, org.apache.thrift.TException + { + createDependency_result result = new createDependency_result(); + receiveBase(result, "createDependency"); if (result.isSetSuccess()) { return result.success; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "workerGetPinIdList failed: unknown result"); + if (result.e != null) { + throw result.e; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createDependency failed: unknown result"); } - public List workerGetPriorityDependencyList() throws org.apache.thrift.TException + public boolean createDirectory(String path, boolean recursive) throws TachyonTException, org.apache.thrift.TException { - send_workerGetPriorityDependencyList(); - return recv_workerGetPriorityDependencyList(); + send_createDirectory(path, recursive); + return recv_createDirectory(); } - public void send_workerGetPriorityDependencyList() throws org.apache.thrift.TException + public void send_createDirectory(String path, boolean recursive) throws org.apache.thrift.TException { - workerGetPriorityDependencyList_args args = new workerGetPriorityDependencyList_args(); - sendBase("workerGetPriorityDependencyList", args); + createDirectory_args args = new createDirectory_args(); + args.setPath(path); + args.setRecursive(recursive); + sendBase("createDirectory", args); } - public List recv_workerGetPriorityDependencyList() throws org.apache.thrift.TException + public boolean recv_createDirectory() throws TachyonTException, org.apache.thrift.TException { - workerGetPriorityDependencyList_result result = new workerGetPriorityDependencyList_result(); - receiveBase(result, "workerGetPriorityDependencyList"); + createDirectory_result result = new createDirectory_result(); + receiveBase(result, "createDirectory"); if (result.isSetSuccess()) { return result.success; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "workerGetPriorityDependencyList failed: unknown result"); + if (result.e != null) { + throw result.e; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createDirectory failed: unknown result"); } - public long getFileId(String path) throws InvalidPathException, org.apache.thrift.TException + public long createFile(String path, long blockSizeBytes, boolean recursive, long ttl) throws TachyonTException, org.apache.thrift.TException { - send_getFileId(path); - return recv_getFileId(); + send_createFile(path, blockSizeBytes, recursive, ttl); + return recv_createFile(); } - public void send_getFileId(String path) throws org.apache.thrift.TException + public void send_createFile(String path, long blockSizeBytes, boolean recursive, long ttl) throws org.apache.thrift.TException { - getFileId_args args = new getFileId_args(); + createFile_args args = new createFile_args(); args.setPath(path); - sendBase("getFileId", args); + args.setBlockSizeBytes(blockSizeBytes); + args.setRecursive(recursive); + args.setTtl(ttl); + sendBase("createFile", args); } - public long recv_getFileId() throws InvalidPathException, org.apache.thrift.TException + public long recv_createFile() throws TachyonTException, org.apache.thrift.TException { - getFileId_result result = new getFileId_result(); - receiveBase(result, "getFileId"); + createFile_result result = new createFile_result(); + receiveBase(result, "createFile"); if (result.isSetSuccess()) { return result.success; } - if (result.ipe != null) { - throw result.ipe; + if (result.e != null) { + throw result.e; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFileId failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createFile failed: unknown result"); } - public FileInfo getFileInfo(long fileId) throws FileDoesNotExistException, org.apache.thrift.TException + public boolean deleteFile(long fileId, boolean recursive) throws TachyonTException, org.apache.thrift.TException { - send_getFileInfo(fileId); - return recv_getFileInfo(); + send_deleteFile(fileId, recursive); + return recv_deleteFile(); } - public void send_getFileInfo(long fileId) throws org.apache.thrift.TException + public void send_deleteFile(long fileId, boolean recursive) throws org.apache.thrift.TException { - getFileInfo_args args = new getFileInfo_args(); + deleteFile_args args = new deleteFile_args(); args.setFileId(fileId); - sendBase("getFileInfo", args); + args.setRecursive(recursive); + sendBase("deleteFile", args); } - public FileInfo recv_getFileInfo() throws FileDoesNotExistException, org.apache.thrift.TException + public boolean recv_deleteFile() throws TachyonTException, org.apache.thrift.TException { - getFileInfo_result result = new getFileInfo_result(); - receiveBase(result, "getFileInfo"); + deleteFile_result result = new deleteFile_result(); + receiveBase(result, "deleteFile"); if (result.isSetSuccess()) { return result.success; } - if (result.fdnee != null) { - throw result.fdnee; + if (result.e != null) { + throw result.e; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFileInfo failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteFile failed: unknown result"); } - public List getFileInfoList(long fileId) throws FileDoesNotExistException, org.apache.thrift.TException + public boolean free(long fileId, boolean recursive) throws TachyonTException, org.apache.thrift.TException { - send_getFileInfoList(fileId); - return recv_getFileInfoList(); + send_free(fileId, recursive); + return recv_free(); } - public void send_getFileInfoList(long fileId) throws org.apache.thrift.TException + public void send_free(long fileId, boolean recursive) throws org.apache.thrift.TException { - getFileInfoList_args args = new getFileInfoList_args(); + free_args args = new free_args(); args.setFileId(fileId); - sendBase("getFileInfoList", args); + args.setRecursive(recursive); + sendBase("free", args); } - public List recv_getFileInfoList() throws FileDoesNotExistException, org.apache.thrift.TException + public boolean recv_free() throws TachyonTException, org.apache.thrift.TException { - getFileInfoList_result result = new getFileInfoList_result(); - receiveBase(result, "getFileInfoList"); + free_result result = new free_result(); + receiveBase(result, "free"); if (result.isSetSuccess()) { return result.success; } - if (result.fdnee != null) { - throw result.fdnee; + if (result.e != null) { + throw result.e; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFileInfoList failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "free failed: unknown result"); + } + + public DependencyInfo getDependencyInfo(int dependencyId) throws TachyonTException, org.apache.thrift.TException + { + send_getDependencyInfo(dependencyId); + return recv_getDependencyInfo(); + } + + public void send_getDependencyInfo(int dependencyId) throws org.apache.thrift.TException + { + getDependencyInfo_args args = new getDependencyInfo_args(); + args.setDependencyId(dependencyId); + sendBase("getDependencyInfo", args); + } + + public DependencyInfo recv_getDependencyInfo() throws TachyonTException, org.apache.thrift.TException + { + getDependencyInfo_result result = new getDependencyInfo_result(); + receiveBase(result, "getDependencyInfo"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.e != null) { + throw result.e; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDependencyInfo failed: unknown result"); } - public FileBlockInfo getFileBlockInfo(long fileId, int fileBlockIndex) throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException + public FileBlockInfo getFileBlockInfo(long fileId, int fileBlockIndex) throws TachyonTException, org.apache.thrift.TException { send_getFileBlockInfo(fileId, fileBlockIndex); return recv_getFileBlockInfo(); @@ -317,23 +388,20 @@ public void send_getFileBlockInfo(long fileId, int fileBlockIndex) throws org.ap sendBase("getFileBlockInfo", args); } - public FileBlockInfo recv_getFileBlockInfo() throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException + public FileBlockInfo recv_getFileBlockInfo() throws TachyonTException, org.apache.thrift.TException { getFileBlockInfo_result result = new getFileBlockInfo_result(); receiveBase(result, "getFileBlockInfo"); if (result.isSetSuccess()) { return result.success; } - if (result.fdnee != null) { - throw result.fdnee; - } - if (result.bie != null) { - throw result.bie; + if (result.e != null) { + throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFileBlockInfo failed: unknown result"); } - public List getFileBlockInfoList(long fileId) throws FileDoesNotExistException, org.apache.thrift.TException + public List getFileBlockInfoList(long fileId) throws TachyonTException, org.apache.thrift.TException { send_getFileBlockInfoList(fileId); return recv_getFileBlockInfoList(); @@ -346,381 +414,327 @@ public void send_getFileBlockInfoList(long fileId) throws org.apache.thrift.TExc sendBase("getFileBlockInfoList", args); } - public List recv_getFileBlockInfoList() throws FileDoesNotExistException, org.apache.thrift.TException + public List recv_getFileBlockInfoList() throws TachyonTException, org.apache.thrift.TException { getFileBlockInfoList_result result = new getFileBlockInfoList_result(); receiveBase(result, "getFileBlockInfoList"); if (result.isSetSuccess()) { return result.success; } - if (result.fdnee != null) { - throw result.fdnee; + if (result.e != null) { + throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFileBlockInfoList failed: unknown result"); } - public long getNewBlockIdForFile(long fileId) throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException + public long getFileId(String path) throws TachyonTException, org.apache.thrift.TException { - send_getNewBlockIdForFile(fileId); - return recv_getNewBlockIdForFile(); + send_getFileId(path); + return recv_getFileId(); } - public void send_getNewBlockIdForFile(long fileId) throws org.apache.thrift.TException + public void send_getFileId(String path) throws org.apache.thrift.TException { - getNewBlockIdForFile_args args = new getNewBlockIdForFile_args(); - args.setFileId(fileId); - sendBase("getNewBlockIdForFile", args); + getFileId_args args = new getFileId_args(); + args.setPath(path); + sendBase("getFileId", args); } - public long recv_getNewBlockIdForFile() throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException + public long recv_getFileId() throws TachyonTException, org.apache.thrift.TException { - getNewBlockIdForFile_result result = new getNewBlockIdForFile_result(); - receiveBase(result, "getNewBlockIdForFile"); + getFileId_result result = new getFileId_result(); + receiveBase(result, "getFileId"); if (result.isSetSuccess()) { return result.success; } - if (result.fdnee != null) { - throw result.fdnee; + if (result.e != null) { + throw result.e; } - if (result.bie != null) { - throw result.bie; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNewBlockIdForFile failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFileId failed: unknown result"); } - public String getUfsAddress() throws org.apache.thrift.TException + public FileInfo getFileInfo(long fileId) throws TachyonTException, org.apache.thrift.TException { - send_getUfsAddress(); - return recv_getUfsAddress(); + send_getFileInfo(fileId); + return recv_getFileInfo(); } - public void send_getUfsAddress() throws org.apache.thrift.TException + public void send_getFileInfo(long fileId) throws org.apache.thrift.TException { - getUfsAddress_args args = new getUfsAddress_args(); - sendBase("getUfsAddress", args); + getFileInfo_args args = new getFileInfo_args(); + args.setFileId(fileId); + sendBase("getFileInfo", args); } - public String recv_getUfsAddress() throws org.apache.thrift.TException + public FileInfo recv_getFileInfo() throws TachyonTException, org.apache.thrift.TException { - getUfsAddress_result result = new getUfsAddress_result(); - receiveBase(result, "getUfsAddress"); + getFileInfo_result result = new getFileInfo_result(); + receiveBase(result, "getFileInfo"); if (result.isSetSuccess()) { return result.success; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUfsAddress failed: unknown result"); + if (result.e != null) { + throw result.e; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFileInfo failed: unknown result"); } - public long createFile(String path, long blockSizeBytes, boolean recursive, long ttl) throws FileAlreadyExistException, BlockInfoException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException + public List getFileInfoList(long fileId) throws TachyonTException, org.apache.thrift.TException { - send_createFile(path, blockSizeBytes, recursive, ttl); - return recv_createFile(); + send_getFileInfoList(fileId); + return recv_getFileInfoList(); } - public void send_createFile(String path, long blockSizeBytes, boolean recursive, long ttl) throws org.apache.thrift.TException + public void send_getFileInfoList(long fileId) throws org.apache.thrift.TException { - createFile_args args = new createFile_args(); - args.setPath(path); - args.setBlockSizeBytes(blockSizeBytes); - args.setRecursive(recursive); - args.setTtl(ttl); - sendBase("createFile", args); + getFileInfoList_args args = new getFileInfoList_args(); + args.setFileId(fileId); + sendBase("getFileInfoList", args); } - public long recv_createFile() throws FileAlreadyExistException, BlockInfoException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException + public List recv_getFileInfoList() throws TachyonTException, org.apache.thrift.TException { - createFile_result result = new createFile_result(); - receiveBase(result, "createFile"); + getFileInfoList_result result = new getFileInfoList_result(); + receiveBase(result, "getFileInfoList"); if (result.isSetSuccess()) { return result.success; } - if (result.faee != null) { - throw result.faee; + if (result.e != null) { + throw result.e; } - if (result.bie != null) { - throw result.bie; - } - if (result.sfse != null) { - throw result.sfse; - } - if (result.te != null) { - throw result.te; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createFile failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFileInfoList failed: unknown result"); } - public void completeFile(long fileId) throws BlockInfoException, FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException + public long getNewBlockIdForFile(long fileId) throws TachyonTException, org.apache.thrift.TException { - send_completeFile(fileId); - recv_completeFile(); + send_getNewBlockIdForFile(fileId); + return recv_getNewBlockIdForFile(); } - public void send_completeFile(long fileId) throws org.apache.thrift.TException + public void send_getNewBlockIdForFile(long fileId) throws org.apache.thrift.TException { - completeFile_args args = new completeFile_args(); + getNewBlockIdForFile_args args = new getNewBlockIdForFile_args(); args.setFileId(fileId); - sendBase("completeFile", args); + sendBase("getNewBlockIdForFile", args); } - public void recv_completeFile() throws BlockInfoException, FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException + public long recv_getNewBlockIdForFile() throws TachyonTException, org.apache.thrift.TException { - completeFile_result result = new completeFile_result(); - receiveBase(result, "completeFile"); - if (result.bie != null) { - throw result.bie; - } - if (result.fdnee != null) { - throw result.fdnee; + getNewBlockIdForFile_result result = new getNewBlockIdForFile_result(); + receiveBase(result, "getNewBlockIdForFile"); + if (result.isSetSuccess()) { + return result.success; } - if (result.ipe != null) { - throw result.ipe; + if (result.e != null) { + throw result.e; } - return; + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNewBlockIdForFile failed: unknown result"); } - public boolean deleteFile(long fileId, boolean recursive) throws TachyonException, org.apache.thrift.TException + public String getUfsAddress() throws org.apache.thrift.TException { - send_deleteFile(fileId, recursive); - return recv_deleteFile(); + send_getUfsAddress(); + return recv_getUfsAddress(); } - public void send_deleteFile(long fileId, boolean recursive) throws org.apache.thrift.TException + public void send_getUfsAddress() throws org.apache.thrift.TException { - deleteFile_args args = new deleteFile_args(); - args.setFileId(fileId); - args.setRecursive(recursive); - sendBase("deleteFile", args); + getUfsAddress_args args = new getUfsAddress_args(); + sendBase("getUfsAddress", args); } - public boolean recv_deleteFile() throws TachyonException, org.apache.thrift.TException + public String recv_getUfsAddress() throws org.apache.thrift.TException { - deleteFile_result result = new deleteFile_result(); - receiveBase(result, "deleteFile"); + getUfsAddress_result result = new getUfsAddress_result(); + receiveBase(result, "getUfsAddress"); if (result.isSetSuccess()) { return result.success; } - if (result.te != null) { - throw result.te; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteFile failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUfsAddress failed: unknown result"); } - public boolean renameFile(long fileId, String dstPath) throws FileAlreadyExistException, FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException + public long loadFileInfoFromUfs(String ufsPath, boolean recursive) throws TachyonTException, org.apache.thrift.TException { - send_renameFile(fileId, dstPath); - return recv_renameFile(); + send_loadFileInfoFromUfs(ufsPath, recursive); + return recv_loadFileInfoFromUfs(); } - public void send_renameFile(long fileId, String dstPath) throws org.apache.thrift.TException + public void send_loadFileInfoFromUfs(String ufsPath, boolean recursive) throws org.apache.thrift.TException { - renameFile_args args = new renameFile_args(); - args.setFileId(fileId); - args.setDstPath(dstPath); - sendBase("renameFile", args); + loadFileInfoFromUfs_args args = new loadFileInfoFromUfs_args(); + args.setUfsPath(ufsPath); + args.setRecursive(recursive); + sendBase("loadFileInfoFromUfs", args); } - public boolean recv_renameFile() throws FileAlreadyExistException, FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException + public long recv_loadFileInfoFromUfs() throws TachyonTException, org.apache.thrift.TException { - renameFile_result result = new renameFile_result(); - receiveBase(result, "renameFile"); + loadFileInfoFromUfs_result result = new loadFileInfoFromUfs_result(); + receiveBase(result, "loadFileInfoFromUfs"); if (result.isSetSuccess()) { return result.success; } - if (result.faee != null) { - throw result.faee; - } - if (result.fdnee != null) { - throw result.fdnee; + if (result.e != null) { + throw result.e; } - if (result.ipe != null) { - throw result.ipe; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "renameFile failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "loadFileInfoFromUfs failed: unknown result"); } - public void setPinned(long fileId, boolean pinned) throws FileDoesNotExistException, org.apache.thrift.TException + public boolean mount(String tachyonPath, String ufsPath) throws TachyonTException, ThriftIOException, org.apache.thrift.TException { - send_setPinned(fileId, pinned); - recv_setPinned(); + send_mount(tachyonPath, ufsPath); + return recv_mount(); } - public void send_setPinned(long fileId, boolean pinned) throws org.apache.thrift.TException + public void send_mount(String tachyonPath, String ufsPath) throws org.apache.thrift.TException { - setPinned_args args = new setPinned_args(); - args.setFileId(fileId); - args.setPinned(pinned); - sendBase("setPinned", args); + mount_args args = new mount_args(); + args.setTachyonPath(tachyonPath); + args.setUfsPath(ufsPath); + sendBase("mount", args); } - public void recv_setPinned() throws FileDoesNotExistException, org.apache.thrift.TException + public boolean recv_mount() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { - setPinned_result result = new setPinned_result(); - receiveBase(result, "setPinned"); - if (result.fdnee != null) { - throw result.fdnee; + mount_result result = new mount_result(); + receiveBase(result, "mount"); + if (result.isSetSuccess()) { + return result.success; } - return; + if (result.e != null) { + throw result.e; + } + if (result.ioe != null) { + throw result.ioe; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "mount failed: unknown result"); } - public boolean createDirectory(String path, boolean recursive) throws FileAlreadyExistException, InvalidPathException, org.apache.thrift.TException + public boolean persistFile(long fileId, long length) throws TachyonTException, org.apache.thrift.TException { - send_createDirectory(path, recursive); - return recv_createDirectory(); + send_persistFile(fileId, length); + return recv_persistFile(); } - public void send_createDirectory(String path, boolean recursive) throws org.apache.thrift.TException + public void send_persistFile(long fileId, long length) throws org.apache.thrift.TException { - createDirectory_args args = new createDirectory_args(); - args.setPath(path); - args.setRecursive(recursive); - sendBase("createDirectory", args); + persistFile_args args = new persistFile_args(); + args.setFileId(fileId); + args.setLength(length); + sendBase("persistFile", args); } - public boolean recv_createDirectory() throws FileAlreadyExistException, InvalidPathException, org.apache.thrift.TException + public boolean recv_persistFile() throws TachyonTException, org.apache.thrift.TException { - createDirectory_result result = new createDirectory_result(); - receiveBase(result, "createDirectory"); + persistFile_result result = new persistFile_result(); + receiveBase(result, "persistFile"); if (result.isSetSuccess()) { return result.success; } - if (result.faee != null) { - throw result.faee; - } - if (result.ipe != null) { - throw result.ipe; + if (result.e != null) { + throw result.e; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createDirectory failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "persistFile failed: unknown result"); } - public boolean free(long fileId, boolean recursive) throws FileDoesNotExistException, org.apache.thrift.TException + public boolean renameFile(long fileId, String dstPath) throws TachyonTException, org.apache.thrift.TException { - send_free(fileId, recursive); - return recv_free(); + send_renameFile(fileId, dstPath); + return recv_renameFile(); } - public void send_free(long fileId, boolean recursive) throws org.apache.thrift.TException + public void send_renameFile(long fileId, String dstPath) throws org.apache.thrift.TException { - free_args args = new free_args(); + renameFile_args args = new renameFile_args(); args.setFileId(fileId); - args.setRecursive(recursive); - sendBase("free", args); + args.setDstPath(dstPath); + sendBase("renameFile", args); } - public boolean recv_free() throws FileDoesNotExistException, org.apache.thrift.TException + public boolean recv_renameFile() throws TachyonTException, org.apache.thrift.TException { - free_result result = new free_result(); - receiveBase(result, "free"); + renameFile_result result = new renameFile_result(); + receiveBase(result, "renameFile"); if (result.isSetSuccess()) { return result.success; } - if (result.fdnee != null) { - throw result.fdnee; + if (result.e != null) { + throw result.e; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "free failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "renameFile failed: unknown result"); } - public boolean persistFile(long fileId, long length) throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException + public void reportLostFile(long fileId) throws TachyonTException, org.apache.thrift.TException { - send_persistFile(fileId, length); - return recv_persistFile(); + send_reportLostFile(fileId); + recv_reportLostFile(); } - public void send_persistFile(long fileId, long length) throws org.apache.thrift.TException + public void send_reportLostFile(long fileId) throws org.apache.thrift.TException { - persistFile_args args = new persistFile_args(); + reportLostFile_args args = new reportLostFile_args(); args.setFileId(fileId); - args.setLength(length); - sendBase("persistFile", args); + sendBase("reportLostFile", args); } - public boolean recv_persistFile() throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException + public void recv_reportLostFile() throws TachyonTException, org.apache.thrift.TException { - persistFile_result result = new persistFile_result(); - receiveBase(result, "persistFile"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.eP != null) { - throw result.eP; - } - if (result.eS != null) { - throw result.eS; - } - if (result.eB != null) { - throw result.eB; + reportLostFile_result result = new reportLostFile_result(); + receiveBase(result, "reportLostFile"); + if (result.e != null) { + throw result.e; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "persistFile failed: unknown result"); + return; } - public long loadFileInfoFromUfs(String ufsPath, boolean recursive) throws BlockInfoException, FileDoesNotExistException, FileAlreadyExistException, InvalidPathException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException + public void requestFilesInDependency(int depId) throws TachyonTException, org.apache.thrift.TException { - send_loadFileInfoFromUfs(ufsPath, recursive); - return recv_loadFileInfoFromUfs(); + send_requestFilesInDependency(depId); + recv_requestFilesInDependency(); } - public void send_loadFileInfoFromUfs(String ufsPath, boolean recursive) throws org.apache.thrift.TException + public void send_requestFilesInDependency(int depId) throws org.apache.thrift.TException { - loadFileInfoFromUfs_args args = new loadFileInfoFromUfs_args(); - args.setUfsPath(ufsPath); - args.setRecursive(recursive); - sendBase("loadFileInfoFromUfs", args); + requestFilesInDependency_args args = new requestFilesInDependency_args(); + args.setDepId(depId); + sendBase("requestFilesInDependency", args); } - public long recv_loadFileInfoFromUfs() throws BlockInfoException, FileDoesNotExistException, FileAlreadyExistException, InvalidPathException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException + public void recv_requestFilesInDependency() throws TachyonTException, org.apache.thrift.TException { - loadFileInfoFromUfs_result result = new loadFileInfoFromUfs_result(); - receiveBase(result, "loadFileInfoFromUfs"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.bie != null) { - throw result.bie; - } - if (result.fdnee != null) { - throw result.fdnee; - } - if (result.faee != null) { - throw result.faee; - } - if (result.ipe != null) { - throw result.ipe; - } - if (result.sfse != null) { - throw result.sfse; - } - if (result.te != null) { - throw result.te; + requestFilesInDependency_result result = new requestFilesInDependency_result(); + receiveBase(result, "requestFilesInDependency"); + if (result.e != null) { + throw result.e; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "loadFileInfoFromUfs failed: unknown result"); + return; } - public boolean mount(String tachyonPath, String ufsPath) throws TachyonException, org.apache.thrift.TException + public void setPinned(long fileId, boolean pinned) throws TachyonTException, org.apache.thrift.TException { - send_mount(tachyonPath, ufsPath); - return recv_mount(); + send_setPinned(fileId, pinned); + recv_setPinned(); } - public void send_mount(String tachyonPath, String ufsPath) throws org.apache.thrift.TException + public void send_setPinned(long fileId, boolean pinned) throws org.apache.thrift.TException { - mount_args args = new mount_args(); - args.setTachyonPath(tachyonPath); - args.setUfsPath(ufsPath); - sendBase("mount", args); + setPinned_args args = new setPinned_args(); + args.setFileId(fileId); + args.setPinned(pinned); + sendBase("setPinned", args); } - public boolean recv_mount() throws TachyonException, org.apache.thrift.TException + public void recv_setPinned() throws TachyonTException, org.apache.thrift.TException { - mount_result result = new mount_result(); - receiveBase(result, "mount"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.te != null) { - throw result.te; + setPinned_result result = new setPinned_result(); + receiveBase(result, "setPinned"); + if (result.e != null) { + throw result.e; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "mount failed: unknown result"); + return; } - public boolean unmount(String tachyonPath) throws TachyonException, org.apache.thrift.TException + public boolean unmount(String tachyonPath) throws TachyonTException, ThriftIOException, org.apache.thrift.TException { send_unmount(tachyonPath); return recv_unmount(); @@ -733,135 +747,64 @@ public void send_unmount(String tachyonPath) throws org.apache.thrift.TException sendBase("unmount", args); } - public boolean recv_unmount() throws TachyonException, org.apache.thrift.TException + public boolean recv_unmount() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { unmount_result result = new unmount_result(); receiveBase(result, "unmount"); if (result.isSetSuccess()) { return result.success; } - if (result.te != null) { - throw result.te; + if (result.e != null) { + throw result.e; + } + if (result.ioe != null) { + throw result.ioe; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "unmount failed: unknown result"); } - public int createDependency(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte) throws InvalidPathException, FileDoesNotExistException, FileAlreadyExistException, BlockInfoException, TachyonException, org.apache.thrift.TException + public Set workerGetPinIdList() throws org.apache.thrift.TException { - send_createDependency(parents, children, commandPrefix, data, comment, framework, frameworkVersion, dependencyType, childrenBlockSizeByte); - return recv_createDependency(); + send_workerGetPinIdList(); + return recv_workerGetPinIdList(); } - public void send_createDependency(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte) throws org.apache.thrift.TException + public void send_workerGetPinIdList() throws org.apache.thrift.TException { - createDependency_args args = new createDependency_args(); - args.setParents(parents); - args.setChildren(children); - args.setCommandPrefix(commandPrefix); - args.setData(data); - args.setComment(comment); - args.setFramework(framework); - args.setFrameworkVersion(frameworkVersion); - args.setDependencyType(dependencyType); - args.setChildrenBlockSizeByte(childrenBlockSizeByte); - sendBase("createDependency", args); + workerGetPinIdList_args args = new workerGetPinIdList_args(); + sendBase("workerGetPinIdList", args); } - public int recv_createDependency() throws InvalidPathException, FileDoesNotExistException, FileAlreadyExistException, BlockInfoException, TachyonException, org.apache.thrift.TException + public Set recv_workerGetPinIdList() throws org.apache.thrift.TException { - createDependency_result result = new createDependency_result(); - receiveBase(result, "createDependency"); + workerGetPinIdList_result result = new workerGetPinIdList_result(); + receiveBase(result, "workerGetPinIdList"); if (result.isSetSuccess()) { return result.success; } - if (result.ipe != null) { - throw result.ipe; - } - if (result.fdnee != null) { - throw result.fdnee; - } - if (result.faee != null) { - throw result.faee; - } - if (result.bie != null) { - throw result.bie; - } - if (result.te != null) { - throw result.te; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createDependency failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "workerGetPinIdList failed: unknown result"); } - public DependencyInfo getDependencyInfo(int dependencyId) throws DependencyDoesNotExistException, org.apache.thrift.TException + public List workerGetPriorityDependencyList() throws org.apache.thrift.TException { - send_getDependencyInfo(dependencyId); - return recv_getDependencyInfo(); + send_workerGetPriorityDependencyList(); + return recv_workerGetPriorityDependencyList(); } - public void send_getDependencyInfo(int dependencyId) throws org.apache.thrift.TException + public void send_workerGetPriorityDependencyList() throws org.apache.thrift.TException { - getDependencyInfo_args args = new getDependencyInfo_args(); - args.setDependencyId(dependencyId); - sendBase("getDependencyInfo", args); + workerGetPriorityDependencyList_args args = new workerGetPriorityDependencyList_args(); + sendBase("workerGetPriorityDependencyList", args); } - public DependencyInfo recv_getDependencyInfo() throws DependencyDoesNotExistException, org.apache.thrift.TException + public List recv_workerGetPriorityDependencyList() throws org.apache.thrift.TException { - getDependencyInfo_result result = new getDependencyInfo_result(); - receiveBase(result, "getDependencyInfo"); + workerGetPriorityDependencyList_result result = new workerGetPriorityDependencyList_result(); + receiveBase(result, "workerGetPriorityDependencyList"); if (result.isSetSuccess()) { return result.success; } - if (result.ddnee != null) { - throw result.ddnee; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDependencyInfo failed: unknown result"); - } - - public void reportLostFile(long fileId) throws FileDoesNotExistException, org.apache.thrift.TException - { - send_reportLostFile(fileId); - recv_reportLostFile(); - } - - public void send_reportLostFile(long fileId) throws org.apache.thrift.TException - { - reportLostFile_args args = new reportLostFile_args(); - args.setFileId(fileId); - sendBase("reportLostFile", args); - } - - public void recv_reportLostFile() throws FileDoesNotExistException, org.apache.thrift.TException - { - reportLostFile_result result = new reportLostFile_result(); - receiveBase(result, "reportLostFile"); - if (result.fdnee != null) { - throw result.fdnee; - } - return; - } - - public void requestFilesInDependency(int depId) throws DependencyDoesNotExistException, org.apache.thrift.TException - { - send_requestFilesInDependency(depId); - recv_requestFilesInDependency(); - } - - public void send_requestFilesInDependency(int depId) throws org.apache.thrift.TException - { - requestFilesInDependency_args args = new requestFilesInDependency_args(); - args.setDepId(depId); - sendBase("requestFilesInDependency", args); - } - - public void recv_requestFilesInDependency() throws DependencyDoesNotExistException, org.apache.thrift.TException - { - requestFilesInDependency_result result = new requestFilesInDependency_result(); - receiveBase(result, "requestFilesInDependency"); - if (result.ddnee != null) { - throw result.ddnee; - } - return; + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "workerGetPriorityDependencyList failed: unknown result"); } } @@ -882,533 +825,563 @@ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, super(protocolFactory, clientManager, transport); } - public void workerGetPinIdList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void completeFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - workerGetPinIdList_call method_call = new workerGetPinIdList_call(resultHandler, this, ___protocolFactory, ___transport); + completeFile_call method_call = new completeFile_call(fileId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class workerGetPinIdList_call extends org.apache.thrift.async.TAsyncMethodCall { - public workerGetPinIdList_call(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 static class completeFile_call extends org.apache.thrift.async.TAsyncMethodCall { + private long fileId; + public completeFile_call(long fileId, 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; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("workerGetPinIdList", org.apache.thrift.protocol.TMessageType.CALL, 0)); - workerGetPinIdList_args args = new workerGetPinIdList_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("completeFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); + completeFile_args args = new completeFile_args(); + args.setFileId(fileId); args.write(prot); prot.writeMessageEnd(); } - public Set getResult() throws org.apache.thrift.TException { + public void getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_workerGetPinIdList(); + (new Client(prot)).recv_completeFile(); } } - public void workerGetPriorityDependencyList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void createDependency(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - workerGetPriorityDependencyList_call method_call = new workerGetPriorityDependencyList_call(resultHandler, this, ___protocolFactory, ___transport); + createDependency_call method_call = new createDependency_call(parents, children, commandPrefix, data, comment, framework, frameworkVersion, dependencyType, childrenBlockSizeByte, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class workerGetPriorityDependencyList_call extends org.apache.thrift.async.TAsyncMethodCall { - public workerGetPriorityDependencyList_call(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 static class createDependency_call extends org.apache.thrift.async.TAsyncMethodCall { + private List parents; + private List children; + private String commandPrefix; + private List data; + private String comment; + private String framework; + private String frameworkVersion; + private int dependencyType; + private long childrenBlockSizeByte; + public createDependency_call(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte, 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.parents = parents; + this.children = children; + this.commandPrefix = commandPrefix; + this.data = data; + this.comment = comment; + this.framework = framework; + this.frameworkVersion = frameworkVersion; + this.dependencyType = dependencyType; + this.childrenBlockSizeByte = childrenBlockSizeByte; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("workerGetPriorityDependencyList", org.apache.thrift.protocol.TMessageType.CALL, 0)); - workerGetPriorityDependencyList_args args = new workerGetPriorityDependencyList_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createDependency", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createDependency_args args = new createDependency_args(); + args.setParents(parents); + args.setChildren(children); + args.setCommandPrefix(commandPrefix); + args.setData(data); + args.setComment(comment); + args.setFramework(framework); + args.setFrameworkVersion(frameworkVersion); + args.setDependencyType(dependencyType); + args.setChildrenBlockSizeByte(childrenBlockSizeByte); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws org.apache.thrift.TException { + public int getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_workerGetPriorityDependencyList(); + return (new Client(prot)).recv_createDependency(); } } - public void getFileId(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void createDirectory(String path, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getFileId_call method_call = new getFileId_call(path, resultHandler, this, ___protocolFactory, ___transport); + createDirectory_call method_call = new createDirectory_call(path, recursive, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getFileId_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class createDirectory_call extends org.apache.thrift.async.TAsyncMethodCall { private String path; - public getFileId_call(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private boolean recursive; + public createDirectory_call(String path, boolean recursive, 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.path = path; + this.recursive = recursive; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileId", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getFileId_args args = new getFileId_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createDirectory", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createDirectory_args args = new createDirectory_args(); args.setPath(path); + args.setRecursive(recursive); args.write(prot); prot.writeMessageEnd(); } - public long getResult() throws InvalidPathException, org.apache.thrift.TException { + public boolean getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getFileId(); + return (new Client(prot)).recv_createDirectory(); } } - public void getFileInfo(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void createFile(String path, long blockSizeBytes, boolean recursive, long ttl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getFileInfo_call method_call = new getFileInfo_call(fileId, resultHandler, this, ___protocolFactory, ___transport); + createFile_call method_call = new createFile_call(path, blockSizeBytes, recursive, ttl, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getFileInfo_call extends org.apache.thrift.async.TAsyncMethodCall { - private long fileId; - public getFileInfo_call(long fileId, 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 static class createFile_call extends org.apache.thrift.async.TAsyncMethodCall { + private String path; + private long blockSizeBytes; + private boolean recursive; + private long ttl; + public createFile_call(String path, long blockSizeBytes, boolean recursive, long ttl, 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.path = path; + this.blockSizeBytes = blockSizeBytes; + this.recursive = recursive; + this.ttl = ttl; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getFileInfo_args args = new getFileInfo_args(); - args.setFileId(fileId); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createFile_args args = new createFile_args(); + args.setPath(path); + args.setBlockSizeBytes(blockSizeBytes); + args.setRecursive(recursive); + args.setTtl(ttl); args.write(prot); prot.writeMessageEnd(); } - public FileInfo getResult() throws FileDoesNotExistException, org.apache.thrift.TException { + public long getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getFileInfo(); + return (new Client(prot)).recv_createFile(); } } - public void getFileInfoList(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void deleteFile(long fileId, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getFileInfoList_call method_call = new getFileInfoList_call(fileId, resultHandler, this, ___protocolFactory, ___transport); + deleteFile_call method_call = new deleteFile_call(fileId, recursive, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getFileInfoList_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class deleteFile_call extends org.apache.thrift.async.TAsyncMethodCall { private long fileId; - public getFileInfoList_call(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private boolean recursive; + public deleteFile_call(long fileId, boolean recursive, 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.recursive = recursive; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileInfoList", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getFileInfoList_args args = new getFileInfoList_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteFile_args args = new deleteFile_args(); args.setFileId(fileId); + args.setRecursive(recursive); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws FileDoesNotExistException, org.apache.thrift.TException { + public boolean getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getFileInfoList(); + return (new Client(prot)).recv_deleteFile(); } } - public void getFileBlockInfo(long fileId, int fileBlockIndex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void free(long fileId, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getFileBlockInfo_call method_call = new getFileBlockInfo_call(fileId, fileBlockIndex, resultHandler, this, ___protocolFactory, ___transport); + free_call method_call = new free_call(fileId, recursive, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getFileBlockInfo_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class free_call extends org.apache.thrift.async.TAsyncMethodCall { private long fileId; - private int fileBlockIndex; - public getFileBlockInfo_call(long fileId, int fileBlockIndex, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private boolean recursive; + public free_call(long fileId, boolean recursive, 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.fileBlockIndex = fileBlockIndex; + this.recursive = recursive; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileBlockInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getFileBlockInfo_args args = new getFileBlockInfo_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("free", org.apache.thrift.protocol.TMessageType.CALL, 0)); + free_args args = new free_args(); args.setFileId(fileId); - args.setFileBlockIndex(fileBlockIndex); + args.setRecursive(recursive); args.write(prot); prot.writeMessageEnd(); } - public FileBlockInfo getResult() throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException { + public boolean getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getFileBlockInfo(); + return (new Client(prot)).recv_free(); } } - public void getFileBlockInfoList(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getDependencyInfo(int dependencyId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getFileBlockInfoList_call method_call = new getFileBlockInfoList_call(fileId, resultHandler, this, ___protocolFactory, ___transport); + getDependencyInfo_call method_call = new getDependencyInfo_call(dependencyId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getFileBlockInfoList_call extends org.apache.thrift.async.TAsyncMethodCall { - private long fileId; - public getFileBlockInfoList_call(long fileId, 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 static class getDependencyInfo_call extends org.apache.thrift.async.TAsyncMethodCall { + private int dependencyId; + public getDependencyInfo_call(int dependencyId, 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.dependencyId = dependencyId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileBlockInfoList", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getFileBlockInfoList_args args = new getFileBlockInfoList_args(); - args.setFileId(fileId); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDependencyInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getDependencyInfo_args args = new getDependencyInfo_args(); + args.setDependencyId(dependencyId); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws FileDoesNotExistException, org.apache.thrift.TException { + public DependencyInfo getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getFileBlockInfoList(); + return (new Client(prot)).recv_getDependencyInfo(); } } - public void getNewBlockIdForFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getFileBlockInfo(long fileId, int fileBlockIndex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getNewBlockIdForFile_call method_call = new getNewBlockIdForFile_call(fileId, resultHandler, this, ___protocolFactory, ___transport); + getFileBlockInfo_call method_call = new getFileBlockInfo_call(fileId, fileBlockIndex, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getNewBlockIdForFile_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class getFileBlockInfo_call extends org.apache.thrift.async.TAsyncMethodCall { private long fileId; - public getNewBlockIdForFile_call(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private int fileBlockIndex; + public getFileBlockInfo_call(long fileId, int fileBlockIndex, 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.fileBlockIndex = fileBlockIndex; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNewBlockIdForFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getNewBlockIdForFile_args args = new getNewBlockIdForFile_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileBlockInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getFileBlockInfo_args args = new getFileBlockInfo_args(); args.setFileId(fileId); + args.setFileBlockIndex(fileBlockIndex); args.write(prot); prot.writeMessageEnd(); } - public long getResult() throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException { + public FileBlockInfo getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getNewBlockIdForFile(); + return (new Client(prot)).recv_getFileBlockInfo(); } } - public void getUfsAddress(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getFileBlockInfoList(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getUfsAddress_call method_call = new getUfsAddress_call(resultHandler, this, ___protocolFactory, ___transport); + getFileBlockInfoList_call method_call = new getFileBlockInfoList_call(fileId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getUfsAddress_call extends org.apache.thrift.async.TAsyncMethodCall { - public getUfsAddress_call(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 static class getFileBlockInfoList_call extends org.apache.thrift.async.TAsyncMethodCall { + private long fileId; + public getFileBlockInfoList_call(long fileId, 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; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUfsAddress", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getUfsAddress_args args = new getUfsAddress_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileBlockInfoList", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getFileBlockInfoList_args args = new getFileBlockInfoList_args(); + args.setFileId(fileId); args.write(prot); prot.writeMessageEnd(); } - public String getResult() throws org.apache.thrift.TException { + public List getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getUfsAddress(); + return (new Client(prot)).recv_getFileBlockInfoList(); } } - public void createFile(String path, long blockSizeBytes, boolean recursive, long ttl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getFileId(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - createFile_call method_call = new createFile_call(path, blockSizeBytes, recursive, ttl, resultHandler, this, ___protocolFactory, ___transport); + getFileId_call method_call = new getFileId_call(path, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class createFile_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class getFileId_call extends org.apache.thrift.async.TAsyncMethodCall { private String path; - private long blockSizeBytes; - private boolean recursive; - private long ttl; - public createFile_call(String path, long blockSizeBytes, boolean recursive, long ttl, 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 getFileId_call(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.path = path; - this.blockSizeBytes = blockSizeBytes; - this.recursive = recursive; - this.ttl = ttl; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - createFile_args args = new createFile_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileId", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getFileId_args args = new getFileId_args(); args.setPath(path); - args.setBlockSizeBytes(blockSizeBytes); - args.setRecursive(recursive); - args.setTtl(ttl); args.write(prot); prot.writeMessageEnd(); } - public long getResult() throws FileAlreadyExistException, BlockInfoException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException { + public long getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_createFile(); + return (new Client(prot)).recv_getFileId(); } } - public void completeFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getFileInfo(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - completeFile_call method_call = new completeFile_call(fileId, resultHandler, this, ___protocolFactory, ___transport); + getFileInfo_call method_call = new getFileInfo_call(fileId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class completeFile_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class getFileInfo_call extends org.apache.thrift.async.TAsyncMethodCall { private long fileId; - public completeFile_call(long fileId, 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 getFileInfo_call(long fileId, 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; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("completeFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - completeFile_args args = new completeFile_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getFileInfo_args args = new getFileInfo_args(); args.setFileId(fileId); args.write(prot); prot.writeMessageEnd(); } - public void getResult() throws BlockInfoException, FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException { + public FileInfo getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_completeFile(); + return (new Client(prot)).recv_getFileInfo(); } } - public void deleteFile(long fileId, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getFileInfoList(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - deleteFile_call method_call = new deleteFile_call(fileId, recursive, resultHandler, this, ___protocolFactory, ___transport); + getFileInfoList_call method_call = new getFileInfoList_call(fileId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class deleteFile_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class getFileInfoList_call extends org.apache.thrift.async.TAsyncMethodCall { private long fileId; - private boolean recursive; - public deleteFile_call(long fileId, boolean recursive, 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 getFileInfoList_call(long fileId, 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.recursive = recursive; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - deleteFile_args args = new deleteFile_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileInfoList", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getFileInfoList_args args = new getFileInfoList_args(); args.setFileId(fileId); - args.setRecursive(recursive); args.write(prot); prot.writeMessageEnd(); } - public boolean getResult() throws TachyonException, org.apache.thrift.TException { + public List getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_deleteFile(); + return (new Client(prot)).recv_getFileInfoList(); } } - public void renameFile(long fileId, String dstPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getNewBlockIdForFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - renameFile_call method_call = new renameFile_call(fileId, dstPath, resultHandler, this, ___protocolFactory, ___transport); + getNewBlockIdForFile_call method_call = new getNewBlockIdForFile_call(fileId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class renameFile_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class getNewBlockIdForFile_call extends org.apache.thrift.async.TAsyncMethodCall { private long fileId; - private String dstPath; - public renameFile_call(long fileId, String dstPath, 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 getNewBlockIdForFile_call(long fileId, 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.dstPath = dstPath; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("renameFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - renameFile_args args = new renameFile_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNewBlockIdForFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getNewBlockIdForFile_args args = new getNewBlockIdForFile_args(); args.setFileId(fileId); - args.setDstPath(dstPath); args.write(prot); prot.writeMessageEnd(); } - public boolean getResult() throws FileAlreadyExistException, FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException { + public long getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_renameFile(); + return (new Client(prot)).recv_getNewBlockIdForFile(); } } - public void setPinned(long fileId, boolean pinned, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getUfsAddress(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - setPinned_call method_call = new setPinned_call(fileId, pinned, resultHandler, this, ___protocolFactory, ___transport); + getUfsAddress_call method_call = new getUfsAddress_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class setPinned_call extends org.apache.thrift.async.TAsyncMethodCall { - private long fileId; - private boolean pinned; - public setPinned_call(long fileId, boolean pinned, 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 static class getUfsAddress_call extends org.apache.thrift.async.TAsyncMethodCall { + public getUfsAddress_call(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.pinned = pinned; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setPinned", org.apache.thrift.protocol.TMessageType.CALL, 0)); - setPinned_args args = new setPinned_args(); - args.setFileId(fileId); - args.setPinned(pinned); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUfsAddress", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getUfsAddress_args args = new getUfsAddress_args(); args.write(prot); prot.writeMessageEnd(); } - public void getResult() throws FileDoesNotExistException, org.apache.thrift.TException { + public String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_setPinned(); + return (new Client(prot)).recv_getUfsAddress(); } } - public void createDirectory(String path, boolean recursive, 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 { checkReady(); - createDirectory_call method_call = new createDirectory_call(path, recursive, resultHandler, this, ___protocolFactory, ___transport); + loadFileInfoFromUfs_call method_call = new loadFileInfoFromUfs_call(ufsPath, recursive, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class createDirectory_call extends org.apache.thrift.async.TAsyncMethodCall { - private String path; + public static class loadFileInfoFromUfs_call extends org.apache.thrift.async.TAsyncMethodCall { + private String ufsPath; private boolean recursive; - public createDirectory_call(String path, boolean recursive, 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 loadFileInfoFromUfs_call(String ufsPath, boolean recursive, 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.path = path; + this.ufsPath = ufsPath; this.recursive = recursive; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createDirectory", org.apache.thrift.protocol.TMessageType.CALL, 0)); - createDirectory_args args = new createDirectory_args(); - args.setPath(path); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("loadFileInfoFromUfs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + loadFileInfoFromUfs_args args = new loadFileInfoFromUfs_args(); + args.setUfsPath(ufsPath); args.setRecursive(recursive); args.write(prot); prot.writeMessageEnd(); } - public boolean getResult() throws FileAlreadyExistException, InvalidPathException, org.apache.thrift.TException { + public long getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_createDirectory(); + return (new Client(prot)).recv_loadFileInfoFromUfs(); } } - public void free(long fileId, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void mount(String tachyonPath, String ufsPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - free_call method_call = new free_call(fileId, recursive, resultHandler, this, ___protocolFactory, ___transport); + mount_call method_call = new mount_call(tachyonPath, ufsPath, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class free_call extends org.apache.thrift.async.TAsyncMethodCall { - private long fileId; - private boolean recursive; - public free_call(long fileId, boolean recursive, 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 static class mount_call extends org.apache.thrift.async.TAsyncMethodCall { + private String tachyonPath; + private String ufsPath; + public mount_call(String tachyonPath, String ufsPath, 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.recursive = recursive; + this.tachyonPath = tachyonPath; + this.ufsPath = ufsPath; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("free", org.apache.thrift.protocol.TMessageType.CALL, 0)); - free_args args = new free_args(); - args.setFileId(fileId); - args.setRecursive(recursive); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mount", org.apache.thrift.protocol.TMessageType.CALL, 0)); + mount_args args = new mount_args(); + args.setTachyonPath(tachyonPath); + args.setUfsPath(ufsPath); args.write(prot); prot.writeMessageEnd(); } - public boolean getResult() throws FileDoesNotExistException, org.apache.thrift.TException { + public boolean getResult() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_free(); + return (new Client(prot)).recv_mount(); } } @@ -1437,7 +1410,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public boolean getResult() throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException { + public boolean getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -1447,257 +1420,227 @@ public boolean getResult() throws FileDoesNotExistException, SuspectedFileSizeEx } } - public void loadFileInfoFromUfs(String ufsPath, boolean recursive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void renameFile(long fileId, String dstPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - loadFileInfoFromUfs_call method_call = new loadFileInfoFromUfs_call(ufsPath, recursive, resultHandler, this, ___protocolFactory, ___transport); + renameFile_call method_call = new renameFile_call(fileId, dstPath, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class loadFileInfoFromUfs_call extends org.apache.thrift.async.TAsyncMethodCall { - private String ufsPath; - private boolean recursive; - public loadFileInfoFromUfs_call(String ufsPath, boolean recursive, 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 static class renameFile_call extends org.apache.thrift.async.TAsyncMethodCall { + private long fileId; + private String dstPath; + public renameFile_call(long fileId, String dstPath, 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.ufsPath = ufsPath; - this.recursive = recursive; + this.fileId = fileId; + this.dstPath = dstPath; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("loadFileInfoFromUfs", org.apache.thrift.protocol.TMessageType.CALL, 0)); - loadFileInfoFromUfs_args args = new loadFileInfoFromUfs_args(); - args.setUfsPath(ufsPath); - args.setRecursive(recursive); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("renameFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); + renameFile_args args = new renameFile_args(); + args.setFileId(fileId); + args.setDstPath(dstPath); args.write(prot); prot.writeMessageEnd(); } - public long getResult() throws BlockInfoException, FileDoesNotExistException, FileAlreadyExistException, InvalidPathException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException { + public boolean getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_loadFileInfoFromUfs(); + return (new Client(prot)).recv_renameFile(); } } - public void mount(String tachyonPath, String ufsPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void reportLostFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - mount_call method_call = new mount_call(tachyonPath, ufsPath, resultHandler, this, ___protocolFactory, ___transport); + reportLostFile_call method_call = new reportLostFile_call(fileId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class mount_call extends org.apache.thrift.async.TAsyncMethodCall { - private String tachyonPath; - private String ufsPath; - public mount_call(String tachyonPath, String ufsPath, 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 static class reportLostFile_call extends org.apache.thrift.async.TAsyncMethodCall { + private long fileId; + public reportLostFile_call(long fileId, 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.tachyonPath = tachyonPath; - this.ufsPath = ufsPath; + this.fileId = fileId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mount", org.apache.thrift.protocol.TMessageType.CALL, 0)); - mount_args args = new mount_args(); - args.setTachyonPath(tachyonPath); - args.setUfsPath(ufsPath); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("reportLostFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); + reportLostFile_args args = new reportLostFile_args(); + args.setFileId(fileId); args.write(prot); prot.writeMessageEnd(); } - public boolean getResult() throws TachyonException, org.apache.thrift.TException { + public void getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_mount(); + (new Client(prot)).recv_reportLostFile(); } } - public void unmount(String tachyonPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void requestFilesInDependency(int depId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - unmount_call method_call = new unmount_call(tachyonPath, resultHandler, this, ___protocolFactory, ___transport); + requestFilesInDependency_call method_call = new requestFilesInDependency_call(depId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class unmount_call extends org.apache.thrift.async.TAsyncMethodCall { - private String tachyonPath; - public unmount_call(String tachyonPath, 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 static class requestFilesInDependency_call extends org.apache.thrift.async.TAsyncMethodCall { + private int depId; + public requestFilesInDependency_call(int depId, 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.tachyonPath = tachyonPath; + this.depId = depId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unmount", org.apache.thrift.protocol.TMessageType.CALL, 0)); - unmount_args args = new unmount_args(); - args.setTachyonPath(tachyonPath); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestFilesInDependency", org.apache.thrift.protocol.TMessageType.CALL, 0)); + requestFilesInDependency_args args = new requestFilesInDependency_args(); + args.setDepId(depId); args.write(prot); prot.writeMessageEnd(); } - public boolean getResult() throws TachyonException, org.apache.thrift.TException { + public void getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_unmount(); + (new Client(prot)).recv_requestFilesInDependency(); } } - public void createDependency(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void setPinned(long fileId, boolean pinned, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - createDependency_call method_call = new createDependency_call(parents, children, commandPrefix, data, comment, framework, frameworkVersion, dependencyType, childrenBlockSizeByte, resultHandler, this, ___protocolFactory, ___transport); + setPinned_call method_call = new setPinned_call(fileId, pinned, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class createDependency_call extends org.apache.thrift.async.TAsyncMethodCall { - private List parents; - private List children; - private String commandPrefix; - private List data; - private String comment; - private String framework; - private String frameworkVersion; - private int dependencyType; - private long childrenBlockSizeByte; - public createDependency_call(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte, 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 static class setPinned_call extends org.apache.thrift.async.TAsyncMethodCall { + private long fileId; + private boolean pinned; + public setPinned_call(long fileId, boolean pinned, 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.parents = parents; - this.children = children; - this.commandPrefix = commandPrefix; - this.data = data; - this.comment = comment; - this.framework = framework; - this.frameworkVersion = frameworkVersion; - this.dependencyType = dependencyType; - this.childrenBlockSizeByte = childrenBlockSizeByte; + this.fileId = fileId; + this.pinned = pinned; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createDependency", org.apache.thrift.protocol.TMessageType.CALL, 0)); - createDependency_args args = new createDependency_args(); - args.setParents(parents); - args.setChildren(children); - args.setCommandPrefix(commandPrefix); - args.setData(data); - args.setComment(comment); - args.setFramework(framework); - args.setFrameworkVersion(frameworkVersion); - args.setDependencyType(dependencyType); - args.setChildrenBlockSizeByte(childrenBlockSizeByte); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setPinned", org.apache.thrift.protocol.TMessageType.CALL, 0)); + setPinned_args args = new setPinned_args(); + args.setFileId(fileId); + args.setPinned(pinned); args.write(prot); prot.writeMessageEnd(); } - public int getResult() throws InvalidPathException, FileDoesNotExistException, FileAlreadyExistException, BlockInfoException, TachyonException, org.apache.thrift.TException { + public void getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_createDependency(); + (new Client(prot)).recv_setPinned(); } } - public void getDependencyInfo(int dependencyId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void unmount(String tachyonPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getDependencyInfo_call method_call = new getDependencyInfo_call(dependencyId, resultHandler, this, ___protocolFactory, ___transport); + unmount_call method_call = new unmount_call(tachyonPath, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getDependencyInfo_call extends org.apache.thrift.async.TAsyncMethodCall { - private int dependencyId; - public getDependencyInfo_call(int dependencyId, 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 static class unmount_call extends org.apache.thrift.async.TAsyncMethodCall { + private String tachyonPath; + public unmount_call(String tachyonPath, 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.dependencyId = dependencyId; + this.tachyonPath = tachyonPath; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDependencyInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getDependencyInfo_args args = new getDependencyInfo_args(); - args.setDependencyId(dependencyId); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unmount", org.apache.thrift.protocol.TMessageType.CALL, 0)); + unmount_args args = new unmount_args(); + args.setTachyonPath(tachyonPath); args.write(prot); prot.writeMessageEnd(); } - public DependencyInfo getResult() throws DependencyDoesNotExistException, org.apache.thrift.TException { + public boolean getResult() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getDependencyInfo(); + return (new Client(prot)).recv_unmount(); } } - public void reportLostFile(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void workerGetPinIdList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - reportLostFile_call method_call = new reportLostFile_call(fileId, resultHandler, this, ___protocolFactory, ___transport); + workerGetPinIdList_call method_call = new workerGetPinIdList_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class reportLostFile_call extends org.apache.thrift.async.TAsyncMethodCall { - private long fileId; - public reportLostFile_call(long fileId, 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 static class workerGetPinIdList_call extends org.apache.thrift.async.TAsyncMethodCall { + public workerGetPinIdList_call(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; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("reportLostFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - reportLostFile_args args = new reportLostFile_args(); - args.setFileId(fileId); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("workerGetPinIdList", org.apache.thrift.protocol.TMessageType.CALL, 0)); + workerGetPinIdList_args args = new workerGetPinIdList_args(); args.write(prot); prot.writeMessageEnd(); } - public void getResult() throws FileDoesNotExistException, org.apache.thrift.TException { + public Set getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_reportLostFile(); + return (new Client(prot)).recv_workerGetPinIdList(); } } - public void requestFilesInDependency(int depId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void workerGetPriorityDependencyList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - requestFilesInDependency_call method_call = new requestFilesInDependency_call(depId, resultHandler, this, ___protocolFactory, ___transport); + workerGetPriorityDependencyList_call method_call = new workerGetPriorityDependencyList_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class requestFilesInDependency_call extends org.apache.thrift.async.TAsyncMethodCall { - private int depId; - public requestFilesInDependency_call(int depId, 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 static class workerGetPriorityDependencyList_call extends org.apache.thrift.async.TAsyncMethodCall { + public workerGetPriorityDependencyList_call(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.depId = depId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestFilesInDependency", org.apache.thrift.protocol.TMessageType.CALL, 0)); - requestFilesInDependency_args args = new requestFilesInDependency_args(); - args.setDepId(depId); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("workerGetPriorityDependencyList", org.apache.thrift.protocol.TMessageType.CALL, 0)); + workerGetPriorityDependencyList_args args = new workerGetPriorityDependencyList_args(); args.write(prot); prot.writeMessageEnd(); } - public void getResult() throws DependencyDoesNotExistException, org.apache.thrift.TException { + public List getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_requestFilesInDependency(); + return (new Client(prot)).recv_workerGetPriorityDependencyList(); } } @@ -1714,141 +1657,201 @@ protected Processor(I iface, Map Map> getProcessMap(Map> processMap) { - processMap.put("workerGetPinIdList", new workerGetPinIdList()); - processMap.put("workerGetPriorityDependencyList", new workerGetPriorityDependencyList()); + processMap.put("completeFile", new completeFile()); + processMap.put("createDependency", new createDependency()); + processMap.put("createDirectory", new createDirectory()); + processMap.put("createFile", new createFile()); + processMap.put("deleteFile", new deleteFile()); + processMap.put("free", new free()); + processMap.put("getDependencyInfo", new getDependencyInfo()); + processMap.put("getFileBlockInfo", new getFileBlockInfo()); + processMap.put("getFileBlockInfoList", new getFileBlockInfoList()); processMap.put("getFileId", new getFileId()); processMap.put("getFileInfo", new getFileInfo()); processMap.put("getFileInfoList", new getFileInfoList()); - processMap.put("getFileBlockInfo", new getFileBlockInfo()); - processMap.put("getFileBlockInfoList", new getFileBlockInfoList()); processMap.put("getNewBlockIdForFile", new getNewBlockIdForFile()); processMap.put("getUfsAddress", new getUfsAddress()); - processMap.put("createFile", new createFile()); - processMap.put("completeFile", new completeFile()); - processMap.put("deleteFile", new deleteFile()); - processMap.put("renameFile", new renameFile()); - processMap.put("setPinned", new setPinned()); - processMap.put("createDirectory", new createDirectory()); - processMap.put("free", new free()); - processMap.put("persistFile", new persistFile()); processMap.put("loadFileInfoFromUfs", new loadFileInfoFromUfs()); processMap.put("mount", new mount()); - processMap.put("unmount", new unmount()); - processMap.put("createDependency", new createDependency()); - processMap.put("getDependencyInfo", new getDependencyInfo()); + processMap.put("persistFile", new persistFile()); + processMap.put("renameFile", new renameFile()); processMap.put("reportLostFile", new reportLostFile()); processMap.put("requestFilesInDependency", new requestFilesInDependency()); + processMap.put("setPinned", new setPinned()); + processMap.put("unmount", new unmount()); + processMap.put("workerGetPinIdList", new workerGetPinIdList()); + processMap.put("workerGetPriorityDependencyList", new workerGetPriorityDependencyList()); return processMap; } - public static class workerGetPinIdList extends org.apache.thrift.ProcessFunction { - public workerGetPinIdList() { - super("workerGetPinIdList"); + public static class completeFile extends org.apache.thrift.ProcessFunction { + public completeFile() { + super("completeFile"); } - public workerGetPinIdList_args getEmptyArgsInstance() { - return new workerGetPinIdList_args(); + public completeFile_args getEmptyArgsInstance() { + return new completeFile_args(); } protected boolean isOneway() { return false; } - public workerGetPinIdList_result getResult(I iface, workerGetPinIdList_args args) throws org.apache.thrift.TException { - workerGetPinIdList_result result = new workerGetPinIdList_result(); - result.success = iface.workerGetPinIdList(); + public completeFile_result getResult(I iface, completeFile_args args) throws org.apache.thrift.TException { + completeFile_result result = new completeFile_result(); + try { + iface.completeFile(args.fileId); + } catch (TachyonTException e) { + result.e = e; + } return result; } } - public static class workerGetPriorityDependencyList extends org.apache.thrift.ProcessFunction { - public workerGetPriorityDependencyList() { - super("workerGetPriorityDependencyList"); + public static class createDependency extends org.apache.thrift.ProcessFunction { + public createDependency() { + super("createDependency"); } - public workerGetPriorityDependencyList_args getEmptyArgsInstance() { - return new workerGetPriorityDependencyList_args(); + public createDependency_args getEmptyArgsInstance() { + return new createDependency_args(); } protected boolean isOneway() { return false; } - public workerGetPriorityDependencyList_result getResult(I iface, workerGetPriorityDependencyList_args args) throws org.apache.thrift.TException { - workerGetPriorityDependencyList_result result = new workerGetPriorityDependencyList_result(); - result.success = iface.workerGetPriorityDependencyList(); + public createDependency_result getResult(I iface, createDependency_args args) throws org.apache.thrift.TException { + createDependency_result result = new createDependency_result(); + try { + result.success = iface.createDependency(args.parents, args.children, args.commandPrefix, args.data, args.comment, args.framework, args.frameworkVersion, args.dependencyType, args.childrenBlockSizeByte); + result.setSuccessIsSet(true); + } catch (TachyonTException e) { + result.e = e; + } return result; } } - public static class getFileId extends org.apache.thrift.ProcessFunction { - public getFileId() { - super("getFileId"); + public static class createDirectory extends org.apache.thrift.ProcessFunction { + public createDirectory() { + super("createDirectory"); } - public getFileId_args getEmptyArgsInstance() { - return new getFileId_args(); + public createDirectory_args getEmptyArgsInstance() { + return new createDirectory_args(); } protected boolean isOneway() { return false; } - public getFileId_result getResult(I iface, getFileId_args args) throws org.apache.thrift.TException { - getFileId_result result = new getFileId_result(); + public createDirectory_result getResult(I iface, createDirectory_args args) throws org.apache.thrift.TException { + createDirectory_result result = new createDirectory_result(); try { - result.success = iface.getFileId(args.path); + result.success = iface.createDirectory(args.path, args.recursive); result.setSuccessIsSet(true); - } catch (InvalidPathException ipe) { - result.ipe = ipe; + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class getFileInfo extends org.apache.thrift.ProcessFunction { - public getFileInfo() { - super("getFileInfo"); + public static class createFile extends org.apache.thrift.ProcessFunction { + public createFile() { + super("createFile"); } - public getFileInfo_args getEmptyArgsInstance() { - return new getFileInfo_args(); + public createFile_args getEmptyArgsInstance() { + return new createFile_args(); } protected boolean isOneway() { return false; } - public getFileInfo_result getResult(I iface, getFileInfo_args args) throws org.apache.thrift.TException { - getFileInfo_result result = new getFileInfo_result(); + public createFile_result getResult(I iface, createFile_args args) throws org.apache.thrift.TException { + createFile_result result = new createFile_result(); try { - result.success = iface.getFileInfo(args.fileId); - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; + result.success = iface.createFile(args.path, args.blockSizeBytes, args.recursive, args.ttl); + result.setSuccessIsSet(true); + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class getFileInfoList extends org.apache.thrift.ProcessFunction { - public getFileInfoList() { - super("getFileInfoList"); + public static class deleteFile extends org.apache.thrift.ProcessFunction { + public deleteFile() { + super("deleteFile"); } - public getFileInfoList_args getEmptyArgsInstance() { - return new getFileInfoList_args(); + public deleteFile_args getEmptyArgsInstance() { + return new deleteFile_args(); } protected boolean isOneway() { return false; } - public getFileInfoList_result getResult(I iface, getFileInfoList_args args) throws org.apache.thrift.TException { - getFileInfoList_result result = new getFileInfoList_result(); + public deleteFile_result getResult(I iface, deleteFile_args args) throws org.apache.thrift.TException { + deleteFile_result result = new deleteFile_result(); try { - result.success = iface.getFileInfoList(args.fileId); - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; + result.success = iface.deleteFile(args.fileId, args.recursive); + result.setSuccessIsSet(true); + } catch (TachyonTException e) { + result.e = e; + } + return result; + } + } + + public static class free extends org.apache.thrift.ProcessFunction { + public free() { + super("free"); + } + + public free_args getEmptyArgsInstance() { + return new free_args(); + } + + protected boolean isOneway() { + return false; + } + + public free_result getResult(I iface, free_args args) throws org.apache.thrift.TException { + free_result result = new free_result(); + try { + result.success = iface.free(args.fileId, args.recursive); + result.setSuccessIsSet(true); + } catch (TachyonTException e) { + result.e = e; + } + return result; + } + } + + public static class getDependencyInfo extends org.apache.thrift.ProcessFunction { + public getDependencyInfo() { + super("getDependencyInfo"); + } + + public getDependencyInfo_args getEmptyArgsInstance() { + return new getDependencyInfo_args(); + } + + protected boolean isOneway() { + return false; + } + + public getDependencyInfo_result getResult(I iface, getDependencyInfo_args args) throws org.apache.thrift.TException { + getDependencyInfo_result result = new getDependencyInfo_result(); + try { + result.success = iface.getDependencyInfo(args.dependencyId); + } catch (TachyonTException e) { + result.e = e; } return result; } @@ -1871,10 +1874,8 @@ public getFileBlockInfo_result getResult(I iface, getFileBlockInfo_args args) th getFileBlockInfo_result result = new getFileBlockInfo_result(); try { result.success = iface.getFileBlockInfo(args.fileId, args.fileBlockIndex); - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; - } catch (BlockInfoException bie) { - result.bie = bie; + } catch (TachyonTException e) { + result.e = e; } return result; } @@ -1897,244 +1898,178 @@ public getFileBlockInfoList_result getResult(I iface, getFileBlockInfoList_args getFileBlockInfoList_result result = new getFileBlockInfoList_result(); try { result.success = iface.getFileBlockInfoList(args.fileId); - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class getNewBlockIdForFile extends org.apache.thrift.ProcessFunction { - public getNewBlockIdForFile() { - super("getNewBlockIdForFile"); + public static class getFileId extends org.apache.thrift.ProcessFunction { + public getFileId() { + super("getFileId"); } - public getNewBlockIdForFile_args getEmptyArgsInstance() { - return new getNewBlockIdForFile_args(); + public getFileId_args getEmptyArgsInstance() { + return new getFileId_args(); } protected boolean isOneway() { return false; } - public getNewBlockIdForFile_result getResult(I iface, getNewBlockIdForFile_args args) throws org.apache.thrift.TException { - getNewBlockIdForFile_result result = new getNewBlockIdForFile_result(); + public getFileId_result getResult(I iface, getFileId_args args) throws org.apache.thrift.TException { + getFileId_result result = new getFileId_result(); try { - result.success = iface.getNewBlockIdForFile(args.fileId); + result.success = iface.getFileId(args.path); result.setSuccessIsSet(true); - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; - } catch (BlockInfoException bie) { - result.bie = bie; + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class getUfsAddress extends org.apache.thrift.ProcessFunction { - public getUfsAddress() { - super("getUfsAddress"); + public static class getFileInfo extends org.apache.thrift.ProcessFunction { + public getFileInfo() { + super("getFileInfo"); } - public getUfsAddress_args getEmptyArgsInstance() { - return new getUfsAddress_args(); + public getFileInfo_args getEmptyArgsInstance() { + return new getFileInfo_args(); } protected boolean isOneway() { return false; } - public getUfsAddress_result getResult(I iface, getUfsAddress_args args) throws org.apache.thrift.TException { - getUfsAddress_result result = new getUfsAddress_result(); - result.success = iface.getUfsAddress(); + public getFileInfo_result getResult(I iface, getFileInfo_args args) throws org.apache.thrift.TException { + getFileInfo_result result = new getFileInfo_result(); + try { + result.success = iface.getFileInfo(args.fileId); + } catch (TachyonTException e) { + result.e = e; + } return result; } } - public static class createFile extends org.apache.thrift.ProcessFunction { - public createFile() { - super("createFile"); + public static class getFileInfoList extends org.apache.thrift.ProcessFunction { + public getFileInfoList() { + super("getFileInfoList"); } - public createFile_args getEmptyArgsInstance() { - return new createFile_args(); + public getFileInfoList_args getEmptyArgsInstance() { + return new getFileInfoList_args(); } protected boolean isOneway() { return false; } - public createFile_result getResult(I iface, createFile_args args) throws org.apache.thrift.TException { - createFile_result result = new createFile_result(); + public getFileInfoList_result getResult(I iface, getFileInfoList_args args) throws org.apache.thrift.TException { + getFileInfoList_result result = new getFileInfoList_result(); try { - result.success = iface.createFile(args.path, args.blockSizeBytes, args.recursive, args.ttl); - result.setSuccessIsSet(true); - } catch (FileAlreadyExistException faee) { - result.faee = faee; - } catch (BlockInfoException bie) { - result.bie = bie; - } catch (SuspectedFileSizeException sfse) { - result.sfse = sfse; - } catch (TachyonException te) { - result.te = te; + result.success = iface.getFileInfoList(args.fileId); + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class completeFile extends org.apache.thrift.ProcessFunction { - public completeFile() { - super("completeFile"); - } - - public completeFile_args getEmptyArgsInstance() { - return new completeFile_args(); - } - - protected boolean isOneway() { - return false; - } - - public completeFile_result getResult(I iface, completeFile_args args) throws org.apache.thrift.TException { - completeFile_result result = new completeFile_result(); - try { - iface.completeFile(args.fileId); - } catch (BlockInfoException bie) { - result.bie = bie; - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; - } catch (InvalidPathException ipe) { - result.ipe = ipe; - } - return result; - } - } - - public static class deleteFile extends org.apache.thrift.ProcessFunction { - public deleteFile() { - super("deleteFile"); - } - - public deleteFile_args getEmptyArgsInstance() { - return new deleteFile_args(); - } - - protected boolean isOneway() { - return false; - } - - public deleteFile_result getResult(I iface, deleteFile_args args) throws org.apache.thrift.TException { - deleteFile_result result = new deleteFile_result(); - try { - result.success = iface.deleteFile(args.fileId, args.recursive); - result.setSuccessIsSet(true); - } catch (TachyonException te) { - result.te = te; - } - return result; - } - } - - public static class renameFile extends org.apache.thrift.ProcessFunction { - public renameFile() { - super("renameFile"); + public static class getNewBlockIdForFile extends org.apache.thrift.ProcessFunction { + public getNewBlockIdForFile() { + super("getNewBlockIdForFile"); } - public renameFile_args getEmptyArgsInstance() { - return new renameFile_args(); + public getNewBlockIdForFile_args getEmptyArgsInstance() { + return new getNewBlockIdForFile_args(); } protected boolean isOneway() { return false; } - public renameFile_result getResult(I iface, renameFile_args args) throws org.apache.thrift.TException { - renameFile_result result = new renameFile_result(); + public getNewBlockIdForFile_result getResult(I iface, getNewBlockIdForFile_args args) throws org.apache.thrift.TException { + getNewBlockIdForFile_result result = new getNewBlockIdForFile_result(); try { - result.success = iface.renameFile(args.fileId, args.dstPath); + result.success = iface.getNewBlockIdForFile(args.fileId); result.setSuccessIsSet(true); - } catch (FileAlreadyExistException faee) { - result.faee = faee; - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; - } catch (InvalidPathException ipe) { - result.ipe = ipe; + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class setPinned extends org.apache.thrift.ProcessFunction { - public setPinned() { - super("setPinned"); + public static class getUfsAddress extends org.apache.thrift.ProcessFunction { + public getUfsAddress() { + super("getUfsAddress"); } - public setPinned_args getEmptyArgsInstance() { - return new setPinned_args(); + public getUfsAddress_args getEmptyArgsInstance() { + return new getUfsAddress_args(); } protected boolean isOneway() { return false; } - public setPinned_result getResult(I iface, setPinned_args args) throws org.apache.thrift.TException { - setPinned_result result = new setPinned_result(); - try { - iface.setPinned(args.fileId, args.pinned); - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; - } + public getUfsAddress_result getResult(I iface, getUfsAddress_args args) throws org.apache.thrift.TException { + getUfsAddress_result result = new getUfsAddress_result(); + result.success = iface.getUfsAddress(); return result; } } - public static class createDirectory extends org.apache.thrift.ProcessFunction { - public createDirectory() { - super("createDirectory"); + public static class loadFileInfoFromUfs extends org.apache.thrift.ProcessFunction { + public loadFileInfoFromUfs() { + super("loadFileInfoFromUfs"); } - public createDirectory_args getEmptyArgsInstance() { - return new createDirectory_args(); + public loadFileInfoFromUfs_args getEmptyArgsInstance() { + return new loadFileInfoFromUfs_args(); } protected boolean isOneway() { return false; } - public createDirectory_result getResult(I iface, createDirectory_args args) throws org.apache.thrift.TException { - createDirectory_result result = new createDirectory_result(); + public loadFileInfoFromUfs_result getResult(I iface, loadFileInfoFromUfs_args args) throws org.apache.thrift.TException { + loadFileInfoFromUfs_result result = new loadFileInfoFromUfs_result(); try { - result.success = iface.createDirectory(args.path, args.recursive); + result.success = iface.loadFileInfoFromUfs(args.ufsPath, args.recursive); result.setSuccessIsSet(true); - } catch (FileAlreadyExistException faee) { - result.faee = faee; - } catch (InvalidPathException ipe) { - result.ipe = ipe; + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class free extends org.apache.thrift.ProcessFunction { - public free() { - super("free"); + public static class mount extends org.apache.thrift.ProcessFunction { + public mount() { + super("mount"); } - public free_args getEmptyArgsInstance() { - return new free_args(); + public mount_args getEmptyArgsInstance() { + return new mount_args(); } protected boolean isOneway() { return false; } - public free_result getResult(I iface, free_args args) throws org.apache.thrift.TException { - free_result result = new free_result(); + public mount_result getResult(I iface, mount_args args) throws org.apache.thrift.TException { + mount_result result = new mount_result(); try { - result.success = iface.free(args.fileId, args.recursive); + result.success = iface.mount(args.tachyonPath, args.ufsPath); result.setSuccessIsSet(true); - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; + } catch (TachyonTException e) { + result.e = e; + } catch (ThriftIOException ioe) { + result.ioe = ioe; } return result; } @@ -2158,203 +2093,173 @@ public persistFile_result getResult(I iface, persistFile_args args) throws org.a try { result.success = iface.persistFile(args.fileId, args.length); result.setSuccessIsSet(true); - } catch (FileDoesNotExistException eP) { - result.eP = eP; - } catch (SuspectedFileSizeException eS) { - result.eS = eS; - } catch (BlockInfoException eB) { - result.eB = eB; + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class loadFileInfoFromUfs extends org.apache.thrift.ProcessFunction { - public loadFileInfoFromUfs() { - super("loadFileInfoFromUfs"); + public static class renameFile extends org.apache.thrift.ProcessFunction { + public renameFile() { + super("renameFile"); } - public loadFileInfoFromUfs_args getEmptyArgsInstance() { - return new loadFileInfoFromUfs_args(); + public renameFile_args getEmptyArgsInstance() { + return new renameFile_args(); } protected boolean isOneway() { return false; } - public loadFileInfoFromUfs_result getResult(I iface, loadFileInfoFromUfs_args args) throws org.apache.thrift.TException { - loadFileInfoFromUfs_result result = new loadFileInfoFromUfs_result(); + public renameFile_result getResult(I iface, renameFile_args args) throws org.apache.thrift.TException { + renameFile_result result = new renameFile_result(); try { - result.success = iface.loadFileInfoFromUfs(args.ufsPath, args.recursive); + result.success = iface.renameFile(args.fileId, args.dstPath); result.setSuccessIsSet(true); - } catch (BlockInfoException bie) { - result.bie = bie; - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; - } catch (FileAlreadyExistException faee) { - result.faee = faee; - } catch (InvalidPathException ipe) { - result.ipe = ipe; - } catch (SuspectedFileSizeException sfse) { - result.sfse = sfse; - } catch (TachyonException te) { - result.te = te; + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class mount extends org.apache.thrift.ProcessFunction { - public mount() { - super("mount"); + public static class reportLostFile extends org.apache.thrift.ProcessFunction { + public reportLostFile() { + super("reportLostFile"); } - public mount_args getEmptyArgsInstance() { - return new mount_args(); + public reportLostFile_args getEmptyArgsInstance() { + return new reportLostFile_args(); } protected boolean isOneway() { return false; } - public mount_result getResult(I iface, mount_args args) throws org.apache.thrift.TException { - mount_result result = new mount_result(); + public reportLostFile_result getResult(I iface, reportLostFile_args args) throws org.apache.thrift.TException { + reportLostFile_result result = new reportLostFile_result(); try { - result.success = iface.mount(args.tachyonPath, args.ufsPath); - result.setSuccessIsSet(true); - } catch (TachyonException te) { - result.te = te; + iface.reportLostFile(args.fileId); + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class unmount extends org.apache.thrift.ProcessFunction { - public unmount() { - super("unmount"); + public static class requestFilesInDependency extends org.apache.thrift.ProcessFunction { + public requestFilesInDependency() { + super("requestFilesInDependency"); } - public unmount_args getEmptyArgsInstance() { - return new unmount_args(); + public requestFilesInDependency_args getEmptyArgsInstance() { + return new requestFilesInDependency_args(); } protected boolean isOneway() { return false; } - public unmount_result getResult(I iface, unmount_args args) throws org.apache.thrift.TException { - unmount_result result = new unmount_result(); + public requestFilesInDependency_result getResult(I iface, requestFilesInDependency_args args) throws org.apache.thrift.TException { + requestFilesInDependency_result result = new requestFilesInDependency_result(); try { - result.success = iface.unmount(args.tachyonPath); - result.setSuccessIsSet(true); - } catch (TachyonException te) { - result.te = te; + iface.requestFilesInDependency(args.depId); + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class createDependency extends org.apache.thrift.ProcessFunction { - public createDependency() { - super("createDependency"); + public static class setPinned extends org.apache.thrift.ProcessFunction { + public setPinned() { + super("setPinned"); } - public createDependency_args getEmptyArgsInstance() { - return new createDependency_args(); + public setPinned_args getEmptyArgsInstance() { + return new setPinned_args(); } protected boolean isOneway() { return false; } - public createDependency_result getResult(I iface, createDependency_args args) throws org.apache.thrift.TException { - createDependency_result result = new createDependency_result(); + public setPinned_result getResult(I iface, setPinned_args args) throws org.apache.thrift.TException { + setPinned_result result = new setPinned_result(); try { - result.success = iface.createDependency(args.parents, args.children, args.commandPrefix, args.data, args.comment, args.framework, args.frameworkVersion, args.dependencyType, args.childrenBlockSizeByte); - result.setSuccessIsSet(true); - } catch (InvalidPathException ipe) { - result.ipe = ipe; - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; - } catch (FileAlreadyExistException faee) { - result.faee = faee; - } catch (BlockInfoException bie) { - result.bie = bie; - } catch (TachyonException te) { - result.te = te; + iface.setPinned(args.fileId, args.pinned); + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class getDependencyInfo extends org.apache.thrift.ProcessFunction { - public getDependencyInfo() { - super("getDependencyInfo"); + public static class unmount extends org.apache.thrift.ProcessFunction { + public unmount() { + super("unmount"); } - public getDependencyInfo_args getEmptyArgsInstance() { - return new getDependencyInfo_args(); + public unmount_args getEmptyArgsInstance() { + return new unmount_args(); } protected boolean isOneway() { return false; } - public getDependencyInfo_result getResult(I iface, getDependencyInfo_args args) throws org.apache.thrift.TException { - getDependencyInfo_result result = new getDependencyInfo_result(); + public unmount_result getResult(I iface, unmount_args args) throws org.apache.thrift.TException { + unmount_result result = new unmount_result(); try { - result.success = iface.getDependencyInfo(args.dependencyId); - } catch (DependencyDoesNotExistException ddnee) { - result.ddnee = ddnee; + result.success = iface.unmount(args.tachyonPath); + result.setSuccessIsSet(true); + } catch (TachyonTException e) { + result.e = e; + } catch (ThriftIOException ioe) { + result.ioe = ioe; } return result; } } - public static class reportLostFile extends org.apache.thrift.ProcessFunction { - public reportLostFile() { - super("reportLostFile"); + public static class workerGetPinIdList extends org.apache.thrift.ProcessFunction { + public workerGetPinIdList() { + super("workerGetPinIdList"); } - public reportLostFile_args getEmptyArgsInstance() { - return new reportLostFile_args(); + public workerGetPinIdList_args getEmptyArgsInstance() { + return new workerGetPinIdList_args(); } protected boolean isOneway() { return false; } - public reportLostFile_result getResult(I iface, reportLostFile_args args) throws org.apache.thrift.TException { - reportLostFile_result result = new reportLostFile_result(); - try { - iface.reportLostFile(args.fileId); - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; - } + public workerGetPinIdList_result getResult(I iface, workerGetPinIdList_args args) throws org.apache.thrift.TException { + workerGetPinIdList_result result = new workerGetPinIdList_result(); + result.success = iface.workerGetPinIdList(); return result; } } - public static class requestFilesInDependency extends org.apache.thrift.ProcessFunction { - public requestFilesInDependency() { - super("requestFilesInDependency"); + public static class workerGetPriorityDependencyList extends org.apache.thrift.ProcessFunction { + public workerGetPriorityDependencyList() { + super("workerGetPriorityDependencyList"); } - public requestFilesInDependency_args getEmptyArgsInstance() { - return new requestFilesInDependency_args(); + public workerGetPriorityDependencyList_args getEmptyArgsInstance() { + return new workerGetPriorityDependencyList_args(); } protected boolean isOneway() { return false; } - public requestFilesInDependency_result getResult(I iface, requestFilesInDependency_args args) throws org.apache.thrift.TException { - requestFilesInDependency_result result = new requestFilesInDependency_result(); - try { - iface.requestFilesInDependency(args.depId); - } catch (DependencyDoesNotExistException ddnee) { - result.ddnee = ddnee; - } + public workerGetPriorityDependencyList_result getResult(I iface, workerGetPriorityDependencyList_args args) throws org.apache.thrift.TException { + workerGetPriorityDependencyList_result result = new workerGetPriorityDependencyList_result(); + result.success = iface.workerGetPriorityDependencyList(); return result; } } @@ -2372,48 +2277,47 @@ protected AsyncProcessor(I iface, Map Map> getProcessMap(Map> processMap) { - processMap.put("workerGetPinIdList", new workerGetPinIdList()); - processMap.put("workerGetPriorityDependencyList", new workerGetPriorityDependencyList()); + processMap.put("completeFile", new completeFile()); + processMap.put("createDependency", new createDependency()); + processMap.put("createDirectory", new createDirectory()); + processMap.put("createFile", new createFile()); + processMap.put("deleteFile", new deleteFile()); + processMap.put("free", new free()); + processMap.put("getDependencyInfo", new getDependencyInfo()); + processMap.put("getFileBlockInfo", new getFileBlockInfo()); + processMap.put("getFileBlockInfoList", new getFileBlockInfoList()); processMap.put("getFileId", new getFileId()); processMap.put("getFileInfo", new getFileInfo()); processMap.put("getFileInfoList", new getFileInfoList()); - processMap.put("getFileBlockInfo", new getFileBlockInfo()); - processMap.put("getFileBlockInfoList", new getFileBlockInfoList()); processMap.put("getNewBlockIdForFile", new getNewBlockIdForFile()); processMap.put("getUfsAddress", new getUfsAddress()); - processMap.put("createFile", new createFile()); - processMap.put("completeFile", new completeFile()); - processMap.put("deleteFile", new deleteFile()); - processMap.put("renameFile", new renameFile()); - processMap.put("setPinned", new setPinned()); - processMap.put("createDirectory", new createDirectory()); - processMap.put("free", new free()); - processMap.put("persistFile", new persistFile()); processMap.put("loadFileInfoFromUfs", new loadFileInfoFromUfs()); processMap.put("mount", new mount()); - processMap.put("unmount", new unmount()); - processMap.put("createDependency", new createDependency()); - processMap.put("getDependencyInfo", new getDependencyInfo()); + processMap.put("persistFile", new persistFile()); + processMap.put("renameFile", new renameFile()); processMap.put("reportLostFile", new reportLostFile()); processMap.put("requestFilesInDependency", new requestFilesInDependency()); - return processMap; + processMap.put("setPinned", new setPinned()); + processMap.put("unmount", new unmount()); + processMap.put("workerGetPinIdList", new workerGetPinIdList()); + processMap.put("workerGetPriorityDependencyList", new workerGetPriorityDependencyList()); + return processMap; } - public static class workerGetPinIdList extends org.apache.thrift.AsyncProcessFunction> { - public workerGetPinIdList() { - super("workerGetPinIdList"); + public static class completeFile extends org.apache.thrift.AsyncProcessFunction { + public completeFile() { + super("completeFile"); } - public workerGetPinIdList_args getEmptyArgsInstance() { - return new workerGetPinIdList_args(); + public completeFile_args getEmptyArgsInstance() { + return new completeFile_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(Set o) { - workerGetPinIdList_result result = new workerGetPinIdList_result(); - result.success = o; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + completeFile_result result = new completeFile_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -2425,7 +2329,13 @@ public void onComplete(Set o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - workerGetPinIdList_result result = new workerGetPinIdList_result(); + completeFile_result result = new completeFile_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); + msg = result; + } + 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()); @@ -2445,26 +2355,27 @@ protected boolean isOneway() { return false; } - public void start(I iface, workerGetPinIdList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.workerGetPinIdList(resultHandler); + public void start(I iface, completeFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.completeFile(args.fileId,resultHandler); } } - public static class workerGetPriorityDependencyList extends org.apache.thrift.AsyncProcessFunction> { - public workerGetPriorityDependencyList() { - super("workerGetPriorityDependencyList"); + public static class createDependency extends org.apache.thrift.AsyncProcessFunction { + public createDependency() { + super("createDependency"); } - public workerGetPriorityDependencyList_args getEmptyArgsInstance() { - return new workerGetPriorityDependencyList_args(); + public createDependency_args getEmptyArgsInstance() { + return new createDependency_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - workerGetPriorityDependencyList_result result = new workerGetPriorityDependencyList_result(); + return new AsyncMethodCallback() { + public void onComplete(Integer o) { + createDependency_result result = new createDependency_result(); result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -2476,7 +2387,13 @@ public void onComplete(List o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - workerGetPriorityDependencyList_result result = new workerGetPriorityDependencyList_result(); + createDependency_result result = new createDependency_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); + msg = result; + } + 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()); @@ -2496,25 +2413,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, workerGetPriorityDependencyList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.workerGetPriorityDependencyList(resultHandler); + public void start(I iface, createDependency_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.createDependency(args.parents, args.children, args.commandPrefix, args.data, args.comment, args.framework, args.frameworkVersion, args.dependencyType, args.childrenBlockSizeByte,resultHandler); } } - public static class getFileId extends org.apache.thrift.AsyncProcessFunction { - public getFileId() { - super("getFileId"); + public static class createDirectory extends org.apache.thrift.AsyncProcessFunction { + public createDirectory() { + super("createDirectory"); } - public getFileId_args getEmptyArgsInstance() { - return new getFileId_args(); + public createDirectory_args getEmptyArgsInstance() { + return new createDirectory_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Long o) { - getFileId_result result = new getFileId_result(); + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + createDirectory_result result = new createDirectory_result(); result.success = o; result.setSuccessIsSet(true); try { @@ -2528,10 +2445,10 @@ public void onComplete(Long o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getFileId_result result = new getFileId_result(); - if (e instanceof InvalidPathException) { - result.ipe = (InvalidPathException) e; - result.setIpeIsSet(true); + createDirectory_result result = new createDirectory_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -2554,26 +2471,27 @@ protected boolean isOneway() { return false; } - public void start(I iface, getFileId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getFileId(args.path,resultHandler); + public void start(I iface, createDirectory_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.createDirectory(args.path, args.recursive,resultHandler); } } - public static class getFileInfo extends org.apache.thrift.AsyncProcessFunction { - public getFileInfo() { - super("getFileInfo"); + public static class createFile extends org.apache.thrift.AsyncProcessFunction { + public createFile() { + super("createFile"); } - public getFileInfo_args getEmptyArgsInstance() { - return new getFileInfo_args(); + public createFile_args getEmptyArgsInstance() { + return new createFile_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(FileInfo o) { - getFileInfo_result result = new getFileInfo_result(); + return new AsyncMethodCallback() { + public void onComplete(Long o) { + createFile_result result = new createFile_result(); result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -2585,10 +2503,10 @@ public void onComplete(FileInfo o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getFileInfo_result result = new getFileInfo_result(); - if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); + createFile_result result = new createFile_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -2611,26 +2529,27 @@ protected boolean isOneway() { return false; } - public void start(I iface, getFileInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getFileInfo(args.fileId,resultHandler); + public void start(I iface, createFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.createFile(args.path, args.blockSizeBytes, args.recursive, args.ttl,resultHandler); } } - public static class getFileInfoList extends org.apache.thrift.AsyncProcessFunction> { - public getFileInfoList() { - super("getFileInfoList"); + public static class deleteFile extends org.apache.thrift.AsyncProcessFunction { + public deleteFile() { + super("deleteFile"); } - public getFileInfoList_args getEmptyArgsInstance() { - return new getFileInfoList_args(); + public deleteFile_args getEmptyArgsInstance() { + return new deleteFile_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getFileInfoList_result result = new getFileInfoList_result(); + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + deleteFile_result result = new deleteFile_result(); result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -2642,10 +2561,10 @@ public void onComplete(List o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getFileInfoList_result result = new getFileInfoList_result(); - if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); + deleteFile_result result = new deleteFile_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -2668,26 +2587,27 @@ protected boolean isOneway() { return false; } - public void start(I iface, getFileInfoList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.getFileInfoList(args.fileId,resultHandler); + public void start(I iface, deleteFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deleteFile(args.fileId, args.recursive,resultHandler); } } - public static class getFileBlockInfo extends org.apache.thrift.AsyncProcessFunction { - public getFileBlockInfo() { - super("getFileBlockInfo"); + public static class free extends org.apache.thrift.AsyncProcessFunction { + public free() { + super("free"); } - public getFileBlockInfo_args getEmptyArgsInstance() { - return new getFileBlockInfo_args(); + public free_args getEmptyArgsInstance() { + return new free_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(FileBlockInfo o) { - getFileBlockInfo_result result = new getFileBlockInfo_result(); + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + free_result result = new free_result(); result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -2699,15 +2619,10 @@ public void onComplete(FileBlockInfo o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getFileBlockInfo_result result = new getFileBlockInfo_result(); - if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); - msg = result; - } - else if (e instanceof BlockInfoException) { - result.bie = (BlockInfoException) e; - result.setBieIsSet(true); + free_result result = new free_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -2730,25 +2645,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getFileBlockInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getFileBlockInfo(args.fileId, args.fileBlockIndex,resultHandler); + public void start(I iface, free_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.free(args.fileId, args.recursive,resultHandler); } } - public static class getFileBlockInfoList extends org.apache.thrift.AsyncProcessFunction> { - public getFileBlockInfoList() { - super("getFileBlockInfoList"); + public static class getDependencyInfo extends org.apache.thrift.AsyncProcessFunction { + public getDependencyInfo() { + super("getDependencyInfo"); } - public getFileBlockInfoList_args getEmptyArgsInstance() { - return new getFileBlockInfoList_args(); + public getDependencyInfo_args getEmptyArgsInstance() { + return new getDependencyInfo_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getFileBlockInfoList_result result = new getFileBlockInfoList_result(); + return new AsyncMethodCallback() { + public void onComplete(DependencyInfo o) { + getDependencyInfo_result result = new getDependencyInfo_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -2761,10 +2676,10 @@ public void onComplete(List o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getFileBlockInfoList_result result = new getFileBlockInfoList_result(); - if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); + getDependencyInfo_result result = new getDependencyInfo_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -2787,27 +2702,26 @@ protected boolean isOneway() { return false; } - public void start(I iface, getFileBlockInfoList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.getFileBlockInfoList(args.fileId,resultHandler); + public void start(I iface, getDependencyInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getDependencyInfo(args.dependencyId,resultHandler); } } - public static class getNewBlockIdForFile extends org.apache.thrift.AsyncProcessFunction { - public getNewBlockIdForFile() { - super("getNewBlockIdForFile"); + public static class getFileBlockInfo extends org.apache.thrift.AsyncProcessFunction { + public getFileBlockInfo() { + super("getFileBlockInfo"); } - public getNewBlockIdForFile_args getEmptyArgsInstance() { - return new getNewBlockIdForFile_args(); + public getFileBlockInfo_args getEmptyArgsInstance() { + return new getFileBlockInfo_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Long o) { - getNewBlockIdForFile_result result = new getNewBlockIdForFile_result(); + return new AsyncMethodCallback() { + public void onComplete(FileBlockInfo o) { + getFileBlockInfo_result result = new getFileBlockInfo_result(); result.success = o; - result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -2819,15 +2733,10 @@ public void onComplete(Long o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getNewBlockIdForFile_result result = new getNewBlockIdForFile_result(); - if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); - msg = result; - } - else if (e instanceof BlockInfoException) { - result.bie = (BlockInfoException) e; - result.setBieIsSet(true); + getFileBlockInfo_result result = new getFileBlockInfo_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -2850,25 +2759,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getNewBlockIdForFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getNewBlockIdForFile(args.fileId,resultHandler); + public void start(I iface, getFileBlockInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getFileBlockInfo(args.fileId, args.fileBlockIndex,resultHandler); } } - public static class getUfsAddress extends org.apache.thrift.AsyncProcessFunction { - public getUfsAddress() { - super("getUfsAddress"); + public static class getFileBlockInfoList extends org.apache.thrift.AsyncProcessFunction> { + public getFileBlockInfoList() { + super("getFileBlockInfoList"); } - public getUfsAddress_args getEmptyArgsInstance() { - return new getUfsAddress_args(); + public getFileBlockInfoList_args getEmptyArgsInstance() { + return new getFileBlockInfoList_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(String o) { - getUfsAddress_result result = new getUfsAddress_result(); + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getFileBlockInfoList_result result = new getFileBlockInfoList_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -2881,7 +2790,13 @@ public void onComplete(String o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getUfsAddress_result result = new getUfsAddress_result(); + getFileBlockInfoList_result result = new getFileBlockInfoList_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); + msg = result; + } + 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()); @@ -2901,25 +2816,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getUfsAddress_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getUfsAddress(resultHandler); + public void start(I iface, getFileBlockInfoList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getFileBlockInfoList(args.fileId,resultHandler); } } - public static class createFile extends org.apache.thrift.AsyncProcessFunction { - public createFile() { - super("createFile"); + public static class getFileId extends org.apache.thrift.AsyncProcessFunction { + public getFileId() { + super("getFileId"); } - public createFile_args getEmptyArgsInstance() { - return new createFile_args(); + public getFileId_args getEmptyArgsInstance() { + return new getFileId_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Long o) { - createFile_result result = new createFile_result(); + getFileId_result result = new getFileId_result(); result.success = o; result.setSuccessIsSet(true); try { @@ -2933,25 +2848,10 @@ public void onComplete(Long o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - createFile_result result = new createFile_result(); - if (e instanceof FileAlreadyExistException) { - result.faee = (FileAlreadyExistException) e; - result.setFaeeIsSet(true); - msg = result; - } - else if (e instanceof BlockInfoException) { - result.bie = (BlockInfoException) e; - result.setBieIsSet(true); - msg = result; - } - else if (e instanceof SuspectedFileSizeException) { - result.sfse = (SuspectedFileSizeException) e; - result.setSfseIsSet(true); - msg = result; - } - else if (e instanceof TachyonException) { - result.te = (TachyonException) e; - result.setTeIsSet(true); + getFileId_result result = new getFileId_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -2974,25 +2874,26 @@ protected boolean isOneway() { return false; } - public void start(I iface, createFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.createFile(args.path, args.blockSizeBytes, args.recursive, args.ttl,resultHandler); + public void start(I iface, getFileId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getFileId(args.path,resultHandler); } } - public static class completeFile extends org.apache.thrift.AsyncProcessFunction { - public completeFile() { - super("completeFile"); + public static class getFileInfo extends org.apache.thrift.AsyncProcessFunction { + public getFileInfo() { + super("getFileInfo"); } - public completeFile_args getEmptyArgsInstance() { - return new completeFile_args(); + public getFileInfo_args getEmptyArgsInstance() { + return new getFileInfo_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - completeFile_result result = new completeFile_result(); + return new AsyncMethodCallback() { + public void onComplete(FileInfo o) { + getFileInfo_result result = new getFileInfo_result(); + result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -3004,20 +2905,10 @@ public void onComplete(Void o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - completeFile_result result = new completeFile_result(); - if (e instanceof BlockInfoException) { - result.bie = (BlockInfoException) e; - result.setBieIsSet(true); - msg = result; - } - else if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); - msg = result; - } - else if (e instanceof InvalidPathException) { - result.ipe = (InvalidPathException) e; - result.setIpeIsSet(true); + getFileInfo_result result = new getFileInfo_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -3040,27 +2931,26 @@ protected boolean isOneway() { return false; } - public void start(I iface, completeFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.completeFile(args.fileId,resultHandler); + public void start(I iface, getFileInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getFileInfo(args.fileId,resultHandler); } } - public static class deleteFile extends org.apache.thrift.AsyncProcessFunction { - public deleteFile() { - super("deleteFile"); + public static class getFileInfoList extends org.apache.thrift.AsyncProcessFunction> { + public getFileInfoList() { + super("getFileInfoList"); } - public deleteFile_args getEmptyArgsInstance() { - return new deleteFile_args(); + public getFileInfoList_args getEmptyArgsInstance() { + return new getFileInfoList_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - deleteFile_result result = new deleteFile_result(); + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getFileInfoList_result result = new getFileInfoList_result(); result.success = o; - result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -3072,10 +2962,10 @@ public void onComplete(Boolean o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - deleteFile_result result = new deleteFile_result(); - if (e instanceof TachyonException) { - result.te = (TachyonException) e; - result.setTeIsSet(true); + getFileInfoList_result result = new getFileInfoList_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -3098,25 +2988,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, deleteFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.deleteFile(args.fileId, args.recursive,resultHandler); + public void start(I iface, getFileInfoList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getFileInfoList(args.fileId,resultHandler); } } - public static class renameFile extends org.apache.thrift.AsyncProcessFunction { - public renameFile() { - super("renameFile"); + public static class getNewBlockIdForFile extends org.apache.thrift.AsyncProcessFunction { + public getNewBlockIdForFile() { + super("getNewBlockIdForFile"); } - public renameFile_args getEmptyArgsInstance() { - return new renameFile_args(); + public getNewBlockIdForFile_args getEmptyArgsInstance() { + return new getNewBlockIdForFile_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - renameFile_result result = new renameFile_result(); + return new AsyncMethodCallback() { + public void onComplete(Long o) { + getNewBlockIdForFile_result result = new getNewBlockIdForFile_result(); result.success = o; result.setSuccessIsSet(true); try { @@ -3130,20 +3020,10 @@ public void onComplete(Boolean o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - renameFile_result result = new renameFile_result(); - if (e instanceof FileAlreadyExistException) { - result.faee = (FileAlreadyExistException) e; - result.setFaeeIsSet(true); - msg = result; - } - else if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); - msg = result; - } - else if (e instanceof InvalidPathException) { - result.ipe = (InvalidPathException) e; - result.setIpeIsSet(true); + getNewBlockIdForFile_result result = new getNewBlockIdForFile_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -3166,25 +3046,26 @@ protected boolean isOneway() { return false; } - public void start(I iface, renameFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.renameFile(args.fileId, args.dstPath,resultHandler); + public void start(I iface, getNewBlockIdForFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getNewBlockIdForFile(args.fileId,resultHandler); } } - public static class setPinned extends org.apache.thrift.AsyncProcessFunction { - public setPinned() { - super("setPinned"); + public static class getUfsAddress extends org.apache.thrift.AsyncProcessFunction { + public getUfsAddress() { + super("getUfsAddress"); } - public setPinned_args getEmptyArgsInstance() { - return new setPinned_args(); + public getUfsAddress_args getEmptyArgsInstance() { + return new getUfsAddress_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - setPinned_result result = new setPinned_result(); + return new AsyncMethodCallback() { + public void onComplete(String o) { + getUfsAddress_result result = new getUfsAddress_result(); + result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -3196,13 +3077,7 @@ public void onComplete(Void o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - setPinned_result result = new setPinned_result(); - if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); - msg = result; - } - else + getUfsAddress_result result = new getUfsAddress_result(); { 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()); @@ -3222,25 +3097,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, setPinned_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.setPinned(args.fileId, args.pinned,resultHandler); + public void start(I iface, getUfsAddress_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getUfsAddress(resultHandler); } } - public static class createDirectory extends org.apache.thrift.AsyncProcessFunction { - public createDirectory() { - super("createDirectory"); + public static class loadFileInfoFromUfs extends org.apache.thrift.AsyncProcessFunction { + public loadFileInfoFromUfs() { + super("loadFileInfoFromUfs"); } - public createDirectory_args getEmptyArgsInstance() { - return new createDirectory_args(); + public loadFileInfoFromUfs_args getEmptyArgsInstance() { + return new loadFileInfoFromUfs_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - createDirectory_result result = new createDirectory_result(); + return new AsyncMethodCallback() { + public void onComplete(Long o) { + loadFileInfoFromUfs_result result = new loadFileInfoFromUfs_result(); result.success = o; result.setSuccessIsSet(true); try { @@ -3254,15 +3129,10 @@ public void onComplete(Boolean o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - createDirectory_result result = new createDirectory_result(); - if (e instanceof FileAlreadyExistException) { - result.faee = (FileAlreadyExistException) e; - result.setFaeeIsSet(true); - msg = result; - } - else if (e instanceof InvalidPathException) { - result.ipe = (InvalidPathException) e; - result.setIpeIsSet(true); + loadFileInfoFromUfs_result result = new loadFileInfoFromUfs_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -3285,25 +3155,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, createDirectory_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.createDirectory(args.path, args.recursive,resultHandler); + public void start(I iface, loadFileInfoFromUfs_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.loadFileInfoFromUfs(args.ufsPath, args.recursive,resultHandler); } } - public static class free extends org.apache.thrift.AsyncProcessFunction { - public free() { - super("free"); + public static class mount extends org.apache.thrift.AsyncProcessFunction { + public mount() { + super("mount"); } - public free_args getEmptyArgsInstance() { - return new free_args(); + public mount_args getEmptyArgsInstance() { + return new mount_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) { - free_result result = new free_result(); + mount_result result = new mount_result(); result.success = o; result.setSuccessIsSet(true); try { @@ -3317,10 +3187,15 @@ public void onComplete(Boolean o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - free_result result = new free_result(); - if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); + mount_result result = new mount_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); + msg = result; + } + else if (e instanceof ThriftIOException) { + result.ioe = (ThriftIOException) e; + result.setIoeIsSet(true); msg = result; } else @@ -3343,8 +3218,8 @@ protected boolean isOneway() { return false; } - public void start(I iface, free_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.free(args.fileId, args.recursive,resultHandler); + public void start(I iface, mount_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.mount(args.tachyonPath, args.ufsPath,resultHandler); } } @@ -3376,19 +3251,9 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; persistFile_result result = new persistFile_result(); - if (e instanceof FileDoesNotExistException) { - result.eP = (FileDoesNotExistException) e; - result.setEPIsSet(true); - msg = result; - } - else if (e instanceof SuspectedFileSizeException) { - result.eS = (SuspectedFileSizeException) e; - result.setESIsSet(true); - msg = result; - } - else if (e instanceof BlockInfoException) { - result.eB = (BlockInfoException) e; - result.setEBIsSet(true); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -3416,20 +3281,20 @@ public void start(I iface, persistFile_args args, org.apache.thrift.async.AsyncM } } - public static class loadFileInfoFromUfs extends org.apache.thrift.AsyncProcessFunction { - public loadFileInfoFromUfs() { - super("loadFileInfoFromUfs"); + public static class renameFile extends org.apache.thrift.AsyncProcessFunction { + public renameFile() { + super("renameFile"); } - public loadFileInfoFromUfs_args getEmptyArgsInstance() { - return new loadFileInfoFromUfs_args(); + public renameFile_args getEmptyArgsInstance() { + return new renameFile_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Long o) { - loadFileInfoFromUfs_result result = new loadFileInfoFromUfs_result(); + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + renameFile_result result = new renameFile_result(); result.success = o; result.setSuccessIsSet(true); try { @@ -3443,35 +3308,10 @@ public void onComplete(Long o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - loadFileInfoFromUfs_result result = new loadFileInfoFromUfs_result(); - if (e instanceof BlockInfoException) { - result.bie = (BlockInfoException) e; - result.setBieIsSet(true); - msg = result; - } - else if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); - msg = result; - } - else if (e instanceof FileAlreadyExistException) { - result.faee = (FileAlreadyExistException) e; - result.setFaeeIsSet(true); - msg = result; - } - else if (e instanceof InvalidPathException) { - result.ipe = (InvalidPathException) e; - result.setIpeIsSet(true); - msg = result; - } - else if (e instanceof SuspectedFileSizeException) { - result.sfse = (SuspectedFileSizeException) e; - result.setSfseIsSet(true); - msg = result; - } - else if (e instanceof TachyonException) { - result.te = (TachyonException) e; - result.setTeIsSet(true); + renameFile_result result = new renameFile_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -3494,27 +3334,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, loadFileInfoFromUfs_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.loadFileInfoFromUfs(args.ufsPath, args.recursive,resultHandler); + public void start(I iface, renameFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.renameFile(args.fileId, args.dstPath,resultHandler); } } - public static class mount extends org.apache.thrift.AsyncProcessFunction { - public mount() { - super("mount"); + public static class reportLostFile extends org.apache.thrift.AsyncProcessFunction { + public reportLostFile() { + super("reportLostFile"); } - public mount_args getEmptyArgsInstance() { - return new mount_args(); + public reportLostFile_args getEmptyArgsInstance() { + return new reportLostFile_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - mount_result result = new mount_result(); - result.success = o; - result.setSuccessIsSet(true); + return new AsyncMethodCallback() { + public void onComplete(Void o) { + reportLostFile_result result = new reportLostFile_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -3526,10 +3364,10 @@ public void onComplete(Boolean o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - mount_result result = new mount_result(); - if (e instanceof TachyonException) { - result.te = (TachyonException) e; - result.setTeIsSet(true); + reportLostFile_result result = new reportLostFile_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -3552,27 +3390,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, mount_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.mount(args.tachyonPath, args.ufsPath,resultHandler); + public void start(I iface, reportLostFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.reportLostFile(args.fileId,resultHandler); } } - public static class unmount extends org.apache.thrift.AsyncProcessFunction { - public unmount() { - super("unmount"); + public static class requestFilesInDependency extends org.apache.thrift.AsyncProcessFunction { + public requestFilesInDependency() { + super("requestFilesInDependency"); } - public unmount_args getEmptyArgsInstance() { - return new unmount_args(); + public requestFilesInDependency_args getEmptyArgsInstance() { + return new requestFilesInDependency_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - unmount_result result = new unmount_result(); - result.success = o; - result.setSuccessIsSet(true); + return new AsyncMethodCallback() { + public void onComplete(Void o) { + requestFilesInDependency_result result = new requestFilesInDependency_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -3584,10 +3420,10 @@ public void onComplete(Boolean o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - unmount_result result = new unmount_result(); - if (e instanceof TachyonException) { - result.te = (TachyonException) e; - result.setTeIsSet(true); + requestFilesInDependency_result result = new requestFilesInDependency_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -3610,27 +3446,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, unmount_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.unmount(args.tachyonPath,resultHandler); + public void start(I iface, requestFilesInDependency_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.requestFilesInDependency(args.depId,resultHandler); } } - public static class createDependency extends org.apache.thrift.AsyncProcessFunction { - public createDependency() { - super("createDependency"); + public static class setPinned extends org.apache.thrift.AsyncProcessFunction { + public setPinned() { + super("setPinned"); } - public createDependency_args getEmptyArgsInstance() { - return new createDependency_args(); + public setPinned_args getEmptyArgsInstance() { + return new setPinned_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Integer o) { - createDependency_result result = new createDependency_result(); - result.success = o; - result.setSuccessIsSet(true); + return new AsyncMethodCallback() { + public void onComplete(Void o) { + setPinned_result result = new setPinned_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -3642,30 +3476,10 @@ public void onComplete(Integer o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - createDependency_result result = new createDependency_result(); - if (e instanceof InvalidPathException) { - result.ipe = (InvalidPathException) e; - result.setIpeIsSet(true); - msg = result; - } - else if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); - msg = result; - } - else if (e instanceof FileAlreadyExistException) { - result.faee = (FileAlreadyExistException) e; - result.setFaeeIsSet(true); - msg = result; - } - else if (e instanceof BlockInfoException) { - result.bie = (BlockInfoException) e; - result.setBieIsSet(true); - msg = result; - } - else if (e instanceof TachyonException) { - result.te = (TachyonException) e; - result.setTeIsSet(true); + setPinned_result result = new setPinned_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -3688,26 +3502,27 @@ protected boolean isOneway() { return false; } - public void start(I iface, createDependency_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.createDependency(args.parents, args.children, args.commandPrefix, args.data, args.comment, args.framework, args.frameworkVersion, args.dependencyType, args.childrenBlockSizeByte,resultHandler); + public void start(I iface, setPinned_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.setPinned(args.fileId, args.pinned,resultHandler); } } - public static class getDependencyInfo extends org.apache.thrift.AsyncProcessFunction { - public getDependencyInfo() { - super("getDependencyInfo"); + public static class unmount extends org.apache.thrift.AsyncProcessFunction { + public unmount() { + super("unmount"); } - public getDependencyInfo_args getEmptyArgsInstance() { - return new getDependencyInfo_args(); + public unmount_args getEmptyArgsInstance() { + return new unmount_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(DependencyInfo o) { - getDependencyInfo_result result = new getDependencyInfo_result(); + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + unmount_result result = new unmount_result(); result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -3719,10 +3534,15 @@ public void onComplete(DependencyInfo o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getDependencyInfo_result result = new getDependencyInfo_result(); - if (e instanceof DependencyDoesNotExistException) { - result.ddnee = (DependencyDoesNotExistException) e; - result.setDdneeIsSet(true); + unmount_result result = new unmount_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); + msg = result; + } + else if (e instanceof ThriftIOException) { + result.ioe = (ThriftIOException) e; + result.setIoeIsSet(true); msg = result; } else @@ -3745,25 +3565,26 @@ protected boolean isOneway() { return false; } - public void start(I iface, getDependencyInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getDependencyInfo(args.dependencyId,resultHandler); + public void start(I iface, unmount_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.unmount(args.tachyonPath,resultHandler); } } - public static class reportLostFile extends org.apache.thrift.AsyncProcessFunction { - public reportLostFile() { - super("reportLostFile"); + public static class workerGetPinIdList extends org.apache.thrift.AsyncProcessFunction> { + public workerGetPinIdList() { + super("workerGetPinIdList"); } - public reportLostFile_args getEmptyArgsInstance() { - return new reportLostFile_args(); + public workerGetPinIdList_args getEmptyArgsInstance() { + return new workerGetPinIdList_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - reportLostFile_result result = new reportLostFile_result(); + return new AsyncMethodCallback>() { + public void onComplete(Set o) { + workerGetPinIdList_result result = new workerGetPinIdList_result(); + result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -3775,13 +3596,7 @@ public void onComplete(Void o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - reportLostFile_result result = new reportLostFile_result(); - if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); - msg = result; - } - else + workerGetPinIdList_result result = new workerGetPinIdList_result(); { 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()); @@ -3801,25 +3616,26 @@ protected boolean isOneway() { return false; } - public void start(I iface, reportLostFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.reportLostFile(args.fileId,resultHandler); + public void start(I iface, workerGetPinIdList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.workerGetPinIdList(resultHandler); } } - public static class requestFilesInDependency extends org.apache.thrift.AsyncProcessFunction { - public requestFilesInDependency() { - super("requestFilesInDependency"); + public static class workerGetPriorityDependencyList extends org.apache.thrift.AsyncProcessFunction> { + public workerGetPriorityDependencyList() { + super("workerGetPriorityDependencyList"); } - public requestFilesInDependency_args getEmptyArgsInstance() { - return new requestFilesInDependency_args(); + public workerGetPriorityDependencyList_args getEmptyArgsInstance() { + return new workerGetPriorityDependencyList_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - requestFilesInDependency_result result = new requestFilesInDependency_result(); + return new AsyncMethodCallback>() { + public void onComplete(List o) { + workerGetPriorityDependencyList_result result = new workerGetPriorityDependencyList_result(); + result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -3831,13 +3647,7 @@ public void onComplete(Void o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - requestFilesInDependency_result result = new requestFilesInDependency_result(); - if (e instanceof DependencyDoesNotExistException) { - result.ddnee = (DependencyDoesNotExistException) e; - result.setDdneeIsSet(true); - msg = result; - } - else + workerGetPriorityDependencyList_result result = new workerGetPriorityDependencyList_result(); { 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()); @@ -3857,27 +3667,29 @@ protected boolean isOneway() { return false; } - public void start(I iface, requestFilesInDependency_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.requestFilesInDependency(args.depId,resultHandler); + public void start(I iface, workerGetPriorityDependencyList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.workerGetPriorityDependencyList(resultHandler); } } } - public static class workerGetPinIdList_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("workerGetPinIdList_args"); + public static class completeFile_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("completeFile_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new workerGetPinIdList_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerGetPinIdList_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new completeFile_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new completeFile_argsTupleSchemeFactory()); } + public long fileId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + FILE_ID((short)1, "fileId"); private static final Map byName = new HashMap(); @@ -3892,6 +3704,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 1: // FILE_ID + return FILE_ID; default: return null; } @@ -3930,37 +3744,89 @@ public String getFieldName() { return _fieldName; } } + + // isset id assignments + private static final int __FILEID_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerGetPinIdList_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(completeFile_args.class, metaDataMap); } - public workerGetPinIdList_args() { + public completeFile_args() { + } + + public completeFile_args( + long fileId) + { + this(); + this.fileId = fileId; + setFileIdIsSet(true); } /** * Performs a deep copy on other. */ - public workerGetPinIdList_args(workerGetPinIdList_args other) { + public completeFile_args(completeFile_args other) { + __isset_bitfield = other.__isset_bitfield; + this.fileId = other.fileId; } - public workerGetPinIdList_args deepCopy() { - return new workerGetPinIdList_args(this); + public completeFile_args deepCopy() { + return new completeFile_args(this); } @Override public void clear() { + setFileIdIsSet(false); + this.fileId = 0; + } + + public long getFileId() { + return this.fileId; + } + + public completeFile_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); + return this; + } + + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + } + + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + } + + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { + case FILE_ID: + if (value == null) { + unsetFileId(); + } else { + setFileId((Long)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case FILE_ID: + return Long.valueOf(getFileId()); + } throw new IllegalStateException(); } @@ -3972,6 +3838,8 @@ public boolean isSet(_Fields field) { } switch (field) { + case FILE_ID: + return isSetFileId(); } throw new IllegalStateException(); } @@ -3980,15 +3848,24 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof workerGetPinIdList_args) - return this.equals((workerGetPinIdList_args)that); + if (that instanceof completeFile_args) + return this.equals((completeFile_args)that); return false; } - public boolean equals(workerGetPinIdList_args that) { + public boolean equals(completeFile_args that) { if (that == null) return false; + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) + return false; + if (this.fileId != that.fileId) + return false; + } + return true; } @@ -3996,17 +3873,32 @@ public boolean equals(workerGetPinIdList_args that) { public int hashCode() { List list = new ArrayList(); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); + return list.hashCode(); } @Override - public int compareTo(workerGetPinIdList_args other) { + public int compareTo(completeFile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -4024,9 +3916,12 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("workerGetPinIdList_args("); + StringBuilder sb = new StringBuilder("completeFile_args("); boolean first = true; + sb.append("fileId:"); + sb.append(this.fileId); + first = false; sb.append(")"); return sb.toString(); } @@ -4046,21 +3941,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class workerGetPinIdList_argsStandardSchemeFactory implements SchemeFactory { - public workerGetPinIdList_argsStandardScheme getScheme() { - return new workerGetPinIdList_argsStandardScheme(); + private static class completeFile_argsStandardSchemeFactory implements SchemeFactory { + public completeFile_argsStandardScheme getScheme() { + return new completeFile_argsStandardScheme(); } } - private static class workerGetPinIdList_argsStandardScheme extends StandardScheme { + private static class completeFile_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPinIdList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, completeFile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4070,6 +3967,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPinIdList_ break; } switch (schemeField.id) { + case 1: // FILE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -4081,53 +3986,69 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPinIdList_ struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetPinIdList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, completeFile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class workerGetPinIdList_argsTupleSchemeFactory implements SchemeFactory { - public workerGetPinIdList_argsTupleScheme getScheme() { - return new workerGetPinIdList_argsTupleScheme(); + private static class completeFile_argsTupleSchemeFactory implements SchemeFactory { + public completeFile_argsTupleScheme getScheme() { + return new completeFile_argsTupleScheme(); } } - private static class workerGetPinIdList_argsTupleScheme extends TupleScheme { + private static class completeFile_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerGetPinIdList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, completeFile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetFileId()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerGetPinIdList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, completeFile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); + } } } } - public static class workerGetPinIdList_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("workerGetPinIdList_result"); + public static class completeFile_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("completeFile_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.SET, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new workerGetPinIdList_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerGetPinIdList_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new completeFile_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new completeFile_resultTupleSchemeFactory()); } - public Set success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -4142,8 +4063,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; + case 1: // E + return E; default: return null; } @@ -4187,88 +4108,71 @@ 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, - new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + 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(workerGetPinIdList_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(completeFile_result.class, metaDataMap); } - public workerGetPinIdList_result() { + public completeFile_result() { } - public workerGetPinIdList_result( - Set success) + public completeFile_result( + TachyonTException e) { this(); - this.success = success; + this.e = e; } /** * Performs a deep copy on other. */ - public workerGetPinIdList_result(workerGetPinIdList_result other) { - if (other.isSetSuccess()) { - Set __this__success = new HashSet(other.success); - this.success = __this__success; + public completeFile_result(completeFile_result other) { + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public workerGetPinIdList_result deepCopy() { - return new workerGetPinIdList_result(this); + public completeFile_result deepCopy() { + return new completeFile_result(this); } @Override public void clear() { - this.success = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(long elem) { - if (this.success == null) { - this.success = new HashSet(); - } - this.success.add(elem); + this.e = null; } - public Set getSuccess() { - return this.success; + public TachyonTException getE() { + return this.e; } - public workerGetPinIdList_result setSuccess(Set success) { - this.success = success; + public completeFile_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetSuccess() { - this.success = null; + public void unsetE() { + this.e = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setSuccessIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.success = null; + this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case E: if (value == null) { - unsetSuccess(); + unsetE(); } else { - setSuccess((Set)value); + setE((TachyonTException)value); } break; @@ -4277,8 +4181,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case E: + return getE(); } throw new IllegalStateException(); @@ -4291,8 +4195,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -4301,21 +4205,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof workerGetPinIdList_result) - return this.equals((workerGetPinIdList_result)that); + if (that instanceof completeFile_result) + return this.equals((completeFile_result)that); return false; } - public boolean equals(workerGetPinIdList_result that) { + public boolean equals(completeFile_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.success.equals(that.success)) + if (!this.e.equals(that.e)) return false; } @@ -4326,28 +4230,28 @@ public boolean equals(workerGetPinIdList_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(workerGetPinIdList_result other) { + public int compareTo(completeFile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -4369,14 +4273,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("workerGetPinIdList_result("); + StringBuilder sb = new StringBuilder("completeFile_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.e); } first = false; sb.append(")"); @@ -4404,15 +4308,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class workerGetPinIdList_resultStandardSchemeFactory implements SchemeFactory { - public workerGetPinIdList_resultStandardScheme getScheme() { - return new workerGetPinIdList_resultStandardScheme(); + private static class completeFile_resultStandardSchemeFactory implements SchemeFactory { + public completeFile_resultStandardScheme getScheme() { + return new completeFile_resultStandardScheme(); } } - private static class workerGetPinIdList_resultStandardScheme extends StandardScheme { + private static class completeFile_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPinIdList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, completeFile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4422,20 +4326,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPinIdList_ break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.SET) { - { - org.apache.thrift.protocol.TSet _set180 = iprot.readSetBegin(); - struct.success = new HashSet(2*_set180.size); - long _elem181; - for (int _i182 = 0; _i182 < _set180.size; ++_i182) - { - _elem181 = iprot.readI64(); - struct.success.add(_elem181); - } - iprot.readSetEnd(); - } - struct.setSuccessIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -4451,20 +4346,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPinIdList_ struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetPinIdList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, completeFile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.success.size())); - for (long _iter183 : struct.success) - { - oprot.writeI64(_iter183); - } - oprot.writeSetEnd(); - } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -4473,69 +4361,81 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetPinIdList } - private static class workerGetPinIdList_resultTupleSchemeFactory implements SchemeFactory { - public workerGetPinIdList_resultTupleScheme getScheme() { - return new workerGetPinIdList_resultTupleScheme(); + private static class completeFile_resultTupleSchemeFactory implements SchemeFactory { + public completeFile_resultTupleScheme getScheme() { + return new completeFile_resultTupleScheme(); } } - private static class workerGetPinIdList_resultTupleScheme extends TupleScheme { + private static class completeFile_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerGetPinIdList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, completeFile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (long _iter184 : struct.success) - { - oprot.writeI64(_iter184); - } - } + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerGetPinIdList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, completeFile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - { - org.apache.thrift.protocol.TSet _set185 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.success = new HashSet(2*_set185.size); - long _elem186; - for (int _i187 = 0; _i187 < _set185.size; ++_i187) - { - _elem186 = iprot.readI64(); - struct.success.add(_elem186); - } - } - struct.setSuccessIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class workerGetPriorityDependencyList_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("workerGetPriorityDependencyList_args"); + public static class createDependency_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("createDependency_args"); + private static final org.apache.thrift.protocol.TField PARENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("parents", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField CHILDREN_FIELD_DESC = new org.apache.thrift.protocol.TField("children", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField COMMAND_PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("commandPrefix", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField COMMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("comment", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField FRAMEWORK_FIELD_DESC = new org.apache.thrift.protocol.TField("framework", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField FRAMEWORK_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("frameworkVersion", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField DEPENDENCY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dependencyType", org.apache.thrift.protocol.TType.I32, (short)8); + private static final org.apache.thrift.protocol.TField CHILDREN_BLOCK_SIZE_BYTE_FIELD_DESC = new org.apache.thrift.protocol.TField("childrenBlockSizeByte", org.apache.thrift.protocol.TType.I64, (short)9); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new workerGetPriorityDependencyList_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerGetPriorityDependencyList_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new createDependency_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createDependency_argsTupleSchemeFactory()); } + public List parents; // required + public List children; // required + public String commandPrefix; // required + public List data; // required + public String comment; // required + public String framework; // required + public String frameworkVersion; // required + public int dependencyType; // required + public long childrenBlockSizeByte; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + PARENTS((short)1, "parents"), + CHILDREN((short)2, "children"), + COMMAND_PREFIX((short)3, "commandPrefix"), + DATA((short)4, "data"), + COMMENT((short)5, "comment"), + FRAMEWORK((short)6, "framework"), + FRAMEWORK_VERSION((short)7, "frameworkVersion"), + DEPENDENCY_TYPE((short)8, "dependencyType"), + CHILDREN_BLOCK_SIZE_BYTE((short)9, "childrenBlockSizeByte"); private static final Map byName = new HashMap(); @@ -4550,6 +4450,24 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 1: // PARENTS + return PARENTS; + case 2: // CHILDREN + return CHILDREN; + case 3: // COMMAND_PREFIX + return COMMAND_PREFIX; + case 4: // DATA + return DATA; + case 5: // COMMENT + return COMMENT; + case 6: // FRAMEWORK + return FRAMEWORK; + case 7: // FRAMEWORK_VERSION + return FRAMEWORK_VERSION; + case 8: // DEPENDENCY_TYPE + return DEPENDENCY_TYPE; + case 9: // CHILDREN_BLOCK_SIZE_BYTE + return CHILDREN_BLOCK_SIZE_BYTE; default: return null; } @@ -4588,392 +4506,608 @@ public String getFieldName() { return _fieldName; } } + + // isset id assignments + private static final int __DEPENDENCYTYPE_ISSET_ID = 0; + private static final int __CHILDRENBLOCKSIZEBYTE_ISSET_ID = 1; + private byte __isset_bitfield = 0; 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.PARENTS, new org.apache.thrift.meta_data.FieldMetaData("parents", 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.STRING)))); + tmpMap.put(_Fields.CHILDREN, new org.apache.thrift.meta_data.FieldMetaData("children", 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.STRING)))); + tmpMap.put(_Fields.COMMAND_PREFIX, new org.apache.thrift.meta_data.FieldMetaData("commandPrefix", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", 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.STRING , true)))); + tmpMap.put(_Fields.COMMENT, new org.apache.thrift.meta_data.FieldMetaData("comment", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FRAMEWORK, new org.apache.thrift.meta_data.FieldMetaData("framework", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FRAMEWORK_VERSION, new org.apache.thrift.meta_data.FieldMetaData("frameworkVersion", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DEPENDENCY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dependencyType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.CHILDREN_BLOCK_SIZE_BYTE, new org.apache.thrift.meta_data.FieldMetaData("childrenBlockSizeByte", 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(workerGetPriorityDependencyList_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createDependency_args.class, metaDataMap); } - public workerGetPriorityDependencyList_args() { + public createDependency_args() { } - /** - * Performs a deep copy on other. + public createDependency_args( + List parents, + List children, + String commandPrefix, + List data, + String comment, + String framework, + String frameworkVersion, + int dependencyType, + long childrenBlockSizeByte) + { + this(); + this.parents = parents; + this.children = children; + this.commandPrefix = commandPrefix; + this.data = data; + this.comment = comment; + this.framework = framework; + this.frameworkVersion = frameworkVersion; + this.dependencyType = dependencyType; + setDependencyTypeIsSet(true); + this.childrenBlockSizeByte = childrenBlockSizeByte; + setChildrenBlockSizeByteIsSet(true); + } + + /** + * Performs a deep copy on other. */ - public workerGetPriorityDependencyList_args(workerGetPriorityDependencyList_args other) { + public createDependency_args(createDependency_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetParents()) { + List __this__parents = new ArrayList(other.parents); + this.parents = __this__parents; + } + if (other.isSetChildren()) { + List __this__children = new ArrayList(other.children); + this.children = __this__children; + } + if (other.isSetCommandPrefix()) { + this.commandPrefix = other.commandPrefix; + } + if (other.isSetData()) { + List __this__data = new ArrayList(other.data); + this.data = __this__data; + } + if (other.isSetComment()) { + this.comment = other.comment; + } + if (other.isSetFramework()) { + this.framework = other.framework; + } + if (other.isSetFrameworkVersion()) { + this.frameworkVersion = other.frameworkVersion; + } + this.dependencyType = other.dependencyType; + this.childrenBlockSizeByte = other.childrenBlockSizeByte; } - public workerGetPriorityDependencyList_args deepCopy() { - return new workerGetPriorityDependencyList_args(this); + public createDependency_args deepCopy() { + return new createDependency_args(this); } @Override public void clear() { + this.parents = null; + this.children = null; + this.commandPrefix = null; + this.data = null; + this.comment = null; + this.framework = null; + this.frameworkVersion = null; + setDependencyTypeIsSet(false); + this.dependencyType = 0; + setChildrenBlockSizeByteIsSet(false); + this.childrenBlockSizeByte = 0; } - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } + public int getParentsSize() { + return (this.parents == null) ? 0 : this.parents.size(); } - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); + public java.util.Iterator getParentsIterator() { + return (this.parents == null) ? null : this.parents.iterator(); } - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { + public void addToParents(String elem) { + if (this.parents == null) { + this.parents = new ArrayList(); } - throw new IllegalStateException(); + this.parents.add(elem); } - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof workerGetPriorityDependencyList_args) - return this.equals((workerGetPriorityDependencyList_args)that); - return false; + public List getParents() { + return this.parents; } - public boolean equals(workerGetPriorityDependencyList_args that) { - if (that == null) - return false; - - return true; + public createDependency_args setParents(List parents) { + this.parents = parents; + return this; } - @Override - public int hashCode() { - List list = new ArrayList(); + public void unsetParents() { + this.parents = null; + } - return list.hashCode(); + /** Returns true if field parents is set (has been assigned a value) and false otherwise */ + public boolean isSetParents() { + return this.parents != null; } - @Override - public int compareTo(workerGetPriorityDependencyList_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); + public void setParentsIsSet(boolean value) { + if (!value) { + this.parents = null; } + } - int lastComparison = 0; - - return 0; + public int getChildrenSize() { + return (this.children == null) ? 0 : this.children.size(); } - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); + public java.util.Iterator getChildrenIterator() { + return (this.children == null) ? null : this.children.iterator(); } - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + public void addToChildren(String elem) { + if (this.children == null) { + this.children = new ArrayList(); + } + this.children.add(elem); } - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + public List getChildren() { + return this.children; } - @Override - public String toString() { - StringBuilder sb = new StringBuilder("workerGetPriorityDependencyList_args("); - boolean first = true; + public createDependency_args setChildren(List children) { + this.children = children; + return this; + } - sb.append(")"); - return sb.toString(); + public void unsetChildren() { + this.children = null; } - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity + /** Returns true if field children is set (has been assigned a value) and false otherwise */ + public boolean isSetChildren() { + return this.children != null; } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); + public void setChildrenIsSet(boolean value) { + if (!value) { + this.children = null; } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } + public String getCommandPrefix() { + return this.commandPrefix; } - private static class workerGetPriorityDependencyList_argsStandardSchemeFactory implements SchemeFactory { - public workerGetPriorityDependencyList_argsStandardScheme getScheme() { - return new workerGetPriorityDependencyList_argsStandardScheme(); - } + public createDependency_args setCommandPrefix(String commandPrefix) { + this.commandPrefix = commandPrefix; + return this; } - private static class workerGetPriorityDependencyList_argsStandardScheme extends StandardScheme { + public void unsetCommandPrefix() { + this.commandPrefix = null; + } - public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPriorityDependencyList_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); + /** Returns true if field commandPrefix is set (has been assigned a value) and false otherwise */ + public boolean isSetCommandPrefix() { + return this.commandPrefix != null; + } - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); + public void setCommandPrefixIsSet(boolean value) { + if (!value) { + this.commandPrefix = null; } + } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetPriorityDependencyList_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } + public int getDataSize() { + return (this.data == null) ? 0 : this.data.size(); + } + public java.util.Iterator getDataIterator() { + return (this.data == null) ? null : this.data.iterator(); } - private static class workerGetPriorityDependencyList_argsTupleSchemeFactory implements SchemeFactory { - public workerGetPriorityDependencyList_argsTupleScheme getScheme() { - return new workerGetPriorityDependencyList_argsTupleScheme(); + public void addToData(ByteBuffer elem) { + if (this.data == null) { + this.data = new ArrayList(); } + this.data.add(elem); } - private static class workerGetPriorityDependencyList_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerGetPriorityDependencyList_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } + public List getData() { + return this.data; + } - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerGetPriorityDependencyList_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } + public createDependency_args setData(List data) { + this.data = data; + return this; } - } - - public static class workerGetPriorityDependencyList_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("workerGetPriorityDependencyList_result"); + public void unsetData() { + this.data = null; + } - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + /** Returns true if field data is set (has been assigned a value) and false otherwise */ + public boolean isSetData() { + return this.data != null; + } - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new workerGetPriorityDependencyList_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new workerGetPriorityDependencyList_resultTupleSchemeFactory()); + public void setDataIsSet(boolean value) { + if (!value) { + this.data = null; + } } - public List success; // required + public String getComment() { + return this.comment; + } - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); + public createDependency_args setComment(String comment) { + this.comment = comment; + return this; + } - private static final Map byName = new HashMap(); + public void unsetComment() { + this.comment = null; + } - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } + /** Returns true if field comment is set (has been assigned a value) and false otherwise */ + public boolean isSetComment() { + return this.comment != null; + } - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } + public void setCommentIsSet(boolean value) { + if (!value) { + this.comment = null; } + } - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } + public String getFramework() { + return this.framework; + } - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } + public createDependency_args setFramework(String framework) { + this.framework = framework; + return this; + } - private final short _thriftId; - private final String _fieldName; + public void unsetFramework() { + this.framework = null; + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } + /** Returns true if field framework is set (has been assigned a value) and false otherwise */ + public boolean isSetFramework() { + return this.framework != null; + } - public short getThriftFieldId() { - return _thriftId; + public void setFrameworkIsSet(boolean value) { + if (!value) { + this.framework = null; } + } - public String getFieldName() { - return _fieldName; - } + public String getFrameworkVersion() { + return this.frameworkVersion; } - // isset id assignments - 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, - 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.I32)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerGetPriorityDependencyList_result.class, metaDataMap); + public createDependency_args setFrameworkVersion(String frameworkVersion) { + this.frameworkVersion = frameworkVersion; + return this; } - public workerGetPriorityDependencyList_result() { + public void unsetFrameworkVersion() { + this.frameworkVersion = null; } - public workerGetPriorityDependencyList_result( - List success) - { - this(); - this.success = success; + /** Returns true if field frameworkVersion is set (has been assigned a value) and false otherwise */ + public boolean isSetFrameworkVersion() { + return this.frameworkVersion != null; } - /** - * Performs a deep copy on other. - */ - public workerGetPriorityDependencyList_result(workerGetPriorityDependencyList_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; + public void setFrameworkVersionIsSet(boolean value) { + if (!value) { + this.frameworkVersion = null; } } - public workerGetPriorityDependencyList_result deepCopy() { - return new workerGetPriorityDependencyList_result(this); + public int getDependencyType() { + return this.dependencyType; } - @Override - public void clear() { - this.success = null; + public createDependency_args setDependencyType(int dependencyType) { + this.dependencyType = dependencyType; + setDependencyTypeIsSet(true); + return this; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public void unsetDependencyType() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEPENDENCYTYPE_ISSET_ID); } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + /** Returns true if field dependencyType is set (has been assigned a value) and false otherwise */ + public boolean isSetDependencyType() { + return EncodingUtils.testBit(__isset_bitfield, __DEPENDENCYTYPE_ISSET_ID); } - public void addToSuccess(int elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + public void setDependencyTypeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEPENDENCYTYPE_ISSET_ID, value); } - public List getSuccess() { - return this.success; + public long getChildrenBlockSizeByte() { + return this.childrenBlockSizeByte; } - public workerGetPriorityDependencyList_result setSuccess(List success) { - this.success = success; + public createDependency_args setChildrenBlockSizeByte(long childrenBlockSizeByte) { + this.childrenBlockSizeByte = childrenBlockSizeByte; + setChildrenBlockSizeByteIsSet(true); return this; } - public void unsetSuccess() { - this.success = null; + public void unsetChildrenBlockSizeByte() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CHILDRENBLOCKSIZEBYTE_ISSET_ID); } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field childrenBlockSizeByte is set (has been assigned a value) and false otherwise */ + public boolean isSetChildrenBlockSizeByte() { + return EncodingUtils.testBit(__isset_bitfield, __CHILDRENBLOCKSIZEBYTE_ISSET_ID); } - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + public void setChildrenBlockSizeByteIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CHILDRENBLOCKSIZEBYTE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case PARENTS: if (value == null) { - unsetSuccess(); + unsetParents(); } else { - setSuccess((List)value); + setParents((List)value); } break; - } - } + case CHILDREN: + if (value == null) { + unsetChildren(); + } else { + setChildren((List)value); + } + break; - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); + case COMMAND_PREFIX: + if (value == null) { + unsetCommandPrefix(); + } else { + setCommandPrefix((String)value); + } + break; - } - throw new IllegalStateException(); - } + case DATA: + if (value == null) { + unsetData(); + } else { + setData((List)value); + } + break; - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } + case COMMENT: + if (value == null) { + unsetComment(); + } else { + setComment((String)value); + } + break; - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } + case FRAMEWORK: + if (value == null) { + unsetFramework(); + } else { + setFramework((String)value); + } + break; - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof workerGetPriorityDependencyList_result) - return this.equals((workerGetPriorityDependencyList_result)that); - return false; + case FRAMEWORK_VERSION: + if (value == null) { + unsetFrameworkVersion(); + } else { + setFrameworkVersion((String)value); + } + break; + + case DEPENDENCY_TYPE: + if (value == null) { + unsetDependencyType(); + } else { + setDependencyType((Integer)value); + } + break; + + case CHILDREN_BLOCK_SIZE_BYTE: + if (value == null) { + unsetChildrenBlockSizeByte(); + } else { + setChildrenBlockSizeByte((Long)value); + } + break; + + } } - public boolean equals(workerGetPriorityDependencyList_result that) { + public Object getFieldValue(_Fields field) { + switch (field) { + case PARENTS: + return getParents(); + + case CHILDREN: + return getChildren(); + + case COMMAND_PREFIX: + return getCommandPrefix(); + + case DATA: + return getData(); + + case COMMENT: + return getComment(); + + case FRAMEWORK: + return getFramework(); + + case FRAMEWORK_VERSION: + return getFrameworkVersion(); + + case DEPENDENCY_TYPE: + return Integer.valueOf(getDependencyType()); + + case CHILDREN_BLOCK_SIZE_BYTE: + return Long.valueOf(getChildrenBlockSizeByte()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PARENTS: + return isSetParents(); + case CHILDREN: + return isSetChildren(); + case COMMAND_PREFIX: + return isSetCommandPrefix(); + case DATA: + return isSetData(); + case COMMENT: + return isSetComment(); + case FRAMEWORK: + return isSetFramework(); + case FRAMEWORK_VERSION: + return isSetFrameworkVersion(); + case DEPENDENCY_TYPE: + return isSetDependencyType(); + case CHILDREN_BLOCK_SIZE_BYTE: + return isSetChildrenBlockSizeByte(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { if (that == null) return false; + if (that instanceof createDependency_args) + return this.equals((createDependency_args)that); + return false; + } - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + public boolean equals(createDependency_args that) { + if (that == null) + return false; + + boolean this_present_parents = true && this.isSetParents(); + boolean that_present_parents = true && that.isSetParents(); + if (this_present_parents || that_present_parents) { + if (!(this_present_parents && that_present_parents)) return false; - if (!this.success.equals(that.success)) + if (!this.parents.equals(that.parents)) + return false; + } + + boolean this_present_children = true && this.isSetChildren(); + boolean that_present_children = true && that.isSetChildren(); + if (this_present_children || that_present_children) { + if (!(this_present_children && that_present_children)) + return false; + if (!this.children.equals(that.children)) + return false; + } + + boolean this_present_commandPrefix = true && this.isSetCommandPrefix(); + boolean that_present_commandPrefix = true && that.isSetCommandPrefix(); + if (this_present_commandPrefix || that_present_commandPrefix) { + if (!(this_present_commandPrefix && that_present_commandPrefix)) + return false; + if (!this.commandPrefix.equals(that.commandPrefix)) + return false; + } + + boolean this_present_data = true && this.isSetData(); + boolean that_present_data = true && that.isSetData(); + if (this_present_data || that_present_data) { + if (!(this_present_data && that_present_data)) + return false; + if (!this.data.equals(that.data)) + return false; + } + + boolean this_present_comment = true && this.isSetComment(); + boolean that_present_comment = true && that.isSetComment(); + if (this_present_comment || that_present_comment) { + if (!(this_present_comment && that_present_comment)) + return false; + if (!this.comment.equals(that.comment)) + return false; + } + + boolean this_present_framework = true && this.isSetFramework(); + boolean that_present_framework = true && that.isSetFramework(); + if (this_present_framework || that_present_framework) { + if (!(this_present_framework && that_present_framework)) + return false; + if (!this.framework.equals(that.framework)) + return false; + } + + boolean this_present_frameworkVersion = true && this.isSetFrameworkVersion(); + boolean that_present_frameworkVersion = true && that.isSetFrameworkVersion(); + if (this_present_frameworkVersion || that_present_frameworkVersion) { + if (!(this_present_frameworkVersion && that_present_frameworkVersion)) + return false; + if (!this.frameworkVersion.equals(that.frameworkVersion)) + return false; + } + + boolean this_present_dependencyType = true; + boolean that_present_dependencyType = true; + if (this_present_dependencyType || that_present_dependencyType) { + if (!(this_present_dependencyType && that_present_dependencyType)) + return false; + if (this.dependencyType != that.dependencyType) + return false; + } + + boolean this_present_childrenBlockSizeByte = true; + boolean that_present_childrenBlockSizeByte = true; + if (this_present_childrenBlockSizeByte || that_present_childrenBlockSizeByte) { + if (!(this_present_childrenBlockSizeByte && that_present_childrenBlockSizeByte)) + return false; + if (this.childrenBlockSizeByte != that.childrenBlockSizeByte) return false; } @@ -4984,28 +5118,148 @@ public boolean equals(workerGetPriorityDependencyList_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + boolean present_parents = true && (isSetParents()); + list.add(present_parents); + if (present_parents) + list.add(parents); + + boolean present_children = true && (isSetChildren()); + list.add(present_children); + if (present_children) + list.add(children); + + boolean present_commandPrefix = true && (isSetCommandPrefix()); + list.add(present_commandPrefix); + if (present_commandPrefix) + list.add(commandPrefix); + + boolean present_data = true && (isSetData()); + list.add(present_data); + if (present_data) + list.add(data); + + boolean present_comment = true && (isSetComment()); + list.add(present_comment); + if (present_comment) + list.add(comment); + + boolean present_framework = true && (isSetFramework()); + list.add(present_framework); + if (present_framework) + list.add(framework); + + boolean present_frameworkVersion = true && (isSetFrameworkVersion()); + list.add(present_frameworkVersion); + if (present_frameworkVersion) + list.add(frameworkVersion); + + boolean present_dependencyType = true; + list.add(present_dependencyType); + if (present_dependencyType) + list.add(dependencyType); + + boolean present_childrenBlockSizeByte = true; + list.add(present_childrenBlockSizeByte); + if (present_childrenBlockSizeByte) + list.add(childrenBlockSizeByte); return list.hashCode(); } @Override - public int compareTo(workerGetPriorityDependencyList_result other) { + public int compareTo(createDependency_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetParents()).compareTo(other.isSetParents()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetParents()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parents, other.parents); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetChildren()).compareTo(other.isSetChildren()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetChildren()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.children, other.children); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCommandPrefix()).compareTo(other.isSetCommandPrefix()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCommandPrefix()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.commandPrefix, other.commandPrefix); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetComment()).compareTo(other.isSetComment()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetComment()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, other.comment); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFramework()).compareTo(other.isSetFramework()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFramework()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.framework, other.framework); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFrameworkVersion()).compareTo(other.isSetFrameworkVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFrameworkVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.frameworkVersion, other.frameworkVersion); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDependencyType()).compareTo(other.isSetDependencyType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDependencyType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dependencyType, other.dependencyType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetChildrenBlockSizeByte()).compareTo(other.isSetChildrenBlockSizeByte()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetChildrenBlockSizeByte()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childrenBlockSizeByte, other.childrenBlockSizeByte); if (lastComparison != 0) { return lastComparison; } @@ -5023,20 +5277,76 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("workerGetPriorityDependencyList_result("); + StringBuilder sb = new StringBuilder("createDependency_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("parents:"); + if (this.parents == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.parents); + } + first = false; + if (!first) sb.append(", "); + sb.append("children:"); + if (this.children == null) { + sb.append("null"); + } else { + sb.append(this.children); } first = false; + if (!first) sb.append(", "); + sb.append("commandPrefix:"); + if (this.commandPrefix == null) { + sb.append("null"); + } else { + sb.append(this.commandPrefix); + } + first = false; + if (!first) sb.append(", "); + sb.append("data:"); + if (this.data == null) { + sb.append("null"); + } else { + sb.append(this.data); + } + first = false; + if (!first) sb.append(", "); + sb.append("comment:"); + if (this.comment == null) { + sb.append("null"); + } else { + sb.append(this.comment); + } + first = false; + if (!first) sb.append(", "); + sb.append("framework:"); + if (this.framework == null) { + sb.append("null"); + } else { + sb.append(this.framework); + } + first = false; + if (!first) sb.append(", "); + sb.append("frameworkVersion:"); + if (this.frameworkVersion == null) { + sb.append("null"); + } else { + sb.append(this.frameworkVersion); + } + first = false; + if (!first) sb.append(", "); + sb.append("dependencyType:"); + sb.append(this.dependencyType); + first = false; + if (!first) sb.append(", "); + sb.append("childrenBlockSizeByte:"); + sb.append(this.childrenBlockSizeByte); + first = false; sb.append(")"); return sb.toString(); } @@ -5056,21 +5366,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class workerGetPriorityDependencyList_resultStandardSchemeFactory implements SchemeFactory { - public workerGetPriorityDependencyList_resultStandardScheme getScheme() { - return new workerGetPriorityDependencyList_resultStandardScheme(); + private static class createDependency_argsStandardSchemeFactory implements SchemeFactory { + public createDependency_argsStandardScheme getScheme() { + return new createDependency_argsStandardScheme(); } } - private static class workerGetPriorityDependencyList_resultStandardScheme extends StandardScheme { + private static class createDependency_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPriorityDependencyList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, createDependency_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5080,20 +5392,104 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPriorityDe break; } switch (schemeField.id) { - case 0: // SUCCESS + case 1: // PARENTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list188 = iprot.readListBegin(); - struct.success = new ArrayList(_list188.size); - int _elem189; - for (int _i190 = 0; _i190 < _list188.size; ++_i190) + org.apache.thrift.protocol.TList _list180 = iprot.readListBegin(); + struct.parents = new ArrayList(_list180.size); + String _elem181; + for (int _i182 = 0; _i182 < _list180.size; ++_i182) { - _elem189 = iprot.readI32(); - struct.success.add(_elem189); + _elem181 = iprot.readString(); + struct.parents.add(_elem181); } iprot.readListEnd(); } - struct.setSuccessIsSet(true); + struct.setParentsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CHILDREN + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list183 = iprot.readListBegin(); + struct.children = new ArrayList(_list183.size); + String _elem184; + for (int _i185 = 0; _i185 < _list183.size; ++_i185) + { + _elem184 = iprot.readString(); + struct.children.add(_elem184); + } + iprot.readListEnd(); + } + struct.setChildrenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COMMAND_PREFIX + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.commandPrefix = iprot.readString(); + struct.setCommandPrefixIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DATA + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list186 = iprot.readListBegin(); + struct.data = new ArrayList(_list186.size); + ByteBuffer _elem187; + for (int _i188 = 0; _i188 < _list186.size; ++_i188) + { + _elem187 = iprot.readBinary(); + struct.data.add(_elem187); + } + iprot.readListEnd(); + } + struct.setDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // COMMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.comment = iprot.readString(); + struct.setCommentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // FRAMEWORK + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.framework = iprot.readString(); + struct.setFrameworkIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // FRAMEWORK_VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.frameworkVersion = iprot.readString(); + struct.setFrameworkVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // DEPENDENCY_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.dependencyType = iprot.readI32(); + struct.setDependencyTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // CHILDREN_BLOCK_SIZE_BYTE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.childrenBlockSizeByte = iprot.readI64(); + struct.setChildrenBlockSizeByteIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5109,93 +5505,256 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPriorityDe struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetPriorityDependencyList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, createDependency_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + if (struct.parents != null) { + oprot.writeFieldBegin(PARENTS_FIELD_DESC); { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.success.size())); - for (int _iter191 : struct.success) + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.parents.size())); + for (String _iter189 : struct.parents) + { + oprot.writeString(_iter189); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.children != null) { + oprot.writeFieldBegin(CHILDREN_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.children.size())); + for (String _iter190 : struct.children) + { + oprot.writeString(_iter190); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.commandPrefix != null) { + oprot.writeFieldBegin(COMMAND_PREFIX_FIELD_DESC); + oprot.writeString(struct.commandPrefix); + oprot.writeFieldEnd(); + } + if (struct.data != null) { + oprot.writeFieldBegin(DATA_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.data.size())); + for (ByteBuffer _iter191 : struct.data) { - oprot.writeI32(_iter191); + oprot.writeBinary(_iter191); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } + if (struct.comment != null) { + oprot.writeFieldBegin(COMMENT_FIELD_DESC); + oprot.writeString(struct.comment); + oprot.writeFieldEnd(); + } + if (struct.framework != null) { + oprot.writeFieldBegin(FRAMEWORK_FIELD_DESC); + oprot.writeString(struct.framework); + oprot.writeFieldEnd(); + } + if (struct.frameworkVersion != null) { + oprot.writeFieldBegin(FRAMEWORK_VERSION_FIELD_DESC); + oprot.writeString(struct.frameworkVersion); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DEPENDENCY_TYPE_FIELD_DESC); + oprot.writeI32(struct.dependencyType); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(CHILDREN_BLOCK_SIZE_BYTE_FIELD_DESC); + oprot.writeI64(struct.childrenBlockSizeByte); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class workerGetPriorityDependencyList_resultTupleSchemeFactory implements SchemeFactory { - public workerGetPriorityDependencyList_resultTupleScheme getScheme() { - return new workerGetPriorityDependencyList_resultTupleScheme(); + private static class createDependency_argsTupleSchemeFactory implements SchemeFactory { + public createDependency_argsTupleScheme getScheme() { + return new createDependency_argsTupleScheme(); } } - private static class workerGetPriorityDependencyList_resultTupleScheme extends TupleScheme { + private static class createDependency_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, workerGetPriorityDependencyList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, createDependency_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetParents()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { + if (struct.isSetChildren()) { + optionals.set(1); + } + if (struct.isSetCommandPrefix()) { + optionals.set(2); + } + if (struct.isSetData()) { + optionals.set(3); + } + if (struct.isSetComment()) { + optionals.set(4); + } + if (struct.isSetFramework()) { + optionals.set(5); + } + if (struct.isSetFrameworkVersion()) { + optionals.set(6); + } + if (struct.isSetDependencyType()) { + optionals.set(7); + } + if (struct.isSetChildrenBlockSizeByte()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetParents()) { { - oprot.writeI32(struct.success.size()); - for (int _iter192 : struct.success) + oprot.writeI32(struct.parents.size()); + for (String _iter192 : struct.parents) + { + oprot.writeString(_iter192); + } + } + } + if (struct.isSetChildren()) { + { + oprot.writeI32(struct.children.size()); + for (String _iter193 : struct.children) + { + oprot.writeString(_iter193); + } + } + } + if (struct.isSetCommandPrefix()) { + oprot.writeString(struct.commandPrefix); + } + if (struct.isSetData()) { + { + oprot.writeI32(struct.data.size()); + for (ByteBuffer _iter194 : struct.data) { - oprot.writeI32(_iter192); + oprot.writeBinary(_iter194); } } } + if (struct.isSetComment()) { + oprot.writeString(struct.comment); + } + if (struct.isSetFramework()) { + oprot.writeString(struct.framework); + } + if (struct.isSetFrameworkVersion()) { + oprot.writeString(struct.frameworkVersion); + } + if (struct.isSetDependencyType()) { + oprot.writeI32(struct.dependencyType); + } + if (struct.isSetChildrenBlockSizeByte()) { + oprot.writeI64(struct.childrenBlockSizeByte); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, workerGetPriorityDependencyList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, createDependency_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list193 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); - struct.success = new ArrayList(_list193.size); - int _elem194; - for (int _i195 = 0; _i195 < _list193.size; ++_i195) + org.apache.thrift.protocol.TList _list195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parents = new ArrayList(_list195.size); + String _elem196; + for (int _i197 = 0; _i197 < _list195.size; ++_i197) { - _elem194 = iprot.readI32(); - struct.success.add(_elem194); + _elem196 = iprot.readString(); + struct.parents.add(_elem196); } } - struct.setSuccessIsSet(true); + struct.setParentsIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list198 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.children = new ArrayList(_list198.size); + String _elem199; + for (int _i200 = 0; _i200 < _list198.size; ++_i200) + { + _elem199 = iprot.readString(); + struct.children.add(_elem199); + } + } + struct.setChildrenIsSet(true); + } + if (incoming.get(2)) { + struct.commandPrefix = iprot.readString(); + struct.setCommandPrefixIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list201 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.data = new ArrayList(_list201.size); + ByteBuffer _elem202; + for (int _i203 = 0; _i203 < _list201.size; ++_i203) + { + _elem202 = iprot.readBinary(); + struct.data.add(_elem202); + } + } + struct.setDataIsSet(true); + } + if (incoming.get(4)) { + struct.comment = iprot.readString(); + struct.setCommentIsSet(true); + } + if (incoming.get(5)) { + struct.framework = iprot.readString(); + struct.setFrameworkIsSet(true); + } + if (incoming.get(6)) { + struct.frameworkVersion = iprot.readString(); + struct.setFrameworkVersionIsSet(true); + } + if (incoming.get(7)) { + struct.dependencyType = iprot.readI32(); + struct.setDependencyTypeIsSet(true); + } + if (incoming.get(8)) { + struct.childrenBlockSizeByte = iprot.readI64(); + struct.setChildrenBlockSizeByteIsSet(true); } } } } - public static class getFileId_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("getFileId_args"); + public static class createDependency_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("createDependency_result"); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getFileId_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFileId_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new createDependency_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createDependency_resultTupleSchemeFactory()); } - public String path; // required + public int success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -5210,8 +5769,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PATH - return PATH; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -5252,74 +5813,116 @@ public String getFieldName() { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + 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.I32))); + 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(getFileId_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createDependency_result.class, metaDataMap); } - public getFileId_args() { + public createDependency_result() { } - public getFileId_args( - String path) + public createDependency_result( + int success, + TachyonTException e) { this(); - this.path = path; + this.success = success; + setSuccessIsSet(true); + this.e = e; + } + + /** + * Performs a deep copy on other. + */ + public createDependency_result(createDependency_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } + } + + public createDependency_result deepCopy() { + return new createDependency_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.e = null; + } + + public int getSuccess() { + return this.success; + } + + public createDependency_result setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + return this; } - /** - * Performs a deep copy on other. - */ - public getFileId_args(getFileId_args other) { - if (other.isSetPath()) { - this.path = other.path; - } + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public getFileId_args deepCopy() { - return new getFileId_args(this); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - @Override - public void clear() { - this.path = null; + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public String getPath() { - return this.path; + public TachyonTException getE() { + return this.e; } - public getFileId_args setPath(String path) { - this.path = path; + public createDependency_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetPath() { - this.path = null; + public void unsetE() { + this.e = null; } - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setPathIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.path = null; + this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case PATH: + case SUCCESS: if (value == null) { - unsetPath(); + unsetSuccess(); } else { - setPath((String)value); + setSuccess((Integer)value); + } + break; + + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); } break; @@ -5328,8 +5931,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case PATH: - return getPath(); + case SUCCESS: + return Integer.valueOf(getSuccess()); + + case E: + return getE(); } throw new IllegalStateException(); @@ -5342,8 +5948,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case PATH: - return isSetPath(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -5352,21 +5960,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getFileId_args) - return this.equals((getFileId_args)that); + if (that instanceof createDependency_result) + return this.equals((createDependency_result)that); return false; } - public boolean equals(getFileId_args that) { + public boolean equals(createDependency_result that) { if (that == null) return false; - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.path.equals(that.path)) + if (this.success != that.success) + return false; + } + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) return false; } @@ -5377,28 +5994,43 @@ public boolean equals(getFileId_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_path = true && (isSetPath()); - list.add(present_path); - if (present_path) - list.add(path); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(getFileId_args other) { + public int compareTo(createDependency_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -5416,18 +6048,22 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getFileId_args("); + StringBuilder sb = new StringBuilder("createDependency_result("); boolean first = true; - sb.append("path:"); - if (this.path == null) { + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.path); + sb.append(this.e); } first = false; sb.append(")"); @@ -5449,21 +6085,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getFileId_argsStandardSchemeFactory implements SchemeFactory { - public getFileId_argsStandardScheme getScheme() { - return new getFileId_argsStandardScheme(); + private static class createDependency_resultStandardSchemeFactory implements SchemeFactory { + public createDependency_resultStandardScheme getScheme() { + return new createDependency_resultStandardScheme(); } } - private static class getFileId_argsStandardScheme extends StandardScheme { + private static class createDependency_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getFileId_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, createDependency_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5473,10 +6111,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileId_args stru break; } switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5492,13 +6139,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileId_args stru struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getFileId_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, createDependency_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -5507,59 +6159,70 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getFileId_args str } - private static class getFileId_argsTupleSchemeFactory implements SchemeFactory { - public getFileId_argsTupleScheme getScheme() { - return new getFileId_argsTupleScheme(); + private static class createDependency_resultTupleSchemeFactory implements SchemeFactory { + public createDependency_resultTupleScheme getScheme() { + return new createDependency_resultTupleScheme(); } } - private static class getFileId_argsTupleScheme extends TupleScheme { + private static class createDependency_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getFileId_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, createDependency_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetPath()) { + if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetPath()) { - oprot.writeString(struct.path); + if (struct.isSetE()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success); + } + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getFileId_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, createDependency_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class getFileId_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("getFileId_result"); + public static class createDirectory_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("createDirectory_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); - private static final org.apache.thrift.protocol.TField IPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ipe", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getFileId_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFileId_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new createDirectory_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createDirectory_argsTupleSchemeFactory()); } - public long success; // required - public InvalidPathException ipe; // required + public String path; // required + public boolean recursive; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - IPE((short)1, "ipe"); + PATH((short)1, "path"), + RECURSIVE((short)2, "recursive"); private static final Map byName = new HashMap(); @@ -5574,10 +6237,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // IPE - return IPE; + case 1: // PATH + return PATH; + case 2: // RECURSIVE + return RECURSIVE; default: return null; } @@ -5618,116 +6281,116 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; + private static final int __RECURSIVE_ISSET_ID = 0; private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.IPE, new org.apache.thrift.meta_data.FieldMetaData("ipe", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", 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(getFileId_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createDirectory_args.class, metaDataMap); } - public getFileId_result() { + public createDirectory_args() { } - public getFileId_result( - long success, - InvalidPathException ipe) + public createDirectory_args( + String path, + boolean recursive) { this(); - this.success = success; - setSuccessIsSet(true); - this.ipe = ipe; + this.path = path; + this.recursive = recursive; + setRecursiveIsSet(true); } /** * Performs a deep copy on other. */ - public getFileId_result(getFileId_result other) { + public createDirectory_args(createDirectory_args other) { __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetIpe()) { - this.ipe = new InvalidPathException(other.ipe); + if (other.isSetPath()) { + this.path = other.path; } + this.recursive = other.recursive; } - public getFileId_result deepCopy() { - return new getFileId_result(this); + public createDirectory_args deepCopy() { + return new createDirectory_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.ipe = null; + this.path = null; + setRecursiveIsSet(false); + this.recursive = false; } - public long getSuccess() { - return this.success; + public String getPath() { + return this.path; } - public getFileId_result setSuccess(long success) { - this.success = success; - setSuccessIsSet(true); + public createDirectory_args setPath(String path) { + this.path = path; return this; } - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + public void unsetPath() { + this.path = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + /** Returns true if field path is set (has been assigned a value) and false otherwise */ + public boolean isSetPath() { + return this.path != null; } - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + public void setPathIsSet(boolean value) { + if (!value) { + this.path = null; + } } - public InvalidPathException getIpe() { - return this.ipe; + public boolean isRecursive() { + return this.recursive; } - public getFileId_result setIpe(InvalidPathException ipe) { - this.ipe = ipe; + public createDirectory_args setRecursive(boolean recursive) { + this.recursive = recursive; + setRecursiveIsSet(true); return this; } - public void unsetIpe() { - this.ipe = null; + public void unsetRecursive() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID); } - /** Returns true if field ipe is set (has been assigned a value) and false otherwise */ - public boolean isSetIpe() { - return this.ipe != null; + /** Returns true if field recursive is set (has been assigned a value) and false otherwise */ + public boolean isSetRecursive() { + return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID); } - public void setIpeIsSet(boolean value) { - if (!value) { - this.ipe = null; - } + public void setRecursiveIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case PATH: if (value == null) { - unsetSuccess(); + unsetPath(); } else { - setSuccess((Long)value); + setPath((String)value); } break; - case IPE: + case RECURSIVE: if (value == null) { - unsetIpe(); + unsetRecursive(); } else { - setIpe((InvalidPathException)value); + setRecursive((Boolean)value); } break; @@ -5736,11 +6399,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Long.valueOf(getSuccess()); + case PATH: + return getPath(); - case IPE: - return getIpe(); + case RECURSIVE: + return Boolean.valueOf(isRecursive()); } throw new IllegalStateException(); @@ -5753,10 +6416,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case IPE: - return isSetIpe(); + case PATH: + return isSetPath(); + case RECURSIVE: + return isSetRecursive(); } throw new IllegalStateException(); } @@ -5765,30 +6428,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getFileId_result) - return this.equals((getFileId_result)that); + if (that instanceof createDirectory_args) + return this.equals((createDirectory_args)that); return false; } - public boolean equals(getFileId_result that) { + public boolean equals(createDirectory_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_path = true && this.isSetPath(); + boolean that_present_path = true && that.isSetPath(); + if (this_present_path || that_present_path) { + if (!(this_present_path && that_present_path)) return false; - if (this.success != that.success) + if (!this.path.equals(that.path)) return false; } - boolean this_present_ipe = true && this.isSetIpe(); - boolean that_present_ipe = true && that.isSetIpe(); - if (this_present_ipe || that_present_ipe) { - if (!(this_present_ipe && that_present_ipe)) + boolean this_present_recursive = true; + boolean that_present_recursive = true; + if (this_present_recursive || that_present_recursive) { + if (!(this_present_recursive && that_present_recursive)) return false; - if (!this.ipe.equals(that.ipe)) + if (this.recursive != that.recursive) return false; } @@ -5799,43 +6462,43 @@ public boolean equals(getFileId_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); + boolean present_path = true && (isSetPath()); + list.add(present_path); + if (present_path) + list.add(path); - boolean present_ipe = true && (isSetIpe()); - list.add(present_ipe); - if (present_ipe) - list.add(ipe); + boolean present_recursive = true; + list.add(present_recursive); + if (present_recursive) + list.add(recursive); return list.hashCode(); } @Override - public int compareTo(getFileId_result other) { + public int compareTo(createDirectory_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIpe()).compareTo(other.isSetIpe()); + lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive()); if (lastComparison != 0) { return lastComparison; } - if (isSetIpe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipe, other.ipe); + if (isSetRecursive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive); if (lastComparison != 0) { return lastComparison; } @@ -5853,24 +6516,24 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getFileId_result("); + StringBuilder sb = new StringBuilder("createDirectory_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("ipe:"); - if (this.ipe == null) { + sb.append("path:"); + if (this.path == null) { sb.append("null"); } else { - sb.append(this.ipe); + sb.append(this.path); } first = false; + if (!first) sb.append(", "); + sb.append("recursive:"); + sb.append(this.recursive); + first = false; sb.append(")"); return sb.toString(); } @@ -5898,15 +6561,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getFileId_resultStandardSchemeFactory implements SchemeFactory { - public getFileId_resultStandardScheme getScheme() { - return new getFileId_resultStandardScheme(); + private static class createDirectory_argsStandardSchemeFactory implements SchemeFactory { + public createDirectory_argsStandardScheme getScheme() { + return new createDirectory_argsStandardScheme(); } } - private static class getFileId_resultStandardScheme extends StandardScheme { + private static class createDirectory_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getFileId_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, createDirectory_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5916,19 +6579,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileId_result st break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); + case 1: // PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // IPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); + case 2: // RECURSIVE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.recursive = iprot.readBool(); + struct.setRecursiveIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5944,87 +6606,87 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileId_result st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getFileId_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, createDirectory_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); - oprot.writeFieldEnd(); - } - if (struct.ipe != null) { - oprot.writeFieldBegin(IPE_FIELD_DESC); - struct.ipe.write(oprot); + if (struct.path != null) { + oprot.writeFieldBegin(PATH_FIELD_DESC); + oprot.writeString(struct.path); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(RECURSIVE_FIELD_DESC); + oprot.writeBool(struct.recursive); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getFileId_resultTupleSchemeFactory implements SchemeFactory { - public getFileId_resultTupleScheme getScheme() { - return new getFileId_resultTupleScheme(); + private static class createDirectory_argsTupleSchemeFactory implements SchemeFactory { + public createDirectory_argsTupleScheme getScheme() { + return new createDirectory_argsTupleScheme(); } } - private static class getFileId_resultTupleScheme extends TupleScheme { + private static class createDirectory_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getFileId_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, createDirectory_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetPath()) { optionals.set(0); } - if (struct.isSetIpe()) { + if (struct.isSetRecursive()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); + if (struct.isSetPath()) { + oprot.writeString(struct.path); } - if (struct.isSetIpe()) { - struct.ipe.write(oprot); + if (struct.isSetRecursive()) { + oprot.writeBool(struct.recursive); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getFileId_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, createDirectory_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); + struct.path = iprot.readString(); + struct.setPathIsSet(true); } if (incoming.get(1)) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); + struct.recursive = iprot.readBool(); + struct.setRecursiveIsSet(true); } } } } - public static class getFileInfo_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("getFileInfo_args"); + public static class createDirectory_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("createDirectory_result"); - 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 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_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getFileInfo_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFileInfo_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new createDirectory_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createDirectory_resultTupleSchemeFactory()); } - public long fileId; // required + public boolean success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -6039,8 +6701,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -6081,76 +6745,116 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; + private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileInfo_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createDirectory_result.class, metaDataMap); } - public getFileInfo_args() { + public createDirectory_result() { } - public getFileInfo_args( - long fileId) + public createDirectory_result( + boolean success, + TachyonTException e) { this(); - this.fileId = fileId; - setFileIdIsSet(true); + this.success = success; + setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public getFileInfo_args(getFileInfo_args other) { + public createDirectory_result(createDirectory_result other) { __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public getFileInfo_args deepCopy() { - return new getFileInfo_args(this); + public createDirectory_result deepCopy() { + return new createDirectory_result(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; + setSuccessIsSet(false); + this.success = false; + this.e = null; } - public long getFileId() { - return this.fileId; + public boolean isSuccess() { + return this.success; } - public getFileInfo_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public createDirectory_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TachyonTException getE() { + return this.e; + } + + public createDirectory_result setE(TachyonTException e) { + this.e = e; + return this; + } + + public void unsetE() { + this.e = null; + } + + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; + } + + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SUCCESS: if (value == null) { - unsetFileId(); + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case E: + if (value == null) { + unsetE(); } else { - setFileId((Long)value); + setE((TachyonTException)value); } break; @@ -6159,8 +6863,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case E: + return getE(); } throw new IllegalStateException(); @@ -6173,8 +6880,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -6183,21 +6892,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getFileInfo_args) - return this.equals((getFileInfo_args)that); + if (that instanceof createDirectory_result) + return this.equals((createDirectory_result)that); return false; } - public boolean equals(getFileInfo_args that) { + public boolean equals(createDirectory_result that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.fileId != that.fileId) + if (this.success != that.success) + return false; + } + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) return false; } @@ -6208,28 +6926,43 @@ public boolean equals(getFileInfo_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(getFileInfo_args other) { + public int compareTo(createDirectory_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -6247,15 +6980,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getFileInfo_args("); + StringBuilder sb = new StringBuilder("createDirectory_result("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -6284,15 +7025,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getFileInfo_argsStandardSchemeFactory implements SchemeFactory { - public getFileInfo_argsStandardScheme getScheme() { - return new getFileInfo_argsStandardScheme(); + private static class createDirectory_resultStandardSchemeFactory implements SchemeFactory { + public createDirectory_resultStandardScheme getScheme() { + return new createDirectory_resultStandardScheme(); } } - private static class getFileInfo_argsStandardScheme extends StandardScheme { + private static class createDirectory_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, createDirectory_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6302,10 +7043,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_args st break; } switch (schemeField.id) { - case 1: // FILE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -6321,72 +7071,96 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_args st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getFileInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, createDirectory_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getFileInfo_argsTupleSchemeFactory implements SchemeFactory { - public getFileInfo_argsTupleScheme getScheme() { - return new getFileInfo_argsTupleScheme(); + private static class createDirectory_resultTupleSchemeFactory implements SchemeFactory { + public createDirectory_resultTupleScheme getScheme() { + return new createDirectory_resultTupleScheme(); } } - private static class getFileInfo_argsTupleScheme extends TupleScheme { + private static class createDirectory_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, createDirectory_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetE()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getFileInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, createDirectory_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class getFileInfo_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("getFileInfo_result"); + public static class createFile_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("createFile_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField BLOCK_SIZE_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockSizeBytes", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final org.apache.thrift.protocol.TField TTL_FIELD_DESC = new org.apache.thrift.protocol.TField("ttl", org.apache.thrift.protocol.TType.I64, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getFileInfo_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFileInfo_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new createFile_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createFile_argsTupleSchemeFactory()); } - public FileInfo success; // required - public FileDoesNotExistException fdnee; // required + public String path; // required + public long blockSizeBytes; // required + public boolean recursive; // required + public long ttl; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - FDNEE((short)1, "fdnee"); + PATH((short)1, "path"), + BLOCK_SIZE_BYTES((short)2, "blockSizeBytes"), + RECURSIVE((short)3, "recursive"), + TTL((short)4, "ttl"); private static final Map byName = new HashMap(); @@ -6401,10 +7175,14 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // FDNEE - return FDNEE; + case 1: // PATH + return PATH; + case 2: // BLOCK_SIZE_BYTES + return BLOCK_SIZE_BYTES; + case 3: // RECURSIVE + return RECURSIVE; + case 4: // TTL + return TTL; default: return null; } @@ -6445,114 +7223,196 @@ public String getFieldName() { } // isset id assignments + private static final int __BLOCKSIZEBYTES_ISSET_ID = 0; + private static final int __RECURSIVE_ISSET_ID = 1; + private static final int __TTL_ISSET_ID = 2; + private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileInfo.class))); - tmpMap.put(_Fields.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.BLOCK_SIZE_BYTES, new org.apache.thrift.meta_data.FieldMetaData("blockSizeBytes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.TTL, new org.apache.thrift.meta_data.FieldMetaData("ttl", 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(getFileInfo_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createFile_args.class, metaDataMap); } - public getFileInfo_result() { + public createFile_args() { } - public getFileInfo_result( - FileInfo success, - FileDoesNotExistException fdnee) + public createFile_args( + String path, + long blockSizeBytes, + boolean recursive, + long ttl) { this(); - this.success = success; - this.fdnee = fdnee; + this.path = path; + this.blockSizeBytes = blockSizeBytes; + setBlockSizeBytesIsSet(true); + this.recursive = recursive; + setRecursiveIsSet(true); + this.ttl = ttl; + setTtlIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public createFile_args(createFile_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetPath()) { + this.path = other.path; + } + this.blockSizeBytes = other.blockSizeBytes; + this.recursive = other.recursive; + this.ttl = other.ttl; + } + + public createFile_args deepCopy() { + return new createFile_args(this); + } + + @Override + public void clear() { + this.path = null; + setBlockSizeBytesIsSet(false); + this.blockSizeBytes = 0; + setRecursiveIsSet(false); + this.recursive = false; + setTtlIsSet(false); + this.ttl = 0; + } + + public String getPath() { + return this.path; + } + + public createFile_args setPath(String path) { + this.path = path; + return this; + } + + public void unsetPath() { + this.path = null; + } + + /** Returns true if field path is set (has been assigned a value) and false otherwise */ + public boolean isSetPath() { + return this.path != null; + } + + public void setPathIsSet(boolean value) { + if (!value) { + this.path = null; + } + } + + public long getBlockSizeBytes() { + return this.blockSizeBytes; } - /** - * Performs a deep copy on other. - */ - public getFileInfo_result(getFileInfo_result other) { - if (other.isSetSuccess()) { - this.success = new FileInfo(other.success); - } - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); - } + public createFile_args setBlockSizeBytes(long blockSizeBytes) { + this.blockSizeBytes = blockSizeBytes; + setBlockSizeBytesIsSet(true); + return this; } - public getFileInfo_result deepCopy() { - return new getFileInfo_result(this); + public void unsetBlockSizeBytes() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID); } - @Override - public void clear() { - this.success = null; - this.fdnee = null; + /** Returns true if field blockSizeBytes is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockSizeBytes() { + return EncodingUtils.testBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID); } - public FileInfo getSuccess() { - return this.success; + public void setBlockSizeBytesIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID, value); } - public getFileInfo_result setSuccess(FileInfo success) { - this.success = success; + public boolean isRecursive() { + return this.recursive; + } + + public createFile_args setRecursive(boolean recursive) { + this.recursive = recursive; + setRecursiveIsSet(true); return this; } - public void unsetSuccess() { - this.success = null; + public void unsetRecursive() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID); } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field recursive is set (has been assigned a value) and false otherwise */ + public boolean isSetRecursive() { + return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID); } - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + public void setRecursiveIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value); } - public FileDoesNotExistException getFdnee() { - return this.fdnee; + public long getTtl() { + return this.ttl; } - public getFileInfo_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; + public createFile_args setTtl(long ttl) { + this.ttl = ttl; + setTtlIsSet(true); return this; } - public void unsetFdnee() { - this.fdnee = null; + public void unsetTtl() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TTL_ISSET_ID); } - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; + /** Returns true if field ttl is set (has been assigned a value) and false otherwise */ + public boolean isSetTtl() { + return EncodingUtils.testBit(__isset_bitfield, __TTL_ISSET_ID); } - public void setFdneeIsSet(boolean value) { - if (!value) { - this.fdnee = null; - } + public void setTtlIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TTL_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case PATH: if (value == null) { - unsetSuccess(); + unsetPath(); } else { - setSuccess((FileInfo)value); + setPath((String)value); + } + break; + + case BLOCK_SIZE_BYTES: + if (value == null) { + unsetBlockSizeBytes(); + } else { + setBlockSizeBytes((Long)value); + } + break; + + case RECURSIVE: + if (value == null) { + unsetRecursive(); + } else { + setRecursive((Boolean)value); } break; - case FDNEE: + case TTL: if (value == null) { - unsetFdnee(); + unsetTtl(); } else { - setFdnee((FileDoesNotExistException)value); + setTtl((Long)value); } break; @@ -6561,11 +7421,17 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case PATH: + return getPath(); + + case BLOCK_SIZE_BYTES: + return Long.valueOf(getBlockSizeBytes()); + + case RECURSIVE: + return Boolean.valueOf(isRecursive()); - case FDNEE: - return getFdnee(); + case TTL: + return Long.valueOf(getTtl()); } throw new IllegalStateException(); @@ -6578,10 +7444,14 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case FDNEE: - return isSetFdnee(); + case PATH: + return isSetPath(); + case BLOCK_SIZE_BYTES: + return isSetBlockSizeBytes(); + case RECURSIVE: + return isSetRecursive(); + case TTL: + return isSetTtl(); } throw new IllegalStateException(); } @@ -6590,30 +7460,48 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getFileInfo_result) - return this.equals((getFileInfo_result)that); + if (that instanceof createFile_args) + return this.equals((createFile_args)that); return false; } - public boolean equals(getFileInfo_result that) { + public boolean equals(createFile_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_path = true && this.isSetPath(); + boolean that_present_path = true && that.isSetPath(); + if (this_present_path || that_present_path) { + if (!(this_present_path && that_present_path)) return false; - if (!this.success.equals(that.success)) + if (!this.path.equals(that.path)) return false; } - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) + boolean this_present_blockSizeBytes = true; + boolean that_present_blockSizeBytes = true; + if (this_present_blockSizeBytes || that_present_blockSizeBytes) { + if (!(this_present_blockSizeBytes && that_present_blockSizeBytes)) + return false; + if (this.blockSizeBytes != that.blockSizeBytes) + return false; + } + + boolean this_present_recursive = true; + boolean that_present_recursive = true; + if (this_present_recursive || that_present_recursive) { + if (!(this_present_recursive && that_present_recursive)) + return false; + if (this.recursive != that.recursive) + return false; + } + + boolean this_present_ttl = true; + boolean that_present_ttl = true; + if (this_present_ttl || that_present_ttl) { + if (!(this_present_ttl && that_present_ttl)) return false; - if (!this.fdnee.equals(that.fdnee)) + if (this.ttl != that.ttl) return false; } @@ -6624,43 +7512,73 @@ public boolean equals(getFileInfo_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + boolean present_path = true && (isSetPath()); + list.add(present_path); + if (present_path) + list.add(path); + + boolean present_blockSizeBytes = true; + list.add(present_blockSizeBytes); + if (present_blockSizeBytes) + list.add(blockSizeBytes); + + boolean present_recursive = true; + list.add(present_recursive); + if (present_recursive) + list.add(recursive); - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); + boolean present_ttl = true; + list.add(present_ttl); + if (present_ttl) + list.add(ttl); return list.hashCode(); } @Override - public int compareTo(getFileInfo_result other) { + public int compareTo(createFile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBlockSizeBytes()).compareTo(other.isSetBlockSizeBytes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBlockSizeBytes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockSizeBytes, other.blockSizeBytes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRecursive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); + lastComparison = Boolean.valueOf(isSetTtl()).compareTo(other.isSetTtl()); if (lastComparison != 0) { return lastComparison; } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); + if (isSetTtl()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ttl, other.ttl); if (lastComparison != 0) { return lastComparison; } @@ -6678,27 +7596,31 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getFileInfo_result("); + StringBuilder sb = new StringBuilder("createFile_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("path:"); + if (this.path == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.path); } first = false; if (!first) sb.append(", "); - sb.append("fdnee:"); - if (this.fdnee == null) { - sb.append("null"); - } else { - sb.append(this.fdnee); - } + sb.append("blockSizeBytes:"); + sb.append(this.blockSizeBytes); + first = false; + if (!first) sb.append(", "); + sb.append("recursive:"); + sb.append(this.recursive); + first = false; + if (!first) sb.append(", "); + sb.append("ttl:"); + sb.append(this.ttl); first = false; sb.append(")"); return sb.toString(); @@ -6707,9 +7629,6 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -6722,21 +7641,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getFileInfo_resultStandardSchemeFactory implements SchemeFactory { - public getFileInfo_resultStandardScheme getScheme() { - return new getFileInfo_resultStandardScheme(); + private static class createFile_argsStandardSchemeFactory implements SchemeFactory { + public createFile_argsStandardScheme getScheme() { + return new createFile_argsStandardScheme(); } } - private static class getFileInfo_resultStandardScheme extends StandardScheme { + private static class createFile_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, createFile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6746,20 +7667,34 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_result break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new FileInfo(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); + case 1: // PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // BLOCK_SIZE_BYTES + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.blockSizeBytes = iprot.readI64(); + struct.setBlockSizeBytesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + case 3: // RECURSIVE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.recursive = iprot.readBool(); + struct.setRecursiveIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TTL + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.ttl = iprot.readI64(); + struct.setTtlIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -6775,88 +7710,113 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getFileInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, createFile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); + if (struct.path != null) { + oprot.writeFieldBegin(PATH_FIELD_DESC); + oprot.writeString(struct.path); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(BLOCK_SIZE_BYTES_FIELD_DESC); + oprot.writeI64(struct.blockSizeBytes); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(RECURSIVE_FIELD_DESC); + oprot.writeBool(struct.recursive); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(TTL_FIELD_DESC); + oprot.writeI64(struct.ttl); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getFileInfo_resultTupleSchemeFactory implements SchemeFactory { - public getFileInfo_resultTupleScheme getScheme() { - return new getFileInfo_resultTupleScheme(); + private static class createFile_argsTupleSchemeFactory implements SchemeFactory { + public createFile_argsTupleScheme getScheme() { + return new createFile_argsTupleScheme(); } } - private static class getFileInfo_resultTupleScheme extends TupleScheme { + private static class createFile_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, createFile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetPath()) { optionals.set(0); } - if (struct.isSetFdnee()) { + if (struct.isSetBlockSizeBytes()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); + if (struct.isSetRecursive()) { + optionals.set(2); + } + if (struct.isSetTtl()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetPath()) { + oprot.writeString(struct.path); + } + if (struct.isSetBlockSizeBytes()) { + oprot.writeI64(struct.blockSizeBytes); + } + if (struct.isSetRecursive()) { + oprot.writeBool(struct.recursive); } - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); + if (struct.isSetTtl()) { + oprot.writeI64(struct.ttl); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getFileInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, createFile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { - struct.success = new FileInfo(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); + struct.path = iprot.readString(); + struct.setPathIsSet(true); } if (incoming.get(1)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + struct.blockSizeBytes = iprot.readI64(); + struct.setBlockSizeBytesIsSet(true); + } + if (incoming.get(2)) { + struct.recursive = iprot.readBool(); + struct.setRecursiveIsSet(true); + } + if (incoming.get(3)) { + struct.ttl = iprot.readI64(); + struct.setTtlIsSet(true); } } } } - public static class getFileInfoList_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("getFileInfoList_args"); + public static class createFile_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("createFile_result"); - 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 SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getFileInfoList_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFileInfoList_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new createFile_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createFile_resultTupleSchemeFactory()); } - public long fileId; // required + public long success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -6871,8 +7831,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -6913,76 +7875,116 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; + private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.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.I64))); + 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(getFileInfoList_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createFile_result.class, metaDataMap); } - public getFileInfoList_args() { + public createFile_result() { } - public getFileInfoList_args( - long fileId) + public createFile_result( + long success, + TachyonTException e) { this(); - this.fileId = fileId; - setFileIdIsSet(true); + this.success = success; + setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public getFileInfoList_args(getFileInfoList_args other) { + public createFile_result(createFile_result other) { __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public getFileInfoList_args deepCopy() { - return new getFileInfoList_args(this); + public createFile_result deepCopy() { + return new createFile_result(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; + setSuccessIsSet(false); + this.success = 0; + this.e = null; } - public long getFileId() { - return this.fileId; + public long getSuccess() { + return this.success; } - public getFileInfoList_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public createFile_result setSuccess(long success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TachyonTException getE() { + return this.e; + } + + public createFile_result setE(TachyonTException e) { + this.e = e; + return this; + } + + public void unsetE() { + this.e = null; + } + + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; + } + + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SUCCESS: if (value == null) { - unsetFileId(); + unsetSuccess(); } else { - setFileId((Long)value); + setSuccess((Long)value); + } + break; + + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); } break; @@ -6991,8 +7993,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SUCCESS: + return Long.valueOf(getSuccess()); + + case E: + return getE(); } throw new IllegalStateException(); @@ -7005,8 +8010,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -7015,21 +8022,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getFileInfoList_args) - return this.equals((getFileInfoList_args)that); + if (that instanceof createFile_result) + return this.equals((createFile_result)that); return false; } - public boolean equals(getFileInfoList_args that) { + public boolean equals(createFile_result that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.fileId != that.fileId) + if (this.success != that.success) + return false; + } + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) return false; } @@ -7040,28 +8056,43 @@ public boolean equals(getFileInfoList_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(getFileInfoList_args other) { + public int compareTo(createFile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -7079,15 +8110,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getFileInfoList_args("); + StringBuilder sb = new StringBuilder("createFile_result("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -7116,15 +8155,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getFileInfoList_argsStandardSchemeFactory implements SchemeFactory { - public getFileInfoList_argsStandardScheme getScheme() { - return new getFileInfoList_argsStandardScheme(); + private static class createFile_resultStandardSchemeFactory implements SchemeFactory { + public createFile_resultStandardScheme getScheme() { + return new createFile_resultStandardScheme(); } } - private static class getFileInfoList_argsStandardScheme extends StandardScheme { + private static class createFile_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfoList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, createFile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -7134,10 +8173,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfoList_arg break; } switch (schemeField.id) { - case 1: // FILE_ID + case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -7153,72 +8201,90 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfoList_arg struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getFileInfoList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, createFile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI64(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getFileInfoList_argsTupleSchemeFactory implements SchemeFactory { - public getFileInfoList_argsTupleScheme getScheme() { - return new getFileInfoList_argsTupleScheme(); + private static class createFile_resultTupleSchemeFactory implements SchemeFactory { + public createFile_resultTupleScheme getScheme() { + return new createFile_resultTupleScheme(); } } - private static class getFileInfoList_argsTupleScheme extends TupleScheme { + private static class createFile_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfoList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, createFile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetE()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI64(struct.success); + } + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getFileInfoList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, createFile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class getFileInfoList_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("getFileInfoList_result"); + public static class deleteFile_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("deleteFile_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); + 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 RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getFileInfoList_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFileInfoList_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteFile_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteFile_argsTupleSchemeFactory()); } - public List success; // required - public FileDoesNotExistException fdnee; // required + public long fileId; // required + public boolean recursive; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - FDNEE((short)1, "fdnee"); + FILE_ID((short)1, "fileId"), + RECURSIVE((short)2, "recursive"); private static final Map byName = new HashMap(); @@ -7233,10 +8299,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // FDNEE - return FDNEE; + case 1: // FILE_ID + return FILE_ID; + case 2: // RECURSIVE + return RECURSIVE; default: return null; } @@ -7277,134 +8343,116 @@ public String getFieldName() { } // isset id assignments + private static final int __FILEID_ISSET_ID = 0; + private static final int __RECURSIVE_ISSET_ID = 1; + private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileInfo.class)))); - tmpMap.put(_Fields.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + 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.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", 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(getFileInfoList_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteFile_args.class, metaDataMap); } - public getFileInfoList_result() { + public deleteFile_args() { } - public getFileInfoList_result( - List success, - FileDoesNotExistException fdnee) + public deleteFile_args( + long fileId, + boolean recursive) { this(); - this.success = success; - this.fdnee = fdnee; + this.fileId = fileId; + setFileIdIsSet(true); + this.recursive = recursive; + setRecursiveIsSet(true); } /** * Performs a deep copy on other. */ - public getFileInfoList_result(getFileInfoList_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (FileInfo other_element : other.success) { - __this__success.add(new FileInfo(other_element)); - } - this.success = __this__success; - } - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); - } + public deleteFile_args(deleteFile_args other) { + __isset_bitfield = other.__isset_bitfield; + this.fileId = other.fileId; + this.recursive = other.recursive; } - public getFileInfoList_result deepCopy() { - return new getFileInfoList_result(this); + public deleteFile_args deepCopy() { + return new deleteFile_args(this); } @Override public void clear() { - this.success = null; - this.fdnee = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(FileInfo elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + setFileIdIsSet(false); + this.fileId = 0; + setRecursiveIsSet(false); + this.recursive = false; } - public List getSuccess() { - return this.success; + public long getFileId() { + return this.fileId; } - public getFileInfoList_result setSuccess(List success) { - this.success = success; + public deleteFile_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetSuccess() { - this.success = null; + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } - public FileDoesNotExistException getFdnee() { - return this.fdnee; + public boolean isRecursive() { + return this.recursive; } - public getFileInfoList_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; + public deleteFile_args setRecursive(boolean recursive) { + this.recursive = recursive; + setRecursiveIsSet(true); return this; } - public void unsetFdnee() { - this.fdnee = null; + public void unsetRecursive() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID); } - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; + /** Returns true if field recursive is set (has been assigned a value) and false otherwise */ + public boolean isSetRecursive() { + return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID); } - public void setFdneeIsSet(boolean value) { - if (!value) { - this.fdnee = null; - } + public void setRecursiveIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case FILE_ID: if (value == null) { - unsetSuccess(); + unsetFileId(); } else { - setSuccess((List)value); + setFileId((Long)value); } break; - case FDNEE: + case RECURSIVE: if (value == null) { - unsetFdnee(); + unsetRecursive(); } else { - setFdnee((FileDoesNotExistException)value); + setRecursive((Boolean)value); } break; @@ -7413,11 +8461,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case FILE_ID: + return Long.valueOf(getFileId()); - case FDNEE: - return getFdnee(); + case RECURSIVE: + return Boolean.valueOf(isRecursive()); } throw new IllegalStateException(); @@ -7430,10 +8478,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case FDNEE: - return isSetFdnee(); + case FILE_ID: + return isSetFileId(); + case RECURSIVE: + return isSetRecursive(); } throw new IllegalStateException(); } @@ -7442,30 +8490,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getFileInfoList_result) - return this.equals((getFileInfoList_result)that); + if (that instanceof deleteFile_args) + return this.equals((deleteFile_args)that); return false; } - public boolean equals(getFileInfoList_result that) { + public boolean equals(deleteFile_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (!this.success.equals(that.success)) + if (this.fileId != that.fileId) return false; } - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) + boolean this_present_recursive = true; + boolean that_present_recursive = true; + if (this_present_recursive || that_present_recursive) { + if (!(this_present_recursive && that_present_recursive)) return false; - if (!this.fdnee.equals(that.fdnee)) + if (this.recursive != that.recursive) return false; } @@ -7476,43 +8524,43 @@ public boolean equals(getFileInfoList_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); + boolean present_recursive = true; + list.add(present_recursive); + if (present_recursive) + list.add(recursive); return list.hashCode(); } @Override - public int compareTo(getFileInfoList_result other) { + public int compareTo(deleteFile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); + lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive()); if (lastComparison != 0) { return lastComparison; } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); + if (isSetRecursive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive); if (lastComparison != 0) { return lastComparison; } @@ -7530,27 +8578,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getFileInfoList_result("); + StringBuilder sb = new StringBuilder("deleteFile_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append("fileId:"); + sb.append(this.fileId); first = false; if (!first) sb.append(", "); - sb.append("fdnee:"); - if (this.fdnee == null) { - sb.append("null"); - } else { - sb.append(this.fdnee); - } + sb.append("recursive:"); + sb.append(this.recursive); first = false; sb.append(")"); return sb.toString(); @@ -7571,21 +8611,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getFileInfoList_resultStandardSchemeFactory implements SchemeFactory { - public getFileInfoList_resultStandardScheme getScheme() { - return new getFileInfoList_resultStandardScheme(); + private static class deleteFile_argsStandardSchemeFactory implements SchemeFactory { + public deleteFile_argsStandardScheme getScheme() { + return new deleteFile_argsStandardScheme(); } } - private static class getFileInfoList_resultStandardScheme extends StandardScheme { + private static class deleteFile_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfoList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteFile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -7595,30 +8637,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfoList_res break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list196 = iprot.readListBegin(); - struct.success = new ArrayList(_list196.size); - FileInfo _elem197; - for (int _i198 = 0; _i198 < _list196.size; ++_i198) - { - _elem197 = new FileInfo(); - _elem197.read(iprot); - struct.success.add(_elem197); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); + case 1: // FILE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + case 2: // RECURSIVE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.recursive = iprot.readBool(); + struct.setRecursiveIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -7634,113 +8664,85 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfoList_res struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getFileInfoList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteFile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (FileInfo _iter199 : struct.success) - { - _iter199.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(RECURSIVE_FIELD_DESC); + oprot.writeBool(struct.recursive); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getFileInfoList_resultTupleSchemeFactory implements SchemeFactory { - public getFileInfoList_resultTupleScheme getScheme() { - return new getFileInfoList_resultTupleScheme(); + private static class deleteFile_argsTupleSchemeFactory implements SchemeFactory { + public deleteFile_argsTupleScheme getScheme() { + return new deleteFile_argsTupleScheme(); } } - private static class getFileInfoList_resultTupleScheme extends TupleScheme { + private static class deleteFile_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfoList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteFile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetFdnee()) { + if (struct.isSetRecursive()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (FileInfo _iter200 : struct.success) - { - _iter200.write(oprot); - } - } + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); } - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); + if (struct.isSetRecursive()) { + oprot.writeBool(struct.recursive); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getFileInfoList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteFile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list201 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list201.size); - FileInfo _elem202; - for (int _i203 = 0; _i203 < _list201.size; ++_i203) - { - _elem202 = new FileInfo(); - _elem202.read(iprot); - struct.success.add(_elem202); - } - } - struct.setSuccessIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } if (incoming.get(1)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + struct.recursive = iprot.readBool(); + struct.setRecursiveIsSet(true); } } } } - public static class getFileBlockInfo_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("getFileBlockInfo_args"); + public static class deleteFile_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("deleteFile_result"); - 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 FILE_BLOCK_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("fileBlockIndex", org.apache.thrift.protocol.TType.I32, (short)2); + 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_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getFileBlockInfo_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFileBlockInfo_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteFile_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteFile_resultTupleSchemeFactory()); } - public long fileId; // required - public int fileBlockIndex; // required + public boolean success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"), - FILE_BLOCK_INDEX((short)2, "fileBlockIndex"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -7755,10 +8757,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; - case 2: // FILE_BLOCK_INDEX - return FILE_BLOCK_INDEX; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -7799,116 +8801,116 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; - private static final int __FILEBLOCKINDEX_ISSET_ID = 1; + private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.FILE_BLOCK_INDEX, new org.apache.thrift.meta_data.FieldMetaData("fileBlockIndex", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileBlockInfo_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteFile_result.class, metaDataMap); } - public getFileBlockInfo_args() { + public deleteFile_result() { } - public getFileBlockInfo_args( - long fileId, - int fileBlockIndex) + public deleteFile_result( + boolean success, + TachyonTException e) { this(); - this.fileId = fileId; - setFileIdIsSet(true); - this.fileBlockIndex = fileBlockIndex; - setFileBlockIndexIsSet(true); + this.success = success; + setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public getFileBlockInfo_args(getFileBlockInfo_args other) { + public deleteFile_result(deleteFile_result other) { __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; - this.fileBlockIndex = other.fileBlockIndex; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public getFileBlockInfo_args deepCopy() { - return new getFileBlockInfo_args(this); + public deleteFile_result deepCopy() { + return new deleteFile_result(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; - setFileBlockIndexIsSet(false); - this.fileBlockIndex = 0; + setSuccessIsSet(false); + this.success = false; + this.e = null; } - public long getFileId() { - return this.fileId; + public boolean isSuccess() { + return this.success; } - public getFileBlockInfo_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public deleteFile_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public int getFileBlockIndex() { - return this.fileBlockIndex; + public TachyonTException getE() { + return this.e; } - public getFileBlockInfo_args setFileBlockIndex(int fileBlockIndex) { - this.fileBlockIndex = fileBlockIndex; - setFileBlockIndexIsSet(true); + public deleteFile_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetFileBlockIndex() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEBLOCKINDEX_ISSET_ID); + public void unsetE() { + this.e = null; } - /** Returns true if field fileBlockIndex is set (has been assigned a value) and false otherwise */ - public boolean isSetFileBlockIndex() { - return EncodingUtils.testBit(__isset_bitfield, __FILEBLOCKINDEX_ISSET_ID); + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setFileBlockIndexIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEBLOCKINDEX_ISSET_ID, value); + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SUCCESS: if (value == null) { - unsetFileId(); + unsetSuccess(); } else { - setFileId((Long)value); + setSuccess((Boolean)value); } break; - case FILE_BLOCK_INDEX: + case E: if (value == null) { - unsetFileBlockIndex(); + unsetE(); } else { - setFileBlockIndex((Integer)value); + setE((TachyonTException)value); } break; @@ -7917,11 +8919,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SUCCESS: + return Boolean.valueOf(isSuccess()); - case FILE_BLOCK_INDEX: - return Integer.valueOf(getFileBlockIndex()); + case E: + return getE(); } throw new IllegalStateException(); @@ -7934,10 +8936,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); - case FILE_BLOCK_INDEX: - return isSetFileBlockIndex(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -7946,30 +8948,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getFileBlockInfo_args) - return this.equals((getFileBlockInfo_args)that); + if (that instanceof deleteFile_result) + return this.equals((deleteFile_result)that); return false; } - public boolean equals(getFileBlockInfo_args that) { + public boolean equals(deleteFile_result that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.fileId != that.fileId) + if (this.success != that.success) return false; } - boolean this_present_fileBlockIndex = true; - boolean that_present_fileBlockIndex = true; - if (this_present_fileBlockIndex || that_present_fileBlockIndex) { - if (!(this_present_fileBlockIndex && that_present_fileBlockIndex)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (this.fileBlockIndex != that.fileBlockIndex) + if (!this.e.equals(that.e)) return false; } @@ -7980,43 +8982,43 @@ public boolean equals(getFileBlockInfo_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); - boolean present_fileBlockIndex = true; - list.add(present_fileBlockIndex); - if (present_fileBlockIndex) - list.add(fileBlockIndex); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(getFileBlockInfo_args other) { + public int compareTo(deleteFile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFileBlockIndex()).compareTo(other.isSetFileBlockIndex()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileBlockIndex()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileBlockIndex, other.fileBlockIndex); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -8034,19 +9036,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getFileBlockInfo_args("); + StringBuilder sb = new StringBuilder("deleteFile_result("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("fileBlockIndex:"); - sb.append(this.fileBlockIndex); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -8075,15 +9081,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getFileBlockInfo_argsStandardSchemeFactory implements SchemeFactory { - public getFileBlockInfo_argsStandardScheme getScheme() { - return new getFileBlockInfo_argsStandardScheme(); + private static class deleteFile_resultStandardSchemeFactory implements SchemeFactory { + public deleteFile_resultStandardScheme getScheme() { + return new deleteFile_resultStandardScheme(); } } - private static class getFileBlockInfo_argsStandardScheme extends StandardScheme { + private static class deleteFile_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteFile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -8093,18 +9099,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfo_ar break; } switch (schemeField.id) { - case 1: // FILE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // FILE_BLOCK_INDEX - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.fileBlockIndex = iprot.readI32(); - struct.setFileBlockIndexIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -8120,88 +9127,90 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfo_ar struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getFileBlockInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteFile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(FILE_BLOCK_INDEX_FIELD_DESC); - oprot.writeI32(struct.fileBlockIndex); - oprot.writeFieldEnd(); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getFileBlockInfo_argsTupleSchemeFactory implements SchemeFactory { - public getFileBlockInfo_argsTupleScheme getScheme() { - return new getFileBlockInfo_argsTupleScheme(); + private static class deleteFile_resultTupleSchemeFactory implements SchemeFactory { + public deleteFile_resultTupleScheme getScheme() { + return new deleteFile_resultTupleScheme(); } } - private static class getFileBlockInfo_argsTupleScheme extends TupleScheme { + private static class deleteFile_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteFile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetFileBlockIndex()) { + if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); } - if (struct.isSetFileBlockIndex()) { - oprot.writeI32(struct.fileBlockIndex); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteFile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.fileBlockIndex = iprot.readI32(); - struct.setFileBlockIndexIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class getFileBlockInfo_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("getFileBlockInfo_result"); + public static class free_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("free_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField BIE_FIELD_DESC = new org.apache.thrift.protocol.TField("bie", org.apache.thrift.protocol.TType.STRUCT, (short)2); + 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 RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getFileBlockInfo_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFileBlockInfo_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new free_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new free_argsTupleSchemeFactory()); } - public FileBlockInfo success; // required - public FileDoesNotExistException fdnee; // required - public BlockInfoException bie; // required + public long fileId; // required + public boolean recursive; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - FDNEE((short)1, "fdnee"), - BIE((short)2, "bie"); + FILE_ID((short)1, "fileId"), + RECURSIVE((short)2, "recursive"); private static final Map byName = new HashMap(); @@ -8216,12 +9225,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // FDNEE - return FDNEE; - case 2: // BIE - return BIE; + case 1: // FILE_ID + return FILE_ID; + case 2: // RECURSIVE + return RECURSIVE; default: return null; } @@ -8262,154 +9269,116 @@ public String getFieldName() { } // isset id assignments + private static final int __FILEID_ISSET_ID = 0; + private static final int __RECURSIVE_ISSET_ID = 1; + private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileBlockInfo.class))); - tmpMap.put(_Fields.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.BIE, new org.apache.thrift.meta_data.FieldMetaData("bie", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + 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.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", 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(getFileBlockInfo_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(free_args.class, metaDataMap); } - public getFileBlockInfo_result() { + public free_args() { } - public getFileBlockInfo_result( - FileBlockInfo success, - FileDoesNotExistException fdnee, - BlockInfoException bie) + public free_args( + long fileId, + boolean recursive) { this(); - this.success = success; - this.fdnee = fdnee; - this.bie = bie; + this.fileId = fileId; + setFileIdIsSet(true); + this.recursive = recursive; + setRecursiveIsSet(true); } /** * Performs a deep copy on other. */ - public getFileBlockInfo_result(getFileBlockInfo_result other) { - if (other.isSetSuccess()) { - this.success = new FileBlockInfo(other.success); - } - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); - } - if (other.isSetBie()) { - this.bie = new BlockInfoException(other.bie); - } + public free_args(free_args other) { + __isset_bitfield = other.__isset_bitfield; + this.fileId = other.fileId; + this.recursive = other.recursive; } - public getFileBlockInfo_result deepCopy() { - return new getFileBlockInfo_result(this); + public free_args deepCopy() { + return new free_args(this); } @Override public void clear() { - this.success = null; - this.fdnee = null; - this.bie = null; - } - - public FileBlockInfo getSuccess() { - return this.success; - } - - public getFileBlockInfo_result setSuccess(FileBlockInfo success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + setFileIdIsSet(false); + this.fileId = 0; + setRecursiveIsSet(false); + this.recursive = false; } - public FileDoesNotExistException getFdnee() { - return this.fdnee; + public long getFileId() { + return this.fileId; } - public getFileBlockInfo_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; + public free_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetFdnee() { - this.fdnee = null; + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setFdneeIsSet(boolean value) { - if (!value) { - this.fdnee = null; - } + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } - public BlockInfoException getBie() { - return this.bie; + public boolean isRecursive() { + return this.recursive; } - public getFileBlockInfo_result setBie(BlockInfoException bie) { - this.bie = bie; + public free_args setRecursive(boolean recursive) { + this.recursive = recursive; + setRecursiveIsSet(true); return this; } - public void unsetBie() { - this.bie = null; + public void unsetRecursive() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID); } - /** Returns true if field bie is set (has been assigned a value) and false otherwise */ - public boolean isSetBie() { - return this.bie != null; + /** Returns true if field recursive is set (has been assigned a value) and false otherwise */ + public boolean isSetRecursive() { + return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID); } - public void setBieIsSet(boolean value) { - if (!value) { - this.bie = null; - } + public void setRecursiveIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((FileBlockInfo)value); - } - break; - - case FDNEE: + case FILE_ID: if (value == null) { - unsetFdnee(); + unsetFileId(); } else { - setFdnee((FileDoesNotExistException)value); + setFileId((Long)value); } break; - case BIE: + case RECURSIVE: if (value == null) { - unsetBie(); + unsetRecursive(); } else { - setBie((BlockInfoException)value); + setRecursive((Boolean)value); } break; @@ -8418,14 +9387,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case FDNEE: - return getFdnee(); + case FILE_ID: + return Long.valueOf(getFileId()); - case BIE: - return getBie(); + case RECURSIVE: + return Boolean.valueOf(isRecursive()); } throw new IllegalStateException(); @@ -8438,12 +9404,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case FDNEE: - return isSetFdnee(); - case BIE: - return isSetBie(); + case FILE_ID: + return isSetFileId(); + case RECURSIVE: + return isSetRecursive(); } throw new IllegalStateException(); } @@ -8452,39 +9416,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getFileBlockInfo_result) - return this.equals((getFileBlockInfo_result)that); + if (that instanceof free_args) + return this.equals((free_args)that); return false; } - public boolean equals(getFileBlockInfo_result that) { + public boolean equals(free_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (!this.fdnee.equals(that.fdnee)) + if (this.fileId != that.fileId) return false; } - boolean this_present_bie = true && this.isSetBie(); - boolean that_present_bie = true && that.isSetBie(); - if (this_present_bie || that_present_bie) { - if (!(this_present_bie && that_present_bie)) + boolean this_present_recursive = true; + boolean that_present_recursive = true; + if (this_present_recursive || that_present_recursive) { + if (!(this_present_recursive && that_present_recursive)) return false; - if (!this.bie.equals(that.bie)) + if (this.recursive != that.recursive) return false; } @@ -8495,58 +9450,43 @@ public boolean equals(getFileBlockInfo_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); - boolean present_bie = true && (isSetBie()); - list.add(present_bie); - if (present_bie) - list.add(bie); + boolean present_recursive = true; + list.add(present_recursive); + if (present_recursive) + list.add(recursive); return list.hashCode(); } @Override - public int compareTo(getFileBlockInfo_result other) { + public int compareTo(free_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetBie()).compareTo(other.isSetBie()); + lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive()); if (lastComparison != 0) { return lastComparison; } - if (isSetBie()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bie, other.bie); + if (isSetRecursive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive); if (lastComparison != 0) { return lastComparison; } @@ -8564,35 +9504,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getFileBlockInfo_result("); + StringBuilder sb = new StringBuilder("free_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("fdnee:"); - if (this.fdnee == null) { - sb.append("null"); - } else { - sb.append(this.fdnee); - } + sb.append("fileId:"); + sb.append(this.fileId); first = false; if (!first) sb.append(", "); - sb.append("bie:"); - if (this.bie == null) { - sb.append("null"); - } else { - sb.append(this.bie); - } + sb.append("recursive:"); + sb.append(this.recursive); first = false; sb.append(")"); return sb.toString(); @@ -8601,9 +9525,6 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -8616,21 +9537,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getFileBlockInfo_resultStandardSchemeFactory implements SchemeFactory { - public getFileBlockInfo_resultStandardScheme getScheme() { - return new getFileBlockInfo_resultStandardScheme(); + private static class free_argsStandardSchemeFactory implements SchemeFactory { + public free_argsStandardScheme getScheme() { + return new free_argsStandardScheme(); } } - private static class getFileBlockInfo_resultStandardScheme extends StandardScheme { + private static class free_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, free_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -8640,29 +9563,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfo_re break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new FileBlockInfo(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + case 1: // FILE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // BIE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); + case 2: // RECURSIVE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.recursive = iprot.readBool(); + struct.setRecursiveIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -8678,104 +9590,85 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfo_re struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getFileBlockInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, free_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.bie != null) { - oprot.writeFieldBegin(BIE_FIELD_DESC); - struct.bie.write(oprot); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(RECURSIVE_FIELD_DESC); + oprot.writeBool(struct.recursive); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getFileBlockInfo_resultTupleSchemeFactory implements SchemeFactory { - public getFileBlockInfo_resultTupleScheme getScheme() { - return new getFileBlockInfo_resultTupleScheme(); + private static class free_argsTupleSchemeFactory implements SchemeFactory { + public free_argsTupleScheme getScheme() { + return new free_argsTupleScheme(); } } - private static class getFileBlockInfo_resultTupleScheme extends TupleScheme { + private static class free_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, free_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetFdnee()) { + if (struct.isSetRecursive()) { optionals.set(1); } - if (struct.isSetBie()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); + oprot.writeBitSet(optionals, 2); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); } - if (struct.isSetBie()) { - struct.bie.write(oprot); + if (struct.isSetRecursive()) { + oprot.writeBool(struct.recursive); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, free_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = new FileBlockInfo(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } if (incoming.get(1)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } - if (incoming.get(2)) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); + struct.recursive = iprot.readBool(); + struct.setRecursiveIsSet(true); } } } } - public static class getFileBlockInfoList_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("getFileBlockInfoList_args"); + public static class free_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("free_result"); - 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 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_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getFileBlockInfoList_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFileBlockInfoList_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new free_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new free_resultTupleSchemeFactory()); } - public long fileId; // required + public boolean success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -8790,8 +9683,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -8832,76 +9727,116 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; + private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileBlockInfoList_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(free_result.class, metaDataMap); } - public getFileBlockInfoList_args() { + public free_result() { } - public getFileBlockInfoList_args( - long fileId) + public free_result( + boolean success, + TachyonTException e) { this(); - this.fileId = fileId; - setFileIdIsSet(true); + this.success = success; + setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public getFileBlockInfoList_args(getFileBlockInfoList_args other) { + public free_result(free_result other) { __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public getFileBlockInfoList_args deepCopy() { - return new getFileBlockInfoList_args(this); + public free_result deepCopy() { + return new free_result(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; + setSuccessIsSet(false); + this.success = false; + this.e = null; } - public long getFileId() { - return this.fileId; + public boolean isSuccess() { + return this.success; } - public getFileBlockInfoList_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public free_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TachyonTException getE() { + return this.e; + } + + public free_result setE(TachyonTException e) { + this.e = e; + return this; + } + + public void unsetE() { + this.e = null; + } + + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; + } + + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SUCCESS: if (value == null) { - unsetFileId(); + unsetSuccess(); } else { - setFileId((Long)value); + setSuccess((Boolean)value); + } + break; + + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); } break; @@ -8910,8 +9845,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case E: + return getE(); } throw new IllegalStateException(); @@ -8924,8 +9862,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -8934,21 +9874,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getFileBlockInfoList_args) - return this.equals((getFileBlockInfoList_args)that); + if (that instanceof free_result) + return this.equals((free_result)that); return false; } - public boolean equals(getFileBlockInfoList_args that) { + public boolean equals(free_result that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (this.fileId != that.fileId) + if (!this.e.equals(that.e)) return false; } @@ -8959,28 +9908,43 @@ public boolean equals(getFileBlockInfoList_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(getFileBlockInfoList_args other) { + public int compareTo(free_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -8998,15 +9962,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getFileBlockInfoList_args("); + StringBuilder sb = new StringBuilder("free_result("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -9035,15 +10007,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getFileBlockInfoList_argsStandardSchemeFactory implements SchemeFactory { - public getFileBlockInfoList_argsStandardScheme getScheme() { - return new getFileBlockInfoList_argsStandardScheme(); + private static class free_resultStandardSchemeFactory implements SchemeFactory { + public free_resultStandardScheme getScheme() { + return new free_resultStandardScheme(); } } - private static class getFileBlockInfoList_argsStandardScheme extends StandardScheme { + private static class free_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfoList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, free_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -9053,10 +10025,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfoLis break; } switch (schemeField.id) { - case 1: // FILE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -9072,72 +10053,87 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfoLis struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getFileBlockInfoList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, free_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getFileBlockInfoList_argsTupleSchemeFactory implements SchemeFactory { - public getFileBlockInfoList_argsTupleScheme getScheme() { - return new getFileBlockInfoList_argsTupleScheme(); + private static class free_resultTupleSchemeFactory implements SchemeFactory { + public free_resultTupleScheme getScheme() { + return new free_resultTupleScheme(); } } - private static class getFileBlockInfoList_argsTupleScheme extends TupleScheme { + private static class free_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfoList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, free_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetE()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfoList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, free_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class getFileBlockInfoList_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("getFileBlockInfoList_result"); + public static class getDependencyInfo_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("getDependencyInfo_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField DEPENDENCY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dependencyId", org.apache.thrift.protocol.TType.I32, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getFileBlockInfoList_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFileBlockInfoList_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getDependencyInfo_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getDependencyInfo_argsTupleSchemeFactory()); } - public List success; // required - public FileDoesNotExistException fdnee; // required + public int dependencyId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - FDNEE((short)1, "fdnee"); + DEPENDENCY_ID((short)1, "dependencyId"); private static final Map byName = new HashMap(); @@ -9152,10 +10148,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // FDNEE - return FDNEE; + case 1: // DEPENDENCY_ID + return DEPENDENCY_ID; default: return null; } @@ -9196,134 +10190,76 @@ public String getFieldName() { } // isset id assignments + private static final int __DEPENDENCYID_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileBlockInfo.class)))); - tmpMap.put(_Fields.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.DEPENDENCY_ID, new org.apache.thrift.meta_data.FieldMetaData("dependencyId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileBlockInfoList_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDependencyInfo_args.class, metaDataMap); } - public getFileBlockInfoList_result() { + public getDependencyInfo_args() { } - public getFileBlockInfoList_result( - List success, - FileDoesNotExistException fdnee) + public getDependencyInfo_args( + int dependencyId) { this(); - this.success = success; - this.fdnee = fdnee; + this.dependencyId = dependencyId; + setDependencyIdIsSet(true); } /** * Performs a deep copy on other. */ - public getFileBlockInfoList_result(getFileBlockInfoList_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (FileBlockInfo other_element : other.success) { - __this__success.add(new FileBlockInfo(other_element)); - } - this.success = __this__success; - } - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); - } + public getDependencyInfo_args(getDependencyInfo_args other) { + __isset_bitfield = other.__isset_bitfield; + this.dependencyId = other.dependencyId; } - public getFileBlockInfoList_result deepCopy() { - return new getFileBlockInfoList_result(this); + public getDependencyInfo_args deepCopy() { + return new getDependencyInfo_args(this); } @Override public void clear() { - this.success = null; - this.fdnee = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(FileBlockInfo elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public getFileBlockInfoList_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + setDependencyIdIsSet(false); + this.dependencyId = 0; } - public FileDoesNotExistException getFdnee() { - return this.fdnee; + public int getDependencyId() { + return this.dependencyId; } - public getFileBlockInfoList_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; + public getDependencyInfo_args setDependencyId(int dependencyId) { + this.dependencyId = dependencyId; + setDependencyIdIsSet(true); return this; } - public void unsetFdnee() { - this.fdnee = null; + public void unsetDependencyId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEPENDENCYID_ISSET_ID); } - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; + /** Returns true if field dependencyId is set (has been assigned a value) and false otherwise */ + public boolean isSetDependencyId() { + return EncodingUtils.testBit(__isset_bitfield, __DEPENDENCYID_ISSET_ID); } - public void setFdneeIsSet(boolean value) { - if (!value) { - this.fdnee = null; - } + public void setDependencyIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEPENDENCYID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case FDNEE: + case DEPENDENCY_ID: if (value == null) { - unsetFdnee(); + unsetDependencyId(); } else { - setFdnee((FileDoesNotExistException)value); + setDependencyId((Integer)value); } break; @@ -9332,11 +10268,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case FDNEE: - return getFdnee(); + case DEPENDENCY_ID: + return Integer.valueOf(getDependencyId()); } throw new IllegalStateException(); @@ -9349,10 +10282,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case FDNEE: - return isSetFdnee(); + case DEPENDENCY_ID: + return isSetDependencyId(); } throw new IllegalStateException(); } @@ -9361,30 +10292,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getFileBlockInfoList_result) - return this.equals((getFileBlockInfoList_result)that); - return false; - } - - public boolean equals(getFileBlockInfoList_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } + if (that instanceof getDependencyInfo_args) + return this.equals((getDependencyInfo_args)that); + return false; + } + + public boolean equals(getDependencyInfo_args that) { + if (that == null) + return false; - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) + boolean this_present_dependencyId = true; + boolean that_present_dependencyId = true; + if (this_present_dependencyId || that_present_dependencyId) { + if (!(this_present_dependencyId && that_present_dependencyId)) return false; - if (!this.fdnee.equals(that.fdnee)) + if (this.dependencyId != that.dependencyId) return false; } @@ -9395,43 +10317,28 @@ public boolean equals(getFileBlockInfoList_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); + boolean present_dependencyId = true; + list.add(present_dependencyId); + if (present_dependencyId) + list.add(dependencyId); return list.hashCode(); } @Override - public int compareTo(getFileBlockInfoList_result other) { + public int compareTo(getDependencyInfo_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); + lastComparison = Boolean.valueOf(isSetDependencyId()).compareTo(other.isSetDependencyId()); if (lastComparison != 0) { return lastComparison; } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); + if (isSetDependencyId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dependencyId, other.dependencyId); if (lastComparison != 0) { return lastComparison; } @@ -9449,27 +10356,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getFileBlockInfoList_result("); + StringBuilder sb = new StringBuilder("getDependencyInfo_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("fdnee:"); - if (this.fdnee == null) { - sb.append("null"); - } else { - sb.append(this.fdnee); - } + sb.append("dependencyId:"); + sb.append(this.dependencyId); first = false; sb.append(")"); return sb.toString(); @@ -9490,21 +10385,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getFileBlockInfoList_resultStandardSchemeFactory implements SchemeFactory { - public getFileBlockInfoList_resultStandardScheme getScheme() { - return new getFileBlockInfoList_resultStandardScheme(); + private static class getDependencyInfo_argsStandardSchemeFactory implements SchemeFactory { + public getDependencyInfo_argsStandardScheme getScheme() { + return new getDependencyInfo_argsStandardScheme(); } } - private static class getFileBlockInfoList_resultStandardScheme extends StandardScheme { + private static class getDependencyInfo_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfoList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getDependencyInfo_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -9514,30 +10411,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfoLis break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list204 = iprot.readListBegin(); - struct.success = new ArrayList(_list204.size); - FileBlockInfo _elem205; - for (int _i206 = 0; _i206 < _list204.size; ++_i206) - { - _elem205 = new FileBlockInfo(); - _elem205.read(iprot); - struct.success.add(_elem205); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + case 1: // DEPENDENCY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.dependencyId = iprot.readI32(); + struct.setDependencyIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -9553,110 +10430,72 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfoLis struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getFileBlockInfoList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getDependencyInfo_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (FileBlockInfo _iter207 : struct.success) - { - _iter207.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(DEPENDENCY_ID_FIELD_DESC); + oprot.writeI32(struct.dependencyId); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getFileBlockInfoList_resultTupleSchemeFactory implements SchemeFactory { - public getFileBlockInfoList_resultTupleScheme getScheme() { - return new getFileBlockInfoList_resultTupleScheme(); + private static class getDependencyInfo_argsTupleSchemeFactory implements SchemeFactory { + public getDependencyInfo_argsTupleScheme getScheme() { + return new getDependencyInfo_argsTupleScheme(); } } - private static class getFileBlockInfoList_resultTupleScheme extends TupleScheme { + private static class getDependencyInfo_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfoList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getDependencyInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetDependencyId()) { optionals.set(0); } - if (struct.isSetFdnee()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (FileBlockInfo _iter208 : struct.success) - { - _iter208.write(oprot); - } - } - } - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); + oprot.writeBitSet(optionals, 1); + if (struct.isSetDependencyId()) { + oprot.writeI32(struct.dependencyId); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfoList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getDependencyInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list209 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list209.size); - FileBlockInfo _elem210; - for (int _i211 = 0; _i211 < _list209.size; ++_i211) - { - _elem210 = new FileBlockInfo(); - _elem210.read(iprot); - struct.success.add(_elem210); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + struct.dependencyId = iprot.readI32(); + struct.setDependencyIdIsSet(true); } } } } - public static class getNewBlockIdForFile_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("getNewBlockIdForFile_args"); + public static class getDependencyInfo_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("getDependencyInfo_result"); - 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 SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getNewBlockIdForFile_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getNewBlockIdForFile_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getDependencyInfo_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getDependencyInfo_resultTupleSchemeFactory()); } - public long fileId; // required + public DependencyInfo success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -9671,8 +10510,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -9713,76 +10554,114 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DependencyInfo.class))); + 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(getNewBlockIdForFile_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDependencyInfo_result.class, metaDataMap); } - public getNewBlockIdForFile_args() { + public getDependencyInfo_result() { } - public getNewBlockIdForFile_args( - long fileId) + public getDependencyInfo_result( + DependencyInfo success, + TachyonTException e) { this(); - this.fileId = fileId; - setFileIdIsSet(true); + this.success = success; + this.e = e; } /** * Performs a deep copy on other. */ - public getNewBlockIdForFile_args(getNewBlockIdForFile_args other) { - __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; + public getDependencyInfo_result(getDependencyInfo_result other) { + if (other.isSetSuccess()) { + this.success = new DependencyInfo(other.success); + } + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public getNewBlockIdForFile_args deepCopy() { - return new getNewBlockIdForFile_args(this); + public getDependencyInfo_result deepCopy() { + return new getDependencyInfo_result(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; + this.success = null; + this.e = null; } - public long getFileId() { - return this.fileId; + public DependencyInfo getSuccess() { + return this.success; } - public getNewBlockIdForFile_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public getDependencyInfo_result setSuccess(DependencyInfo success) { + this.success = success; return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetSuccess() { + this.success = null; } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TachyonTException getE() { + return this.e; + } + + public getDependencyInfo_result setE(TachyonTException e) { + this.e = e; + return this; + } + + public void unsetE() { + this.e = null; + } + + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; + } + + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SUCCESS: if (value == null) { - unsetFileId(); + unsetSuccess(); } else { - setFileId((Long)value); + setSuccess((DependencyInfo)value); + } + break; + + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); } break; @@ -9791,8 +10670,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SUCCESS: + return getSuccess(); + + case E: + return getE(); } throw new IllegalStateException(); @@ -9805,8 +10687,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -9815,21 +10699,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getNewBlockIdForFile_args) - return this.equals((getNewBlockIdForFile_args)that); + if (that instanceof getDependencyInfo_result) + return this.equals((getDependencyInfo_result)that); return false; } - public boolean equals(getNewBlockIdForFile_args that) { + public boolean equals(getDependencyInfo_result that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.fileId != that.fileId) + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) return false; } @@ -9840,28 +10733,43 @@ public boolean equals(getNewBlockIdForFile_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(getNewBlockIdForFile_args other) { + public int compareTo(getDependencyInfo_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -9879,15 +10787,27 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getNewBlockIdForFile_args("); + StringBuilder sb = new StringBuilder("getDependencyInfo_result("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -9896,6 +10816,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -9908,23 +10831,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getNewBlockIdForFile_argsStandardSchemeFactory implements SchemeFactory { - public getNewBlockIdForFile_argsStandardScheme getScheme() { - return new getNewBlockIdForFile_argsStandardScheme(); + private static class getDependencyInfo_resultStandardSchemeFactory implements SchemeFactory { + public getDependencyInfo_resultStandardScheme getScheme() { + return new getDependencyInfo_resultStandardScheme(); } } - private static class getNewBlockIdForFile_argsStandardScheme extends StandardScheme { + private static class getDependencyInfo_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getDependencyInfo_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -9934,10 +10855,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getNewBlockIdForFil break; } switch (schemeField.id) { - case 1: // FILE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new DependencyInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -9953,75 +10884,91 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getNewBlockIdForFil struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getDependencyInfo_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getNewBlockIdForFile_argsTupleSchemeFactory implements SchemeFactory { - public getNewBlockIdForFile_argsTupleScheme getScheme() { - return new getNewBlockIdForFile_argsTupleScheme(); + private static class getDependencyInfo_resultTupleSchemeFactory implements SchemeFactory { + public getDependencyInfo_resultTupleScheme getScheme() { + return new getDependencyInfo_resultTupleScheme(); } } - private static class getNewBlockIdForFile_argsTupleScheme extends TupleScheme { + private static class getDependencyInfo_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getDependencyInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetE()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getDependencyInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = new DependencyInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class getNewBlockIdForFile_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("getNewBlockIdForFile_result"); + public static class getFileBlockInfo_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("getFileBlockInfo_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField BIE_FIELD_DESC = new org.apache.thrift.protocol.TField("bie", org.apache.thrift.protocol.TType.STRUCT, (short)2); + 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 FILE_BLOCK_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("fileBlockIndex", org.apache.thrift.protocol.TType.I32, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getNewBlockIdForFile_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getNewBlockIdForFile_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getFileBlockInfo_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFileBlockInfo_argsTupleSchemeFactory()); } - public long success; // required - public FileDoesNotExistException fdnee; // required - public BlockInfoException bie; // required + public long fileId; // required + public int fileBlockIndex; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - FDNEE((short)1, "fdnee"), - BIE((short)2, "bie"); + FILE_ID((short)1, "fileId"), + FILE_BLOCK_INDEX((short)2, "fileBlockIndex"); private static final Map byName = new HashMap(); @@ -10036,12 +10983,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // FDNEE - return FDNEE; - case 2: // BIE - return BIE; + case 1: // FILE_ID + return FILE_ID; + case 2: // FILE_BLOCK_INDEX + return FILE_BLOCK_INDEX; default: return null; } @@ -10082,156 +11027,116 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; + private static final int __FILEID_ISSET_ID = 0; + private static final int __FILEBLOCKINDEX_ISSET_ID = 1; private byte __isset_bitfield = 0; 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.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.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.BIE, new org.apache.thrift.meta_data.FieldMetaData("bie", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.FILE_BLOCK_INDEX, new org.apache.thrift.meta_data.FieldMetaData("fileBlockIndex", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNewBlockIdForFile_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileBlockInfo_args.class, metaDataMap); } - public getNewBlockIdForFile_result() { + public getFileBlockInfo_args() { } - public getNewBlockIdForFile_result( - long success, - FileDoesNotExistException fdnee, - BlockInfoException bie) + public getFileBlockInfo_args( + long fileId, + int fileBlockIndex) { this(); - this.success = success; - setSuccessIsSet(true); - this.fdnee = fdnee; - this.bie = bie; + this.fileId = fileId; + setFileIdIsSet(true); + this.fileBlockIndex = fileBlockIndex; + setFileBlockIndexIsSet(true); } /** * Performs a deep copy on other. */ - public getNewBlockIdForFile_result(getNewBlockIdForFile_result other) { + public getFileBlockInfo_args(getFileBlockInfo_args other) { __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); - } - if (other.isSetBie()) { - this.bie = new BlockInfoException(other.bie); - } + this.fileId = other.fileId; + this.fileBlockIndex = other.fileBlockIndex; } - public getNewBlockIdForFile_result deepCopy() { - return new getNewBlockIdForFile_result(this); + public getFileBlockInfo_args deepCopy() { + return new getFileBlockInfo_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.fdnee = null; - this.bie = null; - } - - public long getSuccess() { - return this.success; - } - - public getNewBlockIdForFile_result setSuccess(long success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + setFileIdIsSet(false); + this.fileId = 0; + setFileBlockIndexIsSet(false); + this.fileBlockIndex = 0; } - public FileDoesNotExistException getFdnee() { - return this.fdnee; + public long getFileId() { + return this.fileId; } - public getNewBlockIdForFile_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; + public getFileBlockInfo_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetFdnee() { - this.fdnee = null; + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setFdneeIsSet(boolean value) { - if (!value) { - this.fdnee = null; - } + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } - public BlockInfoException getBie() { - return this.bie; + public int getFileBlockIndex() { + return this.fileBlockIndex; } - public getNewBlockIdForFile_result setBie(BlockInfoException bie) { - this.bie = bie; + public getFileBlockInfo_args setFileBlockIndex(int fileBlockIndex) { + this.fileBlockIndex = fileBlockIndex; + setFileBlockIndexIsSet(true); return this; } - public void unsetBie() { - this.bie = null; + public void unsetFileBlockIndex() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEBLOCKINDEX_ISSET_ID); } - /** Returns true if field bie is set (has been assigned a value) and false otherwise */ - public boolean isSetBie() { - return this.bie != null; + /** Returns true if field fileBlockIndex is set (has been assigned a value) and false otherwise */ + public boolean isSetFileBlockIndex() { + return EncodingUtils.testBit(__isset_bitfield, __FILEBLOCKINDEX_ISSET_ID); } - public void setBieIsSet(boolean value) { - if (!value) { - this.bie = null; - } + public void setFileBlockIndexIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEBLOCKINDEX_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Long)value); - } - break; - - case FDNEE: + case FILE_ID: if (value == null) { - unsetFdnee(); + unsetFileId(); } else { - setFdnee((FileDoesNotExistException)value); + setFileId((Long)value); } break; - case BIE: + case FILE_BLOCK_INDEX: if (value == null) { - unsetBie(); + unsetFileBlockIndex(); } else { - setBie((BlockInfoException)value); + setFileBlockIndex((Integer)value); } break; @@ -10240,14 +11145,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Long.valueOf(getSuccess()); - - case FDNEE: - return getFdnee(); + case FILE_ID: + return Long.valueOf(getFileId()); - case BIE: - return getBie(); + case FILE_BLOCK_INDEX: + return Integer.valueOf(getFileBlockIndex()); } throw new IllegalStateException(); @@ -10260,12 +11162,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case FDNEE: - return isSetFdnee(); - case BIE: - return isSetBie(); + case FILE_ID: + return isSetFileId(); + case FILE_BLOCK_INDEX: + return isSetFileBlockIndex(); } throw new IllegalStateException(); } @@ -10274,39 +11174,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getNewBlockIdForFile_result) - return this.equals((getNewBlockIdForFile_result)that); + if (that instanceof getFileBlockInfo_args) + return this.equals((getFileBlockInfo_args)that); return false; } - public boolean equals(getNewBlockIdForFile_result that) { + public boolean equals(getFileBlockInfo_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (!this.fdnee.equals(that.fdnee)) + if (this.fileId != that.fileId) return false; } - boolean this_present_bie = true && this.isSetBie(); - boolean that_present_bie = true && that.isSetBie(); - if (this_present_bie || that_present_bie) { - if (!(this_present_bie && that_present_bie)) + boolean this_present_fileBlockIndex = true; + boolean that_present_fileBlockIndex = true; + if (this_present_fileBlockIndex || that_present_fileBlockIndex) { + if (!(this_present_fileBlockIndex && that_present_fileBlockIndex)) return false; - if (!this.bie.equals(that.bie)) + if (this.fileBlockIndex != that.fileBlockIndex) return false; } @@ -10317,58 +11208,43 @@ public boolean equals(getNewBlockIdForFile_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); - boolean present_bie = true && (isSetBie()); - list.add(present_bie); - if (present_bie) - list.add(bie); + boolean present_fileBlockIndex = true; + list.add(present_fileBlockIndex); + if (present_fileBlockIndex) + list.add(fileBlockIndex); return list.hashCode(); } @Override - public int compareTo(getNewBlockIdForFile_result other) { + public int compareTo(getFileBlockInfo_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetBie()).compareTo(other.isSetBie()); + lastComparison = Boolean.valueOf(isSetFileBlockIndex()).compareTo(other.isSetFileBlockIndex()); if (lastComparison != 0) { return lastComparison; } - if (isSetBie()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bie, other.bie); + if (isSetFileBlockIndex()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileBlockIndex, other.fileBlockIndex); if (lastComparison != 0) { return lastComparison; } @@ -10386,31 +11262,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getNewBlockIdForFile_result("); + StringBuilder sb = new StringBuilder("getFileBlockInfo_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("fdnee:"); - if (this.fdnee == null) { - sb.append("null"); - } else { - sb.append(this.fdnee); - } + sb.append("fileId:"); + sb.append(this.fileId); first = false; if (!first) sb.append(", "); - sb.append("bie:"); - if (this.bie == null) { - sb.append("null"); - } else { - sb.append(this.bie); - } + sb.append("fileBlockIndex:"); + sb.append(this.fileBlockIndex); first = false; sb.append(")"); return sb.toString(); @@ -10439,15 +11303,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getNewBlockIdForFile_resultStandardSchemeFactory implements SchemeFactory { - public getNewBlockIdForFile_resultStandardScheme getScheme() { - return new getNewBlockIdForFile_resultStandardScheme(); + private static class getFileBlockInfo_argsStandardSchemeFactory implements SchemeFactory { + public getFileBlockInfo_argsStandardScheme getScheme() { + return new getFileBlockInfo_argsStandardScheme(); } } - private static class getNewBlockIdForFile_resultStandardScheme extends StandardScheme { + private static class getFileBlockInfo_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfo_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -10457,28 +11321,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getNewBlockIdForFil break; } switch (schemeField.id) { - case 0: // SUCCESS + case 1: // FILE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // BIE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); + case 2: // FILE_BLOCK_INDEX + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.fileBlockIndex = iprot.readI32(); + struct.setFileBlockIndexIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -10494,101 +11348,85 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getNewBlockIdForFil struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getFileBlockInfo_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); - oprot.writeFieldEnd(); - } - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.bie != null) { - oprot.writeFieldBegin(BIE_FIELD_DESC); - struct.bie.write(oprot); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(FILE_BLOCK_INDEX_FIELD_DESC); + oprot.writeI32(struct.fileBlockIndex); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getNewBlockIdForFile_resultTupleSchemeFactory implements SchemeFactory { - public getNewBlockIdForFile_resultTupleScheme getScheme() { - return new getNewBlockIdForFile_resultTupleScheme(); + private static class getFileBlockInfo_argsTupleSchemeFactory implements SchemeFactory { + public getFileBlockInfo_argsTupleScheme getScheme() { + return new getFileBlockInfo_argsTupleScheme(); } } - private static class getNewBlockIdForFile_resultTupleScheme extends TupleScheme { + private static class getFileBlockInfo_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetFdnee()) { + if (struct.isSetFileBlockIndex()) { optionals.set(1); } - if (struct.isSetBie()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); - } - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); + oprot.writeBitSet(optionals, 2); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); } - if (struct.isSetBie()) { - struct.bie.write(oprot); + if (struct.isSetFileBlockIndex()) { + oprot.writeI32(struct.fileBlockIndex); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } if (incoming.get(1)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } - if (incoming.get(2)) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); + struct.fileBlockIndex = iprot.readI32(); + struct.setFileBlockIndexIsSet(true); } } } } - public static class getUfsAddress_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("getUfsAddress_args"); + public static class getFileBlockInfo_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("getFileBlockInfo_result"); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getUfsAddress_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getUfsAddress_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getFileBlockInfo_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFileBlockInfo_resultTupleSchemeFactory()); } + public FileBlockInfo success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -10603,6 +11441,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -10641,37 +11483,130 @@ public String getFieldName() { return _fieldName; } } + + // isset id assignments 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, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileBlockInfo.class))); + 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(getUfsAddress_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileBlockInfo_result.class, metaDataMap); } - public getUfsAddress_args() { + public getFileBlockInfo_result() { + } + + public getFileBlockInfo_result( + FileBlockInfo success, + TachyonTException e) + { + this(); + this.success = success; + this.e = e; } /** * Performs a deep copy on other. */ - public getUfsAddress_args(getUfsAddress_args other) { + public getFileBlockInfo_result(getFileBlockInfo_result other) { + if (other.isSetSuccess()) { + this.success = new FileBlockInfo(other.success); + } + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } + } + + public getFileBlockInfo_result deepCopy() { + return new getFileBlockInfo_result(this); + } + + @Override + public void clear() { + this.success = null; + this.e = null; + } + + public FileBlockInfo getSuccess() { + return this.success; + } + + public getFileBlockInfo_result setSuccess(FileBlockInfo success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TachyonTException getE() { + return this.e; + } + + public getFileBlockInfo_result setE(TachyonTException e) { + this.e = e; + return this; } - public getUfsAddress_args deepCopy() { - return new getUfsAddress_args(this); + public void unsetE() { + this.e = null; } - @Override - public void clear() { + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; + } + + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((FileBlockInfo)value); + } + break; + + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return getSuccess(); + + case E: + return getE(); + } throw new IllegalStateException(); } @@ -10683,6 +11618,10 @@ public boolean isSet(_Fields field) { } switch (field) { + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -10691,15 +11630,33 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getUfsAddress_args) - return this.equals((getUfsAddress_args)that); + if (that instanceof getFileBlockInfo_result) + return this.equals((getFileBlockInfo_result)that); return false; } - public boolean equals(getUfsAddress_args that) { + public boolean equals(getFileBlockInfo_result that) { if (that == null) return false; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) + return false; + } + return true; } @@ -10707,17 +11664,47 @@ public boolean equals(getUfsAddress_args that) { public int hashCode() { List list = new ArrayList(); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); + return list.hashCode(); } @Override - public int compareTo(getUfsAddress_args other) { + public int compareTo(getFileBlockInfo_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -10731,13 +11718,28 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getUfsAddress_args("); + StringBuilder sb = new StringBuilder("getFileBlockInfo_result("); boolean first = true; + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } + first = false; sb.append(")"); return sb.toString(); } @@ -10745,6 +11747,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -10763,15 +11768,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getUfsAddress_argsStandardSchemeFactory implements SchemeFactory { - public getUfsAddress_argsStandardScheme getScheme() { - return new getUfsAddress_argsStandardScheme(); + private static class getFileBlockInfo_resultStandardSchemeFactory implements SchemeFactory { + public getFileBlockInfo_resultStandardScheme getScheme() { + return new getFileBlockInfo_resultStandardScheme(); } } - private static class getUfsAddress_argsStandardScheme extends StandardScheme { + private static class getFileBlockInfo_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsAddress_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfo_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -10781,6 +11786,24 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsAddress_args break; } switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new FileBlockInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -10792,53 +11815,88 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsAddress_args struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getUfsAddress_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getFileBlockInfo_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getUfsAddress_argsTupleSchemeFactory implements SchemeFactory { - public getUfsAddress_argsTupleScheme getScheme() { - return new getUfsAddress_argsTupleScheme(); + private static class getFileBlockInfo_resultTupleSchemeFactory implements SchemeFactory { + public getFileBlockInfo_resultTupleScheme getScheme() { + return new getFileBlockInfo_resultTupleScheme(); } } - private static class getUfsAddress_argsTupleScheme extends TupleScheme { + private static class getFileBlockInfo_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getUfsAddress_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetE()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetE()) { + struct.e.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getUfsAddress_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new FileBlockInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } } } } - public static class getUfsAddress_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("getUfsAddress_result"); + public static class getFileBlockInfoList_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("getFileBlockInfoList_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getUfsAddress_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getUfsAddress_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getFileBlockInfoList_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFileBlockInfoList_argsTupleSchemeFactory()); } - public String success; // required + public long fileId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); + FILE_ID((short)1, "fileId"); private static final Map byName = new HashMap(); @@ -10853,8 +11911,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; + case 1: // FILE_ID + return FILE_ID; default: return null; } @@ -10895,74 +11953,76 @@ public String getFieldName() { } // isset id assignments + private static final int __FILEID_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + 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(getUfsAddress_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileBlockInfoList_args.class, metaDataMap); } - public getUfsAddress_result() { + public getFileBlockInfoList_args() { } - public getUfsAddress_result( - String success) + public getFileBlockInfoList_args( + long fileId) { this(); - this.success = success; + this.fileId = fileId; + setFileIdIsSet(true); } /** * Performs a deep copy on other. */ - public getUfsAddress_result(getUfsAddress_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } + public getFileBlockInfoList_args(getFileBlockInfoList_args other) { + __isset_bitfield = other.__isset_bitfield; + this.fileId = other.fileId; } - public getUfsAddress_result deepCopy() { - return new getUfsAddress_result(this); + public getFileBlockInfoList_args deepCopy() { + return new getFileBlockInfoList_args(this); } @Override public void clear() { - this.success = null; + setFileIdIsSet(false); + this.fileId = 0; } - public String getSuccess() { - return this.success; + public long getFileId() { + return this.fileId; } - public getUfsAddress_result setSuccess(String success) { - this.success = success; + public getFileBlockInfoList_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetSuccess() { - this.success = null; + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case FILE_ID: if (value == null) { - unsetSuccess(); + unsetFileId(); } else { - setSuccess((String)value); + setFileId((Long)value); } break; @@ -10971,8 +12031,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case FILE_ID: + return Long.valueOf(getFileId()); } throw new IllegalStateException(); @@ -10985,8 +12045,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); + case FILE_ID: + return isSetFileId(); } throw new IllegalStateException(); } @@ -10995,21 +12055,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getUfsAddress_result) - return this.equals((getUfsAddress_result)that); + if (that instanceof getFileBlockInfoList_args) + return this.equals((getFileBlockInfoList_args)that); return false; } - public boolean equals(getUfsAddress_result that) { + public boolean equals(getFileBlockInfoList_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (!this.success.equals(that.success)) + if (this.fileId != that.fileId) return false; } @@ -11020,28 +12080,28 @@ public boolean equals(getUfsAddress_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); return list.hashCode(); } @Override - public int compareTo(getUfsAddress_result other) { + public int compareTo(getFileBlockInfoList_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); if (lastComparison != 0) { return lastComparison; } @@ -11059,19 +12119,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getUfsAddress_result("); + StringBuilder sb = new StringBuilder("getFileBlockInfoList_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append("fileId:"); + sb.append(this.fileId); first = false; sb.append(")"); return sb.toString(); @@ -11092,21 +12148,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getUfsAddress_resultStandardSchemeFactory implements SchemeFactory { - public getUfsAddress_resultStandardScheme getScheme() { - return new getUfsAddress_resultStandardScheme(); + private static class getFileBlockInfoList_argsStandardSchemeFactory implements SchemeFactory { + public getFileBlockInfoList_argsStandardScheme getScheme() { + return new getFileBlockInfoList_argsStandardScheme(); } } - private static class getUfsAddress_resultStandardScheme extends StandardScheme { + private static class getFileBlockInfoList_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsAddress_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfoList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -11116,10 +12174,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsAddress_resul break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.success = iprot.readString(); - struct.setSuccessIsSet(true); + case 1: // FILE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -11135,80 +12193,72 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsAddress_resul struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getUfsAddress_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getFileBlockInfoList_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(struct.success); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getUfsAddress_resultTupleSchemeFactory implements SchemeFactory { - public getUfsAddress_resultTupleScheme getScheme() { - return new getUfsAddress_resultTupleScheme(); + private static class getFileBlockInfoList_argsTupleSchemeFactory implements SchemeFactory { + public getFileBlockInfoList_argsTupleScheme getScheme() { + return new getFileBlockInfoList_argsTupleScheme(); } } - private static class getUfsAddress_resultTupleScheme extends TupleScheme { + private static class getFileBlockInfoList_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getUfsAddress_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfoList_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetFileId()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeString(struct.success); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getUfsAddress_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfoList_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = iprot.readString(); - struct.setSuccessIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } } } } - public static class createFile_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("createFile_args"); + public static class getFileBlockInfoList_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("getFileBlockInfoList_result"); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField BLOCK_SIZE_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockSizeBytes", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)3); - private static final org.apache.thrift.protocol.TField TTL_FIELD_DESC = new org.apache.thrift.protocol.TField("ttl", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new createFile_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new createFile_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getFileBlockInfoList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFileBlockInfoList_resultTupleSchemeFactory()); } - public String path; // required - public long blockSizeBytes; // required - public boolean recursive; // required - public long ttl; // required + public List success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"), - BLOCK_SIZE_BYTES((short)2, "blockSizeBytes"), - RECURSIVE((short)3, "recursive"), - TTL((short)4, "ttl"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -11223,14 +12273,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PATH - return PATH; - case 2: // BLOCK_SIZE_BYTES - return BLOCK_SIZE_BYTES; - case 3: // RECURSIVE - return RECURSIVE; - case 4: // TTL - return TTL; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -11271,196 +12317,134 @@ public String getFieldName() { } // isset id assignments - private static final int __BLOCKSIZEBYTES_ISSET_ID = 0; - private static final int __RECURSIVE_ISSET_ID = 1; - private static final int __TTL_ISSET_ID = 2; - private byte __isset_bitfield = 0; 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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.BLOCK_SIZE_BYTES, new org.apache.thrift.meta_data.FieldMetaData("blockSizeBytes", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TTL, new org.apache.thrift.meta_data.FieldMetaData("ttl", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileBlockInfo.class)))); + 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(createFile_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileBlockInfoList_result.class, metaDataMap); } - public createFile_args() { + public getFileBlockInfoList_result() { } - public createFile_args( - String path, - long blockSizeBytes, - boolean recursive, - long ttl) + public getFileBlockInfoList_result( + List success, + TachyonTException e) { this(); - this.path = path; - this.blockSizeBytes = blockSizeBytes; - setBlockSizeBytesIsSet(true); - this.recursive = recursive; - setRecursiveIsSet(true); - this.ttl = ttl; - setTtlIsSet(true); + this.success = success; + this.e = e; } /** * Performs a deep copy on other. */ - public createFile_args(createFile_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPath()) { - this.path = other.path; + public getFileBlockInfoList_result(getFileBlockInfoList_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (FileBlockInfo other_element : other.success) { + __this__success.add(new FileBlockInfo(other_element)); + } + this.success = __this__success; + } + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } - this.blockSizeBytes = other.blockSizeBytes; - this.recursive = other.recursive; - this.ttl = other.ttl; } - public createFile_args deepCopy() { - return new createFile_args(this); + public getFileBlockInfoList_result deepCopy() { + return new getFileBlockInfoList_result(this); } @Override public void clear() { - this.path = null; - setBlockSizeBytesIsSet(false); - this.blockSizeBytes = 0; - setRecursiveIsSet(false); - this.recursive = false; - setTtlIsSet(false); - this.ttl = 0; - } - - public String getPath() { - return this.path; - } - - public createFile_args setPath(String path) { - this.path = path; - return this; + this.success = null; + this.e = null; } - public void unsetPath() { - this.path = null; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; + public void addToSuccess(FileBlockInfo elem) { + if (this.success == null) { + this.success = new ArrayList(); } + this.success.add(elem); } - public long getBlockSizeBytes() { - return this.blockSizeBytes; - } - - public createFile_args setBlockSizeBytes(long blockSizeBytes) { - this.blockSizeBytes = blockSizeBytes; - setBlockSizeBytesIsSet(true); - return this; - } - - public void unsetBlockSizeBytes() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID); - } - - /** Returns true if field blockSizeBytes is set (has been assigned a value) and false otherwise */ - public boolean isSetBlockSizeBytes() { - return EncodingUtils.testBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID); - } - - public void setBlockSizeBytesIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID, value); - } - - public boolean isRecursive() { - return this.recursive; + public List getSuccess() { + return this.success; } - public createFile_args setRecursive(boolean recursive) { - this.recursive = recursive; - setRecursiveIsSet(true); + public getFileBlockInfoList_result setSuccess(List success) { + this.success = success; return this; } - public void unsetRecursive() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID); + public void unsetSuccess() { + this.success = null; } - /** Returns true if field recursive is set (has been assigned a value) and false otherwise */ - public boolean isSetRecursive() { - return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setRecursiveIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value); + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } } - public long getTtl() { - return this.ttl; + public TachyonTException getE() { + return this.e; } - - public createFile_args setTtl(long ttl) { - this.ttl = ttl; - setTtlIsSet(true); + + public getFileBlockInfoList_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetTtl() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TTL_ISSET_ID); + public void unsetE() { + this.e = null; } - /** Returns true if field ttl is set (has been assigned a value) and false otherwise */ - public boolean isSetTtl() { - return EncodingUtils.testBit(__isset_bitfield, __TTL_ISSET_ID); + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setTtlIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TTL_ISSET_ID, value); + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case BLOCK_SIZE_BYTES: - if (value == null) { - unsetBlockSizeBytes(); - } else { - setBlockSizeBytes((Long)value); - } - break; - - case RECURSIVE: + case SUCCESS: if (value == null) { - unsetRecursive(); + unsetSuccess(); } else { - setRecursive((Boolean)value); + setSuccess((List)value); } break; - case TTL: + case E: if (value == null) { - unsetTtl(); + unsetE(); } else { - setTtl((Long)value); + setE((TachyonTException)value); } break; @@ -11469,17 +12453,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case PATH: - return getPath(); - - case BLOCK_SIZE_BYTES: - return Long.valueOf(getBlockSizeBytes()); - - case RECURSIVE: - return Boolean.valueOf(isRecursive()); + case SUCCESS: + return getSuccess(); - case TTL: - return Long.valueOf(getTtl()); + case E: + return getE(); } throw new IllegalStateException(); @@ -11492,14 +12470,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case PATH: - return isSetPath(); - case BLOCK_SIZE_BYTES: - return isSetBlockSizeBytes(); - case RECURSIVE: - return isSetRecursive(); - case TTL: - return isSetTtl(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -11508,48 +12482,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof createFile_args) - return this.equals((createFile_args)that); + if (that instanceof getFileBlockInfoList_result) + return this.equals((getFileBlockInfoList_result)that); return false; } - public boolean equals(createFile_args that) { + public boolean equals(getFileBlockInfoList_result that) { if (that == null) return false; - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_blockSizeBytes = true; - boolean that_present_blockSizeBytes = true; - if (this_present_blockSizeBytes || that_present_blockSizeBytes) { - if (!(this_present_blockSizeBytes && that_present_blockSizeBytes)) - return false; - if (this.blockSizeBytes != that.blockSizeBytes) - return false; - } - - boolean this_present_recursive = true; - boolean that_present_recursive = true; - if (this_present_recursive || that_present_recursive) { - if (!(this_present_recursive && that_present_recursive)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.recursive != that.recursive) + if (!this.success.equals(that.success)) return false; } - boolean this_present_ttl = true; - boolean that_present_ttl = true; - if (this_present_ttl || that_present_ttl) { - if (!(this_present_ttl && that_present_ttl)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (this.ttl != that.ttl) + if (!this.e.equals(that.e)) return false; } @@ -11560,73 +12516,43 @@ public boolean equals(createFile_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_path = true && (isSetPath()); - list.add(present_path); - if (present_path) - list.add(path); - - boolean present_blockSizeBytes = true; - list.add(present_blockSizeBytes); - if (present_blockSizeBytes) - list.add(blockSizeBytes); - - boolean present_recursive = true; - list.add(present_recursive); - if (present_recursive) - list.add(recursive); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); - boolean present_ttl = true; - list.add(present_ttl); - if (present_ttl) - list.add(ttl); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(createFile_args other) { + public int compareTo(getFileBlockInfoList_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBlockSizeBytes()).compareTo(other.isSetBlockSizeBytes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBlockSizeBytes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockSizeBytes, other.blockSizeBytes); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetRecursive()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTtl()).compareTo(other.isSetTtl()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetTtl()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ttl, other.ttl); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -11644,31 +12570,27 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("createFile_args("); + StringBuilder sb = new StringBuilder("getFileBlockInfoList_result("); boolean first = true; - sb.append("path:"); - if (this.path == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.path); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("blockSizeBytes:"); - sb.append(this.blockSizeBytes); - first = false; - if (!first) sb.append(", "); - sb.append("recursive:"); - sb.append(this.recursive); - first = false; - if (!first) sb.append(", "); - sb.append("ttl:"); - sb.append(this.ttl); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -11689,23 +12611,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class createFile_argsStandardSchemeFactory implements SchemeFactory { - public createFile_argsStandardScheme getScheme() { - return new createFile_argsStandardScheme(); + private static class getFileBlockInfoList_resultStandardSchemeFactory implements SchemeFactory { + public getFileBlockInfoList_resultStandardScheme getScheme() { + return new getFileBlockInfoList_resultStandardScheme(); } } - private static class createFile_argsStandardScheme extends StandardScheme { + private static class getFileBlockInfoList_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, createFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getFileBlockInfoList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -11715,34 +12635,30 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createFile_args str break; } switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // BLOCK_SIZE_BYTES - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.blockSizeBytes = iprot.readI64(); - struct.setBlockSizeBytesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // RECURSIVE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.recursive = iprot.readBool(); - struct.setRecursiveIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list204 = iprot.readListBegin(); + struct.success = new ArrayList(_list204.size); + FileBlockInfo _elem205; + for (int _i206 = 0; _i206 < _list204.size; ++_i206) + { + _elem205 = new FileBlockInfo(); + _elem205.read(iprot); + struct.success.add(_elem205); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 4: // TTL - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.ttl = iprot.readI64(); - struct.setTtlIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -11758,122 +12674,110 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createFile_args str struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, createFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getFileBlockInfoList_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (FileBlockInfo _iter207 : struct.success) + { + _iter207.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(BLOCK_SIZE_BYTES_FIELD_DESC); - oprot.writeI64(struct.blockSizeBytes); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(RECURSIVE_FIELD_DESC); - oprot.writeBool(struct.recursive); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TTL_FIELD_DESC); - oprot.writeI64(struct.ttl); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class createFile_argsTupleSchemeFactory implements SchemeFactory { - public createFile_argsTupleScheme getScheme() { - return new createFile_argsTupleScheme(); + private static class getFileBlockInfoList_resultTupleSchemeFactory implements SchemeFactory { + public getFileBlockInfoList_resultTupleScheme getScheme() { + return new getFileBlockInfoList_resultTupleScheme(); } } - private static class createFile_argsTupleScheme extends TupleScheme { + private static class getFileBlockInfoList_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfoList_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetPath()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetBlockSizeBytes()) { + if (struct.isSetE()) { optionals.set(1); } - if (struct.isSetRecursive()) { - optionals.set(2); - } - if (struct.isSetTtl()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetBlockSizeBytes()) { - oprot.writeI64(struct.blockSizeBytes); - } - if (struct.isSetRecursive()) { - oprot.writeBool(struct.recursive); + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (FileBlockInfo _iter208 : struct.success) + { + _iter208.write(oprot); + } + } } - if (struct.isSetTtl()) { - oprot.writeI64(struct.ttl); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getFileBlockInfoList_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); + { + org.apache.thrift.protocol.TList _list209 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list209.size); + FileBlockInfo _elem210; + for (int _i211 = 0; _i211 < _list209.size; ++_i211) + { + _elem210 = new FileBlockInfo(); + _elem210.read(iprot); + struct.success.add(_elem210); + } + } + struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.blockSizeBytes = iprot.readI64(); - struct.setBlockSizeBytesIsSet(true); - } - if (incoming.get(2)) { - struct.recursive = iprot.readBool(); - struct.setRecursiveIsSet(true); - } - if (incoming.get(3)) { - struct.ttl = iprot.readI64(); - struct.setTtlIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class createFile_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("createFile_result"); + public static class getFileId_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("getFileId_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); - private static final org.apache.thrift.protocol.TField FAEE_FIELD_DESC = new org.apache.thrift.protocol.TField("faee", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField BIE_FIELD_DESC = new org.apache.thrift.protocol.TField("bie", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField SFSE_FIELD_DESC = new org.apache.thrift.protocol.TField("sfse", org.apache.thrift.protocol.TType.STRUCT, (short)3); - private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new createFile_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new createFile_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getFileId_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFileId_argsTupleSchemeFactory()); } - public long success; // required - public FileAlreadyExistException faee; // required - public BlockInfoException bie; // required - public SuspectedFileSizeException sfse; // required - public TachyonException te; // required + public String path; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - FAEE((short)1, "faee"), - BIE((short)2, "bie"), - SFSE((short)3, "sfse"), - TE((short)4, "te"); + PATH((short)1, "path"); private static final Map byName = new HashMap(); @@ -11888,16 +12792,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // FAEE - return FAEE; - case 2: // BIE - return BIE; - case 3: // SFSE - return SFSE; - case 4: // TE - return TE; + case 1: // PATH + return PATH; default: return null; } @@ -11938,236 +12834,74 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.FAEE, new org.apache.thrift.meta_data.FieldMetaData("faee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.BIE, new org.apache.thrift.meta_data.FieldMetaData("bie", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.SFSE, new org.apache.thrift.meta_data.FieldMetaData("sfse", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createFile_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileId_args.class, metaDataMap); } - public createFile_result() { + public getFileId_args() { } - public createFile_result( - long success, - FileAlreadyExistException faee, - BlockInfoException bie, - SuspectedFileSizeException sfse, - TachyonException te) + public getFileId_args( + String path) { this(); - this.success = success; - setSuccessIsSet(true); - this.faee = faee; - this.bie = bie; - this.sfse = sfse; - this.te = te; + this.path = path; } /** * Performs a deep copy on other. */ - public createFile_result(createFile_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetFaee()) { - this.faee = new FileAlreadyExistException(other.faee); - } - if (other.isSetBie()) { - this.bie = new BlockInfoException(other.bie); - } - if (other.isSetSfse()) { - this.sfse = new SuspectedFileSizeException(other.sfse); - } - if (other.isSetTe()) { - this.te = new TachyonException(other.te); + public getFileId_args(getFileId_args other) { + if (other.isSetPath()) { + this.path = other.path; } } - public createFile_result deepCopy() { - return new createFile_result(this); + public getFileId_args deepCopy() { + return new getFileId_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.faee = null; - this.bie = null; - this.sfse = null; - this.te = null; - } - - public long getSuccess() { - return this.success; - } - - public createFile_result setSuccess(long success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public FileAlreadyExistException getFaee() { - return this.faee; - } - - public createFile_result setFaee(FileAlreadyExistException faee) { - this.faee = faee; - return this; - } - - public void unsetFaee() { - this.faee = null; - } - - /** Returns true if field faee is set (has been assigned a value) and false otherwise */ - public boolean isSetFaee() { - return this.faee != null; - } - - public void setFaeeIsSet(boolean value) { - if (!value) { - this.faee = null; - } - } - - public BlockInfoException getBie() { - return this.bie; - } - - public createFile_result setBie(BlockInfoException bie) { - this.bie = bie; - return this; - } - - public void unsetBie() { - this.bie = null; - } - - /** Returns true if field bie is set (has been assigned a value) and false otherwise */ - public boolean isSetBie() { - return this.bie != null; - } - - public void setBieIsSet(boolean value) { - if (!value) { - this.bie = null; - } - } - - public SuspectedFileSizeException getSfse() { - return this.sfse; - } - - public createFile_result setSfse(SuspectedFileSizeException sfse) { - this.sfse = sfse; - return this; - } - - public void unsetSfse() { - this.sfse = null; - } - - /** Returns true if field sfse is set (has been assigned a value) and false otherwise */ - public boolean isSetSfse() { - return this.sfse != null; - } - - public void setSfseIsSet(boolean value) { - if (!value) { - this.sfse = null; - } + this.path = null; } - public TachyonException getTe() { - return this.te; + public String getPath() { + return this.path; } - public createFile_result setTe(TachyonException te) { - this.te = te; + public getFileId_args setPath(String path) { + this.path = path; return this; } - public void unsetTe() { - this.te = null; + public void unsetPath() { + this.path = null; } - /** Returns true if field te is set (has been assigned a value) and false otherwise */ - public boolean isSetTe() { - return this.te != null; + /** Returns true if field path is set (has been assigned a value) and false otherwise */ + public boolean isSetPath() { + return this.path != null; } - public void setTeIsSet(boolean value) { + public void setPathIsSet(boolean value) { if (!value) { - this.te = null; + this.path = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Long)value); - } - break; - - case FAEE: - if (value == null) { - unsetFaee(); - } else { - setFaee((FileAlreadyExistException)value); - } - break; - - case BIE: - if (value == null) { - unsetBie(); - } else { - setBie((BlockInfoException)value); - } - break; - - case SFSE: - if (value == null) { - unsetSfse(); - } else { - setSfse((SuspectedFileSizeException)value); - } - break; - - case TE: + case PATH: if (value == null) { - unsetTe(); + unsetPath(); } else { - setTe((TachyonException)value); + setPath((String)value); } break; @@ -12176,20 +12910,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Long.valueOf(getSuccess()); - - case FAEE: - return getFaee(); - - case BIE: - return getBie(); - - case SFSE: - return getSfse(); - - case TE: - return getTe(); + case PATH: + return getPath(); } throw new IllegalStateException(); @@ -12202,16 +12924,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case FAEE: - return isSetFaee(); - case BIE: - return isSetBie(); - case SFSE: - return isSetSfse(); - case TE: - return isSetTe(); + case PATH: + return isSetPath(); } throw new IllegalStateException(); } @@ -12220,57 +12934,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof createFile_result) - return this.equals((createFile_result)that); + if (that instanceof getFileId_args) + return this.equals((getFileId_args)that); return false; } - public boolean equals(createFile_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_faee = true && this.isSetFaee(); - boolean that_present_faee = true && that.isSetFaee(); - if (this_present_faee || that_present_faee) { - if (!(this_present_faee && that_present_faee)) - return false; - if (!this.faee.equals(that.faee)) - return false; - } - - boolean this_present_bie = true && this.isSetBie(); - boolean that_present_bie = true && that.isSetBie(); - if (this_present_bie || that_present_bie) { - if (!(this_present_bie && that_present_bie)) - return false; - if (!this.bie.equals(that.bie)) - return false; - } - - boolean this_present_sfse = true && this.isSetSfse(); - boolean that_present_sfse = true && that.isSetSfse(); - if (this_present_sfse || that_present_sfse) { - if (!(this_present_sfse && that_present_sfse)) - return false; - if (!this.sfse.equals(that.sfse)) - return false; - } + public boolean equals(getFileId_args that) { + if (that == null) + return false; - boolean this_present_te = true && this.isSetTe(); - boolean that_present_te = true && that.isSetTe(); - if (this_present_te || that_present_te) { - if (!(this_present_te && that_present_te)) + boolean this_present_path = true && this.isSetPath(); + boolean that_present_path = true && that.isSetPath(); + if (this_present_path || that_present_path) { + if (!(this_present_path && that_present_path)) return false; - if (!this.te.equals(that.te)) + if (!this.path.equals(that.path)) return false; } @@ -12281,88 +12959,28 @@ public boolean equals(createFile_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_faee = true && (isSetFaee()); - list.add(present_faee); - if (present_faee) - list.add(faee); - - boolean present_bie = true && (isSetBie()); - list.add(present_bie); - if (present_bie) - list.add(bie); - - boolean present_sfse = true && (isSetSfse()); - list.add(present_sfse); - if (present_sfse) - list.add(sfse); - - boolean present_te = true && (isSetTe()); - list.add(present_te); - if (present_te) - list.add(te); + boolean present_path = true && (isSetPath()); + list.add(present_path); + if (present_path) + list.add(path); return list.hashCode(); } @Override - public int compareTo(createFile_result other) { + public int compareTo(getFileId_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFaee()).compareTo(other.isSetFaee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFaee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.faee, other.faee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBie()).compareTo(other.isSetBie()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBie()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bie, other.bie); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSfse()).compareTo(other.isSetSfse()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSfse()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sfse, other.sfse); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTe()).compareTo(other.isSetTe()); + lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); if (lastComparison != 0) { return lastComparison; } - if (isSetTe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, other.te); + if (isSetPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); if (lastComparison != 0) { return lastComparison; } @@ -12380,46 +12998,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("createFile_result("); + StringBuilder sb = new StringBuilder("getFileId_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("faee:"); - if (this.faee == null) { - sb.append("null"); - } else { - sb.append(this.faee); - } - first = false; - if (!first) sb.append(", "); - sb.append("bie:"); - if (this.bie == null) { - sb.append("null"); - } else { - sb.append(this.bie); - } - first = false; - if (!first) sb.append(", "); - sb.append("sfse:"); - if (this.sfse == null) { - sb.append("null"); - } else { - sb.append(this.sfse); - } - first = false; - if (!first) sb.append(", "); - sb.append("te:"); - if (this.te == null) { + sb.append("path:"); + if (this.path == null) { sb.append("null"); } else { - sb.append(this.te); + sb.append(this.path); } first = false; sb.append(")"); @@ -12441,23 +13031,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class createFile_resultStandardSchemeFactory implements SchemeFactory { - public createFile_resultStandardScheme getScheme() { - return new createFile_resultStandardScheme(); + private static class getFileId_argsStandardSchemeFactory implements SchemeFactory { + public getFileId_argsStandardScheme getScheme() { + return new getFileId_argsStandardScheme(); } } - private static class createFile_resultStandardScheme extends StandardScheme { + private static class getFileId_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, createFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getFileId_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -12467,46 +13055,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createFile_result s break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // FAEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // BIE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // SFSE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.sfse = new SuspectedFileSizeException(); - struct.sfse.read(iprot); - struct.setSfseIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // TE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + case 1: // PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -12522,33 +13074,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createFile_result s struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, createFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getFileId_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); - oprot.writeFieldEnd(); - } - if (struct.faee != null) { - oprot.writeFieldBegin(FAEE_FIELD_DESC); - struct.faee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.bie != null) { - oprot.writeFieldBegin(BIE_FIELD_DESC); - struct.bie.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.sfse != null) { - oprot.writeFieldBegin(SFSE_FIELD_DESC); - struct.sfse.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.te != null) { - oprot.writeFieldBegin(TE_FIELD_DESC); - struct.te.write(oprot); + if (struct.path != null) { + oprot.writeFieldBegin(PATH_FIELD_DESC); + oprot.writeString(struct.path); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -12557,100 +13089,59 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, createFile_result } - private static class createFile_resultTupleSchemeFactory implements SchemeFactory { - public createFile_resultTupleScheme getScheme() { - return new createFile_resultTupleScheme(); + private static class getFileId_argsTupleSchemeFactory implements SchemeFactory { + public getFileId_argsTupleScheme getScheme() { + return new getFileId_argsTupleScheme(); } } - private static class createFile_resultTupleScheme extends TupleScheme { + private static class getFileId_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getFileId_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetPath()) { optionals.set(0); } - if (struct.isSetFaee()) { - optionals.set(1); - } - if (struct.isSetBie()) { - optionals.set(2); - } - if (struct.isSetSfse()) { - optionals.set(3); - } - if (struct.isSetTe()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); - } - if (struct.isSetFaee()) { - struct.faee.write(oprot); - } - if (struct.isSetBie()) { - struct.bie.write(oprot); - } - if (struct.isSetSfse()) { - struct.sfse.write(oprot); - } - if (struct.isSetTe()) { - struct.te.write(oprot); + oprot.writeBitSet(optionals, 1); + if (struct.isSetPath()) { + oprot.writeString(struct.path); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getFileId_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); - } - if (incoming.get(2)) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } - if (incoming.get(3)) { - struct.sfse = new SuspectedFileSizeException(); - struct.sfse.read(iprot); - struct.setSfseIsSet(true); - } - if (incoming.get(4)) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.path = iprot.readString(); + struct.setPathIsSet(true); } } } } - public static class completeFile_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("completeFile_args"); + public static class getFileId_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("getFileId_result"); - 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 SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new completeFile_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new completeFile_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getFileId_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFileId_resultTupleSchemeFactory()); } - public long fileId; // required + public long success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -12665,8 +13156,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -12707,76 +13200,116 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; + private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.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.I64))); + 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(completeFile_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileId_result.class, metaDataMap); } - public completeFile_args() { + public getFileId_result() { } - public completeFile_args( - long fileId) + public getFileId_result( + long success, + TachyonTException e) { this(); - this.fileId = fileId; - setFileIdIsSet(true); + this.success = success; + setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public completeFile_args(completeFile_args other) { + public getFileId_result(getFileId_result other) { __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public completeFile_args deepCopy() { - return new completeFile_args(this); + public getFileId_result deepCopy() { + return new getFileId_result(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; + setSuccessIsSet(false); + this.success = 0; + this.e = null; } - public long getFileId() { - return this.fileId; + public long getSuccess() { + return this.success; } - public completeFile_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public getFileId_result setSuccess(long success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TachyonTException getE() { + return this.e; + } + + public getFileId_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetE() { + this.e = null; } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SUCCESS: if (value == null) { - unsetFileId(); + unsetSuccess(); } else { - setFileId((Long)value); + setSuccess((Long)value); + } + break; + + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); } break; @@ -12785,8 +13318,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SUCCESS: + return Long.valueOf(getSuccess()); + + case E: + return getE(); } throw new IllegalStateException(); @@ -12799,8 +13335,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -12809,21 +13347,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof completeFile_args) - return this.equals((completeFile_args)that); + if (that instanceof getFileId_result) + return this.equals((getFileId_result)that); return false; } - public boolean equals(completeFile_args that) { + public boolean equals(getFileId_result that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.fileId != that.fileId) + if (this.success != that.success) + return false; + } + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) return false; } @@ -12834,28 +13381,43 @@ public boolean equals(completeFile_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(completeFile_args other) { + public int compareTo(getFileId_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -12873,15 +13435,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("completeFile_args("); + StringBuilder sb = new StringBuilder("getFileId_result("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -12910,15 +13480,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class completeFile_argsStandardSchemeFactory implements SchemeFactory { - public completeFile_argsStandardScheme getScheme() { - return new completeFile_argsStandardScheme(); + private static class getFileId_resultStandardSchemeFactory implements SchemeFactory { + public getFileId_resultStandardScheme getScheme() { + return new getFileId_resultStandardScheme(); } } - private static class completeFile_argsStandardScheme extends StandardScheme { + private static class getFileId_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, completeFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getFileId_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -12928,10 +13498,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, completeFile_args s break; } switch (schemeField.id) { - case 1: // FILE_ID + case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -12947,75 +13526,87 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, completeFile_args s struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, completeFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getFileId_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI64(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class completeFile_argsTupleSchemeFactory implements SchemeFactory { - public completeFile_argsTupleScheme getScheme() { - return new completeFile_argsTupleScheme(); + private static class getFileId_resultTupleSchemeFactory implements SchemeFactory { + public getFileId_resultTupleScheme getScheme() { + return new getFileId_resultTupleScheme(); } } - private static class completeFile_argsTupleScheme extends TupleScheme { + private static class getFileId_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, completeFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getFileId_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetE()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI64(struct.success); + } + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, completeFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getFileId_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class completeFile_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("completeFile_result"); + public static class getFileInfo_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("getFileInfo_args"); - private static final org.apache.thrift.protocol.TField BIE_FIELD_DESC = new org.apache.thrift.protocol.TField("bie", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField IPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ipe", org.apache.thrift.protocol.TType.STRUCT, (short)3); + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new completeFile_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new completeFile_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getFileInfo_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFileInfo_argsTupleSchemeFactory()); } - public BlockInfoException bie; // required - public FileDoesNotExistException fdnee; // required - public InvalidPathException ipe; // required + public long fileId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - BIE((short)1, "bie"), - FDNEE((short)2, "fdnee"), - IPE((short)3, "ipe"); + FILE_ID((short)1, "fileId"); private static final Map byName = new HashMap(); @@ -13030,12 +13621,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // BIE - return BIE; - case 2: // FDNEE - return FDNEE; - case 3: // IPE - return IPE; + case 1: // FILE_ID + return FILE_ID; default: return null; } @@ -13076,154 +13663,76 @@ public String getFieldName() { } // isset id assignments + private static final int __FILEID_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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.BIE, new org.apache.thrift.meta_data.FieldMetaData("bie", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.IPE, new org.apache.thrift.meta_data.FieldMetaData("ipe", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + 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(completeFile_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileInfo_args.class, metaDataMap); } - public completeFile_result() { + public getFileInfo_args() { } - public completeFile_result( - BlockInfoException bie, - FileDoesNotExistException fdnee, - InvalidPathException ipe) + public getFileInfo_args( + long fileId) { this(); - this.bie = bie; - this.fdnee = fdnee; - this.ipe = ipe; + this.fileId = fileId; + setFileIdIsSet(true); } /** * Performs a deep copy on other. */ - public completeFile_result(completeFile_result other) { - if (other.isSetBie()) { - this.bie = new BlockInfoException(other.bie); - } - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); - } - if (other.isSetIpe()) { - this.ipe = new InvalidPathException(other.ipe); - } + public getFileInfo_args(getFileInfo_args other) { + __isset_bitfield = other.__isset_bitfield; + this.fileId = other.fileId; } - public completeFile_result deepCopy() { - return new completeFile_result(this); + public getFileInfo_args deepCopy() { + return new getFileInfo_args(this); } @Override public void clear() { - this.bie = null; - this.fdnee = null; - this.ipe = null; - } - - public BlockInfoException getBie() { - return this.bie; - } - - public completeFile_result setBie(BlockInfoException bie) { - this.bie = bie; - return this; - } - - public void unsetBie() { - this.bie = null; - } - - /** Returns true if field bie is set (has been assigned a value) and false otherwise */ - public boolean isSetBie() { - return this.bie != null; - } - - public void setBieIsSet(boolean value) { - if (!value) { - this.bie = null; - } - } - - public FileDoesNotExistException getFdnee() { - return this.fdnee; - } - - public completeFile_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; - return this; - } - - public void unsetFdnee() { - this.fdnee = null; - } - - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; - } - - public void setFdneeIsSet(boolean value) { - if (!value) { - this.fdnee = null; - } + setFileIdIsSet(false); + this.fileId = 0; } - public InvalidPathException getIpe() { - return this.ipe; + public long getFileId() { + return this.fileId; } - public completeFile_result setIpe(InvalidPathException ipe) { - this.ipe = ipe; + public getFileInfo_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetIpe() { - this.ipe = null; + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field ipe is set (has been assigned a value) and false otherwise */ - public boolean isSetIpe() { - return this.ipe != null; + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setIpeIsSet(boolean value) { - if (!value) { - this.ipe = null; - } + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case BIE: - if (value == null) { - unsetBie(); - } else { - setBie((BlockInfoException)value); - } - break; - - case FDNEE: - if (value == null) { - unsetFdnee(); - } else { - setFdnee((FileDoesNotExistException)value); - } - break; - - case IPE: + case FILE_ID: if (value == null) { - unsetIpe(); + unsetFileId(); } else { - setIpe((InvalidPathException)value); + setFileId((Long)value); } break; @@ -13232,14 +13741,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case BIE: - return getBie(); - - case FDNEE: - return getFdnee(); - - case IPE: - return getIpe(); + case FILE_ID: + return Long.valueOf(getFileId()); } throw new IllegalStateException(); @@ -13252,12 +13755,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case BIE: - return isSetBie(); - case FDNEE: - return isSetFdnee(); - case IPE: - return isSetIpe(); + case FILE_ID: + return isSetFileId(); } throw new IllegalStateException(); } @@ -13266,39 +13765,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof completeFile_result) - return this.equals((completeFile_result)that); + if (that instanceof getFileInfo_args) + return this.equals((getFileInfo_args)that); return false; } - public boolean equals(completeFile_result that) { + public boolean equals(getFileInfo_args that) { if (that == null) return false; - boolean this_present_bie = true && this.isSetBie(); - boolean that_present_bie = true && that.isSetBie(); - if (this_present_bie || that_present_bie) { - if (!(this_present_bie && that_present_bie)) - return false; - if (!this.bie.equals(that.bie)) - return false; - } - - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) - return false; - if (!this.fdnee.equals(that.fdnee)) - return false; - } - - boolean this_present_ipe = true && this.isSetIpe(); - boolean that_present_ipe = true && that.isSetIpe(); - if (this_present_ipe || that_present_ipe) { - if (!(this_present_ipe && that_present_ipe)) + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (!this.ipe.equals(that.ipe)) + if (this.fileId != that.fileId) return false; } @@ -13309,58 +13790,28 @@ public boolean equals(completeFile_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_bie = true && (isSetBie()); - list.add(present_bie); - if (present_bie) - list.add(bie); - - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); - - boolean present_ipe = true && (isSetIpe()); - list.add(present_ipe); - if (present_ipe) - list.add(ipe); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); return list.hashCode(); } @Override - public int compareTo(completeFile_result other) { + public int compareTo(getFileInfo_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetBie()).compareTo(other.isSetBie()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBie()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bie, other.bie); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIpe()).compareTo(other.isSetIpe()); + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetIpe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipe, other.ipe); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); if (lastComparison != 0) { return lastComparison; } @@ -13378,35 +13829,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("completeFile_result("); + StringBuilder sb = new StringBuilder("getFileInfo_args("); boolean first = true; - sb.append("bie:"); - if (this.bie == null) { - sb.append("null"); - } else { - sb.append(this.bie); - } - first = false; - if (!first) sb.append(", "); - sb.append("fdnee:"); - if (this.fdnee == null) { - sb.append("null"); - } else { - sb.append(this.fdnee); - } - first = false; - if (!first) sb.append(", "); - sb.append("ipe:"); - if (this.ipe == null) { - sb.append("null"); - } else { - sb.append(this.ipe); - } + sb.append("fileId:"); + sb.append(this.fileId); first = false; sb.append(")"); return sb.toString(); @@ -13427,21 +13858,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class completeFile_resultStandardSchemeFactory implements SchemeFactory { - public completeFile_resultStandardScheme getScheme() { - return new completeFile_resultStandardScheme(); + private static class getFileInfo_argsStandardSchemeFactory implements SchemeFactory { + public getFileInfo_argsStandardScheme getScheme() { + return new getFileInfo_argsStandardScheme(); } } - private static class completeFile_resultStandardScheme extends StandardScheme { + private static class getFileInfo_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, completeFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -13451,29 +13884,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, completeFile_result break; } switch (schemeField.id) { - case 1: // BIE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // IPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); + case 1: // FILE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -13489,107 +13903,72 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, completeFile_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, completeFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getFileInfo_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.bie != null) { - oprot.writeFieldBegin(BIE_FIELD_DESC); - struct.bie.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ipe != null) { - oprot.writeFieldBegin(IPE_FIELD_DESC); - struct.ipe.write(oprot); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class completeFile_resultTupleSchemeFactory implements SchemeFactory { - public completeFile_resultTupleScheme getScheme() { - return new completeFile_resultTupleScheme(); + private static class getFileInfo_argsTupleSchemeFactory implements SchemeFactory { + public getFileInfo_argsTupleScheme getScheme() { + return new getFileInfo_argsTupleScheme(); } } - private static class completeFile_resultTupleScheme extends TupleScheme { + private static class getFileInfo_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, completeFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetBie()) { + if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetFdnee()) { - optionals.set(1); - } - if (struct.isSetIpe()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetBie()) { - struct.bie.write(oprot); - } - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); - } - if (struct.isSetIpe()) { - struct.ipe.write(oprot); + oprot.writeBitSet(optionals, 1); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, completeFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getFileInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } - if (incoming.get(1)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } - if (incoming.get(2)) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } } } } - public static class deleteFile_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("deleteFile_args"); + public static class getFileInfo_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("getFileInfo_result"); - 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 RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)2); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new deleteFile_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new deleteFile_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getFileInfo_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFileInfo_resultTupleSchemeFactory()); } - public long fileId; // required - public boolean recursive; // required + public FileInfo success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"), - RECURSIVE((short)2, "recursive"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -13604,10 +13983,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; - case 2: // RECURSIVE - return RECURSIVE; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -13648,116 +14027,114 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; - private static final int __RECURSIVE_ISSET_ID = 1; - private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileInfo.class))); + 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(deleteFile_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileInfo_result.class, metaDataMap); } - public deleteFile_args() { + public getFileInfo_result() { } - public deleteFile_args( - long fileId, - boolean recursive) + public getFileInfo_result( + FileInfo success, + TachyonTException e) { this(); - this.fileId = fileId; - setFileIdIsSet(true); - this.recursive = recursive; - setRecursiveIsSet(true); + this.success = success; + this.e = e; } /** * Performs a deep copy on other. */ - public deleteFile_args(deleteFile_args other) { - __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; - this.recursive = other.recursive; + public getFileInfo_result(getFileInfo_result other) { + if (other.isSetSuccess()) { + this.success = new FileInfo(other.success); + } + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public deleteFile_args deepCopy() { - return new deleteFile_args(this); + public getFileInfo_result deepCopy() { + return new getFileInfo_result(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; - setRecursiveIsSet(false); - this.recursive = false; + this.success = null; + this.e = null; } - public long getFileId() { - return this.fileId; + public FileInfo getSuccess() { + return this.success; } - public deleteFile_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public getFileInfo_result setSuccess(FileInfo success) { + this.success = success; return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetSuccess() { + this.success = null; } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } } - public boolean isRecursive() { - return this.recursive; + public TachyonTException getE() { + return this.e; } - public deleteFile_args setRecursive(boolean recursive) { - this.recursive = recursive; - setRecursiveIsSet(true); + public getFileInfo_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetRecursive() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID); + public void unsetE() { + this.e = null; } - /** Returns true if field recursive is set (has been assigned a value) and false otherwise */ - public boolean isSetRecursive() { - return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID); + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setRecursiveIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value); + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SUCCESS: if (value == null) { - unsetFileId(); + unsetSuccess(); } else { - setFileId((Long)value); + setSuccess((FileInfo)value); } break; - case RECURSIVE: + case E: if (value == null) { - unsetRecursive(); + unsetE(); } else { - setRecursive((Boolean)value); + setE((TachyonTException)value); } break; @@ -13766,11 +14143,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SUCCESS: + return getSuccess(); - case RECURSIVE: - return Boolean.valueOf(isRecursive()); + case E: + return getE(); } throw new IllegalStateException(); @@ -13783,10 +14160,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); - case RECURSIVE: - return isSetRecursive(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -13794,31 +14171,31 @@ public boolean isSet(_Fields field) { @Override public boolean equals(Object that) { if (that == null) - return false; - if (that instanceof deleteFile_args) - return this.equals((deleteFile_args)that); + return false; + if (that instanceof getFileInfo_result) + return this.equals((getFileInfo_result)that); return false; } - public boolean equals(deleteFile_args that) { + public boolean equals(getFileInfo_result that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.fileId != that.fileId) + if (!this.success.equals(that.success)) return false; } - boolean this_present_recursive = true; - boolean that_present_recursive = true; - if (this_present_recursive || that_present_recursive) { - if (!(this_present_recursive && that_present_recursive)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (this.recursive != that.recursive) + if (!this.e.equals(that.e)) return false; } @@ -13829,43 +14206,43 @@ public boolean equals(deleteFile_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); - boolean present_recursive = true; - list.add(present_recursive); - if (present_recursive) - list.add(recursive); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(deleteFile_args other) { + public int compareTo(getFileInfo_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetRecursive()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -13883,19 +14260,27 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("deleteFile_args("); + StringBuilder sb = new StringBuilder("getFileInfo_result("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } first = false; if (!first) sb.append(", "); - sb.append("recursive:"); - sb.append(this.recursive); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -13904,6 +14289,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -13916,23 +14304,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class deleteFile_argsStandardSchemeFactory implements SchemeFactory { - public deleteFile_argsStandardScheme getScheme() { - return new deleteFile_argsStandardScheme(); + private static class getFileInfo_resultStandardSchemeFactory implements SchemeFactory { + public getFileInfo_resultStandardScheme getScheme() { + return new getFileInfo_resultStandardScheme(); } } - private static class deleteFile_argsStandardScheme extends StandardScheme { + private static class getFileInfo_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -13942,18 +14328,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, deleteFile_args str break; } switch (schemeField.id) { - case 1: // FILE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new FileInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // RECURSIVE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.recursive = iprot.readBool(); - struct.setRecursiveIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -13969,85 +14357,88 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, deleteFile_args str struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getFileInfo_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(RECURSIVE_FIELD_DESC); - oprot.writeBool(struct.recursive); - oprot.writeFieldEnd(); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class deleteFile_argsTupleSchemeFactory implements SchemeFactory { - public deleteFile_argsTupleScheme getScheme() { - return new deleteFile_argsTupleScheme(); + private static class getFileInfo_resultTupleSchemeFactory implements SchemeFactory { + public getFileInfo_resultTupleScheme getScheme() { + return new getFileInfo_resultTupleScheme(); } } - private static class deleteFile_argsTupleScheme extends TupleScheme { + private static class getFileInfo_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetRecursive()) { + if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetSuccess()) { + struct.success.write(oprot); } - if (struct.isSetRecursive()) { - oprot.writeBool(struct.recursive); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getFileInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = new FileInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.recursive = iprot.readBool(); - struct.setRecursiveIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class deleteFile_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("deleteFile_result"); + public static class getFileInfoList_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("getFileInfoList_args"); - 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 TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)1); + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new deleteFile_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new deleteFile_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getFileInfoList_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFileInfoList_argsTupleSchemeFactory()); } - public boolean success; // required - public TachyonException te; // required + public long fileId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - TE((short)1, "te"); + FILE_ID((short)1, "fileId"); private static final Map byName = new HashMap(); @@ -14062,10 +14453,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // TE - return TE; + case 1: // FILE_ID + return FILE_ID; default: return null; } @@ -14106,116 +14495,76 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; + private static final int __FILEID_ISSET_ID = 0; private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + 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(deleteFile_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileInfoList_args.class, metaDataMap); } - public deleteFile_result() { + public getFileInfoList_args() { } - public deleteFile_result( - boolean success, - TachyonException te) + public getFileInfoList_args( + long fileId) { this(); - this.success = success; - setSuccessIsSet(true); - this.te = te; + this.fileId = fileId; + setFileIdIsSet(true); } /** * Performs a deep copy on other. */ - public deleteFile_result(deleteFile_result other) { + public getFileInfoList_args(getFileInfoList_args other) { __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetTe()) { - this.te = new TachyonException(other.te); - } + this.fileId = other.fileId; } - public deleteFile_result deepCopy() { - return new deleteFile_result(this); + public getFileInfoList_args deepCopy() { + return new getFileInfoList_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; - this.te = null; - } - - public boolean isSuccess() { - return this.success; - } - - public deleteFile_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + setFileIdIsSet(false); + this.fileId = 0; } - public TachyonException getTe() { - return this.te; + public long getFileId() { + return this.fileId; } - public deleteFile_result setTe(TachyonException te) { - this.te = te; + public getFileInfoList_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetTe() { - this.te = null; + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field te is set (has been assigned a value) and false otherwise */ - public boolean isSetTe() { - return this.te != null; + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setTeIsSet(boolean value) { - if (!value) { - this.te = null; - } + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case TE: + case FILE_ID: if (value == null) { - unsetTe(); + unsetFileId(); } else { - setTe((TachyonException)value); + setFileId((Long)value); } break; @@ -14224,11 +14573,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); - - case TE: - return getTe(); + case FILE_ID: + return Long.valueOf(getFileId()); } throw new IllegalStateException(); @@ -14241,10 +14587,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case TE: - return isSetTe(); + case FILE_ID: + return isSetFileId(); } throw new IllegalStateException(); } @@ -14253,30 +14597,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof deleteFile_result) - return this.equals((deleteFile_result)that); + if (that instanceof getFileInfoList_args) + return this.equals((getFileInfoList_args)that); return false; } - public boolean equals(deleteFile_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_te = true && this.isSetTe(); - boolean that_present_te = true && that.isSetTe(); - if (this_present_te || that_present_te) { - if (!(this_present_te && that_present_te)) + public boolean equals(getFileInfoList_args that) { + if (that == null) + return false; + + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (!this.te.equals(that.te)) + if (this.fileId != that.fileId) return false; } @@ -14287,43 +14622,28 @@ public boolean equals(deleteFile_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_te = true && (isSetTe()); - list.add(present_te); - if (present_te) - list.add(te); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); return list.hashCode(); } @Override - public int compareTo(deleteFile_result other) { + public int compareTo(getFileInfoList_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTe()).compareTo(other.isSetTe()); + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetTe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, other.te); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); if (lastComparison != 0) { return lastComparison; } @@ -14341,23 +14661,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("deleteFile_result("); + StringBuilder sb = new StringBuilder("getFileInfoList_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("te:"); - if (this.te == null) { - sb.append("null"); - } else { - sb.append(this.te); - } + sb.append("fileId:"); + sb.append(this.fileId); first = false; sb.append(")"); return sb.toString(); @@ -14386,15 +14698,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class deleteFile_resultStandardSchemeFactory implements SchemeFactory { - public deleteFile_resultStandardScheme getScheme() { - return new deleteFile_resultStandardScheme(); + private static class getFileInfoList_argsStandardSchemeFactory implements SchemeFactory { + public getFileInfoList_argsStandardScheme getScheme() { + return new getFileInfoList_argsStandardScheme(); } } - private static class deleteFile_resultStandardScheme extends StandardScheme { + private static class getFileInfoList_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfoList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -14404,19 +14716,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, deleteFile_result s break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // TE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + case 1: // FILE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -14432,90 +14735,72 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, deleteFile_result s struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getFileInfoList_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - if (struct.te != null) { - oprot.writeFieldBegin(TE_FIELD_DESC); - struct.te.write(oprot); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class deleteFile_resultTupleSchemeFactory implements SchemeFactory { - public deleteFile_resultTupleScheme getScheme() { - return new deleteFile_resultTupleScheme(); + private static class getFileInfoList_argsTupleSchemeFactory implements SchemeFactory { + public getFileInfoList_argsTupleScheme getScheme() { + return new getFileInfoList_argsTupleScheme(); } } - private static class deleteFile_resultTupleScheme extends TupleScheme { + private static class getFileInfoList_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfoList_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetTe()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - if (struct.isSetTe()) { - struct.te.write(oprot); + oprot.writeBitSet(optionals, 1); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getFileInfoList_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } } } } - public static class renameFile_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("renameFile_args"); + public static class getFileInfoList_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("getFileInfoList_result"); - 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 DST_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("dstPath", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new renameFile_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new renameFile_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getFileInfoList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFileInfoList_resultTupleSchemeFactory()); } - public long fileId; // required - public String dstPath; // required + public List success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"), - DST_PATH((short)2, "dstPath"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -14530,10 +14815,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; - case 2: // DST_PATH - return DST_PATH; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -14574,116 +14859,134 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.DST_PATH, new org.apache.thrift.meta_data.FieldMetaData("dstPath", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileInfo.class)))); + 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(renameFile_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileInfoList_result.class, metaDataMap); } - public renameFile_args() { + public getFileInfoList_result() { } - public renameFile_args( - long fileId, - String dstPath) + public getFileInfoList_result( + List success, + TachyonTException e) { this(); - this.fileId = fileId; - setFileIdIsSet(true); - this.dstPath = dstPath; + this.success = success; + this.e = e; } /** * Performs a deep copy on other. */ - public renameFile_args(renameFile_args other) { - __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; - if (other.isSetDstPath()) { - this.dstPath = other.dstPath; + public getFileInfoList_result(getFileInfoList_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (FileInfo other_element : other.success) { + __this__success.add(new FileInfo(other_element)); + } + this.success = __this__success; + } + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public renameFile_args deepCopy() { - return new renameFile_args(this); + public getFileInfoList_result deepCopy() { + return new getFileInfoList_result(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; - this.dstPath = null; + this.success = null; + this.e = null; } - public long getFileId() { - return this.fileId; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public renameFile_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(FileInfo elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getFileInfoList_result setSuccess(List success) { + this.success = success; return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetSuccess() { + this.success = null; } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } } - public String getDstPath() { - return this.dstPath; + public TachyonTException getE() { + return this.e; } - public renameFile_args setDstPath(String dstPath) { - this.dstPath = dstPath; + public getFileInfoList_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetDstPath() { - this.dstPath = null; + public void unsetE() { + this.e = null; } - /** Returns true if field dstPath is set (has been assigned a value) and false otherwise */ - public boolean isSetDstPath() { - return this.dstPath != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setDstPathIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.dstPath = null; + this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SUCCESS: if (value == null) { - unsetFileId(); + unsetSuccess(); } else { - setFileId((Long)value); + setSuccess((List)value); } break; - case DST_PATH: + case E: if (value == null) { - unsetDstPath(); + unsetE(); } else { - setDstPath((String)value); + setE((TachyonTException)value); } break; @@ -14692,11 +14995,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SUCCESS: + return getSuccess(); - case DST_PATH: - return getDstPath(); + case E: + return getE(); } throw new IllegalStateException(); @@ -14709,10 +15012,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); - case DST_PATH: - return isSetDstPath(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -14721,30 +15024,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof renameFile_args) - return this.equals((renameFile_args)that); + if (that instanceof getFileInfoList_result) + return this.equals((getFileInfoList_result)that); return false; } - public boolean equals(renameFile_args that) { + public boolean equals(getFileInfoList_result that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.fileId != that.fileId) + if (!this.success.equals(that.success)) return false; } - boolean this_present_dstPath = true && this.isSetDstPath(); - boolean that_present_dstPath = true && that.isSetDstPath(); - if (this_present_dstPath || that_present_dstPath) { - if (!(this_present_dstPath && that_present_dstPath)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.dstPath.equals(that.dstPath)) + if (!this.e.equals(that.e)) return false; } @@ -14755,43 +15058,43 @@ public boolean equals(renameFile_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); - boolean present_dstPath = true && (isSetDstPath()); - list.add(present_dstPath); - if (present_dstPath) - list.add(dstPath); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(renameFile_args other) { + public int compareTo(getFileInfoList_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDstPath()).compareTo(other.isSetDstPath()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetDstPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dstPath, other.dstPath); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -14809,22 +15112,26 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("renameFile_args("); + StringBuilder sb = new StringBuilder("getFileInfoList_result("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } first = false; if (!first) sb.append(", "); - sb.append("dstPath:"); - if (this.dstPath == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.dstPath); + sb.append(this.e); } first = false; sb.append(")"); @@ -14846,23 +15153,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class renameFile_argsStandardSchemeFactory implements SchemeFactory { - public renameFile_argsStandardScheme getScheme() { - return new renameFile_argsStandardScheme(); + private static class getFileInfoList_resultStandardSchemeFactory implements SchemeFactory { + public getFileInfoList_resultStandardScheme getScheme() { + return new getFileInfoList_resultStandardScheme(); } } - private static class renameFile_argsStandardScheme extends StandardScheme { + private static class getFileInfoList_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, renameFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfoList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -14872,18 +15177,30 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, renameFile_args str break; } switch (schemeField.id) { - case 1: // FILE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list212 = iprot.readListBegin(); + struct.success = new ArrayList(_list212.size); + FileInfo _elem213; + for (int _i214 = 0; _i214 < _list212.size; ++_i214) + { + _elem213 = new FileInfo(); + _elem213.read(iprot); + struct.success.add(_elem213); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // DST_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.dstPath = iprot.readString(); - struct.setDstPathIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -14899,16 +15216,25 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, renameFile_args str struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, renameFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getFileInfoList_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); - if (struct.dstPath != null) { - oprot.writeFieldBegin(DST_PATH_FIELD_DESC); - oprot.writeString(struct.dstPath); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (FileInfo _iter215 : struct.success) + { + _iter215.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -14917,75 +15243,83 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, renameFile_args st } - private static class renameFile_argsTupleSchemeFactory implements SchemeFactory { - public renameFile_argsTupleScheme getScheme() { - return new renameFile_argsTupleScheme(); + private static class getFileInfoList_resultTupleSchemeFactory implements SchemeFactory { + public getFileInfoList_resultTupleScheme getScheme() { + return new getFileInfoList_resultTupleScheme(); } } - private static class renameFile_argsTupleScheme extends TupleScheme { + private static class getFileInfoList_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, renameFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfoList_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetDstPath()) { + if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (FileInfo _iter216 : struct.success) + { + _iter216.write(oprot); + } + } } - if (struct.isSetDstPath()) { - oprot.writeString(struct.dstPath); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, renameFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getFileInfoList_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + { + org.apache.thrift.protocol.TList _list217 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list217.size); + FileInfo _elem218; + for (int _i219 = 0; _i219 < _list217.size; ++_i219) + { + _elem218 = new FileInfo(); + _elem218.read(iprot); + struct.success.add(_elem218); + } + } + struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.dstPath = iprot.readString(); - struct.setDstPathIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class renameFile_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("renameFile_result"); + public static class getNewBlockIdForFile_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("getNewBlockIdForFile_args"); - 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 FAEE_FIELD_DESC = new org.apache.thrift.protocol.TField("faee", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField IPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ipe", org.apache.thrift.protocol.TType.STRUCT, (short)3); + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new renameFile_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new renameFile_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getNewBlockIdForFile_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getNewBlockIdForFile_argsTupleSchemeFactory()); } - public boolean success; // required - public FileAlreadyExistException faee; // required - public FileDoesNotExistException fdnee; // required - public InvalidPathException ipe; // required + public long fileId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - FAEE((short)1, "faee"), - FDNEE((short)2, "fdnee"), - IPE((short)3, "ipe"); + FILE_ID((short)1, "fileId"); private static final Map byName = new HashMap(); @@ -15000,244 +15334,118 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // FAEE - return FAEE; - case 2: // FDNEE - return FDNEE; - case 3: // IPE - return IPE; + case 1: // FILE_ID + return FILE_ID; default: return null; } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.FAEE, new org.apache.thrift.meta_data.FieldMetaData("faee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.IPE, new org.apache.thrift.meta_data.FieldMetaData("ipe", 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(renameFile_result.class, metaDataMap); - } - - public renameFile_result() { - } - - public renameFile_result( - boolean success, - FileAlreadyExistException faee, - FileDoesNotExistException fdnee, - InvalidPathException ipe) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.faee = faee; - this.fdnee = fdnee; - this.ipe = ipe; - } - - /** - * Performs a deep copy on other. - */ - public renameFile_result(renameFile_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetFaee()) { - this.faee = new FileAlreadyExistException(other.faee); - } - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); - } - if (other.isSetIpe()) { - this.ipe = new InvalidPathException(other.ipe); - } - } - - public renameFile_result deepCopy() { - return new renameFile_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.faee = null; - this.fdnee = null; - this.ipe = null; - } - - public boolean isSuccess() { - return this.success; - } - - public renameFile_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } + } - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } - public FileAlreadyExistException getFaee() { - return this.faee; - } + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } - public renameFile_result setFaee(FileAlreadyExistException faee) { - this.faee = faee; - return this; - } + private final short _thriftId; + private final String _fieldName; - public void unsetFaee() { - this.faee = null; - } + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } - /** Returns true if field faee is set (has been assigned a value) and false otherwise */ - public boolean isSetFaee() { - return this.faee != null; - } + public short getThriftFieldId() { + return _thriftId; + } - public void setFaeeIsSet(boolean value) { - if (!value) { - this.faee = null; + public String getFieldName() { + return _fieldName; } } - public FileDoesNotExistException getFdnee() { - return this.fdnee; + // isset id assignments + private static final int __FILEID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNewBlockIdForFile_args.class, metaDataMap); } - public renameFile_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; - return this; + public getNewBlockIdForFile_args() { } - public void unsetFdnee() { - this.fdnee = null; + public getNewBlockIdForFile_args( + long fileId) + { + this(); + this.fileId = fileId; + setFileIdIsSet(true); } - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; + /** + * Performs a deep copy on other. + */ + public getNewBlockIdForFile_args(getNewBlockIdForFile_args other) { + __isset_bitfield = other.__isset_bitfield; + this.fileId = other.fileId; } - public void setFdneeIsSet(boolean value) { - if (!value) { - this.fdnee = null; - } + public getNewBlockIdForFile_args deepCopy() { + return new getNewBlockIdForFile_args(this); } - public InvalidPathException getIpe() { - return this.ipe; + @Override + public void clear() { + setFileIdIsSet(false); + this.fileId = 0; + } + + public long getFileId() { + return this.fileId; } - public renameFile_result setIpe(InvalidPathException ipe) { - this.ipe = ipe; + public getNewBlockIdForFile_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetIpe() { - this.ipe = null; + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field ipe is set (has been assigned a value) and false otherwise */ - public boolean isSetIpe() { - return this.ipe != null; + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setIpeIsSet(boolean value) { - if (!value) { - this.ipe = null; - } + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case FAEE: - if (value == null) { - unsetFaee(); - } else { - setFaee((FileAlreadyExistException)value); - } - break; - - case FDNEE: - if (value == null) { - unsetFdnee(); - } else { - setFdnee((FileDoesNotExistException)value); - } - break; - - case IPE: + case FILE_ID: if (value == null) { - unsetIpe(); + unsetFileId(); } else { - setIpe((InvalidPathException)value); + setFileId((Long)value); } break; @@ -15246,17 +15454,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); - - case FAEE: - return getFaee(); - - case FDNEE: - return getFdnee(); - - case IPE: - return getIpe(); + case FILE_ID: + return Long.valueOf(getFileId()); } throw new IllegalStateException(); @@ -15269,14 +15468,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case FAEE: - return isSetFaee(); - case FDNEE: - return isSetFdnee(); - case IPE: - return isSetIpe(); + case FILE_ID: + return isSetFileId(); } throw new IllegalStateException(); } @@ -15285,48 +15478,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof renameFile_result) - return this.equals((renameFile_result)that); + if (that instanceof getNewBlockIdForFile_args) + return this.equals((getNewBlockIdForFile_args)that); return false; } - public boolean equals(renameFile_result that) { + public boolean equals(getNewBlockIdForFile_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_faee = true && this.isSetFaee(); - boolean that_present_faee = true && that.isSetFaee(); - if (this_present_faee || that_present_faee) { - if (!(this_present_faee && that_present_faee)) - return false; - if (!this.faee.equals(that.faee)) - return false; - } - - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) - return false; - if (!this.fdnee.equals(that.fdnee)) - return false; - } - - boolean this_present_ipe = true && this.isSetIpe(); - boolean that_present_ipe = true && that.isSetIpe(); - if (this_present_ipe || that_present_ipe) { - if (!(this_present_ipe && that_present_ipe)) + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (!this.ipe.equals(that.ipe)) + if (this.fileId != that.fileId) return false; } @@ -15337,73 +15503,28 @@ public boolean equals(renameFile_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_faee = true && (isSetFaee()); - list.add(present_faee); - if (present_faee) - list.add(faee); - - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); - - boolean present_ipe = true && (isSetIpe()); - list.add(present_ipe); - if (present_ipe) - list.add(ipe); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); return list.hashCode(); } @Override - public int compareTo(renameFile_result other) { + public int compareTo(getNewBlockIdForFile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFaee()).compareTo(other.isSetFaee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFaee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.faee, other.faee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIpe()).compareTo(other.isSetIpe()); + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetIpe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipe, other.ipe); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); if (lastComparison != 0) { return lastComparison; } @@ -15421,39 +15542,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("renameFile_result("); + StringBuilder sb = new StringBuilder("getNewBlockIdForFile_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("faee:"); - if (this.faee == null) { - sb.append("null"); - } else { - sb.append(this.faee); - } - first = false; - if (!first) sb.append(", "); - sb.append("fdnee:"); - if (this.fdnee == null) { - sb.append("null"); - } else { - sb.append(this.fdnee); - } - first = false; - if (!first) sb.append(", "); - sb.append("ipe:"); - if (this.ipe == null) { - sb.append("null"); - } else { - sb.append(this.ipe); - } + sb.append("fileId:"); + sb.append(this.fileId); first = false; sb.append(")"); return sb.toString(); @@ -15482,15 +15579,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class renameFile_resultStandardSchemeFactory implements SchemeFactory { - public renameFile_resultStandardScheme getScheme() { - return new renameFile_resultStandardScheme(); + private static class getNewBlockIdForFile_argsStandardSchemeFactory implements SchemeFactory { + public getNewBlockIdForFile_argsStandardScheme getScheme() { + return new getNewBlockIdForFile_argsStandardScheme(); } } - private static class renameFile_resultStandardScheme extends StandardScheme { + private static class getNewBlockIdForFile_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, renameFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -15500,37 +15597,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, renameFile_result s break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // FAEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // IPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); + case 1: // FILE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -15546,122 +15616,72 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, renameFile_result s struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, renameFile_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - if (struct.faee != null) { - oprot.writeFieldBegin(FAEE_FIELD_DESC); - struct.faee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ipe != null) { - oprot.writeFieldBegin(IPE_FIELD_DESC); - struct.ipe.write(oprot); - oprot.writeFieldEnd(); - } + public void write(org.apache.thrift.protocol.TProtocol oprot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class renameFile_resultTupleSchemeFactory implements SchemeFactory { - public renameFile_resultTupleScheme getScheme() { - return new renameFile_resultTupleScheme(); + private static class getNewBlockIdForFile_argsTupleSchemeFactory implements SchemeFactory { + public getNewBlockIdForFile_argsTupleScheme getScheme() { + return new getNewBlockIdForFile_argsTupleScheme(); } } - private static class renameFile_resultTupleScheme extends TupleScheme { + private static class getNewBlockIdForFile_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, renameFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetFaee()) { - optionals.set(1); - } - if (struct.isSetFdnee()) { - optionals.set(2); - } - if (struct.isSetIpe()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - if (struct.isSetFaee()) { - struct.faee.write(oprot); - } - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); - } - if (struct.isSetIpe()) { - struct.ipe.write(oprot); + oprot.writeBitSet(optionals, 1); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, renameFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); - } - if (incoming.get(2)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } - if (incoming.get(3)) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } } } } - public static class setPinned_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("setPinned_args"); + public static class getNewBlockIdForFile_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("getNewBlockIdForFile_result"); - 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 PINNED_FIELD_DESC = new org.apache.thrift.protocol.TField("pinned", org.apache.thrift.protocol.TType.BOOL, (short)2); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new setPinned_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new setPinned_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getNewBlockIdForFile_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getNewBlockIdForFile_resultTupleSchemeFactory()); } - public long fileId; // required - public boolean pinned; // required + public long success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"), - PINNED((short)2, "pinned"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -15676,10 +15696,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; - case 2: // PINNED - return PINNED; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -15720,116 +15740,116 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; - private static final int __PINNED_ISSET_ID = 1; + private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.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.I64))); - tmpMap.put(_Fields.PINNED, new org.apache.thrift.meta_data.FieldMetaData("pinned", 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setPinned_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNewBlockIdForFile_result.class, metaDataMap); } - public setPinned_args() { + public getNewBlockIdForFile_result() { } - public setPinned_args( - long fileId, - boolean pinned) + public getNewBlockIdForFile_result( + long success, + TachyonTException e) { this(); - this.fileId = fileId; - setFileIdIsSet(true); - this.pinned = pinned; - setPinnedIsSet(true); + this.success = success; + setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public setPinned_args(setPinned_args other) { + public getNewBlockIdForFile_result(getNewBlockIdForFile_result other) { __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; - this.pinned = other.pinned; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public setPinned_args deepCopy() { - return new setPinned_args(this); + public getNewBlockIdForFile_result deepCopy() { + return new getNewBlockIdForFile_result(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; - setPinnedIsSet(false); - this.pinned = false; + setSuccessIsSet(false); + this.success = 0; + this.e = null; } - public long getFileId() { - return this.fileId; + public long getSuccess() { + return this.success; } - public setPinned_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public getNewBlockIdForFile_result setSuccess(long success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public boolean isPinned() { - return this.pinned; + public TachyonTException getE() { + return this.e; } - public setPinned_args setPinned(boolean pinned) { - this.pinned = pinned; - setPinnedIsSet(true); + public getNewBlockIdForFile_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetPinned() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PINNED_ISSET_ID); + public void unsetE() { + this.e = null; } - /** Returns true if field pinned is set (has been assigned a value) and false otherwise */ - public boolean isSetPinned() { - return EncodingUtils.testBit(__isset_bitfield, __PINNED_ISSET_ID); + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setPinnedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PINNED_ISSET_ID, value); + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SUCCESS: if (value == null) { - unsetFileId(); + unsetSuccess(); } else { - setFileId((Long)value); + setSuccess((Long)value); } break; - case PINNED: + case E: if (value == null) { - unsetPinned(); + unsetE(); } else { - setPinned((Boolean)value); + setE((TachyonTException)value); } break; @@ -15838,11 +15858,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SUCCESS: + return Long.valueOf(getSuccess()); - case PINNED: - return Boolean.valueOf(isPinned()); + case E: + return getE(); } throw new IllegalStateException(); @@ -15855,10 +15875,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); - case PINNED: - return isSetPinned(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -15867,30 +15887,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof setPinned_args) - return this.equals((setPinned_args)that); + if (that instanceof getNewBlockIdForFile_result) + return this.equals((getNewBlockIdForFile_result)that); return false; } - public boolean equals(setPinned_args that) { + public boolean equals(getNewBlockIdForFile_result that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.fileId != that.fileId) + if (this.success != that.success) return false; } - boolean this_present_pinned = true; - boolean that_present_pinned = true; - if (this_present_pinned || that_present_pinned) { - if (!(this_present_pinned && that_present_pinned)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (this.pinned != that.pinned) + if (!this.e.equals(that.e)) return false; } @@ -15901,43 +15921,43 @@ public boolean equals(setPinned_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); - boolean present_pinned = true; - list.add(present_pinned); - if (present_pinned) - list.add(pinned); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(setPinned_args other) { + public int compareTo(getNewBlockIdForFile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPinned()).compareTo(other.isSetPinned()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetPinned()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pinned, other.pinned); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -15955,19 +15975,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("setPinned_args("); + StringBuilder sb = new StringBuilder("getNewBlockIdForFile_result("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("pinned:"); - sb.append(this.pinned); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -15996,15 +16020,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class setPinned_argsStandardSchemeFactory implements SchemeFactory { - public setPinned_argsStandardScheme getScheme() { - return new setPinned_argsStandardScheme(); + private static class getNewBlockIdForFile_resultStandardSchemeFactory implements SchemeFactory { + public getNewBlockIdForFile_resultStandardScheme getScheme() { + return new getNewBlockIdForFile_resultStandardScheme(); } } - private static class setPinned_argsStandardScheme extends StandardScheme { + private static class getNewBlockIdForFile_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, setPinned_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -16014,18 +16038,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, setPinned_args stru break; } switch (schemeField.id) { - case 1: // FILE_ID + case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // PINNED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.pinned = iprot.readBool(); - struct.setPinnedIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -16041,82 +16066,85 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, setPinned_args stru struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, setPinned_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(PINNED_FIELD_DESC); - oprot.writeBool(struct.pinned); - oprot.writeFieldEnd(); + public void write(org.apache.thrift.protocol.TProtocol oprot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI64(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class setPinned_argsTupleSchemeFactory implements SchemeFactory { - public setPinned_argsTupleScheme getScheme() { - return new setPinned_argsTupleScheme(); + private static class getNewBlockIdForFile_resultTupleSchemeFactory implements SchemeFactory { + public getNewBlockIdForFile_resultTupleScheme getScheme() { + return new getNewBlockIdForFile_resultTupleScheme(); } } - private static class setPinned_argsTupleScheme extends TupleScheme { + private static class getNewBlockIdForFile_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setPinned_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetPinned()) { + if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetSuccess()) { + oprot.writeI64(struct.success); } - if (struct.isSetPinned()) { - oprot.writeBool(struct.pinned); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setPinned_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.pinned = iprot.readBool(); - struct.setPinnedIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class setPinned_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("setPinned_result"); + public static class getUfsAddress_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("getUfsAddress_args"); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new setPinned_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new setPinned_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getUfsAddress_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getUfsAddress_argsTupleSchemeFactory()); } - public FileDoesNotExistException fdnee; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FDNEE((short)1, "fdnee"); +; private static final Map byName = new HashMap(); @@ -16131,8 +16159,6 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FDNEE - return FDNEE; default: return null; } @@ -16171,87 +16197,37 @@ public String getFieldName() { return _fieldName; } } - - // isset id assignments 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.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", 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(setPinned_result.class, metaDataMap); - } - - public setPinned_result() { + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUfsAddress_args.class, metaDataMap); } - public setPinned_result( - FileDoesNotExistException fdnee) - { - this(); - this.fdnee = fdnee; + public getUfsAddress_args() { } /** * Performs a deep copy on other. */ - public setPinned_result(setPinned_result other) { - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); - } + public getUfsAddress_args(getUfsAddress_args other) { } - public setPinned_result deepCopy() { - return new setPinned_result(this); + public getUfsAddress_args deepCopy() { + return new getUfsAddress_args(this); } @Override public void clear() { - this.fdnee = null; - } - - public FileDoesNotExistException getFdnee() { - return this.fdnee; - } - - public setPinned_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; - return this; - } - - public void unsetFdnee() { - this.fdnee = null; - } - - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; - } - - public void setFdneeIsSet(boolean value) { - if (!value) { - this.fdnee = null; - } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FDNEE: - if (value == null) { - unsetFdnee(); - } else { - setFdnee((FileDoesNotExistException)value); - } - break; - } } public Object getFieldValue(_Fields field) { switch (field) { - case FDNEE: - return getFdnee(); - } throw new IllegalStateException(); } @@ -16263,8 +16239,6 @@ public boolean isSet(_Fields field) { } switch (field) { - case FDNEE: - return isSetFdnee(); } throw new IllegalStateException(); } @@ -16273,24 +16247,15 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof setPinned_result) - return this.equals((setPinned_result)that); + if (that instanceof getUfsAddress_args) + return this.equals((getUfsAddress_args)that); return false; } - public boolean equals(setPinned_result that) { + public boolean equals(getUfsAddress_args that) { if (that == null) return false; - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) - return false; - if (!this.fdnee.equals(that.fdnee)) - return false; - } - return true; } @@ -16298,32 +16263,17 @@ public boolean equals(setPinned_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); - return list.hashCode(); } @Override - public int compareTo(setPinned_result other) { + public int compareTo(getUfsAddress_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -16337,20 +16287,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("setPinned_result("); + StringBuilder sb = new StringBuilder("getUfsAddress_args("); boolean first = true; - sb.append("fdnee:"); - if (this.fdnee == null) { - sb.append("null"); - } else { - sb.append(this.fdnee); - } - first = false; sb.append(")"); return sb.toString(); } @@ -16376,15 +16319,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class setPinned_resultStandardSchemeFactory implements SchemeFactory { - public setPinned_resultStandardScheme getScheme() { - return new setPinned_resultStandardScheme(); + private static class getUfsAddress_argsStandardSchemeFactory implements SchemeFactory { + public getUfsAddress_argsStandardScheme getScheme() { + return new getUfsAddress_argsStandardScheme(); } } - private static class setPinned_resultStandardScheme extends StandardScheme { + private static class getUfsAddress_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, setPinned_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsAddress_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -16394,15 +16337,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, setPinned_result st break; } switch (schemeField.id) { - case 1: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -16414,75 +16348,53 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, setPinned_result st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, setPinned_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getUfsAddress_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class setPinned_resultTupleSchemeFactory implements SchemeFactory { - public setPinned_resultTupleScheme getScheme() { - return new setPinned_resultTupleScheme(); + private static class getUfsAddress_argsTupleSchemeFactory implements SchemeFactory { + public getUfsAddress_argsTupleScheme getScheme() { + return new getUfsAddress_argsTupleScheme(); } } - private static class setPinned_resultTupleScheme extends TupleScheme { + private static class getUfsAddress_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setPinned_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getUfsAddress_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetFdnee()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setPinned_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getUfsAddress_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } } } } - public static class createDirectory_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("createDirectory_args"); + public static class getUfsAddress_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("getUfsAddress_result"); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)2); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new createDirectory_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new createDirectory_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getUfsAddress_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getUfsAddress_resultTupleSchemeFactory()); } - public String path; // required - public boolean recursive; // required + public String success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"), - RECURSIVE((short)2, "recursive"); + SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -16497,10 +16409,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PATH - return PATH; - case 2: // RECURSIVE - return RECURSIVE; + case 0: // SUCCESS + return SUCCESS; default: return null; } @@ -16541,116 +16451,74 @@ public String getFieldName() { } // isset id assignments - private static final int __RECURSIVE_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", 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.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", 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(createDirectory_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUfsAddress_result.class, metaDataMap); } - public createDirectory_args() { + public getUfsAddress_result() { } - public createDirectory_args( - String path, - boolean recursive) + public getUfsAddress_result( + String success) { this(); - this.path = path; - this.recursive = recursive; - setRecursiveIsSet(true); + this.success = success; } /** * Performs a deep copy on other. */ - public createDirectory_args(createDirectory_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPath()) { - this.path = other.path; + public getUfsAddress_result(getUfsAddress_result other) { + if (other.isSetSuccess()) { + this.success = other.success; } - this.recursive = other.recursive; } - public createDirectory_args deepCopy() { - return new createDirectory_args(this); + public getUfsAddress_result deepCopy() { + return new getUfsAddress_result(this); } @Override public void clear() { - this.path = null; - setRecursiveIsSet(false); - this.recursive = false; - } - - public String getPath() { - return this.path; - } - - public createDirectory_args setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } + this.success = null; } - public boolean isRecursive() { - return this.recursive; + public String getSuccess() { + return this.success; } - public createDirectory_args setRecursive(boolean recursive) { - this.recursive = recursive; - setRecursiveIsSet(true); + public getUfsAddress_result setSuccess(String success) { + this.success = success; return this; } - public void unsetRecursive() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID); + public void unsetSuccess() { + this.success = null; } - /** Returns true if field recursive is set (has been assigned a value) and false otherwise */ - public boolean isSetRecursive() { - return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - - public void setRecursiveIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value); + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case RECURSIVE: + case SUCCESS: if (value == null) { - unsetRecursive(); + unsetSuccess(); } else { - setRecursive((Boolean)value); + setSuccess((String)value); } break; @@ -16659,11 +16527,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case PATH: - return getPath(); - - case RECURSIVE: - return Boolean.valueOf(isRecursive()); + case SUCCESS: + return getSuccess(); } throw new IllegalStateException(); @@ -16676,10 +16541,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case PATH: - return isSetPath(); - case RECURSIVE: - return isSetRecursive(); + case SUCCESS: + return isSetSuccess(); } throw new IllegalStateException(); } @@ -16688,30 +16551,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof createDirectory_args) - return this.equals((createDirectory_args)that); + if (that instanceof getUfsAddress_result) + return this.equals((getUfsAddress_result)that); return false; } - public boolean equals(createDirectory_args that) { + public boolean equals(getUfsAddress_result that) { if (that == null) return false; - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_recursive = true; - boolean that_present_recursive = true; - if (this_present_recursive || that_present_recursive) { - if (!(this_present_recursive && that_present_recursive)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.recursive != that.recursive) + if (!this.success.equals(that.success)) return false; } @@ -16722,43 +16576,28 @@ public boolean equals(createDirectory_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_path = true && (isSetPath()); - list.add(present_path); - if (present_path) - list.add(path); - - boolean present_recursive = true; - list.add(present_recursive); - if (present_recursive) - list.add(recursive); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); return list.hashCode(); } @Override - public int compareTo(createDirectory_args other) { + public int compareTo(getUfsAddress_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetRecursive()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -16776,24 +16615,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("createDirectory_args("); + StringBuilder sb = new StringBuilder("getUfsAddress_result("); boolean first = true; - sb.append("path:"); - if (this.path == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.path); + sb.append(this.success); } first = false; - if (!first) sb.append(", "); - sb.append("recursive:"); - sb.append(this.recursive); - first = false; sb.append(")"); return sb.toString(); } @@ -16813,23 +16648,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class createDirectory_argsStandardSchemeFactory implements SchemeFactory { - public createDirectory_argsStandardScheme getScheme() { - return new createDirectory_argsStandardScheme(); + private static class getUfsAddress_resultStandardSchemeFactory implements SchemeFactory { + public getUfsAddress_resultStandardScheme getScheme() { + return new getUfsAddress_resultStandardScheme(); } } - private static class createDirectory_argsStandardScheme extends StandardScheme { + private static class getUfsAddress_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, createDirectory_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsAddress_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -16839,18 +16672,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createDirectory_arg break; } switch (schemeField.id) { - case 1: // PATH + case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // RECURSIVE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.recursive = iprot.readBool(); - struct.setRecursiveIsSet(true); + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -16866,90 +16691,74 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createDirectory_arg struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, createDirectory_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getUfsAddress_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(struct.success); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(RECURSIVE_FIELD_DESC); - oprot.writeBool(struct.recursive); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class createDirectory_argsTupleSchemeFactory implements SchemeFactory { - public createDirectory_argsTupleScheme getScheme() { - return new createDirectory_argsTupleScheme(); + private static class getUfsAddress_resultTupleSchemeFactory implements SchemeFactory { + public getUfsAddress_resultTupleScheme getScheme() { + return new getUfsAddress_resultTupleScheme(); } } - private static class createDirectory_argsTupleScheme extends TupleScheme { + private static class getUfsAddress_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createDirectory_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getUfsAddress_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetPath()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetRecursive()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetRecursive()) { - oprot.writeBool(struct.recursive); + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeString(struct.success); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createDirectory_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getUfsAddress_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(1)) { - struct.recursive = iprot.readBool(); - struct.setRecursiveIsSet(true); + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); } } } } - public static class createDirectory_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("createDirectory_result"); + public static class loadFileInfoFromUfs_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("loadFileInfoFromUfs_args"); - 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 FAEE_FIELD_DESC = new org.apache.thrift.protocol.TField("faee", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField IPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ipe", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField UFS_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("ufsPath", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new createDirectory_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new createDirectory_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new loadFileInfoFromUfs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new loadFileInfoFromUfs_argsTupleSchemeFactory()); } - public boolean success; // required - public FileAlreadyExistException faee; // required - public InvalidPathException ipe; // required + public String ufsPath; // required + public boolean recursive; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - FAEE((short)1, "faee"), - IPE((short)2, "ipe"); + UFS_PATH((short)1, "ufsPath"), + RECURSIVE((short)2, "recursive"); private static final Map byName = new HashMap(); @@ -16964,12 +16773,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // FAEE - return FAEE; - case 2: // IPE - return IPE; + case 1: // UFS_PATH + return UFS_PATH; + case 2: // RECURSIVE + return RECURSIVE; default: return null; } @@ -17010,156 +16817,116 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; + private static final int __RECURSIVE_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.UFS_PATH, new org.apache.thrift.meta_data.FieldMetaData("ufsPath", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.FAEE, new org.apache.thrift.meta_data.FieldMetaData("faee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.IPE, new org.apache.thrift.meta_data.FieldMetaData("ipe", 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(createDirectory_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(loadFileInfoFromUfs_args.class, metaDataMap); } - public createDirectory_result() { + public loadFileInfoFromUfs_args() { } - public createDirectory_result( - boolean success, - FileAlreadyExistException faee, - InvalidPathException ipe) + public loadFileInfoFromUfs_args( + String ufsPath, + boolean recursive) { this(); - this.success = success; - setSuccessIsSet(true); - this.faee = faee; - this.ipe = ipe; + this.ufsPath = ufsPath; + this.recursive = recursive; + setRecursiveIsSet(true); } /** * Performs a deep copy on other. */ - public createDirectory_result(createDirectory_result other) { + public loadFileInfoFromUfs_args(loadFileInfoFromUfs_args other) { __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetFaee()) { - this.faee = new FileAlreadyExistException(other.faee); - } - if (other.isSetIpe()) { - this.ipe = new InvalidPathException(other.ipe); + if (other.isSetUfsPath()) { + this.ufsPath = other.ufsPath; } + this.recursive = other.recursive; } - public createDirectory_result deepCopy() { - return new createDirectory_result(this); + public loadFileInfoFromUfs_args deepCopy() { + return new loadFileInfoFromUfs_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; - this.faee = null; - this.ipe = null; - } - - public boolean isSuccess() { - return this.success; - } - - public createDirectory_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + this.ufsPath = null; + setRecursiveIsSet(false); + this.recursive = false; } - public FileAlreadyExistException getFaee() { - return this.faee; + public String getUfsPath() { + return this.ufsPath; } - public createDirectory_result setFaee(FileAlreadyExistException faee) { - this.faee = faee; + public loadFileInfoFromUfs_args setUfsPath(String ufsPath) { + this.ufsPath = ufsPath; return this; } - public void unsetFaee() { - this.faee = null; + public void unsetUfsPath() { + this.ufsPath = null; } - /** Returns true if field faee is set (has been assigned a value) and false otherwise */ - public boolean isSetFaee() { - return this.faee != null; + /** Returns true if field ufsPath is set (has been assigned a value) and false otherwise */ + public boolean isSetUfsPath() { + return this.ufsPath != null; } - public void setFaeeIsSet(boolean value) { + public void setUfsPathIsSet(boolean value) { if (!value) { - this.faee = null; + this.ufsPath = null; } } - public InvalidPathException getIpe() { - return this.ipe; + public boolean isRecursive() { + return this.recursive; } - public createDirectory_result setIpe(InvalidPathException ipe) { - this.ipe = ipe; + public loadFileInfoFromUfs_args setRecursive(boolean recursive) { + this.recursive = recursive; + setRecursiveIsSet(true); return this; } - public void unsetIpe() { - this.ipe = null; + public void unsetRecursive() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID); } - /** Returns true if field ipe is set (has been assigned a value) and false otherwise */ - public boolean isSetIpe() { - return this.ipe != null; + /** Returns true if field recursive is set (has been assigned a value) and false otherwise */ + public boolean isSetRecursive() { + return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID); } - public void setIpeIsSet(boolean value) { - if (!value) { - this.ipe = null; - } + public void setRecursiveIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case FAEE: + case UFS_PATH: if (value == null) { - unsetFaee(); + unsetUfsPath(); } else { - setFaee((FileAlreadyExistException)value); + setUfsPath((String)value); } break; - case IPE: + case RECURSIVE: if (value == null) { - unsetIpe(); + unsetRecursive(); } else { - setIpe((InvalidPathException)value); + setRecursive((Boolean)value); } break; @@ -17168,14 +16935,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); - - case FAEE: - return getFaee(); + case UFS_PATH: + return getUfsPath(); - case IPE: - return getIpe(); + case RECURSIVE: + return Boolean.valueOf(isRecursive()); } throw new IllegalStateException(); @@ -17188,12 +16952,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case FAEE: - return isSetFaee(); - case IPE: - return isSetIpe(); + case UFS_PATH: + return isSetUfsPath(); + case RECURSIVE: + return isSetRecursive(); } throw new IllegalStateException(); } @@ -17202,39 +16964,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof createDirectory_result) - return this.equals((createDirectory_result)that); + if (that instanceof loadFileInfoFromUfs_args) + return this.equals((loadFileInfoFromUfs_args)that); return false; } - public boolean equals(createDirectory_result that) { + public boolean equals(loadFileInfoFromUfs_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_faee = true && this.isSetFaee(); - boolean that_present_faee = true && that.isSetFaee(); - if (this_present_faee || that_present_faee) { - if (!(this_present_faee && that_present_faee)) + boolean this_present_ufsPath = true && this.isSetUfsPath(); + boolean that_present_ufsPath = true && that.isSetUfsPath(); + if (this_present_ufsPath || that_present_ufsPath) { + if (!(this_present_ufsPath && that_present_ufsPath)) return false; - if (!this.faee.equals(that.faee)) + if (!this.ufsPath.equals(that.ufsPath)) return false; } - boolean this_present_ipe = true && this.isSetIpe(); - boolean that_present_ipe = true && that.isSetIpe(); - if (this_present_ipe || that_present_ipe) { - if (!(this_present_ipe && that_present_ipe)) + boolean this_present_recursive = true; + boolean that_present_recursive = true; + if (this_present_recursive || that_present_recursive) { + if (!(this_present_recursive && that_present_recursive)) return false; - if (!this.ipe.equals(that.ipe)) + if (this.recursive != that.recursive) return false; } @@ -17245,58 +16998,43 @@ public boolean equals(createDirectory_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_faee = true && (isSetFaee()); - list.add(present_faee); - if (present_faee) - list.add(faee); + boolean present_ufsPath = true && (isSetUfsPath()); + list.add(present_ufsPath); + if (present_ufsPath) + list.add(ufsPath); - boolean present_ipe = true && (isSetIpe()); - list.add(present_ipe); - if (present_ipe) - list.add(ipe); + boolean present_recursive = true; + list.add(present_recursive); + if (present_recursive) + list.add(recursive); return list.hashCode(); } @Override - public int compareTo(createDirectory_result other) { + public int compareTo(loadFileInfoFromUfs_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFaee()).compareTo(other.isSetFaee()); + lastComparison = Boolean.valueOf(isSetUfsPath()).compareTo(other.isSetUfsPath()); if (lastComparison != 0) { return lastComparison; } - if (isSetFaee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.faee, other.faee); + if (isSetUfsPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ufsPath, other.ufsPath); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIpe()).compareTo(other.isSetIpe()); + lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive()); if (lastComparison != 0) { return lastComparison; } - if (isSetIpe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipe, other.ipe); + if (isSetRecursive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive); if (lastComparison != 0) { return lastComparison; } @@ -17314,31 +17052,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("createDirectory_result("); + StringBuilder sb = new StringBuilder("loadFileInfoFromUfs_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("faee:"); - if (this.faee == null) { + sb.append("ufsPath:"); + if (this.ufsPath == null) { sb.append("null"); } else { - sb.append(this.faee); + sb.append(this.ufsPath); } first = false; if (!first) sb.append(", "); - sb.append("ipe:"); - if (this.ipe == null) { - sb.append("null"); - } else { - sb.append(this.ipe); - } + sb.append("recursive:"); + sb.append(this.recursive); first = false; sb.append(")"); return sb.toString(); @@ -17367,15 +17097,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class createDirectory_resultStandardSchemeFactory implements SchemeFactory { - public createDirectory_resultStandardScheme getScheme() { - return new createDirectory_resultStandardScheme(); + private static class loadFileInfoFromUfs_argsStandardSchemeFactory implements SchemeFactory { + public loadFileInfoFromUfs_argsStandardScheme getScheme() { + return new loadFileInfoFromUfs_argsStandardScheme(); } } - private static class createDirectory_resultStandardScheme extends StandardScheme { + private static class loadFileInfoFromUfs_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, createDirectory_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, loadFileInfoFromUfs_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -17385,28 +17115,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createDirectory_res break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // FAEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); + case 1: // UFS_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.ufsPath = iprot.readString(); + struct.setUfsPathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // IPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); + case 2: // RECURSIVE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.recursive = iprot.readBool(); + struct.setRecursiveIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -17422,106 +17142,87 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createDirectory_res struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, createDirectory_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, loadFileInfoFromUfs_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - if (struct.faee != null) { - oprot.writeFieldBegin(FAEE_FIELD_DESC); - struct.faee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ipe != null) { - oprot.writeFieldBegin(IPE_FIELD_DESC); - struct.ipe.write(oprot); + if (struct.ufsPath != null) { + oprot.writeFieldBegin(UFS_PATH_FIELD_DESC); + oprot.writeString(struct.ufsPath); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(RECURSIVE_FIELD_DESC); + oprot.writeBool(struct.recursive); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class createDirectory_resultTupleSchemeFactory implements SchemeFactory { - public createDirectory_resultTupleScheme getScheme() { - return new createDirectory_resultTupleScheme(); + private static class loadFileInfoFromUfs_argsTupleSchemeFactory implements SchemeFactory { + public loadFileInfoFromUfs_argsTupleScheme getScheme() { + return new loadFileInfoFromUfs_argsTupleScheme(); } } - private static class createDirectory_resultTupleScheme extends TupleScheme { + private static class loadFileInfoFromUfs_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createDirectory_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, loadFileInfoFromUfs_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetUfsPath()) { optionals.set(0); } - if (struct.isSetFaee()) { + if (struct.isSetRecursive()) { optionals.set(1); } - if (struct.isSetIpe()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - if (struct.isSetFaee()) { - struct.faee.write(oprot); + oprot.writeBitSet(optionals, 2); + if (struct.isSetUfsPath()) { + oprot.writeString(struct.ufsPath); } - if (struct.isSetIpe()) { - struct.ipe.write(oprot); + if (struct.isSetRecursive()) { + oprot.writeBool(struct.recursive); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createDirectory_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, loadFileInfoFromUfs_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); + struct.ufsPath = iprot.readString(); + struct.setUfsPathIsSet(true); } if (incoming.get(1)) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); - } - if (incoming.get(2)) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); + struct.recursive = iprot.readBool(); + struct.setRecursiveIsSet(true); } } } } - public static class free_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("free_args"); + public static class loadFileInfoFromUfs_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("loadFileInfoFromUfs_result"); - 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 RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)2); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new free_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new free_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new loadFileInfoFromUfs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new loadFileInfoFromUfs_resultTupleSchemeFactory()); } - public long fileId; // required - public boolean recursive; // required + public long success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"), - RECURSIVE((short)2, "recursive"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -17536,10 +17237,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; - case 2: // RECURSIVE - return RECURSIVE; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -17580,116 +17281,116 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; - private static final int __RECURSIVE_ISSET_ID = 1; + private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.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.I64))); - tmpMap.put(_Fields.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(free_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(loadFileInfoFromUfs_result.class, metaDataMap); } - public free_args() { + public loadFileInfoFromUfs_result() { } - public free_args( - long fileId, - boolean recursive) + public loadFileInfoFromUfs_result( + long success, + TachyonTException e) { this(); - this.fileId = fileId; - setFileIdIsSet(true); - this.recursive = recursive; - setRecursiveIsSet(true); + this.success = success; + setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public free_args(free_args other) { + public loadFileInfoFromUfs_result(loadFileInfoFromUfs_result other) { __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; - this.recursive = other.recursive; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public free_args deepCopy() { - return new free_args(this); + public loadFileInfoFromUfs_result deepCopy() { + return new loadFileInfoFromUfs_result(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; - setRecursiveIsSet(false); - this.recursive = false; + setSuccessIsSet(false); + this.success = 0; + this.e = null; } - public long getFileId() { - return this.fileId; + public long getSuccess() { + return this.success; } - public free_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public loadFileInfoFromUfs_result setSuccess(long success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public boolean isRecursive() { - return this.recursive; + public TachyonTException getE() { + return this.e; } - public free_args setRecursive(boolean recursive) { - this.recursive = recursive; - setRecursiveIsSet(true); + public loadFileInfoFromUfs_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetRecursive() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID); + public void unsetE() { + this.e = null; } - /** Returns true if field recursive is set (has been assigned a value) and false otherwise */ - public boolean isSetRecursive() { - return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID); + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setRecursiveIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value); + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SUCCESS: if (value == null) { - unsetFileId(); + unsetSuccess(); } else { - setFileId((Long)value); + setSuccess((Long)value); } break; - case RECURSIVE: + case E: if (value == null) { - unsetRecursive(); + unsetE(); } else { - setRecursive((Boolean)value); + setE((TachyonTException)value); } break; @@ -17698,11 +17399,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SUCCESS: + return Long.valueOf(getSuccess()); - case RECURSIVE: - return Boolean.valueOf(isRecursive()); + case E: + return getE(); } throw new IllegalStateException(); @@ -17715,10 +17416,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); - case RECURSIVE: - return isSetRecursive(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -17727,30 +17428,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof free_args) - return this.equals((free_args)that); + if (that instanceof loadFileInfoFromUfs_result) + return this.equals((loadFileInfoFromUfs_result)that); return false; } - public boolean equals(free_args that) { + public boolean equals(loadFileInfoFromUfs_result that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.fileId != that.fileId) + if (this.success != that.success) return false; } - boolean this_present_recursive = true; - boolean that_present_recursive = true; - if (this_present_recursive || that_present_recursive) { - if (!(this_present_recursive && that_present_recursive)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (this.recursive != that.recursive) + if (!this.e.equals(that.e)) return false; } @@ -17761,43 +17462,43 @@ public boolean equals(free_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); - boolean present_recursive = true; - list.add(present_recursive); - if (present_recursive) - list.add(recursive); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(free_args other) { + public int compareTo(loadFileInfoFromUfs_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetRecursive()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -17815,19 +17516,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("free_args("); + StringBuilder sb = new StringBuilder("loadFileInfoFromUfs_result("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("recursive:"); - sb.append(this.recursive); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } first = false; sb.append(")"); return sb.toString(); @@ -17856,15 +17561,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class free_argsStandardSchemeFactory implements SchemeFactory { - public free_argsStandardScheme getScheme() { - return new free_argsStandardScheme(); + private static class loadFileInfoFromUfs_resultStandardSchemeFactory implements SchemeFactory { + public loadFileInfoFromUfs_resultStandardScheme getScheme() { + return new loadFileInfoFromUfs_resultStandardScheme(); } } - private static class free_argsStandardScheme extends StandardScheme { + private static class loadFileInfoFromUfs_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, free_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, loadFileInfoFromUfs_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -17874,18 +17579,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, free_args struct) t break; } switch (schemeField.id) { - case 1: // FILE_ID + case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // RECURSIVE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.recursive = iprot.readBool(); - struct.setRecursiveIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -17901,85 +17607,90 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, free_args struct) t struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, free_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, loadFileInfoFromUfs_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(RECURSIVE_FIELD_DESC); - oprot.writeBool(struct.recursive); - oprot.writeFieldEnd(); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI64(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class free_argsTupleSchemeFactory implements SchemeFactory { - public free_argsTupleScheme getScheme() { - return new free_argsTupleScheme(); + private static class loadFileInfoFromUfs_resultTupleSchemeFactory implements SchemeFactory { + public loadFileInfoFromUfs_resultTupleScheme getScheme() { + return new loadFileInfoFromUfs_resultTupleScheme(); } } - private static class free_argsTupleScheme extends TupleScheme { + private static class loadFileInfoFromUfs_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, free_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, loadFileInfoFromUfs_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetRecursive()) { + if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetSuccess()) { + oprot.writeI64(struct.success); } - if (struct.isSetRecursive()) { - oprot.writeBool(struct.recursive); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, free_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, loadFileInfoFromUfs_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.recursive = iprot.readBool(); - struct.setRecursiveIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class free_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("free_result"); + public static class mount_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("mount_args"); - 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 FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField TACHYON_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("tachyonPath", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField UFS_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("ufsPath", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new free_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new free_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new mount_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mount_argsTupleSchemeFactory()); } - public boolean success; // required - public FileDoesNotExistException fdnee; // required + public String tachyonPath; // required + public String ufsPath; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - FDNEE((short)1, "fdnee"); + TACHYON_PATH((short)1, "tachyonPath"), + UFS_PATH((short)2, "ufsPath"); private static final Map byName = new HashMap(); @@ -17994,10 +17705,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // FDNEE - return FDNEE; + case 1: // TACHYON_PATH + return TACHYON_PATH; + case 2: // UFS_PATH + return UFS_PATH; default: return null; } @@ -18038,116 +17749,114 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.TACHYON_PATH, new org.apache.thrift.meta_data.FieldMetaData("tachyonPath", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.UFS_PATH, new org.apache.thrift.meta_data.FieldMetaData("ufsPath", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(free_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mount_args.class, metaDataMap); } - public free_result() { + public mount_args() { } - public free_result( - boolean success, - FileDoesNotExistException fdnee) + public mount_args( + String tachyonPath, + String ufsPath) { this(); - this.success = success; - setSuccessIsSet(true); - this.fdnee = fdnee; + this.tachyonPath = tachyonPath; + this.ufsPath = ufsPath; } /** * Performs a deep copy on other. */ - public free_result(free_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); + public mount_args(mount_args other) { + if (other.isSetTachyonPath()) { + this.tachyonPath = other.tachyonPath; + } + if (other.isSetUfsPath()) { + this.ufsPath = other.ufsPath; } } - public free_result deepCopy() { - return new free_result(this); + public mount_args deepCopy() { + return new mount_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; - this.fdnee = null; + this.tachyonPath = null; + this.ufsPath = null; } - public boolean isSuccess() { - return this.success; + public String getTachyonPath() { + return this.tachyonPath; } - public free_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); + public mount_args setTachyonPath(String tachyonPath) { + this.tachyonPath = tachyonPath; return this; } - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + public void unsetTachyonPath() { + this.tachyonPath = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + /** Returns true if field tachyonPath is set (has been assigned a value) and false otherwise */ + public boolean isSetTachyonPath() { + return this.tachyonPath != null; } - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + public void setTachyonPathIsSet(boolean value) { + if (!value) { + this.tachyonPath = null; + } } - public FileDoesNotExistException getFdnee() { - return this.fdnee; + public String getUfsPath() { + return this.ufsPath; } - public free_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; + public mount_args setUfsPath(String ufsPath) { + this.ufsPath = ufsPath; return this; } - public void unsetFdnee() { - this.fdnee = null; + public void unsetUfsPath() { + this.ufsPath = null; } - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; + /** Returns true if field ufsPath is set (has been assigned a value) and false otherwise */ + public boolean isSetUfsPath() { + return this.ufsPath != null; } - public void setFdneeIsSet(boolean value) { + public void setUfsPathIsSet(boolean value) { if (!value) { - this.fdnee = null; + this.ufsPath = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case TACHYON_PATH: if (value == null) { - unsetSuccess(); + unsetTachyonPath(); } else { - setSuccess((Boolean)value); + setTachyonPath((String)value); } break; - case FDNEE: + case UFS_PATH: if (value == null) { - unsetFdnee(); + unsetUfsPath(); } else { - setFdnee((FileDoesNotExistException)value); + setUfsPath((String)value); } break; @@ -18156,11 +17865,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); + case TACHYON_PATH: + return getTachyonPath(); - case FDNEE: - return getFdnee(); + case UFS_PATH: + return getUfsPath(); } throw new IllegalStateException(); @@ -18173,10 +17882,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case FDNEE: - return isSetFdnee(); + case TACHYON_PATH: + return isSetTachyonPath(); + case UFS_PATH: + return isSetUfsPath(); } throw new IllegalStateException(); } @@ -18185,30 +17894,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof free_result) - return this.equals((free_result)that); + if (that instanceof mount_args) + return this.equals((mount_args)that); return false; } - public boolean equals(free_result that) { + public boolean equals(mount_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_tachyonPath = true && this.isSetTachyonPath(); + boolean that_present_tachyonPath = true && that.isSetTachyonPath(); + if (this_present_tachyonPath || that_present_tachyonPath) { + if (!(this_present_tachyonPath && that_present_tachyonPath)) return false; - if (this.success != that.success) + if (!this.tachyonPath.equals(that.tachyonPath)) return false; } - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) + boolean this_present_ufsPath = true && this.isSetUfsPath(); + boolean that_present_ufsPath = true && that.isSetUfsPath(); + if (this_present_ufsPath || that_present_ufsPath) { + if (!(this_present_ufsPath && that_present_ufsPath)) return false; - if (!this.fdnee.equals(that.fdnee)) + if (!this.ufsPath.equals(that.ufsPath)) return false; } @@ -18219,43 +17928,43 @@ public boolean equals(free_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); + boolean present_tachyonPath = true && (isSetTachyonPath()); + list.add(present_tachyonPath); + if (present_tachyonPath) + list.add(tachyonPath); - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); + boolean present_ufsPath = true && (isSetUfsPath()); + list.add(present_ufsPath); + if (present_ufsPath) + list.add(ufsPath); return list.hashCode(); } @Override - public int compareTo(free_result other) { + public int compareTo(mount_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetTachyonPath()).compareTo(other.isSetTachyonPath()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetTachyonPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tachyonPath, other.tachyonPath); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); + lastComparison = Boolean.valueOf(isSetUfsPath()).compareTo(other.isSetUfsPath()); if (lastComparison != 0) { return lastComparison; } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); + if (isSetUfsPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ufsPath, other.ufsPath); if (lastComparison != 0) { return lastComparison; } @@ -18273,22 +17982,26 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("free_result("); + StringBuilder sb = new StringBuilder("mount_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); + sb.append("tachyonPath:"); + if (this.tachyonPath == null) { + sb.append("null"); + } else { + sb.append(this.tachyonPath); + } first = false; if (!first) sb.append(", "); - sb.append("fdnee:"); - if (this.fdnee == null) { + sb.append("ufsPath:"); + if (this.ufsPath == null) { sb.append("null"); } else { - sb.append(this.fdnee); + sb.append(this.ufsPath); } first = false; sb.append(")"); @@ -18310,23 +18023,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class free_resultStandardSchemeFactory implements SchemeFactory { - public free_resultStandardScheme getScheme() { - return new free_resultStandardScheme(); + private static class mount_argsStandardSchemeFactory implements SchemeFactory { + public mount_argsStandardScheme getScheme() { + return new mount_argsStandardScheme(); } } - private static class free_resultStandardScheme extends StandardScheme { + private static class mount_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, free_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, mount_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -18336,19 +18047,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, free_result struct) break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); + case 1: // TACHYON_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tachyonPath = iprot.readString(); + struct.setTachyonPathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + case 2: // UFS_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.ufsPath = iprot.readString(); + struct.setUfsPathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -18364,18 +18074,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, free_result struct) struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, free_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, mount_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); + if (struct.tachyonPath != null) { + oprot.writeFieldBegin(TACHYON_PATH_FIELD_DESC); + oprot.writeString(struct.tachyonPath); oprot.writeFieldEnd(); } - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); + if (struct.ufsPath != null) { + oprot.writeFieldBegin(UFS_PATH_FIELD_DESC); + oprot.writeString(struct.ufsPath); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -18384,70 +18094,72 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, free_result struct } - private static class free_resultTupleSchemeFactory implements SchemeFactory { - public free_resultTupleScheme getScheme() { - return new free_resultTupleScheme(); + private static class mount_argsTupleSchemeFactory implements SchemeFactory { + public mount_argsTupleScheme getScheme() { + return new mount_argsTupleScheme(); } } - private static class free_resultTupleScheme extends TupleScheme { + private static class mount_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, free_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, mount_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetTachyonPath()) { optionals.set(0); } - if (struct.isSetFdnee()) { + if (struct.isSetUfsPath()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); + if (struct.isSetTachyonPath()) { + oprot.writeString(struct.tachyonPath); } - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); + if (struct.isSetUfsPath()) { + oprot.writeString(struct.ufsPath); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, free_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, mount_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); + struct.tachyonPath = iprot.readString(); + struct.setTachyonPathIsSet(true); } if (incoming.get(1)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + struct.ufsPath = iprot.readString(); + struct.setUfsPathIsSet(true); } } } } - 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"); + public static class mount_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("mount_result"); - 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 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_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IOE_FIELD_DESC = new org.apache.thrift.protocol.TField("ioe", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new persistFile_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new persistFile_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new mount_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mount_resultTupleSchemeFactory()); } - public long fileId; // required - public long length; // required + public boolean success; // required + public TachyonTException e; // required + public ThriftIOException ioe; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"), - LENGTH((short)2, "length"); + SUCCESS((short)0, "success"), + E((short)1, "e"), + IOE((short)2, "ioe"); private static final Map byName = new HashMap(); @@ -18462,10 +18174,12 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; - case 2: // LENGTH - return LENGTH; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; + case 2: // IOE + return IOE; default: return null; } @@ -18506,116 +18220,156 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; - private static final int __LENGTH_ISSET_ID = 1; + private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - 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))); + 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IOE, new org.apache.thrift.meta_data.FieldMetaData("ioe", 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(persistFile_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mount_result.class, metaDataMap); } - public persistFile_args() { + public mount_result() { } - public persistFile_args( - long fileId, - long length) + public mount_result( + boolean success, + TachyonTException e, + ThriftIOException ioe) { this(); - this.fileId = fileId; - setFileIdIsSet(true); - this.length = length; - setLengthIsSet(true); + this.success = success; + setSuccessIsSet(true); + this.e = e; + this.ioe = ioe; } /** * Performs a deep copy on other. */ - public persistFile_args(persistFile_args other) { + public mount_result(mount_result other) { __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; - this.length = other.length; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } + if (other.isSetIoe()) { + this.ioe = new ThriftIOException(other.ioe); + } + } + + public mount_result deepCopy() { + return new mount_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.e = null; + this.ioe = null; + } + + public boolean isSuccess() { + return this.success; + } + + public mount_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public persistFile_args deepCopy() { - return new persistFile_args(this); + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - @Override - public void clear() { - setFileIdIsSet(false); - this.fileId = 0; - setLengthIsSet(false); - this.length = 0; + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public long getFileId() { - return this.fileId; + public TachyonTException getE() { + return this.e; } - public persistFile_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public mount_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetE() { + this.e = null; } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } - public long getLength() { - return this.length; + public ThriftIOException getIoe() { + return this.ioe; } - public persistFile_args setLength(long length) { - this.length = length; - setLengthIsSet(true); + public mount_result setIoe(ThriftIOException ioe) { + this.ioe = ioe; return this; } - public void unsetLength() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LENGTH_ISSET_ID); + public void unsetIoe() { + this.ioe = null; } - /** Returns true if field length is set (has been assigned a value) and false otherwise */ - public boolean isSetLength() { - return EncodingUtils.testBit(__isset_bitfield, __LENGTH_ISSET_ID); + /** Returns true if field ioe is set (has been assigned a value) and false otherwise */ + public boolean isSetIoe() { + return this.ioe != null; } - public void setLengthIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LENGTH_ISSET_ID, value); + public void setIoeIsSet(boolean value) { + if (!value) { + this.ioe = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SUCCESS: if (value == null) { - unsetFileId(); + unsetSuccess(); } else { - setFileId((Long)value); + setSuccess((Boolean)value); } break; - case LENGTH: + case E: if (value == null) { - unsetLength(); + unsetE(); } else { - setLength((Long)value); + setE((TachyonTException)value); + } + break; + + case IOE: + if (value == null) { + unsetIoe(); + } else { + setIoe((ThriftIOException)value); } break; @@ -18624,11 +18378,14 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SUCCESS: + return Boolean.valueOf(isSuccess()); - case LENGTH: - return Long.valueOf(getLength()); + case E: + return getE(); + + case IOE: + return getIoe(); } throw new IllegalStateException(); @@ -18641,10 +18398,12 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); - case LENGTH: - return isSetLength(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); + case IOE: + return isSetIoe(); } throw new IllegalStateException(); } @@ -18653,30 +18412,39 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof persistFile_args) - return this.equals((persistFile_args)that); + if (that instanceof mount_result) + return this.equals((mount_result)that); return false; } - public boolean equals(persistFile_args that) { + public boolean equals(mount_result that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (this.fileId != that.fileId) + if (this.success != that.success) return false; } - boolean this_present_length = true; - boolean that_present_length = true; - if (this_present_length || that_present_length) { - if (!(this_present_length && that_present_length)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (this.length != that.length) + if (!this.e.equals(that.e)) + return false; + } + + boolean this_present_ioe = true && this.isSetIoe(); + boolean that_present_ioe = true && that.isSetIoe(); + if (this_present_ioe || that_present_ioe) { + if (!(this_present_ioe && that_present_ioe)) + return false; + if (!this.ioe.equals(that.ioe)) return false; } @@ -18687,43 +18455,58 @@ public boolean equals(persistFile_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); - boolean present_length = true; - list.add(present_length); - if (present_length) - list.add(length); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); + + boolean present_ioe = true && (isSetIoe()); + list.add(present_ioe); + if (present_ioe) + list.add(ioe); return list.hashCode(); } @Override - public int compareTo(persistFile_args other) { + public int compareTo(mount_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetLength()).compareTo(other.isSetLength()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetLength()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.length, other.length); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIoe()).compareTo(other.isSetIoe()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIoe()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioe, other.ioe); if (lastComparison != 0) { return lastComparison; } @@ -18741,19 +18524,31 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("persistFile_args("); + StringBuilder sb = new StringBuilder("mount_result("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("length:"); - sb.append(this.length); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } + first = false; + if (!first) sb.append(", "); + sb.append("ioe:"); + if (this.ioe == null) { + sb.append("null"); + } else { + sb.append(this.ioe); + } first = false; sb.append(")"); return sb.toString(); @@ -18782,15 +18577,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class persistFile_argsStandardSchemeFactory implements SchemeFactory { - public persistFile_argsStandardScheme getScheme() { - return new persistFile_argsStandardScheme(); + private static class mount_resultStandardSchemeFactory implements SchemeFactory { + public mount_resultStandardScheme getScheme() { + return new mount_resultStandardScheme(); } } - private static class persistFile_argsStandardScheme extends StandardScheme { + private static class mount_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, mount_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -18800,18 +18595,28 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_args st break; } switch (schemeField.id) { - case 1: // FILE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // LENGTH - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.length = iprot.readI64(); - struct.setLengthIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IOE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -18827,91 +18632,106 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_args st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, persistFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, mount_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LENGTH_FIELD_DESC); - oprot.writeI64(struct.length); - oprot.writeFieldEnd(); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ioe != null) { + oprot.writeFieldBegin(IOE_FIELD_DESC); + struct.ioe.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class persistFile_argsTupleSchemeFactory implements SchemeFactory { - public persistFile_argsTupleScheme getScheme() { - return new persistFile_argsTupleScheme(); + private static class mount_resultTupleSchemeFactory implements SchemeFactory { + public mount_resultTupleScheme getScheme() { + return new mount_resultTupleScheme(); } } - private static class persistFile_argsTupleScheme extends TupleScheme { + private static class mount_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, persistFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, mount_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetLength()) { + if (struct.isSetE()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetIoe()) { + optionals.set(2); } - if (struct.isSetLength()) { - oprot.writeI64(struct.length); + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetE()) { + struct.e.write(oprot); + } + if (struct.isSetIoe()) { + struct.ioe.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, persistFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, mount_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.length = iprot.readI64(); - struct.setLengthIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } + if (incoming.get(2)) { + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } } } } - 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"); + 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 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); - private static final org.apache.thrift.protocol.TField E_S_FIELD_DESC = new org.apache.thrift.protocol.TField("eS", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField E_B_FIELD_DESC = new org.apache.thrift.protocol.TField("eB", org.apache.thrift.protocol.TType.STRUCT, (short)3); + 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 persistFile_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new persistFile_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new persistFile_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new persistFile_argsTupleSchemeFactory()); } - public boolean success; // required - public FileDoesNotExistException eP; // required - public SuspectedFileSizeException eS; // required - public BlockInfoException eB; // required + public long fileId; // required + public long length; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - E_P((short)1, "eP"), - E_S((short)2, "eS"), - E_B((short)3, "eB"); + FILE_ID((short)1, "fileId"), + LENGTH((short)2, "length"); private static final Map byName = new HashMap(); @@ -18926,14 +18746,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // E_P - return E_P; - case 2: // E_S - return E_S; - case 3: // E_B - return E_B; + case 1: // FILE_ID + return FILE_ID; + case 2: // LENGTH + return LENGTH; default: return null; } @@ -18974,196 +18790,116 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; + private static final int __FILEID_ISSET_ID = 0; + private static final int __LENGTH_ISSET_ID = 1; private byte __isset_bitfield = 0; 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, - 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, - 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, - 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + 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(persistFile_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(persistFile_args.class, metaDataMap); } - public persistFile_result() { + public persistFile_args() { } - public persistFile_result( - boolean success, - FileDoesNotExistException eP, - SuspectedFileSizeException eS, - BlockInfoException eB) + public persistFile_args( + long fileId, + long length) { this(); - this.success = success; - setSuccessIsSet(true); - this.eP = eP; - this.eS = eS; - this.eB = eB; + this.fileId = fileId; + setFileIdIsSet(true); + this.length = length; + setLengthIsSet(true); } /** * Performs a deep copy on other. */ - public persistFile_result(persistFile_result other) { + public persistFile_args(persistFile_args other) { __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetEP()) { - this.eP = new FileDoesNotExistException(other.eP); - } - if (other.isSetES()) { - this.eS = new SuspectedFileSizeException(other.eS); - } - if (other.isSetEB()) { - this.eB = new BlockInfoException(other.eB); - } + this.fileId = other.fileId; + this.length = other.length; } - public persistFile_result deepCopy() { - return new persistFile_result(this); + public persistFile_args deepCopy() { + return new persistFile_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; - this.eP = null; - this.eS = null; - this.eB = null; - } - - public boolean isSuccess() { - return this.success; - } - - public persistFile_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public FileDoesNotExistException getEP() { - return this.eP; - } - - public persistFile_result setEP(FileDoesNotExistException eP) { - this.eP = eP; - return this; - } - - public void unsetEP() { - this.eP = null; - } - - /** Returns true if field eP is set (has been assigned a value) and false otherwise */ - public boolean isSetEP() { - return this.eP != null; - } - - public void setEPIsSet(boolean value) { - if (!value) { - this.eP = null; - } + setFileIdIsSet(false); + this.fileId = 0; + setLengthIsSet(false); + this.length = 0; } - public SuspectedFileSizeException getES() { - return this.eS; + public long getFileId() { + return this.fileId; } - public persistFile_result setES(SuspectedFileSizeException eS) { - this.eS = eS; + public persistFile_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetES() { - this.eS = null; + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field eS is set (has been assigned a value) and false otherwise */ - public boolean isSetES() { - return this.eS != null; + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setESIsSet(boolean value) { - if (!value) { - this.eS = null; - } + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } - public BlockInfoException getEB() { - return this.eB; + public long getLength() { + return this.length; } - public persistFile_result setEB(BlockInfoException eB) { - this.eB = eB; + public persistFile_args setLength(long length) { + this.length = length; + setLengthIsSet(true); return this; } - public void unsetEB() { - this.eB = null; + public void unsetLength() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LENGTH_ISSET_ID); } - /** Returns true if field eB is set (has been assigned a value) and false otherwise */ - public boolean isSetEB() { - return this.eB != null; + /** Returns true if field length is set (has been assigned a value) and false otherwise */ + public boolean isSetLength() { + return EncodingUtils.testBit(__isset_bitfield, __LENGTH_ISSET_ID); } - public void setEBIsSet(boolean value) { - if (!value) { - this.eB = null; - } + public void setLengthIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LENGTH_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case E_P: - if (value == null) { - unsetEP(); - } else { - setEP((FileDoesNotExistException)value); - } - break; - - case E_S: + case FILE_ID: if (value == null) { - unsetES(); + unsetFileId(); } else { - setES((SuspectedFileSizeException)value); + setFileId((Long)value); } break; - case E_B: + case LENGTH: if (value == null) { - unsetEB(); + unsetLength(); } else { - setEB((BlockInfoException)value); + setLength((Long)value); } break; @@ -19172,17 +18908,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); - - case E_P: - return getEP(); - - case E_S: - return getES(); + case FILE_ID: + return Long.valueOf(getFileId()); - case E_B: - return getEB(); + case LENGTH: + return Long.valueOf(getLength()); } throw new IllegalStateException(); @@ -19195,14 +18925,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case E_P: - return isSetEP(); - case E_S: - return isSetES(); - case E_B: - return isSetEB(); + case FILE_ID: + return isSetFileId(); + case LENGTH: + return isSetLength(); } throw new IllegalStateException(); } @@ -19211,48 +18937,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof persistFile_result) - return this.equals((persistFile_result)that); + if (that instanceof persistFile_args) + return this.equals((persistFile_args)that); return false; } - public boolean equals(persistFile_result that) { + public boolean equals(persistFile_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_eP = true && this.isSetEP(); - boolean that_present_eP = true && that.isSetEP(); - if (this_present_eP || that_present_eP) { - if (!(this_present_eP && that_present_eP)) - return false; - if (!this.eP.equals(that.eP)) - return false; - } - - boolean this_present_eS = true && this.isSetES(); - boolean that_present_eS = true && that.isSetES(); - if (this_present_eS || that_present_eS) { - if (!(this_present_eS && that_present_eS)) + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (!this.eS.equals(that.eS)) + if (this.fileId != that.fileId) return false; } - boolean this_present_eB = true && this.isSetEB(); - boolean that_present_eB = true && that.isSetEB(); - if (this_present_eB || that_present_eB) { - if (!(this_present_eB && that_present_eB)) + boolean this_present_length = true; + boolean that_present_length = true; + if (this_present_length || that_present_length) { + if (!(this_present_length && that_present_length)) return false; - if (!this.eB.equals(that.eB)) + if (this.length != that.length) return false; } @@ -19263,73 +18971,43 @@ public boolean equals(persistFile_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_eP = true && (isSetEP()); - list.add(present_eP); - if (present_eP) - list.add(eP); - - boolean present_eS = true && (isSetES()); - list.add(present_eS); - if (present_eS) - list.add(eS); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); - boolean present_eB = true && (isSetEB()); - list.add(present_eB); - if (present_eB) - list.add(eB); + boolean present_length = true; + list.add(present_length); + if (present_length) + list.add(length); return list.hashCode(); } @Override - public int compareTo(persistFile_result other) { + public int compareTo(persistFile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEP()).compareTo(other.isSetEP()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEP()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eP, other.eP); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetES()).compareTo(other.isSetES()); + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetES()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eS, other.eS); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetEB()).compareTo(other.isSetEB()); + lastComparison = Boolean.valueOf(isSetLength()).compareTo(other.isSetLength()); if (lastComparison != 0) { return lastComparison; } - if (isSetEB()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eB, other.eB); + if (isSetLength()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.length, other.length); if (lastComparison != 0) { return lastComparison; } @@ -19347,39 +19025,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("persistFile_result("); + StringBuilder sb = new StringBuilder("persistFile_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("eP:"); - if (this.eP == null) { - sb.append("null"); - } else { - sb.append(this.eP); - } - first = false; - if (!first) sb.append(", "); - sb.append("eS:"); - if (this.eS == null) { - sb.append("null"); - } else { - sb.append(this.eS); - } + sb.append("fileId:"); + sb.append(this.fileId); first = false; if (!first) sb.append(", "); - sb.append("eB:"); - if (this.eB == null) { - sb.append("null"); - } else { - sb.append(this.eB); - } + sb.append("length:"); + sb.append(this.length); first = false; sb.append(")"); return sb.toString(); @@ -19408,55 +19066,36 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class persistFile_resultStandardSchemeFactory implements SchemeFactory { - public persistFile_resultStandardScheme getScheme() { - return new persistFile_resultStandardScheme(); + private static class persistFile_argsStandardSchemeFactory implements SchemeFactory { + public persistFile_argsStandardScheme getScheme() { + return new persistFile_argsStandardScheme(); } } - private static class persistFile_resultStandardScheme extends StandardScheme { + private static class persistFile_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // E_P - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eP = new FileDoesNotExistException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // E_S - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eS = new SuspectedFileSizeException(); - struct.eS.read(iprot); - struct.setESIsSet(true); + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // FILE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // E_B - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eB = new BlockInfoException(); - struct.eB.read(iprot); - struct.setEBIsSet(true); + case 2: // LENGTH + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.length = iprot.readI64(); + struct.setLengthIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -19472,122 +19111,85 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, persistFile_result 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); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - if (struct.eP != null) { - oprot.writeFieldBegin(E_P_FIELD_DESC); - struct.eP.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.eS != null) { - oprot.writeFieldBegin(E_S_FIELD_DESC); - struct.eS.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.eB != null) { - oprot.writeFieldBegin(E_B_FIELD_DESC); - struct.eB.write(oprot); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LENGTH_FIELD_DESC); + oprot.writeI64(struct.length); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class persistFile_resultTupleSchemeFactory implements SchemeFactory { - public persistFile_resultTupleScheme getScheme() { - return new persistFile_resultTupleScheme(); + private static class persistFile_argsTupleSchemeFactory implements SchemeFactory { + public persistFile_argsTupleScheme getScheme() { + return new persistFile_argsTupleScheme(); } } - private static class persistFile_resultTupleScheme extends TupleScheme { + private static class persistFile_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, persistFile_result 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.isSetSuccess()) { + if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetEP()) { + if (struct.isSetLength()) { optionals.set(1); } - if (struct.isSetES()) { - optionals.set(2); - } - if (struct.isSetEB()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - if (struct.isSetEP()) { - struct.eP.write(oprot); - } - if (struct.isSetES()) { - struct.eS.write(oprot); + oprot.writeBitSet(optionals, 2); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); } - if (struct.isSetEB()) { - struct.eB.write(oprot); + if (struct.isSetLength()) { + oprot.writeI64(struct.length); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, persistFile_result 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(4); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } if (incoming.get(1)) { - struct.eP = new FileDoesNotExistException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); - } - if (incoming.get(2)) { - struct.eS = new SuspectedFileSizeException(); - struct.eS.read(iprot); - struct.setESIsSet(true); - } - if (incoming.get(3)) { - struct.eB = new BlockInfoException(); - struct.eB.read(iprot); - struct.setEBIsSet(true); + struct.length = iprot.readI64(); + struct.setLengthIsSet(true); } } } } - public static class loadFileInfoFromUfs_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("loadFileInfoFromUfs_args"); + 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 UFS_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("ufsPath", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)2); + 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_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new loadFileInfoFromUfs_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new loadFileInfoFromUfs_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new persistFile_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new persistFile_resultTupleSchemeFactory()); } - public String ufsPath; // required - public boolean recursive; // required + public boolean success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - UFS_PATH((short)1, "ufsPath"), - RECURSIVE((short)2, "recursive"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -19602,10 +19204,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // UFS_PATH - return UFS_PATH; - case 2: // RECURSIVE - return RECURSIVE; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -19646,116 +19248,116 @@ public String getFieldName() { } // isset id assignments - private static final int __RECURSIVE_ISSET_ID = 0; + private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.UFS_PATH, new org.apache.thrift.meta_data.FieldMetaData("ufsPath", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(loadFileInfoFromUfs_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(persistFile_result.class, metaDataMap); } - public loadFileInfoFromUfs_args() { + public persistFile_result() { } - public loadFileInfoFromUfs_args( - String ufsPath, - boolean recursive) + public persistFile_result( + boolean success, + TachyonTException e) { this(); - this.ufsPath = ufsPath; - this.recursive = recursive; - setRecursiveIsSet(true); + this.success = success; + setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public loadFileInfoFromUfs_args(loadFileInfoFromUfs_args other) { + public persistFile_result(persistFile_result other) { __isset_bitfield = other.__isset_bitfield; - if (other.isSetUfsPath()) { - this.ufsPath = other.ufsPath; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } - this.recursive = other.recursive; } - public loadFileInfoFromUfs_args deepCopy() { - return new loadFileInfoFromUfs_args(this); + public persistFile_result deepCopy() { + return new persistFile_result(this); } @Override public void clear() { - this.ufsPath = null; - setRecursiveIsSet(false); - this.recursive = false; + setSuccessIsSet(false); + this.success = false; + this.e = null; } - public String getUfsPath() { - return this.ufsPath; + public boolean isSuccess() { + return this.success; } - public loadFileInfoFromUfs_args setUfsPath(String ufsPath) { - this.ufsPath = ufsPath; + public persistFile_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetUfsPath() { - this.ufsPath = null; + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field ufsPath is set (has been assigned a value) and false otherwise */ - public boolean isSetUfsPath() { - return this.ufsPath != null; + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setUfsPathIsSet(boolean value) { - if (!value) { - this.ufsPath = null; - } + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public boolean isRecursive() { - return this.recursive; + public TachyonTException getE() { + return this.e; } - public loadFileInfoFromUfs_args setRecursive(boolean recursive) { - this.recursive = recursive; - setRecursiveIsSet(true); + public persistFile_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetRecursive() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID); + public void unsetE() { + this.e = null; } - /** Returns true if field recursive is set (has been assigned a value) and false otherwise */ - public boolean isSetRecursive() { - return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID); + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setRecursiveIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value); + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case UFS_PATH: + case SUCCESS: if (value == null) { - unsetUfsPath(); + unsetSuccess(); } else { - setUfsPath((String)value); + setSuccess((Boolean)value); } break; - case RECURSIVE: + case E: if (value == null) { - unsetRecursive(); + unsetE(); } else { - setRecursive((Boolean)value); + setE((TachyonTException)value); } break; @@ -19764,11 +19366,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case UFS_PATH: - return getUfsPath(); + case SUCCESS: + return Boolean.valueOf(isSuccess()); - case RECURSIVE: - return Boolean.valueOf(isRecursive()); + case E: + return getE(); } throw new IllegalStateException(); @@ -19781,10 +19383,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case UFS_PATH: - return isSetUfsPath(); - case RECURSIVE: - return isSetRecursive(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -19793,30 +19395,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof loadFileInfoFromUfs_args) - return this.equals((loadFileInfoFromUfs_args)that); + if (that instanceof persistFile_result) + return this.equals((persistFile_result)that); return false; } - public boolean equals(loadFileInfoFromUfs_args that) { + public boolean equals(persistFile_result that) { if (that == null) return false; - boolean this_present_ufsPath = true && this.isSetUfsPath(); - boolean that_present_ufsPath = true && that.isSetUfsPath(); - if (this_present_ufsPath || that_present_ufsPath) { - if (!(this_present_ufsPath && that_present_ufsPath)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.ufsPath.equals(that.ufsPath)) + if (this.success != that.success) return false; } - boolean this_present_recursive = true; - boolean that_present_recursive = true; - if (this_present_recursive || that_present_recursive) { - if (!(this_present_recursive && that_present_recursive)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (this.recursive != that.recursive) + if (!this.e.equals(that.e)) return false; } @@ -19827,43 +19429,43 @@ public boolean equals(loadFileInfoFromUfs_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_ufsPath = true && (isSetUfsPath()); - list.add(present_ufsPath); - if (present_ufsPath) - list.add(ufsPath); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); - boolean present_recursive = true; - list.add(present_recursive); - if (present_recursive) - list.add(recursive); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(loadFileInfoFromUfs_args other) { + public int compareTo(persistFile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetUfsPath()).compareTo(other.isSetUfsPath()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetUfsPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ufsPath, other.ufsPath); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetRecursive()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -19881,24 +19483,24 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("loadFileInfoFromUfs_args("); + StringBuilder sb = new StringBuilder("persistFile_result("); boolean first = true; - sb.append("ufsPath:"); - if (this.ufsPath == null) { + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.ufsPath); + sb.append(this.e); } first = false; - if (!first) sb.append(", "); - sb.append("recursive:"); - sb.append(this.recursive); - first = false; sb.append(")"); return sb.toString(); } @@ -19926,15 +19528,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class loadFileInfoFromUfs_argsStandardSchemeFactory implements SchemeFactory { - public loadFileInfoFromUfs_argsStandardScheme getScheme() { - return new loadFileInfoFromUfs_argsStandardScheme(); + private static class persistFile_resultStandardSchemeFactory implements SchemeFactory { + public persistFile_resultStandardScheme getScheme() { + return new persistFile_resultStandardScheme(); } } - private static class loadFileInfoFromUfs_argsStandardScheme extends StandardScheme { + private static class persistFile_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, loadFileInfoFromUfs_args 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) @@ -19944,18 +19546,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, loadFileInfoFromUfs break; } switch (schemeField.id) { - case 1: // UFS_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.ufsPath = iprot.readString(); - struct.setUfsPathIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // RECURSIVE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.recursive = iprot.readBool(); - struct.setRecursiveIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -19971,102 +19574,90 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, loadFileInfoFromUfs struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, loadFileInfoFromUfs_args 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); - if (struct.ufsPath != null) { - oprot.writeFieldBegin(UFS_PATH_FIELD_DESC); - oprot.writeString(struct.ufsPath); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(RECURSIVE_FIELD_DESC); - oprot.writeBool(struct.recursive); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class loadFileInfoFromUfs_argsTupleSchemeFactory implements SchemeFactory { - public loadFileInfoFromUfs_argsTupleScheme getScheme() { - return new loadFileInfoFromUfs_argsTupleScheme(); + private static class persistFile_resultTupleSchemeFactory implements SchemeFactory { + public persistFile_resultTupleScheme getScheme() { + return new persistFile_resultTupleScheme(); } } - private static class loadFileInfoFromUfs_argsTupleScheme extends TupleScheme { + private static class persistFile_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, loadFileInfoFromUfs_args 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.isSetUfsPath()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetRecursive()) { + if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetUfsPath()) { - oprot.writeString(struct.ufsPath); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); } - if (struct.isSetRecursive()) { - oprot.writeBool(struct.recursive); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, loadFileInfoFromUfs_args 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(2); if (incoming.get(0)) { - struct.ufsPath = iprot.readString(); - struct.setUfsPathIsSet(true); + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.recursive = iprot.readBool(); - struct.setRecursiveIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class loadFileInfoFromUfs_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("loadFileInfoFromUfs_result"); + public static class renameFile_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("renameFile_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); - private static final org.apache.thrift.protocol.TField BIE_FIELD_DESC = new org.apache.thrift.protocol.TField("bie", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField FAEE_FIELD_DESC = new org.apache.thrift.protocol.TField("faee", org.apache.thrift.protocol.TType.STRUCT, (short)3); - private static final org.apache.thrift.protocol.TField IPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ipe", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private static final org.apache.thrift.protocol.TField SFSE_FIELD_DESC = new org.apache.thrift.protocol.TField("sfse", org.apache.thrift.protocol.TType.STRUCT, (short)5); - private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)6); + 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 DST_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("dstPath", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new loadFileInfoFromUfs_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new loadFileInfoFromUfs_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new renameFile_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new renameFile_argsTupleSchemeFactory()); } - public long success; // required - public BlockInfoException bie; // required - public FileDoesNotExistException fdnee; // required - public FileAlreadyExistException faee; // required - public InvalidPathException ipe; // required - public SuspectedFileSizeException sfse; // required - public TachyonException te; // required + public long fileId; // required + public String dstPath; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - BIE((short)1, "bie"), - FDNEE((short)2, "fdnee"), - FAEE((short)3, "faee"), - IPE((short)4, "ipe"), - SFSE((short)5, "sfse"), - TE((short)6, "te"); + FILE_ID((short)1, "fileId"), + DST_PATH((short)2, "dstPath"); private static final Map byName = new HashMap(); @@ -20081,20 +19672,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // BIE - return BIE; - case 2: // FDNEE - return FDNEE; - case 3: // FAEE - return FAEE; - case 4: // IPE - return IPE; - case 5: // SFSE - return SFSE; - case 6: // TE - return TE; + case 1: // FILE_ID + return FILE_ID; + case 2: // DST_PATH + return DST_PATH; default: return null; } @@ -20135,316 +19716,116 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; + private static final int __FILEID_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.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.BIE, new org.apache.thrift.meta_data.FieldMetaData("bie", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.FAEE, new org.apache.thrift.meta_data.FieldMetaData("faee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.IPE, new org.apache.thrift.meta_data.FieldMetaData("ipe", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.SFSE, new org.apache.thrift.meta_data.FieldMetaData("sfse", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.DST_PATH, new org.apache.thrift.meta_data.FieldMetaData("dstPath", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(loadFileInfoFromUfs_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(renameFile_args.class, metaDataMap); } - public loadFileInfoFromUfs_result() { + public renameFile_args() { } - public loadFileInfoFromUfs_result( - long success, - BlockInfoException bie, - FileDoesNotExistException fdnee, - FileAlreadyExistException faee, - InvalidPathException ipe, - SuspectedFileSizeException sfse, - TachyonException te) + public renameFile_args( + long fileId, + String dstPath) { this(); - this.success = success; - setSuccessIsSet(true); - this.bie = bie; - this.fdnee = fdnee; - this.faee = faee; - this.ipe = ipe; - this.sfse = sfse; - this.te = te; + this.fileId = fileId; + setFileIdIsSet(true); + this.dstPath = dstPath; } /** * Performs a deep copy on other. */ - public loadFileInfoFromUfs_result(loadFileInfoFromUfs_result other) { + public renameFile_args(renameFile_args other) { __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetBie()) { - this.bie = new BlockInfoException(other.bie); - } - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); - } - if (other.isSetFaee()) { - this.faee = new FileAlreadyExistException(other.faee); - } - if (other.isSetIpe()) { - this.ipe = new InvalidPathException(other.ipe); - } - if (other.isSetSfse()) { - this.sfse = new SuspectedFileSizeException(other.sfse); - } - if (other.isSetTe()) { - this.te = new TachyonException(other.te); + this.fileId = other.fileId; + if (other.isSetDstPath()) { + this.dstPath = other.dstPath; } } - public loadFileInfoFromUfs_result deepCopy() { - return new loadFileInfoFromUfs_result(this); + public renameFile_args deepCopy() { + return new renameFile_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.bie = null; - this.fdnee = null; - this.faee = null; - this.ipe = null; - this.sfse = null; - this.te = null; - } - - public long getSuccess() { - return this.success; - } - - public loadFileInfoFromUfs_result setSuccess(long success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public BlockInfoException getBie() { - return this.bie; - } - - public loadFileInfoFromUfs_result setBie(BlockInfoException bie) { - this.bie = bie; - return this; - } - - public void unsetBie() { - this.bie = null; - } - - /** Returns true if field bie is set (has been assigned a value) and false otherwise */ - public boolean isSetBie() { - return this.bie != null; - } - - public void setBieIsSet(boolean value) { - if (!value) { - this.bie = null; - } - } - - public FileDoesNotExistException getFdnee() { - return this.fdnee; - } - - public loadFileInfoFromUfs_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; - return this; - } - - public void unsetFdnee() { - this.fdnee = null; - } - - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; - } - - public void setFdneeIsSet(boolean value) { - if (!value) { - this.fdnee = null; - } - } - - public FileAlreadyExistException getFaee() { - return this.faee; - } - - public loadFileInfoFromUfs_result setFaee(FileAlreadyExistException faee) { - this.faee = faee; - return this; - } - - public void unsetFaee() { - this.faee = null; - } - - /** Returns true if field faee is set (has been assigned a value) and false otherwise */ - public boolean isSetFaee() { - return this.faee != null; - } - - public void setFaeeIsSet(boolean value) { - if (!value) { - this.faee = null; - } - } - - public InvalidPathException getIpe() { - return this.ipe; - } - - public loadFileInfoFromUfs_result setIpe(InvalidPathException ipe) { - this.ipe = ipe; - return this; - } - - public void unsetIpe() { - this.ipe = null; - } - - /** Returns true if field ipe is set (has been assigned a value) and false otherwise */ - public boolean isSetIpe() { - return this.ipe != null; - } - - public void setIpeIsSet(boolean value) { - if (!value) { - this.ipe = null; - } + setFileIdIsSet(false); + this.fileId = 0; + this.dstPath = null; } - public SuspectedFileSizeException getSfse() { - return this.sfse; + public long getFileId() { + return this.fileId; } - public loadFileInfoFromUfs_result setSfse(SuspectedFileSizeException sfse) { - this.sfse = sfse; + public renameFile_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetSfse() { - this.sfse = null; + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field sfse is set (has been assigned a value) and false otherwise */ - public boolean isSetSfse() { - return this.sfse != null; + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setSfseIsSet(boolean value) { - if (!value) { - this.sfse = null; - } + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } - public TachyonException getTe() { - return this.te; + public String getDstPath() { + return this.dstPath; } - public loadFileInfoFromUfs_result setTe(TachyonException te) { - this.te = te; + public renameFile_args setDstPath(String dstPath) { + this.dstPath = dstPath; return this; } - public void unsetTe() { - this.te = null; - } - - /** Returns true if field te is set (has been assigned a value) and false otherwise */ - public boolean isSetTe() { - return this.te != null; - } - - public void setTeIsSet(boolean value) { - if (!value) { - this.te = null; - } + public void unsetDstPath() { + this.dstPath = null; } - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Long)value); - } - break; - - case BIE: - if (value == null) { - unsetBie(); - } else { - setBie((BlockInfoException)value); - } - break; - - case FDNEE: - if (value == null) { - unsetFdnee(); - } else { - setFdnee((FileDoesNotExistException)value); - } - break; - - case FAEE: - if (value == null) { - unsetFaee(); - } else { - setFaee((FileAlreadyExistException)value); - } - break; + /** Returns true if field dstPath is set (has been assigned a value) and false otherwise */ + public boolean isSetDstPath() { + return this.dstPath != null; + } - case IPE: - if (value == null) { - unsetIpe(); - } else { - setIpe((InvalidPathException)value); - } - break; + public void setDstPathIsSet(boolean value) { + if (!value) { + this.dstPath = null; + } + } - case SFSE: + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FILE_ID: if (value == null) { - unsetSfse(); + unsetFileId(); } else { - setSfse((SuspectedFileSizeException)value); + setFileId((Long)value); } break; - case TE: + case DST_PATH: if (value == null) { - unsetTe(); + unsetDstPath(); } else { - setTe((TachyonException)value); + setDstPath((String)value); } break; @@ -20453,26 +19834,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Long.valueOf(getSuccess()); - - case BIE: - return getBie(); - - case FDNEE: - return getFdnee(); - - case FAEE: - return getFaee(); - - case IPE: - return getIpe(); - - case SFSE: - return getSfse(); + case FILE_ID: + return Long.valueOf(getFileId()); - case TE: - return getTe(); + case DST_PATH: + return getDstPath(); } throw new IllegalStateException(); @@ -20485,20 +19851,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case BIE: - return isSetBie(); - case FDNEE: - return isSetFdnee(); - case FAEE: - return isSetFaee(); - case IPE: - return isSetIpe(); - case SFSE: - return isSetSfse(); - case TE: - return isSetTe(); + case FILE_ID: + return isSetFileId(); + case DST_PATH: + return isSetDstPath(); } throw new IllegalStateException(); } @@ -20507,75 +19863,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof loadFileInfoFromUfs_result) - return this.equals((loadFileInfoFromUfs_result)that); + if (that instanceof renameFile_args) + return this.equals((renameFile_args)that); return false; } - public boolean equals(loadFileInfoFromUfs_result that) { + public boolean equals(renameFile_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_bie = true && this.isSetBie(); - boolean that_present_bie = true && that.isSetBie(); - if (this_present_bie || that_present_bie) { - if (!(this_present_bie && that_present_bie)) - return false; - if (!this.bie.equals(that.bie)) - return false; - } - - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) - return false; - if (!this.fdnee.equals(that.fdnee)) - return false; - } - - boolean this_present_faee = true && this.isSetFaee(); - boolean that_present_faee = true && that.isSetFaee(); - if (this_present_faee || that_present_faee) { - if (!(this_present_faee && that_present_faee)) - return false; - if (!this.faee.equals(that.faee)) - return false; - } - - boolean this_present_ipe = true && this.isSetIpe(); - boolean that_present_ipe = true && that.isSetIpe(); - if (this_present_ipe || that_present_ipe) { - if (!(this_present_ipe && that_present_ipe)) - return false; - if (!this.ipe.equals(that.ipe)) - return false; - } - - boolean this_present_sfse = true && this.isSetSfse(); - boolean that_present_sfse = true && that.isSetSfse(); - if (this_present_sfse || that_present_sfse) { - if (!(this_present_sfse && that_present_sfse)) + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (!this.sfse.equals(that.sfse)) + if (this.fileId != that.fileId) return false; } - boolean this_present_te = true && this.isSetTe(); - boolean that_present_te = true && that.isSetTe(); - if (this_present_te || that_present_te) { - if (!(this_present_te && that_present_te)) + boolean this_present_dstPath = true && this.isSetDstPath(); + boolean that_present_dstPath = true && that.isSetDstPath(); + if (this_present_dstPath || that_present_dstPath) { + if (!(this_present_dstPath && that_present_dstPath)) return false; - if (!this.te.equals(that.te)) + if (!this.dstPath.equals(that.dstPath)) return false; } @@ -20586,118 +19897,43 @@ public boolean equals(loadFileInfoFromUfs_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_bie = true && (isSetBie()); - list.add(present_bie); - if (present_bie) - list.add(bie); - - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); - - boolean present_faee = true && (isSetFaee()); - list.add(present_faee); - if (present_faee) - list.add(faee); - - boolean present_ipe = true && (isSetIpe()); - list.add(present_ipe); - if (present_ipe) - list.add(ipe); - - boolean present_sfse = true && (isSetSfse()); - list.add(present_sfse); - if (present_sfse) - list.add(sfse); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); - boolean present_te = true && (isSetTe()); - list.add(present_te); - if (present_te) - list.add(te); + boolean present_dstPath = true && (isSetDstPath()); + list.add(present_dstPath); + if (present_dstPath) + list.add(dstPath); return list.hashCode(); } @Override - public int compareTo(loadFileInfoFromUfs_result other) { + public int compareTo(renameFile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBie()).compareTo(other.isSetBie()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBie()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bie, other.bie); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFaee()).compareTo(other.isSetFaee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFaee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.faee, other.faee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIpe()).compareTo(other.isSetIpe()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIpe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipe, other.ipe); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSfse()).compareTo(other.isSetSfse()); + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetSfse()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sfse, other.sfse); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTe()).compareTo(other.isSetTe()); + lastComparison = Boolean.valueOf(isSetDstPath()).compareTo(other.isSetDstPath()); if (lastComparison != 0) { return lastComparison; } - if (isSetTe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, other.te); + if (isSetDstPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dstPath, other.dstPath); if (lastComparison != 0) { return lastComparison; } @@ -20715,62 +19951,22 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("loadFileInfoFromUfs_result("); + StringBuilder sb = new StringBuilder("renameFile_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("bie:"); - if (this.bie == null) { - sb.append("null"); - } else { - sb.append(this.bie); - } - first = false; - if (!first) sb.append(", "); - sb.append("fdnee:"); - if (this.fdnee == null) { - sb.append("null"); - } else { - sb.append(this.fdnee); - } - first = false; - if (!first) sb.append(", "); - sb.append("faee:"); - if (this.faee == null) { - sb.append("null"); - } else { - sb.append(this.faee); - } - first = false; - if (!first) sb.append(", "); - sb.append("ipe:"); - if (this.ipe == null) { - sb.append("null"); - } else { - sb.append(this.ipe); - } - first = false; - if (!first) sb.append(", "); - sb.append("sfse:"); - if (this.sfse == null) { - sb.append("null"); - } else { - sb.append(this.sfse); - } + sb.append("fileId:"); + sb.append(this.fileId); first = false; if (!first) sb.append(", "); - sb.append("te:"); - if (this.te == null) { + sb.append("dstPath:"); + if (this.dstPath == null) { sb.append("null"); } else { - sb.append(this.te); + sb.append(this.dstPath); } first = false; sb.append(")"); @@ -20800,15 +19996,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class loadFileInfoFromUfs_resultStandardSchemeFactory implements SchemeFactory { - public loadFileInfoFromUfs_resultStandardScheme getScheme() { - return new loadFileInfoFromUfs_resultStandardScheme(); + private static class renameFile_argsStandardSchemeFactory implements SchemeFactory { + public renameFile_argsStandardScheme getScheme() { + return new renameFile_argsStandardScheme(); } } - private static class loadFileInfoFromUfs_resultStandardScheme extends StandardScheme { + private static class renameFile_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, loadFileInfoFromUfs_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, renameFile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -20818,64 +20014,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, loadFileInfoFromUfs break; } switch (schemeField.id) { - case 0: // SUCCESS + case 1: // FILE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // BIE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // FAEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // IPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // SFSE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.sfse = new SuspectedFileSizeException(); - struct.sfse.read(iprot); - struct.setSfseIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // TE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + case 2: // DST_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dstPath = iprot.readString(); + struct.setDstPathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -20891,43 +20041,16 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, loadFileInfoFromUfs struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, loadFileInfoFromUfs_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, renameFile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); - oprot.writeFieldEnd(); - } - if (struct.bie != null) { - oprot.writeFieldBegin(BIE_FIELD_DESC); - struct.bie.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.faee != null) { - oprot.writeFieldBegin(FAEE_FIELD_DESC); - struct.faee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ipe != null) { - oprot.writeFieldBegin(IPE_FIELD_DESC); - struct.ipe.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.sfse != null) { - oprot.writeFieldBegin(SFSE_FIELD_DESC); - struct.sfse.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.te != null) { - oprot.writeFieldBegin(TE_FIELD_DESC); - struct.te.write(oprot); + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); + oprot.writeFieldEnd(); + if (struct.dstPath != null) { + oprot.writeFieldBegin(DST_PATH_FIELD_DESC); + oprot.writeString(struct.dstPath); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -20936,125 +20059,69 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, loadFileInfoFromUf } - private static class loadFileInfoFromUfs_resultTupleSchemeFactory implements SchemeFactory { - public loadFileInfoFromUfs_resultTupleScheme getScheme() { - return new loadFileInfoFromUfs_resultTupleScheme(); + private static class renameFile_argsTupleSchemeFactory implements SchemeFactory { + public renameFile_argsTupleScheme getScheme() { + return new renameFile_argsTupleScheme(); } } - private static class loadFileInfoFromUfs_resultTupleScheme extends TupleScheme { + private static class renameFile_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, loadFileInfoFromUfs_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, renameFile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetBie()) { + if (struct.isSetDstPath()) { optionals.set(1); } - if (struct.isSetFdnee()) { - optionals.set(2); - } - if (struct.isSetFaee()) { - optionals.set(3); - } - if (struct.isSetIpe()) { - optionals.set(4); - } - if (struct.isSetSfse()) { - optionals.set(5); - } - if (struct.isSetTe()) { - optionals.set(6); - } - oprot.writeBitSet(optionals, 7); - if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); - } - if (struct.isSetBie()) { - struct.bie.write(oprot); - } - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); - } - if (struct.isSetFaee()) { - struct.faee.write(oprot); - } - if (struct.isSetIpe()) { - struct.ipe.write(oprot); - } - if (struct.isSetSfse()) { - struct.sfse.write(oprot); + oprot.writeBitSet(optionals, 2); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); } - if (struct.isSetTe()) { - struct.te.write(oprot); + if (struct.isSetDstPath()) { + oprot.writeString(struct.dstPath); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, loadFileInfoFromUfs_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, renameFile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(7); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } if (incoming.get(1)) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } - if (incoming.get(2)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } - if (incoming.get(3)) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); - } - if (incoming.get(4)) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); - } - if (incoming.get(5)) { - struct.sfse = new SuspectedFileSizeException(); - struct.sfse.read(iprot); - struct.setSfseIsSet(true); - } - if (incoming.get(6)) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.dstPath = iprot.readString(); + struct.setDstPathIsSet(true); } } } } - public static class mount_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("mount_args"); + public static class renameFile_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("renameFile_result"); - private static final org.apache.thrift.protocol.TField TACHYON_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("tachyonPath", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField UFS_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("ufsPath", org.apache.thrift.protocol.TType.STRING, (short)2); + 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_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new mount_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new mount_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new renameFile_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new renameFile_resultTupleSchemeFactory()); } - public String tachyonPath; // required - public String ufsPath; // required + public boolean success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TACHYON_PATH((short)1, "tachyonPath"), - UFS_PATH((short)2, "ufsPath"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -21069,10 +20136,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TACHYON_PATH - return TACHYON_PATH; - case 2: // UFS_PATH - return UFS_PATH; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -21113,114 +20180,116 @@ public String getFieldName() { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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.TACHYON_PATH, new org.apache.thrift.meta_data.FieldMetaData("tachyonPath", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.UFS_PATH, new org.apache.thrift.meta_data.FieldMetaData("ufsPath", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mount_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(renameFile_result.class, metaDataMap); } - public mount_args() { + public renameFile_result() { } - public mount_args( - String tachyonPath, - String ufsPath) + public renameFile_result( + boolean success, + TachyonTException e) { this(); - this.tachyonPath = tachyonPath; - this.ufsPath = ufsPath; + this.success = success; + setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public mount_args(mount_args other) { - if (other.isSetTachyonPath()) { - this.tachyonPath = other.tachyonPath; - } - if (other.isSetUfsPath()) { - this.ufsPath = other.ufsPath; + public renameFile_result(renameFile_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public mount_args deepCopy() { - return new mount_args(this); + public renameFile_result deepCopy() { + return new renameFile_result(this); } @Override public void clear() { - this.tachyonPath = null; - this.ufsPath = null; + setSuccessIsSet(false); + this.success = false; + this.e = null; } - public String getTachyonPath() { - return this.tachyonPath; + public boolean isSuccess() { + return this.success; } - public mount_args setTachyonPath(String tachyonPath) { - this.tachyonPath = tachyonPath; + public renameFile_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetTachyonPath() { - this.tachyonPath = null; + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field tachyonPath is set (has been assigned a value) and false otherwise */ - public boolean isSetTachyonPath() { - return this.tachyonPath != null; + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setTachyonPathIsSet(boolean value) { - if (!value) { - this.tachyonPath = null; - } + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public String getUfsPath() { - return this.ufsPath; + public TachyonTException getE() { + return this.e; } - public mount_args setUfsPath(String ufsPath) { - this.ufsPath = ufsPath; + public renameFile_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetUfsPath() { - this.ufsPath = null; + public void unsetE() { + this.e = null; } - /** Returns true if field ufsPath is set (has been assigned a value) and false otherwise */ - public boolean isSetUfsPath() { - return this.ufsPath != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setUfsPathIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.ufsPath = null; + this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TACHYON_PATH: + case SUCCESS: if (value == null) { - unsetTachyonPath(); + unsetSuccess(); } else { - setTachyonPath((String)value); + setSuccess((Boolean)value); } break; - case UFS_PATH: + case E: if (value == null) { - unsetUfsPath(); + unsetE(); } else { - setUfsPath((String)value); + setE((TachyonTException)value); } break; @@ -21229,11 +20298,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case TACHYON_PATH: - return getTachyonPath(); + case SUCCESS: + return Boolean.valueOf(isSuccess()); - case UFS_PATH: - return getUfsPath(); + case E: + return getE(); } throw new IllegalStateException(); @@ -21246,10 +20315,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case TACHYON_PATH: - return isSetTachyonPath(); - case UFS_PATH: - return isSetUfsPath(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -21258,30 +20327,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof mount_args) - return this.equals((mount_args)that); + if (that instanceof renameFile_result) + return this.equals((renameFile_result)that); return false; } - public boolean equals(mount_args that) { + public boolean equals(renameFile_result that) { if (that == null) return false; - boolean this_present_tachyonPath = true && this.isSetTachyonPath(); - boolean that_present_tachyonPath = true && that.isSetTachyonPath(); - if (this_present_tachyonPath || that_present_tachyonPath) { - if (!(this_present_tachyonPath && that_present_tachyonPath)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.tachyonPath.equals(that.tachyonPath)) + if (this.success != that.success) return false; } - boolean this_present_ufsPath = true && this.isSetUfsPath(); - boolean that_present_ufsPath = true && that.isSetUfsPath(); - if (this_present_ufsPath || that_present_ufsPath) { - if (!(this_present_ufsPath && that_present_ufsPath)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.ufsPath.equals(that.ufsPath)) + if (!this.e.equals(that.e)) return false; } @@ -21292,43 +20361,43 @@ public boolean equals(mount_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_tachyonPath = true && (isSetTachyonPath()); - list.add(present_tachyonPath); - if (present_tachyonPath) - list.add(tachyonPath); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); - boolean present_ufsPath = true && (isSetUfsPath()); - list.add(present_ufsPath); - if (present_ufsPath) - list.add(ufsPath); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(mount_args other) { + public int compareTo(renameFile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTachyonPath()).compareTo(other.isSetTachyonPath()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetTachyonPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tachyonPath, other.tachyonPath); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUfsPath()).compareTo(other.isSetUfsPath()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetUfsPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ufsPath, other.ufsPath); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -21346,26 +20415,22 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("mount_args("); + StringBuilder sb = new StringBuilder("renameFile_result("); boolean first = true; - sb.append("tachyonPath:"); - if (this.tachyonPath == null) { - sb.append("null"); - } else { - sb.append(this.tachyonPath); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("ufsPath:"); - if (this.ufsPath == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.ufsPath); + sb.append(this.e); } first = false; sb.append(")"); @@ -21387,21 +20452,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class mount_argsStandardSchemeFactory implements SchemeFactory { - public mount_argsStandardScheme getScheme() { - return new mount_argsStandardScheme(); + private static class renameFile_resultStandardSchemeFactory implements SchemeFactory { + public renameFile_resultStandardScheme getScheme() { + return new renameFile_resultStandardScheme(); } } - private static class mount_argsStandardScheme extends StandardScheme { + private static class renameFile_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, mount_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, renameFile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -21411,18 +20478,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, mount_args struct) break; } switch (schemeField.id) { - case 1: // TACHYON_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.tachyonPath = iprot.readString(); - struct.setTachyonPathIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // UFS_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.ufsPath = iprot.readString(); - struct.setUfsPathIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -21438,18 +20506,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, mount_args struct) struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, mount_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, renameFile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.tachyonPath != null) { - oprot.writeFieldBegin(TACHYON_PATH_FIELD_DESC); - oprot.writeString(struct.tachyonPath); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); oprot.writeFieldEnd(); } - if (struct.ufsPath != null) { - oprot.writeFieldBegin(UFS_PATH_FIELD_DESC); - oprot.writeString(struct.ufsPath); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -21458,69 +20526,67 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, mount_args struct) } - private static class mount_argsTupleSchemeFactory implements SchemeFactory { - public mount_argsTupleScheme getScheme() { - return new mount_argsTupleScheme(); + private static class renameFile_resultTupleSchemeFactory implements SchemeFactory { + public renameFile_resultTupleScheme getScheme() { + return new renameFile_resultTupleScheme(); } } - private static class mount_argsTupleScheme extends TupleScheme { + private static class renameFile_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, mount_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, renameFile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetTachyonPath()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetUfsPath()) { + if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetTachyonPath()) { - oprot.writeString(struct.tachyonPath); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); } - if (struct.isSetUfsPath()) { - oprot.writeString(struct.ufsPath); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, mount_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, renameFile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.tachyonPath = iprot.readString(); - struct.setTachyonPathIsSet(true); + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.ufsPath = iprot.readString(); - struct.setUfsPathIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class mount_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("mount_result"); + public static class reportLostFile_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("reportLostFile_args"); - 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 TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)1); + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new mount_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new mount_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new reportLostFile_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new reportLostFile_argsTupleSchemeFactory()); } - public boolean success; // required - public TachyonException te; // required + public long fileId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - TE((short)1, "te"); + FILE_ID((short)1, "fileId"); private static final Map byName = new HashMap(); @@ -21535,10 +20601,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // TE - return TE; + case 1: // FILE_ID + return FILE_ID; default: return null; } @@ -21579,116 +20643,76 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; + private static final int __FILEID_ISSET_ID = 0; private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + 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(mount_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reportLostFile_args.class, metaDataMap); } - public mount_result() { + public reportLostFile_args() { } - public mount_result( - boolean success, - TachyonException te) + public reportLostFile_args( + long fileId) { this(); - this.success = success; - setSuccessIsSet(true); - this.te = te; + this.fileId = fileId; + setFileIdIsSet(true); } /** * Performs a deep copy on other. */ - public mount_result(mount_result other) { + public reportLostFile_args(reportLostFile_args other) { __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetTe()) { - this.te = new TachyonException(other.te); - } + this.fileId = other.fileId; } - public mount_result deepCopy() { - return new mount_result(this); + public reportLostFile_args deepCopy() { + return new reportLostFile_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; - this.te = null; - } - - public boolean isSuccess() { - return this.success; - } - - public mount_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + setFileIdIsSet(false); + this.fileId = 0; } - public TachyonException getTe() { - return this.te; + public long getFileId() { + return this.fileId; } - public mount_result setTe(TachyonException te) { - this.te = te; + public reportLostFile_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetTe() { - this.te = null; + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field te is set (has been assigned a value) and false otherwise */ - public boolean isSetTe() { - return this.te != null; + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setTeIsSet(boolean value) { - if (!value) { - this.te = null; - } + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case TE: + case FILE_ID: if (value == null) { - unsetTe(); + unsetFileId(); } else { - setTe((TachyonException)value); + setFileId((Long)value); } break; @@ -21697,11 +20721,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); - - case TE: - return getTe(); + case FILE_ID: + return Long.valueOf(getFileId()); } throw new IllegalStateException(); @@ -21714,10 +20735,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case TE: - return isSetTe(); + case FILE_ID: + return isSetFileId(); } throw new IllegalStateException(); } @@ -21726,30 +20745,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof mount_result) - return this.equals((mount_result)that); + if (that instanceof reportLostFile_args) + return this.equals((reportLostFile_args)that); return false; } - public boolean equals(mount_result that) { + public boolean equals(reportLostFile_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_te = true && this.isSetTe(); - boolean that_present_te = true && that.isSetTe(); - if (this_present_te || that_present_te) { - if (!(this_present_te && that_present_te)) + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (!this.te.equals(that.te)) + if (this.fileId != that.fileId) return false; } @@ -21760,43 +20770,28 @@ public boolean equals(mount_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_te = true && (isSetTe()); - list.add(present_te); - if (present_te) - list.add(te); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); return list.hashCode(); } @Override - public int compareTo(mount_result other) { + public int compareTo(reportLostFile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTe()).compareTo(other.isSetTe()); + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetTe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, other.te); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); if (lastComparison != 0) { return lastComparison; } @@ -21814,23 +20809,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("mount_result("); + StringBuilder sb = new StringBuilder("reportLostFile_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("te:"); - if (this.te == null) { - sb.append("null"); - } else { - sb.append(this.te); - } + sb.append("fileId:"); + sb.append(this.fileId); first = false; sb.append(")"); return sb.toString(); @@ -21859,15 +20846,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class mount_resultStandardSchemeFactory implements SchemeFactory { - public mount_resultStandardScheme getScheme() { - return new mount_resultStandardScheme(); + private static class reportLostFile_argsStandardSchemeFactory implements SchemeFactory { + public reportLostFile_argsStandardScheme getScheme() { + return new reportLostFile_argsStandardScheme(); } } - private static class mount_resultStandardScheme extends StandardScheme { + private static class reportLostFile_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, mount_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, reportLostFile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -21877,19 +20864,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, mount_result struct break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // TE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + case 1: // FILE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -21905,87 +20883,69 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, mount_result struct struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, mount_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, reportLostFile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - if (struct.te != null) { - oprot.writeFieldBegin(TE_FIELD_DESC); - struct.te.write(oprot); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class mount_resultTupleSchemeFactory implements SchemeFactory { - public mount_resultTupleScheme getScheme() { - return new mount_resultTupleScheme(); + private static class reportLostFile_argsTupleSchemeFactory implements SchemeFactory { + public reportLostFile_argsTupleScheme getScheme() { + return new reportLostFile_argsTupleScheme(); } } - private static class mount_resultTupleScheme extends TupleScheme { + private static class reportLostFile_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, mount_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, reportLostFile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetTe()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - if (struct.isSetTe()) { - struct.te.write(oprot); + oprot.writeBitSet(optionals, 1); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, mount_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + public void read(org.apache.thrift.protocol.TProtocol prot, reportLostFile_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } } } } - public static class unmount_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("unmount_args"); + public static class reportLostFile_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("reportLostFile_result"); - private static final org.apache.thrift.protocol.TField TACHYON_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("tachyonPath", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new unmount_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new unmount_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new reportLostFile_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new reportLostFile_resultTupleSchemeFactory()); } - public String tachyonPath; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TACHYON_PATH((short)1, "tachyonPath"); + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -22000,8 +20960,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TACHYON_PATH - return TACHYON_PATH; + case 1: // E + return E; default: return null; } @@ -22045,71 +21005,71 @@ 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.TACHYON_PATH, new org.apache.thrift.meta_data.FieldMetaData("tachyonPath", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + 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(unmount_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reportLostFile_result.class, metaDataMap); } - public unmount_args() { + public reportLostFile_result() { } - public unmount_args( - String tachyonPath) + public reportLostFile_result( + TachyonTException e) { this(); - this.tachyonPath = tachyonPath; + this.e = e; } /** * Performs a deep copy on other. */ - public unmount_args(unmount_args other) { - if (other.isSetTachyonPath()) { - this.tachyonPath = other.tachyonPath; + public reportLostFile_result(reportLostFile_result other) { + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public unmount_args deepCopy() { - return new unmount_args(this); + public reportLostFile_result deepCopy() { + return new reportLostFile_result(this); } @Override public void clear() { - this.tachyonPath = null; + this.e = null; } - public String getTachyonPath() { - return this.tachyonPath; + public TachyonTException getE() { + return this.e; } - public unmount_args setTachyonPath(String tachyonPath) { - this.tachyonPath = tachyonPath; + public reportLostFile_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetTachyonPath() { - this.tachyonPath = null; + public void unsetE() { + this.e = null; } - /** Returns true if field tachyonPath is set (has been assigned a value) and false otherwise */ - public boolean isSetTachyonPath() { - return this.tachyonPath != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setTachyonPathIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.tachyonPath = null; + this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TACHYON_PATH: + case E: if (value == null) { - unsetTachyonPath(); + unsetE(); } else { - setTachyonPath((String)value); + setE((TachyonTException)value); } break; @@ -22118,8 +21078,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case TACHYON_PATH: - return getTachyonPath(); + case E: + return getE(); } throw new IllegalStateException(); @@ -22132,8 +21092,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case TACHYON_PATH: - return isSetTachyonPath(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -22142,21 +21102,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof unmount_args) - return this.equals((unmount_args)that); + if (that instanceof reportLostFile_result) + return this.equals((reportLostFile_result)that); return false; } - public boolean equals(unmount_args that) { + public boolean equals(reportLostFile_result that) { if (that == null) return false; - boolean this_present_tachyonPath = true && this.isSetTachyonPath(); - boolean that_present_tachyonPath = true && that.isSetTachyonPath(); - if (this_present_tachyonPath || that_present_tachyonPath) { - if (!(this_present_tachyonPath && that_present_tachyonPath)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.tachyonPath.equals(that.tachyonPath)) + if (!this.e.equals(that.e)) return false; } @@ -22167,28 +21127,28 @@ public boolean equals(unmount_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_tachyonPath = true && (isSetTachyonPath()); - list.add(present_tachyonPath); - if (present_tachyonPath) - list.add(tachyonPath); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(unmount_args other) { + public int compareTo(reportLostFile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTachyonPath()).compareTo(other.isSetTachyonPath()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetTachyonPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tachyonPath, other.tachyonPath); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -22206,18 +21166,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("unmount_args("); + StringBuilder sb = new StringBuilder("reportLostFile_result("); boolean first = true; - sb.append("tachyonPath:"); - if (this.tachyonPath == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.tachyonPath); + sb.append(this.e); } first = false; sb.append(")"); @@ -22245,15 +21205,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class unmount_argsStandardSchemeFactory implements SchemeFactory { - public unmount_argsStandardScheme getScheme() { - return new unmount_argsStandardScheme(); + private static class reportLostFile_resultStandardSchemeFactory implements SchemeFactory { + public reportLostFile_resultStandardScheme getScheme() { + return new reportLostFile_resultStandardScheme(); } } - private static class unmount_argsStandardScheme extends StandardScheme { + private static class reportLostFile_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, unmount_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, reportLostFile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -22263,10 +21223,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unmount_args struct break; } switch (schemeField.id) { - case 1: // TACHYON_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.tachyonPath = iprot.readString(); - struct.setTachyonPathIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -22282,13 +21243,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unmount_args struct struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, unmount_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, reportLostFile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.tachyonPath != null) { - oprot.writeFieldBegin(TACHYON_PATH_FIELD_DESC); - oprot.writeString(struct.tachyonPath); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -22297,59 +21258,57 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, unmount_args struc } - private static class unmount_argsTupleSchemeFactory implements SchemeFactory { - public unmount_argsTupleScheme getScheme() { - return new unmount_argsTupleScheme(); + private static class reportLostFile_resultTupleSchemeFactory implements SchemeFactory { + public reportLostFile_resultTupleScheme getScheme() { + return new reportLostFile_resultTupleScheme(); } } - private static class unmount_argsTupleScheme extends TupleScheme { + private static class reportLostFile_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, unmount_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, reportLostFile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetTachyonPath()) { + if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetTachyonPath()) { - oprot.writeString(struct.tachyonPath); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, unmount_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, reportLostFile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.tachyonPath = iprot.readString(); - struct.setTachyonPathIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class unmount_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("unmount_result"); + public static class requestFilesInDependency_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("requestFilesInDependency_args"); - 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 TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField DEP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("depId", org.apache.thrift.protocol.TType.I32, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new unmount_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new unmount_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new requestFilesInDependency_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new requestFilesInDependency_argsTupleSchemeFactory()); } - public boolean success; // required - public TachyonException te; // required + public int depId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - TE((short)1, "te"); + DEP_ID((short)1, "depId"); private static final Map byName = new HashMap(); @@ -22364,10 +21323,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // TE - return TE; + case 1: // DEP_ID + return DEP_ID; default: return null; } @@ -22408,116 +21365,76 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; + private static final int __DEPID_ISSET_ID = 0; private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.DEP_ID, new org.apache.thrift.meta_data.FieldMetaData("depId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unmount_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestFilesInDependency_args.class, metaDataMap); } - public unmount_result() { + public requestFilesInDependency_args() { } - public unmount_result( - boolean success, - TachyonException te) + public requestFilesInDependency_args( + int depId) { this(); - this.success = success; - setSuccessIsSet(true); - this.te = te; + this.depId = depId; + setDepIdIsSet(true); } /** * Performs a deep copy on other. */ - public unmount_result(unmount_result other) { + public requestFilesInDependency_args(requestFilesInDependency_args other) { __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetTe()) { - this.te = new TachyonException(other.te); - } + this.depId = other.depId; } - public unmount_result deepCopy() { - return new unmount_result(this); + public requestFilesInDependency_args deepCopy() { + return new requestFilesInDependency_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; - this.te = null; - } - - public boolean isSuccess() { - return this.success; - } - - public unmount_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + setDepIdIsSet(false); + this.depId = 0; } - public TachyonException getTe() { - return this.te; + public int getDepId() { + return this.depId; } - public unmount_result setTe(TachyonException te) { - this.te = te; + public requestFilesInDependency_args setDepId(int depId) { + this.depId = depId; + setDepIdIsSet(true); return this; } - public void unsetTe() { - this.te = null; + public void unsetDepId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEPID_ISSET_ID); } - /** Returns true if field te is set (has been assigned a value) and false otherwise */ - public boolean isSetTe() { - return this.te != null; + /** Returns true if field depId is set (has been assigned a value) and false otherwise */ + public boolean isSetDepId() { + return EncodingUtils.testBit(__isset_bitfield, __DEPID_ISSET_ID); } - public void setTeIsSet(boolean value) { - if (!value) { - this.te = null; - } + public void setDepIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEPID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case TE: + case DEP_ID: if (value == null) { - unsetTe(); + unsetDepId(); } else { - setTe((TachyonException)value); + setDepId((Integer)value); } break; @@ -22526,11 +21443,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); - - case TE: - return getTe(); + case DEP_ID: + return Integer.valueOf(getDepId()); } throw new IllegalStateException(); @@ -22543,10 +21457,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case TE: - return isSetTe(); + case DEP_ID: + return isSetDepId(); } throw new IllegalStateException(); } @@ -22555,30 +21467,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof unmount_result) - return this.equals((unmount_result)that); + if (that instanceof requestFilesInDependency_args) + return this.equals((requestFilesInDependency_args)that); return false; } - public boolean equals(unmount_result that) { + public boolean equals(requestFilesInDependency_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_te = true && this.isSetTe(); - boolean that_present_te = true && that.isSetTe(); - if (this_present_te || that_present_te) { - if (!(this_present_te && that_present_te)) + boolean this_present_depId = true; + boolean that_present_depId = true; + if (this_present_depId || that_present_depId) { + if (!(this_present_depId && that_present_depId)) return false; - if (!this.te.equals(that.te)) + if (this.depId != that.depId) return false; } @@ -22589,43 +21492,28 @@ public boolean equals(unmount_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_te = true && (isSetTe()); - list.add(present_te); - if (present_te) - list.add(te); + boolean present_depId = true; + list.add(present_depId); + if (present_depId) + list.add(depId); return list.hashCode(); } @Override - public int compareTo(unmount_result other) { + public int compareTo(requestFilesInDependency_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTe()).compareTo(other.isSetTe()); + lastComparison = Boolean.valueOf(isSetDepId()).compareTo(other.isSetDepId()); if (lastComparison != 0) { return lastComparison; } - if (isSetTe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, other.te); + if (isSetDepId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.depId, other.depId); if (lastComparison != 0) { return lastComparison; } @@ -22643,23 +21531,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("unmount_result("); + StringBuilder sb = new StringBuilder("requestFilesInDependency_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("te:"); - if (this.te == null) { - sb.append("null"); - } else { - sb.append(this.te); - } + sb.append("depId:"); + sb.append(this.depId); first = false; sb.append(")"); return sb.toString(); @@ -22688,15 +21568,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class unmount_resultStandardSchemeFactory implements SchemeFactory { - public unmount_resultStandardScheme getScheme() { - return new unmount_resultStandardScheme(); + private static class requestFilesInDependency_argsStandardSchemeFactory implements SchemeFactory { + public requestFilesInDependency_argsStandardScheme getScheme() { + return new requestFilesInDependency_argsStandardScheme(); } } - private static class unmount_resultStandardScheme extends StandardScheme { + private static class requestFilesInDependency_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, unmount_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, requestFilesInDependency_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -22706,19 +21586,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unmount_result stru break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // TE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + case 1: // DEP_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.depId = iprot.readI32(); + struct.setDepIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -22734,111 +21605,69 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unmount_result stru struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, unmount_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, requestFilesInDependency_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - if (struct.te != null) { - oprot.writeFieldBegin(TE_FIELD_DESC); - struct.te.write(oprot); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(DEP_ID_FIELD_DESC); + oprot.writeI32(struct.depId); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class unmount_resultTupleSchemeFactory implements SchemeFactory { - public unmount_resultTupleScheme getScheme() { - return new unmount_resultTupleScheme(); + private static class requestFilesInDependency_argsTupleSchemeFactory implements SchemeFactory { + public requestFilesInDependency_argsTupleScheme getScheme() { + return new requestFilesInDependency_argsTupleScheme(); } } - private static class unmount_resultTupleScheme extends TupleScheme { + private static class requestFilesInDependency_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, unmount_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, requestFilesInDependency_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetDepId()) { optionals.set(0); } - if (struct.isSetTe()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - if (struct.isSetTe()) { - struct.te.write(oprot); + oprot.writeBitSet(optionals, 1); + if (struct.isSetDepId()) { + oprot.writeI32(struct.depId); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, unmount_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, requestFilesInDependency_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.depId = iprot.readI32(); + struct.setDepIdIsSet(true); } } } } - public static class createDependency_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("createDependency_args"); + public static class requestFilesInDependency_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("requestFilesInDependency_result"); - private static final org.apache.thrift.protocol.TField PARENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("parents", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField CHILDREN_FIELD_DESC = new org.apache.thrift.protocol.TField("children", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField COMMAND_PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("commandPrefix", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField COMMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("comment", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField FRAMEWORK_FIELD_DESC = new org.apache.thrift.protocol.TField("framework", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField FRAMEWORK_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("frameworkVersion", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField DEPENDENCY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dependencyType", org.apache.thrift.protocol.TType.I32, (short)8); - private static final org.apache.thrift.protocol.TField CHILDREN_BLOCK_SIZE_BYTE_FIELD_DESC = new org.apache.thrift.protocol.TField("childrenBlockSizeByte", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new createDependency_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new createDependency_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new requestFilesInDependency_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new requestFilesInDependency_resultTupleSchemeFactory()); } - public List parents; // required - public List children; // required - public String commandPrefix; // required - public List data; // required - public String comment; // required - public String framework; // required - public String frameworkVersion; // required - public int dependencyType; // required - public long childrenBlockSizeByte; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PARENTS((short)1, "parents"), - CHILDREN((short)2, "children"), - COMMAND_PREFIX((short)3, "commandPrefix"), - DATA((short)4, "data"), - COMMENT((short)5, "comment"), - FRAMEWORK((short)6, "framework"), - FRAMEWORK_VERSION((short)7, "frameworkVersion"), - DEPENDENCY_TYPE((short)8, "dependencyType"), - CHILDREN_BLOCK_SIZE_BYTE((short)9, "childrenBlockSizeByte"); + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -22853,24 +21682,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PARENTS - return PARENTS; - case 2: // CHILDREN - return CHILDREN; - case 3: // COMMAND_PREFIX - return COMMAND_PREFIX; - case 4: // DATA - return DATA; - case 5: // COMMENT - return COMMENT; - case 6: // FRAMEWORK - return FRAMEWORK; - case 7: // FRAMEWORK_VERSION - return FRAMEWORK_VERSION; - case 8: // DEPENDENCY_TYPE - return DEPENDENCY_TYPE; - case 9: // CHILDREN_BLOCK_SIZE_BYTE - return CHILDREN_BLOCK_SIZE_BYTE; + case 1: // E + return E; default: return null; } @@ -22911,481 +21724,497 @@ public String getFieldName() { } // isset id assignments - private static final int __DEPENDENCYTYPE_ISSET_ID = 0; - private static final int __CHILDRENBLOCKSIZEBYTE_ISSET_ID = 1; - private byte __isset_bitfield = 0; 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.PARENTS, new org.apache.thrift.meta_data.FieldMetaData("parents", 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.STRING)))); - tmpMap.put(_Fields.CHILDREN, new org.apache.thrift.meta_data.FieldMetaData("children", 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.STRING)))); - tmpMap.put(_Fields.COMMAND_PREFIX, new org.apache.thrift.meta_data.FieldMetaData("commandPrefix", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", 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.STRING , true)))); - tmpMap.put(_Fields.COMMENT, new org.apache.thrift.meta_data.FieldMetaData("comment", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FRAMEWORK, new org.apache.thrift.meta_data.FieldMetaData("framework", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FRAMEWORK_VERSION, new org.apache.thrift.meta_data.FieldMetaData("frameworkVersion", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DEPENDENCY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dependencyType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.CHILDREN_BLOCK_SIZE_BYTE, new org.apache.thrift.meta_data.FieldMetaData("childrenBlockSizeByte", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + 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(createDependency_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestFilesInDependency_result.class, metaDataMap); } - public createDependency_args() { + public requestFilesInDependency_result() { } - public createDependency_args( - List parents, - List children, - String commandPrefix, - List data, - String comment, - String framework, - String frameworkVersion, - int dependencyType, - long childrenBlockSizeByte) + public requestFilesInDependency_result( + TachyonTException e) { this(); - this.parents = parents; - this.children = children; - this.commandPrefix = commandPrefix; - this.data = data; - this.comment = comment; - this.framework = framework; - this.frameworkVersion = frameworkVersion; - this.dependencyType = dependencyType; - setDependencyTypeIsSet(true); - this.childrenBlockSizeByte = childrenBlockSizeByte; - setChildrenBlockSizeByteIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public createDependency_args(createDependency_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetParents()) { - List __this__parents = new ArrayList(other.parents); - this.parents = __this__parents; - } - if (other.isSetChildren()) { - List __this__children = new ArrayList(other.children); - this.children = __this__children; - } - if (other.isSetCommandPrefix()) { - this.commandPrefix = other.commandPrefix; - } - if (other.isSetData()) { - List __this__data = new ArrayList(other.data); - this.data = __this__data; - } - if (other.isSetComment()) { - this.comment = other.comment; - } - if (other.isSetFramework()) { - this.framework = other.framework; - } - if (other.isSetFrameworkVersion()) { - this.frameworkVersion = other.frameworkVersion; + public requestFilesInDependency_result(requestFilesInDependency_result other) { + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } - this.dependencyType = other.dependencyType; - this.childrenBlockSizeByte = other.childrenBlockSizeByte; } - public createDependency_args deepCopy() { - return new createDependency_args(this); + public requestFilesInDependency_result deepCopy() { + return new requestFilesInDependency_result(this); } @Override public void clear() { - this.parents = null; - this.children = null; - this.commandPrefix = null; - this.data = null; - this.comment = null; - this.framework = null; - this.frameworkVersion = null; - setDependencyTypeIsSet(false); - this.dependencyType = 0; - setChildrenBlockSizeByteIsSet(false); - this.childrenBlockSizeByte = 0; - } - - public int getParentsSize() { - return (this.parents == null) ? 0 : this.parents.size(); - } - - public java.util.Iterator getParentsIterator() { - return (this.parents == null) ? null : this.parents.iterator(); - } - - public void addToParents(String elem) { - if (this.parents == null) { - this.parents = new ArrayList(); - } - this.parents.add(elem); + this.e = null; } - public List getParents() { - return this.parents; + public TachyonTException getE() { + return this.e; } - public createDependency_args setParents(List parents) { - this.parents = parents; + public requestFilesInDependency_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetParents() { - this.parents = null; + public void unsetE() { + this.e = null; } - /** Returns true if field parents is set (has been assigned a value) and false otherwise */ - public boolean isSetParents() { - return this.parents != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setParentsIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.parents = null; + this.e = null; } } - public int getChildrenSize() { - return (this.children == null) ? 0 : this.children.size(); - } + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); + } + break; - public java.util.Iterator getChildrenIterator() { - return (this.children == null) ? null : this.children.iterator(); + } } - public void addToChildren(String elem) { - if (this.children == null) { - this.children = new ArrayList(); + public Object getFieldValue(_Fields field) { + switch (field) { + case E: + return getE(); + } - this.children.add(elem); + throw new IllegalStateException(); } - public List getChildren() { - return this.children; - } + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } - public createDependency_args setChildren(List children) { - this.children = children; - return this; + switch (field) { + case E: + return isSetE(); + } + throw new IllegalStateException(); } - public void unsetChildren() { - this.children = null; + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof requestFilesInDependency_result) + return this.equals((requestFilesInDependency_result)that); + return false; } - /** Returns true if field children is set (has been assigned a value) and false otherwise */ - public boolean isSetChildren() { - return this.children != null; - } + public boolean equals(requestFilesInDependency_result that) { + if (that == null) + return false; - public void setChildrenIsSet(boolean value) { - if (!value) { - this.children = null; + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) + return false; } - } - public String getCommandPrefix() { - return this.commandPrefix; + return true; } - public createDependency_args setCommandPrefix(String commandPrefix) { - this.commandPrefix = commandPrefix; - return this; - } + @Override + public int hashCode() { + List list = new ArrayList(); - public void unsetCommandPrefix() { - this.commandPrefix = null; - } + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); - /** Returns true if field commandPrefix is set (has been assigned a value) and false otherwise */ - public boolean isSetCommandPrefix() { - return this.commandPrefix != null; + return list.hashCode(); } - public void setCommandPrefixIsSet(boolean value) { - if (!value) { - this.commandPrefix = null; + @Override + public int compareTo(requestFilesInDependency_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); + if (lastComparison != 0) { + return lastComparison; + } } + return 0; } - public int getDataSize() { - return (this.data == null) ? 0 : this.data.size(); + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); } - public java.util.Iterator getDataIterator() { - return (this.data == null) ? null : this.data.iterator(); + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } - public void addToData(ByteBuffer elem) { - if (this.data == null) { - this.data = new ArrayList(); + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - this.data.add(elem); + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("requestFilesInDependency_result("); + boolean first = true; + + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } + first = false; + sb.append(")"); + return sb.toString(); } - public List getData() { - return this.data; + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity } - public createDependency_args setData(List data) { - this.data = data; - return this; + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } - public void unsetData() { - this.data = null; + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } - /** Returns true if field data is set (has been assigned a value) and false otherwise */ - public boolean isSetData() { - return this.data != null; + private static class requestFilesInDependency_resultStandardSchemeFactory implements SchemeFactory { + public requestFilesInDependency_resultStandardScheme getScheme() { + return new requestFilesInDependency_resultStandardScheme(); + } } - public void setDataIsSet(boolean value) { - if (!value) { - this.data = null; + private static class requestFilesInDependency_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, requestFilesInDependency_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, requestFilesInDependency_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); } + } - public String getComment() { - return this.comment; + private static class requestFilesInDependency_resultTupleSchemeFactory implements SchemeFactory { + public requestFilesInDependency_resultTupleScheme getScheme() { + return new requestFilesInDependency_resultTupleScheme(); + } } - public createDependency_args setComment(String comment) { - this.comment = comment; - return this; + private static class requestFilesInDependency_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, requestFilesInDependency_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetE()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetE()) { + struct.e.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, requestFilesInDependency_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } + } } - public void unsetComment() { - this.comment = null; + } + + public static class setPinned_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("setPinned_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 PINNED_FIELD_DESC = new org.apache.thrift.protocol.TField("pinned", org.apache.thrift.protocol.TType.BOOL, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new setPinned_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new setPinned_argsTupleSchemeFactory()); } - /** Returns true if field comment is set (has been assigned a value) and false otherwise */ - public boolean isSetComment() { - return this.comment != null; - } + public long fileId; // required + public boolean pinned; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + FILE_ID((short)1, "fileId"), + PINNED((short)2, "pinned"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FILE_ID + return FILE_ID; + case 2: // PINNED + return PINNED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } - public void setCommentIsSet(boolean value) { - if (!value) { - this.comment = null; + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); } - } - public String getFramework() { - return this.framework; - } + private final short _thriftId; + private final String _fieldName; - public createDependency_args setFramework(String framework) { - this.framework = framework; - return this; - } + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } - public void unsetFramework() { - this.framework = null; - } + public short getThriftFieldId() { + return _thriftId; + } - /** Returns true if field framework is set (has been assigned a value) and false otherwise */ - public boolean isSetFramework() { - return this.framework != null; + public String getFieldName() { + return _fieldName; + } } - public void setFrameworkIsSet(boolean value) { - if (!value) { - this.framework = null; - } + // isset id assignments + private static final int __FILEID_ISSET_ID = 0; + private static final int __PINNED_ISSET_ID = 1; + private byte __isset_bitfield = 0; + 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PINNED, new org.apache.thrift.meta_data.FieldMetaData("pinned", 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(setPinned_args.class, metaDataMap); } - public String getFrameworkVersion() { - return this.frameworkVersion; + public setPinned_args() { } - public createDependency_args setFrameworkVersion(String frameworkVersion) { - this.frameworkVersion = frameworkVersion; - return this; + public setPinned_args( + long fileId, + boolean pinned) + { + this(); + this.fileId = fileId; + setFileIdIsSet(true); + this.pinned = pinned; + setPinnedIsSet(true); } - public void unsetFrameworkVersion() { - this.frameworkVersion = null; + /** + * Performs a deep copy on other. + */ + public setPinned_args(setPinned_args other) { + __isset_bitfield = other.__isset_bitfield; + this.fileId = other.fileId; + this.pinned = other.pinned; } - /** Returns true if field frameworkVersion is set (has been assigned a value) and false otherwise */ - public boolean isSetFrameworkVersion() { - return this.frameworkVersion != null; + public setPinned_args deepCopy() { + return new setPinned_args(this); } - public void setFrameworkVersionIsSet(boolean value) { - if (!value) { - this.frameworkVersion = null; - } + @Override + public void clear() { + setFileIdIsSet(false); + this.fileId = 0; + setPinnedIsSet(false); + this.pinned = false; } - public int getDependencyType() { - return this.dependencyType; + public long getFileId() { + return this.fileId; } - public createDependency_args setDependencyType(int dependencyType) { - this.dependencyType = dependencyType; - setDependencyTypeIsSet(true); + public setPinned_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetDependencyType() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEPENDENCYTYPE_ISSET_ID); + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field dependencyType is set (has been assigned a value) and false otherwise */ - public boolean isSetDependencyType() { - return EncodingUtils.testBit(__isset_bitfield, __DEPENDENCYTYPE_ISSET_ID); + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setDependencyTypeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEPENDENCYTYPE_ISSET_ID, value); + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } - public long getChildrenBlockSizeByte() { - return this.childrenBlockSizeByte; + public boolean isPinned() { + return this.pinned; } - public createDependency_args setChildrenBlockSizeByte(long childrenBlockSizeByte) { - this.childrenBlockSizeByte = childrenBlockSizeByte; - setChildrenBlockSizeByteIsSet(true); + public setPinned_args setPinned(boolean pinned) { + this.pinned = pinned; + setPinnedIsSet(true); return this; } - public void unsetChildrenBlockSizeByte() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CHILDRENBLOCKSIZEBYTE_ISSET_ID); + public void unsetPinned() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PINNED_ISSET_ID); } - /** Returns true if field childrenBlockSizeByte is set (has been assigned a value) and false otherwise */ - public boolean isSetChildrenBlockSizeByte() { - return EncodingUtils.testBit(__isset_bitfield, __CHILDRENBLOCKSIZEBYTE_ISSET_ID); + /** Returns true if field pinned is set (has been assigned a value) and false otherwise */ + public boolean isSetPinned() { + return EncodingUtils.testBit(__isset_bitfield, __PINNED_ISSET_ID); } - public void setChildrenBlockSizeByteIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CHILDRENBLOCKSIZEBYTE_ISSET_ID, value); + public void setPinnedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PINNED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case PARENTS: - if (value == null) { - unsetParents(); - } else { - setParents((List)value); - } - break; - - case CHILDREN: - if (value == null) { - unsetChildren(); - } else { - setChildren((List)value); - } - break; - - case COMMAND_PREFIX: - if (value == null) { - unsetCommandPrefix(); - } else { - setCommandPrefix((String)value); - } - break; - - case DATA: - if (value == null) { - unsetData(); - } else { - setData((List)value); - } - break; - - case COMMENT: - if (value == null) { - unsetComment(); - } else { - setComment((String)value); - } - break; - - case FRAMEWORK: - if (value == null) { - unsetFramework(); - } else { - setFramework((String)value); - } - break; - - case FRAMEWORK_VERSION: - if (value == null) { - unsetFrameworkVersion(); - } else { - setFrameworkVersion((String)value); - } - break; - - case DEPENDENCY_TYPE: + case FILE_ID: if (value == null) { - unsetDependencyType(); + unsetFileId(); } else { - setDependencyType((Integer)value); + setFileId((Long)value); } break; - case CHILDREN_BLOCK_SIZE_BYTE: + case PINNED: if (value == null) { - unsetChildrenBlockSizeByte(); + unsetPinned(); } else { - setChildrenBlockSizeByte((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PARENTS: - return getParents(); - - case CHILDREN: - return getChildren(); - - case COMMAND_PREFIX: - return getCommandPrefix(); - - case DATA: - return getData(); - - case COMMENT: - return getComment(); - - case FRAMEWORK: - return getFramework(); + setPinned((Boolean)value); + } + break; - case FRAMEWORK_VERSION: - return getFrameworkVersion(); + } + } - case DEPENDENCY_TYPE: - return Integer.valueOf(getDependencyType()); + public Object getFieldValue(_Fields field) { + switch (field) { + case FILE_ID: + return Long.valueOf(getFileId()); - case CHILDREN_BLOCK_SIZE_BYTE: - return Long.valueOf(getChildrenBlockSizeByte()); + case PINNED: + return Boolean.valueOf(isPinned()); } throw new IllegalStateException(); @@ -23398,24 +22227,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case PARENTS: - return isSetParents(); - case CHILDREN: - return isSetChildren(); - case COMMAND_PREFIX: - return isSetCommandPrefix(); - case DATA: - return isSetData(); - case COMMENT: - return isSetComment(); - case FRAMEWORK: - return isSetFramework(); - case FRAMEWORK_VERSION: - return isSetFrameworkVersion(); - case DEPENDENCY_TYPE: - return isSetDependencyType(); - case CHILDREN_BLOCK_SIZE_BYTE: - return isSetChildrenBlockSizeByte(); + case FILE_ID: + return isSetFileId(); + case PINNED: + return isSetPinned(); } throw new IllegalStateException(); } @@ -23424,93 +22239,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof createDependency_args) - return this.equals((createDependency_args)that); + if (that instanceof setPinned_args) + return this.equals((setPinned_args)that); return false; } - public boolean equals(createDependency_args that) { + public boolean equals(setPinned_args that) { if (that == null) return false; - boolean this_present_parents = true && this.isSetParents(); - boolean that_present_parents = true && that.isSetParents(); - if (this_present_parents || that_present_parents) { - if (!(this_present_parents && that_present_parents)) - return false; - if (!this.parents.equals(that.parents)) - return false; - } - - boolean this_present_children = true && this.isSetChildren(); - boolean that_present_children = true && that.isSetChildren(); - if (this_present_children || that_present_children) { - if (!(this_present_children && that_present_children)) - return false; - if (!this.children.equals(that.children)) - return false; - } - - boolean this_present_commandPrefix = true && this.isSetCommandPrefix(); - boolean that_present_commandPrefix = true && that.isSetCommandPrefix(); - if (this_present_commandPrefix || that_present_commandPrefix) { - if (!(this_present_commandPrefix && that_present_commandPrefix)) - return false; - if (!this.commandPrefix.equals(that.commandPrefix)) - return false; - } - - boolean this_present_data = true && this.isSetData(); - boolean that_present_data = true && that.isSetData(); - if (this_present_data || that_present_data) { - if (!(this_present_data && that_present_data)) - return false; - if (!this.data.equals(that.data)) - return false; - } - - boolean this_present_comment = true && this.isSetComment(); - boolean that_present_comment = true && that.isSetComment(); - if (this_present_comment || that_present_comment) { - if (!(this_present_comment && that_present_comment)) - return false; - if (!this.comment.equals(that.comment)) - return false; - } - - boolean this_present_framework = true && this.isSetFramework(); - boolean that_present_framework = true && that.isSetFramework(); - if (this_present_framework || that_present_framework) { - if (!(this_present_framework && that_present_framework)) - return false; - if (!this.framework.equals(that.framework)) - return false; - } - - boolean this_present_frameworkVersion = true && this.isSetFrameworkVersion(); - boolean that_present_frameworkVersion = true && that.isSetFrameworkVersion(); - if (this_present_frameworkVersion || that_present_frameworkVersion) { - if (!(this_present_frameworkVersion && that_present_frameworkVersion)) - return false; - if (!this.frameworkVersion.equals(that.frameworkVersion)) - return false; - } - - boolean this_present_dependencyType = true; - boolean that_present_dependencyType = true; - if (this_present_dependencyType || that_present_dependencyType) { - if (!(this_present_dependencyType && that_present_dependencyType)) + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (this.dependencyType != that.dependencyType) + if (this.fileId != that.fileId) return false; } - boolean this_present_childrenBlockSizeByte = true; - boolean that_present_childrenBlockSizeByte = true; - if (this_present_childrenBlockSizeByte || that_present_childrenBlockSizeByte) { - if (!(this_present_childrenBlockSizeByte && that_present_childrenBlockSizeByte)) + boolean this_present_pinned = true; + boolean that_present_pinned = true; + if (this_present_pinned || that_present_pinned) { + if (!(this_present_pinned && that_present_pinned)) return false; - if (this.childrenBlockSizeByte != that.childrenBlockSizeByte) + if (this.pinned != that.pinned) return false; } @@ -23518,151 +22270,46 @@ public boolean equals(createDependency_args that) { } @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_parents = true && (isSetParents()); - list.add(present_parents); - if (present_parents) - list.add(parents); - - boolean present_children = true && (isSetChildren()); - list.add(present_children); - if (present_children) - list.add(children); - - boolean present_commandPrefix = true && (isSetCommandPrefix()); - list.add(present_commandPrefix); - if (present_commandPrefix) - list.add(commandPrefix); - - boolean present_data = true && (isSetData()); - list.add(present_data); - if (present_data) - list.add(data); - - boolean present_comment = true && (isSetComment()); - list.add(present_comment); - if (present_comment) - list.add(comment); - - boolean present_framework = true && (isSetFramework()); - list.add(present_framework); - if (present_framework) - list.add(framework); - - boolean present_frameworkVersion = true && (isSetFrameworkVersion()); - list.add(present_frameworkVersion); - if (present_frameworkVersion) - list.add(frameworkVersion); - - boolean present_dependencyType = true; - list.add(present_dependencyType); - if (present_dependencyType) - list.add(dependencyType); - - boolean present_childrenBlockSizeByte = true; - list.add(present_childrenBlockSizeByte); - if (present_childrenBlockSizeByte) - list.add(childrenBlockSizeByte); - - return list.hashCode(); - } - - @Override - public int compareTo(createDependency_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetParents()).compareTo(other.isSetParents()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParents()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parents, other.parents); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetChildren()).compareTo(other.isSetChildren()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetChildren()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.children, other.children); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCommandPrefix()).compareTo(other.isSetCommandPrefix()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCommandPrefix()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.commandPrefix, other.commandPrefix); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetComment()).compareTo(other.isSetComment()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetComment()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, other.comment); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFramework()).compareTo(other.isSetFramework()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFramework()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.framework, other.framework); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFrameworkVersion()).compareTo(other.isSetFrameworkVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFrameworkVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.frameworkVersion, other.frameworkVersion); - if (lastComparison != 0) { - return lastComparison; - } + public int hashCode() { + List list = new ArrayList(); + + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); + + boolean present_pinned = true; + list.add(present_pinned); + if (present_pinned) + list.add(pinned); + + return list.hashCode(); + } + + @Override + public int compareTo(setPinned_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); } - lastComparison = Boolean.valueOf(isSetDependencyType()).compareTo(other.isSetDependencyType()); + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetDependencyType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dependencyType, other.dependencyType); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetChildrenBlockSizeByte()).compareTo(other.isSetChildrenBlockSizeByte()); + lastComparison = Boolean.valueOf(isSetPinned()).compareTo(other.isSetPinned()); if (lastComparison != 0) { return lastComparison; } - if (isSetChildrenBlockSizeByte()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childrenBlockSizeByte, other.childrenBlockSizeByte); + if (isSetPinned()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pinned, other.pinned); if (lastComparison != 0) { return lastComparison; } @@ -23684,71 +22331,15 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("createDependency_args("); + StringBuilder sb = new StringBuilder("setPinned_args("); boolean first = true; - sb.append("parents:"); - if (this.parents == null) { - sb.append("null"); - } else { - sb.append(this.parents); - } - first = false; - if (!first) sb.append(", "); - sb.append("children:"); - if (this.children == null) { - sb.append("null"); - } else { - sb.append(this.children); - } - first = false; - if (!first) sb.append(", "); - sb.append("commandPrefix:"); - if (this.commandPrefix == null) { - sb.append("null"); - } else { - sb.append(this.commandPrefix); - } - first = false; - if (!first) sb.append(", "); - sb.append("data:"); - if (this.data == null) { - sb.append("null"); - } else { - sb.append(this.data); - } - first = false; - if (!first) sb.append(", "); - sb.append("comment:"); - if (this.comment == null) { - sb.append("null"); - } else { - sb.append(this.comment); - } - first = false; - if (!first) sb.append(", "); - sb.append("framework:"); - if (this.framework == null) { - sb.append("null"); - } else { - sb.append(this.framework); - } - first = false; - if (!first) sb.append(", "); - sb.append("frameworkVersion:"); - if (this.frameworkVersion == null) { - sb.append("null"); - } else { - sb.append(this.frameworkVersion); - } - first = false; - if (!first) sb.append(", "); - sb.append("dependencyType:"); - sb.append(this.dependencyType); + sb.append("fileId:"); + sb.append(this.fileId); first = false; if (!first) sb.append(", "); - sb.append("childrenBlockSizeByte:"); - sb.append(this.childrenBlockSizeByte); + sb.append("pinned:"); + sb.append(this.pinned); first = false; sb.append(")"); return sb.toString(); @@ -23777,15 +22368,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class createDependency_argsStandardSchemeFactory implements SchemeFactory { - public createDependency_argsStandardScheme getScheme() { - return new createDependency_argsStandardScheme(); + private static class setPinned_argsStandardSchemeFactory implements SchemeFactory { + public setPinned_argsStandardScheme getScheme() { + return new setPinned_argsStandardScheme(); } } - private static class createDependency_argsStandardScheme extends StandardScheme { + private static class setPinned_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, createDependency_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, setPinned_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -23795,104 +22386,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createDependency_ar break; } switch (schemeField.id) { - case 1: // PARENTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list212 = iprot.readListBegin(); - struct.parents = new ArrayList(_list212.size); - String _elem213; - for (int _i214 = 0; _i214 < _list212.size; ++_i214) - { - _elem213 = iprot.readString(); - struct.parents.add(_elem213); - } - iprot.readListEnd(); - } - struct.setParentsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // CHILDREN - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list215 = iprot.readListBegin(); - struct.children = new ArrayList(_list215.size); - String _elem216; - for (int _i217 = 0; _i217 < _list215.size; ++_i217) - { - _elem216 = iprot.readString(); - struct.children.add(_elem216); - } - iprot.readListEnd(); - } - struct.setChildrenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // COMMAND_PREFIX - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.commandPrefix = iprot.readString(); - struct.setCommandPrefixIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // DATA - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list218 = iprot.readListBegin(); - struct.data = new ArrayList(_list218.size); - ByteBuffer _elem219; - for (int _i220 = 0; _i220 < _list218.size; ++_i220) - { - _elem219 = iprot.readBinary(); - struct.data.add(_elem219); - } - iprot.readListEnd(); - } - struct.setDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // COMMENT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.comment = iprot.readString(); - struct.setCommentIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // FRAMEWORK - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.framework = iprot.readString(); - struct.setFrameworkIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // FRAMEWORK_VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.frameworkVersion = iprot.readString(); - struct.setFrameworkVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // DEPENDENCY_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.dependencyType = iprot.readI32(); - struct.setDependencyTypeIsSet(true); + case 1: // FILE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 9: // CHILDREN_BLOCK_SIZE_BYTE - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.childrenBlockSizeByte = iprot.readI64(); - struct.setChildrenBlockSizeByteIsSet(true); + case 2: // PINNED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.pinned = iprot.readBool(); + struct.setPinnedIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -23908,71 +22413,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createDependency_ar struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, createDependency_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, setPinned_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.parents != null) { - oprot.writeFieldBegin(PARENTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.parents.size())); - for (String _iter221 : struct.parents) - { - oprot.writeString(_iter221); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.children != null) { - oprot.writeFieldBegin(CHILDREN_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.children.size())); - for (String _iter222 : struct.children) - { - oprot.writeString(_iter222); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.commandPrefix != null) { - oprot.writeFieldBegin(COMMAND_PREFIX_FIELD_DESC); - oprot.writeString(struct.commandPrefix); - oprot.writeFieldEnd(); - } - if (struct.data != null) { - oprot.writeFieldBegin(DATA_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.data.size())); - for (ByteBuffer _iter223 : struct.data) - { - oprot.writeBinary(_iter223); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.comment != null) { - oprot.writeFieldBegin(COMMENT_FIELD_DESC); - oprot.writeString(struct.comment); - oprot.writeFieldEnd(); - } - if (struct.framework != null) { - oprot.writeFieldBegin(FRAMEWORK_FIELD_DESC); - oprot.writeString(struct.framework); - oprot.writeFieldEnd(); - } - if (struct.frameworkVersion != null) { - oprot.writeFieldBegin(FRAMEWORK_VERSION_FIELD_DESC); - oprot.writeString(struct.frameworkVersion); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DEPENDENCY_TYPE_FIELD_DESC); - oprot.writeI32(struct.dependencyType); + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); oprot.writeFieldEnd(); - oprot.writeFieldBegin(CHILDREN_BLOCK_SIZE_BYTE_FIELD_DESC); - oprot.writeI64(struct.childrenBlockSizeByte); + oprot.writeFieldBegin(PINNED_FIELD_DESC); + oprot.writeBool(struct.pinned); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -23980,196 +22429,66 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, createDependency_a } - private static class createDependency_argsTupleSchemeFactory implements SchemeFactory { - public createDependency_argsTupleScheme getScheme() { - return new createDependency_argsTupleScheme(); + private static class setPinned_argsTupleSchemeFactory implements SchemeFactory { + public setPinned_argsTupleScheme getScheme() { + return new setPinned_argsTupleScheme(); } } - private static class createDependency_argsTupleScheme extends TupleScheme { + private static class setPinned_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createDependency_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, setPinned_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetParents()) { + if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetChildren()) { + if (struct.isSetPinned()) { optionals.set(1); } - if (struct.isSetCommandPrefix()) { - optionals.set(2); - } - if (struct.isSetData()) { - optionals.set(3); - } - if (struct.isSetComment()) { - optionals.set(4); - } - if (struct.isSetFramework()) { - optionals.set(5); - } - if (struct.isSetFrameworkVersion()) { - optionals.set(6); - } - if (struct.isSetDependencyType()) { - optionals.set(7); - } - if (struct.isSetChildrenBlockSizeByte()) { - optionals.set(8); - } - oprot.writeBitSet(optionals, 9); - if (struct.isSetParents()) { - { - oprot.writeI32(struct.parents.size()); - for (String _iter224 : struct.parents) - { - oprot.writeString(_iter224); - } - } - } - if (struct.isSetChildren()) { - { - oprot.writeI32(struct.children.size()); - for (String _iter225 : struct.children) - { - oprot.writeString(_iter225); - } - } - } - if (struct.isSetCommandPrefix()) { - oprot.writeString(struct.commandPrefix); - } - if (struct.isSetData()) { - { - oprot.writeI32(struct.data.size()); - for (ByteBuffer _iter226 : struct.data) - { - oprot.writeBinary(_iter226); - } - } - } - if (struct.isSetComment()) { - oprot.writeString(struct.comment); - } - if (struct.isSetFramework()) { - oprot.writeString(struct.framework); - } - if (struct.isSetFrameworkVersion()) { - oprot.writeString(struct.frameworkVersion); - } - if (struct.isSetDependencyType()) { - oprot.writeI32(struct.dependencyType); + oprot.writeBitSet(optionals, 2); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); } - if (struct.isSetChildrenBlockSizeByte()) { - oprot.writeI64(struct.childrenBlockSizeByte); + if (struct.isSetPinned()) { + oprot.writeBool(struct.pinned); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createDependency_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, setPinned_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(9); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list227 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.parents = new ArrayList(_list227.size); - String _elem228; - for (int _i229 = 0; _i229 < _list227.size; ++_i229) - { - _elem228 = iprot.readString(); - struct.parents.add(_elem228); - } - } - struct.setParentsIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list230 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.children = new ArrayList(_list230.size); - String _elem231; - for (int _i232 = 0; _i232 < _list230.size; ++_i232) - { - _elem231 = iprot.readString(); - struct.children.add(_elem231); - } - } - struct.setChildrenIsSet(true); - } - if (incoming.get(2)) { - struct.commandPrefix = iprot.readString(); - struct.setCommandPrefixIsSet(true); - } - if (incoming.get(3)) { - { - org.apache.thrift.protocol.TList _list233 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.data = new ArrayList(_list233.size); - ByteBuffer _elem234; - for (int _i235 = 0; _i235 < _list233.size; ++_i235) - { - _elem234 = iprot.readBinary(); - struct.data.add(_elem234); - } - } - struct.setDataIsSet(true); - } - if (incoming.get(4)) { - struct.comment = iprot.readString(); - struct.setCommentIsSet(true); - } - if (incoming.get(5)) { - struct.framework = iprot.readString(); - struct.setFrameworkIsSet(true); - } - if (incoming.get(6)) { - struct.frameworkVersion = iprot.readString(); - struct.setFrameworkVersionIsSet(true); - } - if (incoming.get(7)) { - struct.dependencyType = iprot.readI32(); - struct.setDependencyTypeIsSet(true); - } - if (incoming.get(8)) { - struct.childrenBlockSizeByte = iprot.readI64(); - struct.setChildrenBlockSizeByteIsSet(true); + struct.pinned = iprot.readBool(); + struct.setPinnedIsSet(true); } } } } - public static class createDependency_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("createDependency_result"); + public static class setPinned_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("setPinned_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); - private static final org.apache.thrift.protocol.TField IPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ipe", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField FAEE_FIELD_DESC = new org.apache.thrift.protocol.TField("faee", org.apache.thrift.protocol.TType.STRUCT, (short)3); - private static final org.apache.thrift.protocol.TField BIE_FIELD_DESC = new org.apache.thrift.protocol.TField("bie", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)5); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new createDependency_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new createDependency_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new setPinned_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new setPinned_resultTupleSchemeFactory()); } - public int success; // required - public InvalidPathException ipe; // required - public FileDoesNotExistException fdnee; // required - public FileAlreadyExistException faee; // required - public BlockInfoException bie; // required - public TachyonException te; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - IPE((short)1, "ipe"), - FDNEE((short)2, "fdnee"), - FAEE((short)3, "faee"), - BIE((short)4, "bie"), - TE((short)5, "te"); + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -24184,18 +22503,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // IPE - return IPE; - case 2: // FDNEE - return FDNEE; - case 3: // FAEE - return FAEE; - case 4: // BIE - return BIE; - case 5: // TE - return TE; + case 1: // E + return E; default: return null; } @@ -24209,303 +22518,101 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.IPE, new org.apache.thrift.meta_data.FieldMetaData("ipe", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.FAEE, new org.apache.thrift.meta_data.FieldMetaData("faee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.BIE, new org.apache.thrift.meta_data.FieldMetaData("bie", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", 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(createDependency_result.class, metaDataMap); - } - - public createDependency_result() { - } - - public createDependency_result( - int success, - InvalidPathException ipe, - FileDoesNotExistException fdnee, - FileAlreadyExistException faee, - BlockInfoException bie, - TachyonException te) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.ipe = ipe; - this.fdnee = fdnee; - this.faee = faee; - this.bie = bie; - this.te = te; - } - - /** - * Performs a deep copy on other. - */ - public createDependency_result(createDependency_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetIpe()) { - this.ipe = new InvalidPathException(other.ipe); - } - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); - } - if (other.isSetFaee()) { - this.faee = new FileAlreadyExistException(other.faee); - } - if (other.isSetBie()) { - this.bie = new BlockInfoException(other.bie); - } - if (other.isSetTe()) { - this.te = new TachyonException(other.te); - } - } - - public createDependency_result deepCopy() { - return new createDependency_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.ipe = null; - this.fdnee = null; - this.faee = null; - this.bie = null; - this.te = null; - } - - public int getSuccess() { - return this.success; - } - - public createDependency_result setSuccess(int success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public InvalidPathException getIpe() { - return this.ipe; - } - - public createDependency_result setIpe(InvalidPathException ipe) { - this.ipe = ipe; - return this; - } - - public void unsetIpe() { - this.ipe = null; - } - - /** Returns true if field ipe is set (has been assigned a value) and false otherwise */ - public boolean isSetIpe() { - return this.ipe != null; - } - - public void setIpeIsSet(boolean value) { - if (!value) { - this.ipe = null; - } - } - - public FileDoesNotExistException getFdnee() { - return this.fdnee; - } + } - public createDependency_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; - return this; - } + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } - public void unsetFdnee() { - this.fdnee = null; - } + private final short _thriftId; + private final String _fieldName; - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; - } + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } - public void setFdneeIsSet(boolean value) { - if (!value) { - this.fdnee = null; + public short getThriftFieldId() { + return _thriftId; } - } - public FileAlreadyExistException getFaee() { - return this.faee; + public String getFieldName() { + return _fieldName; + } } - public createDependency_result setFaee(FileAlreadyExistException faee) { - this.faee = faee; - return this; + // isset id assignments + 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, 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(setPinned_result.class, metaDataMap); } - public void unsetFaee() { - this.faee = null; + public setPinned_result() { } - /** Returns true if field faee is set (has been assigned a value) and false otherwise */ - public boolean isSetFaee() { - return this.faee != null; + public setPinned_result( + TachyonTException e) + { + this(); + this.e = e; } - public void setFaeeIsSet(boolean value) { - if (!value) { - this.faee = null; + /** + * Performs a deep copy on other. + */ + public setPinned_result(setPinned_result other) { + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public BlockInfoException getBie() { - return this.bie; - } - - public createDependency_result setBie(BlockInfoException bie) { - this.bie = bie; - return this; - } - - public void unsetBie() { - this.bie = null; - } - - /** Returns true if field bie is set (has been assigned a value) and false otherwise */ - public boolean isSetBie() { - return this.bie != null; + public setPinned_result deepCopy() { + return new setPinned_result(this); } - public void setBieIsSet(boolean value) { - if (!value) { - this.bie = null; - } + @Override + public void clear() { + this.e = null; } - public TachyonException getTe() { - return this.te; + public TachyonTException getE() { + return this.e; } - public createDependency_result setTe(TachyonException te) { - this.te = te; + public setPinned_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetTe() { - this.te = null; + public void unsetE() { + this.e = null; } - /** Returns true if field te is set (has been assigned a value) and false otherwise */ - public boolean isSetTe() { - return this.te != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setTeIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.te = null; + this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Integer)value); - } - break; - - case IPE: - if (value == null) { - unsetIpe(); - } else { - setIpe((InvalidPathException)value); - } - break; - - case FDNEE: - if (value == null) { - unsetFdnee(); - } else { - setFdnee((FileDoesNotExistException)value); - } - break; - - case FAEE: - if (value == null) { - unsetFaee(); - } else { - setFaee((FileAlreadyExistException)value); - } - break; - - case BIE: - if (value == null) { - unsetBie(); - } else { - setBie((BlockInfoException)value); - } - break; - - case TE: + case E: if (value == null) { - unsetTe(); + unsetE(); } else { - setTe((TachyonException)value); + setE((TachyonTException)value); } break; @@ -24514,23 +22621,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Integer.valueOf(getSuccess()); - - case IPE: - return getIpe(); - - case FDNEE: - return getFdnee(); - - case FAEE: - return getFaee(); - - case BIE: - return getBie(); - - case TE: - return getTe(); + case E: + return getE(); } throw new IllegalStateException(); @@ -24543,18 +22635,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case IPE: - return isSetIpe(); - case FDNEE: - return isSetFdnee(); - case FAEE: - return isSetFaee(); - case BIE: - return isSetBie(); - case TE: - return isSetTe(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -24563,66 +22645,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof createDependency_result) - return this.equals((createDependency_result)that); + if (that instanceof setPinned_result) + return this.equals((setPinned_result)that); return false; } - public boolean equals(createDependency_result that) { + public boolean equals(setPinned_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_ipe = true && this.isSetIpe(); - boolean that_present_ipe = true && that.isSetIpe(); - if (this_present_ipe || that_present_ipe) { - if (!(this_present_ipe && that_present_ipe)) - return false; - if (!this.ipe.equals(that.ipe)) - return false; - } - - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) - return false; - if (!this.fdnee.equals(that.fdnee)) - return false; - } - - boolean this_present_faee = true && this.isSetFaee(); - boolean that_present_faee = true && that.isSetFaee(); - if (this_present_faee || that_present_faee) { - if (!(this_present_faee && that_present_faee)) - return false; - if (!this.faee.equals(that.faee)) - return false; - } - - boolean this_present_bie = true && this.isSetBie(); - boolean that_present_bie = true && that.isSetBie(); - if (this_present_bie || that_present_bie) { - if (!(this_present_bie && that_present_bie)) - return false; - if (!this.bie.equals(that.bie)) - return false; - } - - boolean this_present_te = true && this.isSetTe(); - boolean that_present_te = true && that.isSetTe(); - if (this_present_te || that_present_te) { - if (!(this_present_te && that_present_te)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.te.equals(that.te)) + if (!this.e.equals(that.e)) return false; } @@ -24633,103 +22670,28 @@ public boolean equals(createDependency_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_ipe = true && (isSetIpe()); - list.add(present_ipe); - if (present_ipe) - list.add(ipe); - - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); - - boolean present_faee = true && (isSetFaee()); - list.add(present_faee); - if (present_faee) - list.add(faee); - - boolean present_bie = true && (isSetBie()); - list.add(present_bie); - if (present_bie) - list.add(bie); - - boolean present_te = true && (isSetTe()); - list.add(present_te); - if (present_te) - list.add(te); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(createDependency_result other) { + public int compareTo(setPinned_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIpe()).compareTo(other.isSetIpe()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIpe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipe, other.ipe); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFaee()).compareTo(other.isSetFaee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFaee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.faee, other.faee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBie()).compareTo(other.isSetBie()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBie()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bie, other.bie); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTe()).compareTo(other.isSetTe()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetTe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, other.te); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -24751,50 +22713,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("createDependency_result("); + StringBuilder sb = new StringBuilder("setPinned_result("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("ipe:"); - if (this.ipe == null) { - sb.append("null"); - } else { - sb.append(this.ipe); - } - first = false; - if (!first) sb.append(", "); - sb.append("fdnee:"); - if (this.fdnee == null) { - sb.append("null"); - } else { - sb.append(this.fdnee); - } - first = false; - if (!first) sb.append(", "); - sb.append("faee:"); - if (this.faee == null) { - sb.append("null"); - } else { - sb.append(this.faee); - } - first = false; - if (!first) sb.append(", "); - sb.append("bie:"); - if (this.bie == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.bie); - } - first = false; - if (!first) sb.append(", "); - sb.append("te:"); - if (this.te == null) { - sb.append("null"); - } else { - sb.append(this.te); + sb.append(this.e); } first = false; sb.append(")"); @@ -24816,23 +22742,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class createDependency_resultStandardSchemeFactory implements SchemeFactory { - public createDependency_resultStandardScheme getScheme() { - return new createDependency_resultStandardScheme(); + private static class setPinned_resultStandardSchemeFactory implements SchemeFactory { + public setPinned_resultStandardScheme getScheme() { + return new setPinned_resultStandardScheme(); } } - private static class createDependency_resultStandardScheme extends StandardScheme { + private static class setPinned_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, createDependency_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, setPinned_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -24842,55 +22766,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createDependency_re break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.success = iprot.readI32(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // IPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // FAEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // BIE + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // TE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -24904,40 +22784,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createDependency_re // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, createDependency_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI32(struct.success); - oprot.writeFieldEnd(); - } - if (struct.ipe != null) { - oprot.writeFieldBegin(IPE_FIELD_DESC); - struct.ipe.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.faee != null) { - oprot.writeFieldBegin(FAEE_FIELD_DESC); - struct.faee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.bie != null) { - oprot.writeFieldBegin(BIE_FIELD_DESC); - struct.bie.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.te != null) { - oprot.writeFieldBegin(TE_FIELD_DESC); - struct.te.write(oprot); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, setPinned_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -24946,111 +22801,57 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, createDependency_r } - private static class createDependency_resultTupleSchemeFactory implements SchemeFactory { - public createDependency_resultTupleScheme getScheme() { - return new createDependency_resultTupleScheme(); + private static class setPinned_resultTupleSchemeFactory implements SchemeFactory { + public setPinned_resultTupleScheme getScheme() { + return new setPinned_resultTupleScheme(); } } - private static class createDependency_resultTupleScheme extends TupleScheme { + private static class setPinned_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createDependency_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, setPinned_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetE()) { optionals.set(0); } - if (struct.isSetIpe()) { - optionals.set(1); - } - if (struct.isSetFdnee()) { - optionals.set(2); - } - if (struct.isSetFaee()) { - optionals.set(3); - } - if (struct.isSetBie()) { - optionals.set(4); - } - if (struct.isSetTe()) { - optionals.set(5); - } - oprot.writeBitSet(optionals, 6); - if (struct.isSetSuccess()) { - oprot.writeI32(struct.success); - } - if (struct.isSetIpe()) { - struct.ipe.write(oprot); - } - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); - } - if (struct.isSetFaee()) { - struct.faee.write(oprot); - } - if (struct.isSetBie()) { - struct.bie.write(oprot); - } - if (struct.isSetTe()) { - struct.te.write(oprot); + oprot.writeBitSet(optionals, 1); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createDependency_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, setPinned_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(6); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = iprot.readI32(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); - } - if (incoming.get(2)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } - if (incoming.get(3)) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); - } - if (incoming.get(4)) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } - if (incoming.get(5)) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class getDependencyInfo_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("getDependencyInfo_args"); + public static class unmount_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("unmount_args"); - private static final org.apache.thrift.protocol.TField DEPENDENCY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dependencyId", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField TACHYON_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("tachyonPath", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getDependencyInfo_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getDependencyInfo_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new unmount_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new unmount_argsTupleSchemeFactory()); } - public int dependencyId; // required + public String tachyonPath; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DEPENDENCY_ID((short)1, "dependencyId"); + TACHYON_PATH((short)1, "tachyonPath"); private static final Map byName = new HashMap(); @@ -25065,8 +22866,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DEPENDENCY_ID - return DEPENDENCY_ID; + case 1: // TACHYON_PATH + return TACHYON_PATH; default: return null; } @@ -25107,76 +22908,74 @@ public String getFieldName() { } // isset id assignments - private static final int __DEPENDENCYID_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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.DEPENDENCY_ID, new org.apache.thrift.meta_data.FieldMetaData("dependencyId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.TACHYON_PATH, new org.apache.thrift.meta_data.FieldMetaData("tachyonPath", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDependencyInfo_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unmount_args.class, metaDataMap); } - public getDependencyInfo_args() { + public unmount_args() { } - public getDependencyInfo_args( - int dependencyId) + public unmount_args( + String tachyonPath) { this(); - this.dependencyId = dependencyId; - setDependencyIdIsSet(true); + this.tachyonPath = tachyonPath; } /** * Performs a deep copy on other. */ - public getDependencyInfo_args(getDependencyInfo_args other) { - __isset_bitfield = other.__isset_bitfield; - this.dependencyId = other.dependencyId; + public unmount_args(unmount_args other) { + if (other.isSetTachyonPath()) { + this.tachyonPath = other.tachyonPath; + } } - public getDependencyInfo_args deepCopy() { - return new getDependencyInfo_args(this); + public unmount_args deepCopy() { + return new unmount_args(this); } @Override public void clear() { - setDependencyIdIsSet(false); - this.dependencyId = 0; + this.tachyonPath = null; } - public int getDependencyId() { - return this.dependencyId; + public String getTachyonPath() { + return this.tachyonPath; } - public getDependencyInfo_args setDependencyId(int dependencyId) { - this.dependencyId = dependencyId; - setDependencyIdIsSet(true); + public unmount_args setTachyonPath(String tachyonPath) { + this.tachyonPath = tachyonPath; return this; } - public void unsetDependencyId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEPENDENCYID_ISSET_ID); + public void unsetTachyonPath() { + this.tachyonPath = null; } - /** Returns true if field dependencyId is set (has been assigned a value) and false otherwise */ - public boolean isSetDependencyId() { - return EncodingUtils.testBit(__isset_bitfield, __DEPENDENCYID_ISSET_ID); + /** Returns true if field tachyonPath is set (has been assigned a value) and false otherwise */ + public boolean isSetTachyonPath() { + return this.tachyonPath != null; } - public void setDependencyIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEPENDENCYID_ISSET_ID, value); + public void setTachyonPathIsSet(boolean value) { + if (!value) { + this.tachyonPath = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DEPENDENCY_ID: + case TACHYON_PATH: if (value == null) { - unsetDependencyId(); + unsetTachyonPath(); } else { - setDependencyId((Integer)value); + setTachyonPath((String)value); } break; @@ -25185,8 +22984,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case DEPENDENCY_ID: - return Integer.valueOf(getDependencyId()); + case TACHYON_PATH: + return getTachyonPath(); } throw new IllegalStateException(); @@ -25199,8 +22998,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case DEPENDENCY_ID: - return isSetDependencyId(); + case TACHYON_PATH: + return isSetTachyonPath(); } throw new IllegalStateException(); } @@ -25209,21 +23008,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getDependencyInfo_args) - return this.equals((getDependencyInfo_args)that); + if (that instanceof unmount_args) + return this.equals((unmount_args)that); return false; } - public boolean equals(getDependencyInfo_args that) { + public boolean equals(unmount_args that) { if (that == null) return false; - boolean this_present_dependencyId = true; - boolean that_present_dependencyId = true; - if (this_present_dependencyId || that_present_dependencyId) { - if (!(this_present_dependencyId && that_present_dependencyId)) + boolean this_present_tachyonPath = true && this.isSetTachyonPath(); + boolean that_present_tachyonPath = true && that.isSetTachyonPath(); + if (this_present_tachyonPath || that_present_tachyonPath) { + if (!(this_present_tachyonPath && that_present_tachyonPath)) return false; - if (this.dependencyId != that.dependencyId) + if (!this.tachyonPath.equals(that.tachyonPath)) return false; } @@ -25234,28 +23033,28 @@ public boolean equals(getDependencyInfo_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_dependencyId = true; - list.add(present_dependencyId); - if (present_dependencyId) - list.add(dependencyId); + boolean present_tachyonPath = true && (isSetTachyonPath()); + list.add(present_tachyonPath); + if (present_tachyonPath) + list.add(tachyonPath); return list.hashCode(); } @Override - public int compareTo(getDependencyInfo_args other) { + public int compareTo(unmount_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetDependencyId()).compareTo(other.isSetDependencyId()); + lastComparison = Boolean.valueOf(isSetTachyonPath()).compareTo(other.isSetTachyonPath()); if (lastComparison != 0) { return lastComparison; } - if (isSetDependencyId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dependencyId, other.dependencyId); + if (isSetTachyonPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tachyonPath, other.tachyonPath); if (lastComparison != 0) { return lastComparison; } @@ -25277,11 +23076,15 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getDependencyInfo_args("); + StringBuilder sb = new StringBuilder("unmount_args("); boolean first = true; - sb.append("dependencyId:"); - sb.append(this.dependencyId); + sb.append("tachyonPath:"); + if (this.tachyonPath == null) { + sb.append("null"); + } else { + sb.append(this.tachyonPath); + } first = false; sb.append(")"); return sb.toString(); @@ -25302,23 +23105,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getDependencyInfo_argsStandardSchemeFactory implements SchemeFactory { - public getDependencyInfo_argsStandardScheme getScheme() { - return new getDependencyInfo_argsStandardScheme(); + private static class unmount_argsStandardSchemeFactory implements SchemeFactory { + public unmount_argsStandardScheme getScheme() { + return new unmount_argsStandardScheme(); } } - private static class getDependencyInfo_argsStandardScheme extends StandardScheme { + private static class unmount_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getDependencyInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, unmount_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -25328,10 +23129,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getDependencyInfo_a break; } switch (schemeField.id) { - case 1: // DEPENDENCY_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.dependencyId = iprot.readI32(); - struct.setDependencyIdIsSet(true); + case 1: // TACHYON_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tachyonPath = iprot.readString(); + struct.setTachyonPathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -25347,72 +23148,77 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getDependencyInfo_a struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getDependencyInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, unmount_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(DEPENDENCY_ID_FIELD_DESC); - oprot.writeI32(struct.dependencyId); - oprot.writeFieldEnd(); + if (struct.tachyonPath != null) { + oprot.writeFieldBegin(TACHYON_PATH_FIELD_DESC); + oprot.writeString(struct.tachyonPath); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getDependencyInfo_argsTupleSchemeFactory implements SchemeFactory { - public getDependencyInfo_argsTupleScheme getScheme() { - return new getDependencyInfo_argsTupleScheme(); + private static class unmount_argsTupleSchemeFactory implements SchemeFactory { + public unmount_argsTupleScheme getScheme() { + return new unmount_argsTupleScheme(); } } - private static class getDependencyInfo_argsTupleScheme extends TupleScheme { + private static class unmount_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getDependencyInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, unmount_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetDependencyId()) { + if (struct.isSetTachyonPath()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetDependencyId()) { - oprot.writeI32(struct.dependencyId); + if (struct.isSetTachyonPath()) { + oprot.writeString(struct.tachyonPath); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getDependencyInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, unmount_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.dependencyId = iprot.readI32(); - struct.setDependencyIdIsSet(true); + struct.tachyonPath = iprot.readString(); + struct.setTachyonPathIsSet(true); } } } } - public static class getDependencyInfo_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("getDependencyInfo_result"); + public static class unmount_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("unmount_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField DDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("ddnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); + 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_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IOE_FIELD_DESC = new org.apache.thrift.protocol.TField("ioe", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getDependencyInfo_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getDependencyInfo_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new unmount_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new unmount_resultTupleSchemeFactory()); } - public DependencyInfo success; // required - public DependencyDoesNotExistException ddnee; // required + public boolean success; // required + public TachyonTException e; // required + public ThriftIOException ioe; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), - DDNEE((short)1, "ddnee"); + E((short)1, "e"), + IOE((short)2, "ioe"); private static final Map byName = new HashMap(); @@ -25429,8 +23235,10 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // DDNEE - return DDNEE; + case 1: // E + return E; + case 2: // IOE + return IOE; default: return null; } @@ -25471,96 +23279,130 @@ public String getFieldName() { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DependencyInfo.class))); - tmpMap.put(_Fields.DDNEE, new org.apache.thrift.meta_data.FieldMetaData("ddnee", 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IOE, new org.apache.thrift.meta_data.FieldMetaData("ioe", 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(getDependencyInfo_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unmount_result.class, metaDataMap); } - public getDependencyInfo_result() { + public unmount_result() { } - public getDependencyInfo_result( - DependencyInfo success, - DependencyDoesNotExistException ddnee) + public unmount_result( + boolean success, + TachyonTException e, + ThriftIOException ioe) { this(); this.success = success; - this.ddnee = ddnee; + setSuccessIsSet(true); + this.e = e; + this.ioe = ioe; } /** * Performs a deep copy on other. */ - public getDependencyInfo_result(getDependencyInfo_result other) { - if (other.isSetSuccess()) { - this.success = new DependencyInfo(other.success); + public unmount_result(unmount_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } - if (other.isSetDdnee()) { - this.ddnee = new DependencyDoesNotExistException(other.ddnee); + if (other.isSetIoe()) { + this.ioe = new ThriftIOException(other.ioe); } } - public getDependencyInfo_result deepCopy() { - return new getDependencyInfo_result(this); + public unmount_result deepCopy() { + return new unmount_result(this); } @Override public void clear() { - this.success = null; - this.ddnee = null; + setSuccessIsSet(false); + this.success = false; + this.e = null; + this.ioe = null; } - public DependencyInfo getSuccess() { + public boolean isSuccess() { return this.success; } - public getDependencyInfo_result setSuccess(DependencyInfo success) { + public unmount_result setSuccess(boolean success) { this.success = success; + setSuccessIsSet(true); return this; } public void unsetSuccess() { - this.success = null; + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.success != null; + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TachyonTException getE() { + return this.e; + } + + public unmount_result setE(TachyonTException e) { + this.e = e; + return this; + } + + public void unsetE() { + this.e = null; + } + + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; + } + + public void setEIsSet(boolean value) { if (!value) { - this.success = null; + this.e = null; } } - public DependencyDoesNotExistException getDdnee() { - return this.ddnee; + public ThriftIOException getIoe() { + return this.ioe; } - public getDependencyInfo_result setDdnee(DependencyDoesNotExistException ddnee) { - this.ddnee = ddnee; + public unmount_result setIoe(ThriftIOException ioe) { + this.ioe = ioe; return this; } - public void unsetDdnee() { - this.ddnee = null; + public void unsetIoe() { + this.ioe = null; } - /** Returns true if field ddnee is set (has been assigned a value) and false otherwise */ - public boolean isSetDdnee() { - return this.ddnee != null; + /** Returns true if field ioe is set (has been assigned a value) and false otherwise */ + public boolean isSetIoe() { + return this.ioe != null; } - public void setDdneeIsSet(boolean value) { + public void setIoeIsSet(boolean value) { if (!value) { - this.ddnee = null; + this.ioe = null; } } @@ -25570,15 +23412,23 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((DependencyInfo)value); + setSuccess((Boolean)value); + } + break; + + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); } break; - case DDNEE: + case IOE: if (value == null) { - unsetDdnee(); + unsetIoe(); } else { - setDdnee((DependencyDoesNotExistException)value); + setIoe((ThriftIOException)value); } break; @@ -25588,10 +23438,13 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return Boolean.valueOf(isSuccess()); - case DDNEE: - return getDdnee(); + case E: + return getE(); + + case IOE: + return getIoe(); } throw new IllegalStateException(); @@ -25606,8 +23459,10 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); - case DDNEE: - return isSetDdnee(); + case E: + return isSetE(); + case IOE: + return isSetIoe(); } throw new IllegalStateException(); } @@ -25616,30 +23471,39 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getDependencyInfo_result) - return this.equals((getDependencyInfo_result)that); + if (that instanceof unmount_result) + return this.equals((unmount_result)that); return false; } - public boolean equals(getDependencyInfo_result that) { + public boolean equals(unmount_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) + if (this.success != that.success) + return false; + } + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) return false; } - boolean this_present_ddnee = true && this.isSetDdnee(); - boolean that_present_ddnee = true && that.isSetDdnee(); - if (this_present_ddnee || that_present_ddnee) { - if (!(this_present_ddnee && that_present_ddnee)) + boolean this_present_ioe = true && this.isSetIoe(); + boolean that_present_ioe = true && that.isSetIoe(); + if (this_present_ioe || that_present_ioe) { + if (!(this_present_ioe && that_present_ioe)) return false; - if (!this.ddnee.equals(that.ddnee)) + if (!this.ioe.equals(that.ioe)) return false; } @@ -25650,21 +23514,26 @@ public boolean equals(getDependencyInfo_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); + boolean present_success = true; list.add(present_success); if (present_success) list.add(success); - boolean present_ddnee = true && (isSetDdnee()); - list.add(present_ddnee); - if (present_ddnee) - list.add(ddnee); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); + + boolean present_ioe = true && (isSetIoe()); + list.add(present_ioe); + if (present_ioe) + list.add(ioe); return list.hashCode(); } @Override - public int compareTo(getDependencyInfo_result other) { + public int compareTo(unmount_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -25681,12 +23550,22 @@ public int compareTo(getDependencyInfo_result other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDdnee()).compareTo(other.isSetDdnee()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIoe()).compareTo(other.isSetIoe()); if (lastComparison != 0) { return lastComparison; } - if (isSetDdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ddnee, other.ddnee); + if (isSetIoe()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioe, other.ioe); if (lastComparison != 0) { return lastComparison; } @@ -25708,22 +23587,26 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getDependencyInfo_result("); + StringBuilder sb = new StringBuilder("unmount_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.e); } first = false; if (!first) sb.append(", "); - sb.append("ddnee:"); - if (this.ddnee == null) { + sb.append("ioe:"); + if (this.ioe == null) { sb.append("null"); } else { - sb.append(this.ddnee); + sb.append(this.ioe); } first = false; sb.append(")"); @@ -25733,9 +23616,6 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -25748,21 +23628,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getDependencyInfo_resultStandardSchemeFactory implements SchemeFactory { - public getDependencyInfo_resultStandardScheme getScheme() { - return new getDependencyInfo_resultStandardScheme(); + private static class unmount_resultStandardSchemeFactory implements SchemeFactory { + public unmount_resultStandardScheme getScheme() { + return new unmount_resultStandardScheme(); } } - private static class getDependencyInfo_resultStandardScheme extends StandardScheme { + private static class unmount_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getDependencyInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, unmount_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -25773,19 +23655,27 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getDependencyInfo_r } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new DependencyInfo(); - struct.success.read(iprot); + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // DDNEE + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IOE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ddnee = new DependencyDoesNotExistException(); - struct.ddnee.read(iprot); - struct.setDdneeIsSet(true); + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -25801,18 +23691,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getDependencyInfo_r struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getDependencyInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, unmount_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { + if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } - if (struct.ddnee != null) { - oprot.writeFieldBegin(DDNEE_FIELD_DESC); - struct.ddnee.write(oprot); + if (struct.ioe != null) { + oprot.writeFieldBegin(IOE_FIELD_DESC); + struct.ioe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -25821,68 +23716,76 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getDependencyInfo_ } - private static class getDependencyInfo_resultTupleSchemeFactory implements SchemeFactory { - public getDependencyInfo_resultTupleScheme getScheme() { - return new getDependencyInfo_resultTupleScheme(); + private static class unmount_resultTupleSchemeFactory implements SchemeFactory { + public unmount_resultTupleScheme getScheme() { + return new unmount_resultTupleScheme(); } } - private static class getDependencyInfo_resultTupleScheme extends TupleScheme { + private static class unmount_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getDependencyInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, unmount_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetDdnee()) { + if (struct.isSetE()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); + if (struct.isSetIoe()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { - struct.success.write(oprot); + oprot.writeBool(struct.success); + } + if (struct.isSetE()) { + struct.e.write(oprot); } - if (struct.isSetDdnee()) { - struct.ddnee.write(oprot); + if (struct.isSetIoe()) { + struct.ioe.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getDependencyInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, unmount_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { - struct.success = new DependencyInfo(); - struct.success.read(iprot); + struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.ddnee = new DependencyDoesNotExistException(); - struct.ddnee.read(iprot); - struct.setDdneeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } + if (incoming.get(2)) { + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } } } } - public static class reportLostFile_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("reportLostFile_args"); + public static class workerGetPinIdList_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("workerGetPinIdList_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new reportLostFile_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new reportLostFile_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new workerGetPinIdList_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerGetPinIdList_argsTupleSchemeFactory()); } - public long fileId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"); +; private static final Map byName = new HashMap(); @@ -25897,8 +23800,6 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; default: return null; } @@ -25937,89 +23838,37 @@ public String getFieldName() { return _fieldName; } } - - // isset id assignments - private static final int __FILEID_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reportLostFile_args.class, metaDataMap); - } - - public reportLostFile_args() { + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerGetPinIdList_args.class, metaDataMap); } - public reportLostFile_args( - long fileId) - { - this(); - this.fileId = fileId; - setFileIdIsSet(true); + public workerGetPinIdList_args() { } /** * Performs a deep copy on other. */ - public reportLostFile_args(reportLostFile_args other) { - __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; + public workerGetPinIdList_args(workerGetPinIdList_args other) { } - public reportLostFile_args deepCopy() { - return new reportLostFile_args(this); + public workerGetPinIdList_args deepCopy() { + return new workerGetPinIdList_args(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; - } - - public long getFileId() { - return this.fileId; - } - - public reportLostFile_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); - return this; - } - - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); - } - - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); - } - - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: - if (value == null) { - unsetFileId(); - } else { - setFileId((Long)value); - } - break; - } } public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); - } throw new IllegalStateException(); } @@ -26031,8 +23880,6 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); } throw new IllegalStateException(); } @@ -26041,24 +23888,15 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof reportLostFile_args) - return this.equals((reportLostFile_args)that); + if (that instanceof workerGetPinIdList_args) + return this.equals((workerGetPinIdList_args)that); return false; } - public boolean equals(reportLostFile_args that) { + public boolean equals(workerGetPinIdList_args that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) - return false; - if (this.fileId != that.fileId) - return false; - } - return true; } @@ -26066,32 +23904,17 @@ public boolean equals(reportLostFile_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); - return list.hashCode(); } @Override - public int compareTo(reportLostFile_args other) { + public int compareTo(workerGetPinIdList_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -26109,12 +23932,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("reportLostFile_args("); + StringBuilder sb = new StringBuilder("workerGetPinIdList_args("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); - first = false; sb.append(")"); return sb.toString(); } @@ -26134,23 +23954,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class reportLostFile_argsStandardSchemeFactory implements SchemeFactory { - public reportLostFile_argsStandardScheme getScheme() { - return new reportLostFile_argsStandardScheme(); + private static class workerGetPinIdList_argsStandardSchemeFactory implements SchemeFactory { + public workerGetPinIdList_argsStandardScheme getScheme() { + return new workerGetPinIdList_argsStandardScheme(); } } - private static class reportLostFile_argsStandardScheme extends StandardScheme { + private static class workerGetPinIdList_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, reportLostFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPinIdList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -26160,14 +23978,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, reportLostFile_args break; } switch (schemeField.id) { - case 1: // FILE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -26179,69 +23989,53 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, reportLostFile_args struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, reportLostFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetPinIdList_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class reportLostFile_argsTupleSchemeFactory implements SchemeFactory { - public reportLostFile_argsTupleScheme getScheme() { - return new reportLostFile_argsTupleScheme(); + private static class workerGetPinIdList_argsTupleSchemeFactory implements SchemeFactory { + public workerGetPinIdList_argsTupleScheme getScheme() { + return new workerGetPinIdList_argsTupleScheme(); } } - private static class reportLostFile_argsTupleScheme extends TupleScheme { + private static class workerGetPinIdList_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, reportLostFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, workerGetPinIdList_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, reportLostFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, workerGetPinIdList_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); - } } } } - public static class reportLostFile_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("reportLostFile_result"); + public static class workerGetPinIdList_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("workerGetPinIdList_result"); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.SET, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new reportLostFile_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new reportLostFile_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new workerGetPinIdList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerGetPinIdList_resultTupleSchemeFactory()); } - public FileDoesNotExistException fdnee; // required + public Set success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FDNEE((short)1, "fdnee"); + SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -26256,8 +24050,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FDNEE - return FDNEE; + case 0: // SUCCESS + return SUCCESS; default: return null; } @@ -26301,71 +24095,88 @@ 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.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reportLostFile_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerGetPinIdList_result.class, metaDataMap); } - public reportLostFile_result() { + public workerGetPinIdList_result() { } - public reportLostFile_result( - FileDoesNotExistException fdnee) + public workerGetPinIdList_result( + Set success) { this(); - this.fdnee = fdnee; + this.success = success; } /** * Performs a deep copy on other. */ - public reportLostFile_result(reportLostFile_result other) { - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); + public workerGetPinIdList_result(workerGetPinIdList_result other) { + if (other.isSetSuccess()) { + Set __this__success = new HashSet(other.success); + this.success = __this__success; } } - public reportLostFile_result deepCopy() { - return new reportLostFile_result(this); + public workerGetPinIdList_result deepCopy() { + return new workerGetPinIdList_result(this); } @Override public void clear() { - this.fdnee = null; + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(long elem) { + if (this.success == null) { + this.success = new HashSet(); + } + this.success.add(elem); } - public FileDoesNotExistException getFdnee() { - return this.fdnee; + public Set getSuccess() { + return this.success; } - public reportLostFile_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; + public workerGetPinIdList_result setSuccess(Set success) { + this.success = success; return this; } - public void unsetFdnee() { - this.fdnee = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setFdneeIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.fdnee = null; + this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FDNEE: + case SUCCESS: if (value == null) { - unsetFdnee(); + unsetSuccess(); } else { - setFdnee((FileDoesNotExistException)value); + setSuccess((Set)value); } break; @@ -26374,8 +24185,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FDNEE: - return getFdnee(); + case SUCCESS: + return getSuccess(); } throw new IllegalStateException(); @@ -26388,8 +24199,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case FDNEE: - return isSetFdnee(); + case SUCCESS: + return isSetSuccess(); } throw new IllegalStateException(); } @@ -26398,21 +24209,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof reportLostFile_result) - return this.equals((reportLostFile_result)that); + if (that instanceof workerGetPinIdList_result) + return this.equals((workerGetPinIdList_result)that); return false; } - public boolean equals(reportLostFile_result that) { + public boolean equals(workerGetPinIdList_result that) { if (that == null) return false; - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.fdnee.equals(that.fdnee)) + if (!this.success.equals(that.success)) return false; } @@ -26423,28 +24234,28 @@ public boolean equals(reportLostFile_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); return list.hashCode(); } @Override - public int compareTo(reportLostFile_result other) { + public int compareTo(workerGetPinIdList_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -26466,14 +24277,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("reportLostFile_result("); + StringBuilder sb = new StringBuilder("workerGetPinIdList_result("); boolean first = true; - sb.append("fdnee:"); - if (this.fdnee == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.fdnee); + sb.append(this.success); } first = false; sb.append(")"); @@ -26501,15 +24312,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class reportLostFile_resultStandardSchemeFactory implements SchemeFactory { - public reportLostFile_resultStandardScheme getScheme() { - return new reportLostFile_resultStandardScheme(); + private static class workerGetPinIdList_resultStandardSchemeFactory implements SchemeFactory { + public workerGetPinIdList_resultStandardScheme getScheme() { + return new workerGetPinIdList_resultStandardScheme(); } } - private static class reportLostFile_resultStandardScheme extends StandardScheme { + private static class workerGetPinIdList_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, reportLostFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPinIdList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -26519,11 +24330,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, reportLostFile_resu break; } switch (schemeField.id) { - case 1: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.SET) { + { + org.apache.thrift.protocol.TSet _set220 = iprot.readSetBegin(); + struct.success = new HashSet(2*_set220.size); + long _elem221; + for (int _i222 = 0; _i222 < _set220.size; ++_i222) + { + _elem221 = iprot.readI64(); + struct.success.add(_elem221); + } + iprot.readSetEnd(); + } + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -26539,13 +24359,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, reportLostFile_resu struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, reportLostFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetPinIdList_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.success.size())); + for (long _iter223 : struct.success) + { + oprot.writeI64(_iter223); + } + oprot.writeSetEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -26554,57 +24381,69 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, reportLostFile_res } - private static class reportLostFile_resultTupleSchemeFactory implements SchemeFactory { - public reportLostFile_resultTupleScheme getScheme() { - return new reportLostFile_resultTupleScheme(); + private static class workerGetPinIdList_resultTupleSchemeFactory implements SchemeFactory { + public workerGetPinIdList_resultTupleScheme getScheme() { + return new workerGetPinIdList_resultTupleScheme(); } } - private static class reportLostFile_resultTupleScheme extends TupleScheme { + private static class workerGetPinIdList_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, reportLostFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, workerGetPinIdList_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFdnee()) { + if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetFdnee()) { - struct.fdnee.write(oprot); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (long _iter224 : struct.success) + { + oprot.writeI64(_iter224); + } + } } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, reportLostFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, workerGetPinIdList_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); + { + org.apache.thrift.protocol.TSet _set225 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.success = new HashSet(2*_set225.size); + long _elem226; + for (int _i227 = 0; _i227 < _set225.size; ++_i227) + { + _elem226 = iprot.readI64(); + struct.success.add(_elem226); + } + } + struct.setSuccessIsSet(true); } } } } - public static class requestFilesInDependency_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("requestFilesInDependency_args"); + public static class workerGetPriorityDependencyList_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("workerGetPriorityDependencyList_args"); - private static final org.apache.thrift.protocol.TField DEP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("depId", org.apache.thrift.protocol.TType.I32, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new requestFilesInDependency_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new requestFilesInDependency_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new workerGetPriorityDependencyList_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerGetPriorityDependencyList_argsTupleSchemeFactory()); } - public int depId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DEP_ID((short)1, "depId"); +; private static final Map byName = new HashMap(); @@ -26619,8 +24458,6 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DEP_ID - return DEP_ID; default: return null; } @@ -26659,89 +24496,37 @@ public String getFieldName() { return _fieldName; } } - - // isset id assignments - private static final int __DEPID_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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.DEP_ID, new org.apache.thrift.meta_data.FieldMetaData("depId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestFilesInDependency_args.class, metaDataMap); - } - - public requestFilesInDependency_args() { + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerGetPriorityDependencyList_args.class, metaDataMap); } - public requestFilesInDependency_args( - int depId) - { - this(); - this.depId = depId; - setDepIdIsSet(true); + public workerGetPriorityDependencyList_args() { } /** * Performs a deep copy on other. */ - public requestFilesInDependency_args(requestFilesInDependency_args other) { - __isset_bitfield = other.__isset_bitfield; - this.depId = other.depId; - } - - public requestFilesInDependency_args deepCopy() { - return new requestFilesInDependency_args(this); - } - - @Override - public void clear() { - setDepIdIsSet(false); - this.depId = 0; - } - - public int getDepId() { - return this.depId; - } - - public requestFilesInDependency_args setDepId(int depId) { - this.depId = depId; - setDepIdIsSet(true); - return this; - } - - public void unsetDepId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEPID_ISSET_ID); + public workerGetPriorityDependencyList_args(workerGetPriorityDependencyList_args other) { } - /** Returns true if field depId is set (has been assigned a value) and false otherwise */ - public boolean isSetDepId() { - return EncodingUtils.testBit(__isset_bitfield, __DEPID_ISSET_ID); + public workerGetPriorityDependencyList_args deepCopy() { + return new workerGetPriorityDependencyList_args(this); } - public void setDepIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEPID_ISSET_ID, value); + @Override + public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DEP_ID: - if (value == null) { - unsetDepId(); - } else { - setDepId((Integer)value); - } - break; - } } public Object getFieldValue(_Fields field) { switch (field) { - case DEP_ID: - return Integer.valueOf(getDepId()); - } throw new IllegalStateException(); } @@ -26753,8 +24538,6 @@ public boolean isSet(_Fields field) { } switch (field) { - case DEP_ID: - return isSetDepId(); } throw new IllegalStateException(); } @@ -26763,24 +24546,15 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof requestFilesInDependency_args) - return this.equals((requestFilesInDependency_args)that); + if (that instanceof workerGetPriorityDependencyList_args) + return this.equals((workerGetPriorityDependencyList_args)that); return false; } - public boolean equals(requestFilesInDependency_args that) { + public boolean equals(workerGetPriorityDependencyList_args that) { if (that == null) return false; - boolean this_present_depId = true; - boolean that_present_depId = true; - if (this_present_depId || that_present_depId) { - if (!(this_present_depId && that_present_depId)) - return false; - if (this.depId != that.depId) - return false; - } - return true; } @@ -26788,32 +24562,17 @@ public boolean equals(requestFilesInDependency_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_depId = true; - list.add(present_depId); - if (present_depId) - list.add(depId); - return list.hashCode(); } @Override - public int compareTo(requestFilesInDependency_args other) { + public int compareTo(workerGetPriorityDependencyList_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetDepId()).compareTo(other.isSetDepId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDepId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.depId, other.depId); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -26831,12 +24590,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("requestFilesInDependency_args("); + StringBuilder sb = new StringBuilder("workerGetPriorityDependencyList_args("); boolean first = true; - sb.append("depId:"); - sb.append(this.depId); - first = false; sb.append(")"); return sb.toString(); } @@ -26856,23 +24612,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class requestFilesInDependency_argsStandardSchemeFactory implements SchemeFactory { - public requestFilesInDependency_argsStandardScheme getScheme() { - return new requestFilesInDependency_argsStandardScheme(); + private static class workerGetPriorityDependencyList_argsStandardSchemeFactory implements SchemeFactory { + public workerGetPriorityDependencyList_argsStandardScheme getScheme() { + return new workerGetPriorityDependencyList_argsStandardScheme(); } } - private static class requestFilesInDependency_argsStandardScheme extends StandardScheme { + private static class workerGetPriorityDependencyList_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, requestFilesInDependency_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPriorityDependencyList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -26882,14 +24636,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestFilesInDepen break; } switch (schemeField.id) { - case 1: // DEP_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.depId = iprot.readI32(); - struct.setDepIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -26901,69 +24647,53 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestFilesInDepen struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, requestFilesInDependency_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetPriorityDependencyList_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(DEP_ID_FIELD_DESC); - oprot.writeI32(struct.depId); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class requestFilesInDependency_argsTupleSchemeFactory implements SchemeFactory { - public requestFilesInDependency_argsTupleScheme getScheme() { - return new requestFilesInDependency_argsTupleScheme(); + private static class workerGetPriorityDependencyList_argsTupleSchemeFactory implements SchemeFactory { + public workerGetPriorityDependencyList_argsTupleScheme getScheme() { + return new workerGetPriorityDependencyList_argsTupleScheme(); } } - private static class requestFilesInDependency_argsTupleScheme extends TupleScheme { + private static class workerGetPriorityDependencyList_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, requestFilesInDependency_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, workerGetPriorityDependencyList_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetDepId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetDepId()) { - oprot.writeI32(struct.depId); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, requestFilesInDependency_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, workerGetPriorityDependencyList_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.depId = iprot.readI32(); - struct.setDepIdIsSet(true); - } } } } - public static class requestFilesInDependency_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("requestFilesInDependency_result"); + public static class workerGetPriorityDependencyList_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("workerGetPriorityDependencyList_result"); - private static final org.apache.thrift.protocol.TField DDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("ddnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new requestFilesInDependency_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new requestFilesInDependency_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new workerGetPriorityDependencyList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new workerGetPriorityDependencyList_resultTupleSchemeFactory()); } - public DependencyDoesNotExistException ddnee; // required + public List success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DDNEE((short)1, "ddnee"); + SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -26978,8 +24708,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DDNEE - return DDNEE; + case 0: // SUCCESS + return SUCCESS; default: return null; } @@ -27023,71 +24753,88 @@ 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.DDNEE, new org.apache.thrift.meta_data.FieldMetaData("ddnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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.I32)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestFilesInDependency_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(workerGetPriorityDependencyList_result.class, metaDataMap); } - public requestFilesInDependency_result() { + public workerGetPriorityDependencyList_result() { } - public requestFilesInDependency_result( - DependencyDoesNotExistException ddnee) + public workerGetPriorityDependencyList_result( + List success) { this(); - this.ddnee = ddnee; + this.success = success; } /** * Performs a deep copy on other. */ - public requestFilesInDependency_result(requestFilesInDependency_result other) { - if (other.isSetDdnee()) { - this.ddnee = new DependencyDoesNotExistException(other.ddnee); + public workerGetPriorityDependencyList_result(workerGetPriorityDependencyList_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; } } - public requestFilesInDependency_result deepCopy() { - return new requestFilesInDependency_result(this); + public workerGetPriorityDependencyList_result deepCopy() { + return new workerGetPriorityDependencyList_result(this); } @Override public void clear() { - this.ddnee = null; + this.success = null; } - public DependencyDoesNotExistException getDdnee() { - return this.ddnee; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(int elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; } - public requestFilesInDependency_result setDdnee(DependencyDoesNotExistException ddnee) { - this.ddnee = ddnee; + public workerGetPriorityDependencyList_result setSuccess(List success) { + this.success = success; return this; } - public void unsetDdnee() { - this.ddnee = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field ddnee is set (has been assigned a value) and false otherwise */ - public boolean isSetDdnee() { - return this.ddnee != null; + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setDdneeIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.ddnee = null; + this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DDNEE: + case SUCCESS: if (value == null) { - unsetDdnee(); + unsetSuccess(); } else { - setDdnee((DependencyDoesNotExistException)value); + setSuccess((List)value); } break; @@ -27096,8 +24843,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case DDNEE: - return getDdnee(); + case SUCCESS: + return getSuccess(); } throw new IllegalStateException(); @@ -27110,8 +24857,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case DDNEE: - return isSetDdnee(); + case SUCCESS: + return isSetSuccess(); } throw new IllegalStateException(); } @@ -27120,21 +24867,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof requestFilesInDependency_result) - return this.equals((requestFilesInDependency_result)that); + if (that instanceof workerGetPriorityDependencyList_result) + return this.equals((workerGetPriorityDependencyList_result)that); return false; } - public boolean equals(requestFilesInDependency_result that) { + public boolean equals(workerGetPriorityDependencyList_result that) { if (that == null) return false; - boolean this_present_ddnee = true && this.isSetDdnee(); - boolean that_present_ddnee = true && that.isSetDdnee(); - if (this_present_ddnee || that_present_ddnee) { - if (!(this_present_ddnee && that_present_ddnee)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.ddnee.equals(that.ddnee)) + if (!this.success.equals(that.success)) return false; } @@ -27145,28 +24892,28 @@ public boolean equals(requestFilesInDependency_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_ddnee = true && (isSetDdnee()); - list.add(present_ddnee); - if (present_ddnee) - list.add(ddnee); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); return list.hashCode(); } @Override - public int compareTo(requestFilesInDependency_result other) { + public int compareTo(workerGetPriorityDependencyList_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetDdnee()).compareTo(other.isSetDdnee()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetDdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ddnee, other.ddnee); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -27188,14 +24935,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("requestFilesInDependency_result("); + StringBuilder sb = new StringBuilder("workerGetPriorityDependencyList_result("); boolean first = true; - sb.append("ddnee:"); - if (this.ddnee == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.ddnee); + sb.append(this.success); } first = false; sb.append(")"); @@ -27223,15 +24970,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class requestFilesInDependency_resultStandardSchemeFactory implements SchemeFactory { - public requestFilesInDependency_resultStandardScheme getScheme() { - return new requestFilesInDependency_resultStandardScheme(); + private static class workerGetPriorityDependencyList_resultStandardSchemeFactory implements SchemeFactory { + public workerGetPriorityDependencyList_resultStandardScheme getScheme() { + return new workerGetPriorityDependencyList_resultStandardScheme(); } } - private static class requestFilesInDependency_resultStandardScheme extends StandardScheme { + private static class workerGetPriorityDependencyList_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, requestFilesInDependency_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, workerGetPriorityDependencyList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -27241,11 +24988,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestFilesInDepen break; } switch (schemeField.id) { - case 1: // DDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ddnee = new DependencyDoesNotExistException(); - struct.ddnee.read(iprot); - struct.setDdneeIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list228 = iprot.readListBegin(); + struct.success = new ArrayList(_list228.size); + int _elem229; + for (int _i230 = 0; _i230 < _list228.size; ++_i230) + { + _elem229 = iprot.readI32(); + struct.success.add(_elem229); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -27261,13 +25017,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestFilesInDepen struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, requestFilesInDependency_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, workerGetPriorityDependencyList_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.ddnee != null) { - oprot.writeFieldBegin(DDNEE_FIELD_DESC); - struct.ddnee.write(oprot); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.success.size())); + for (int _iter231 : struct.success) + { + oprot.writeI32(_iter231); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -27276,35 +25039,49 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, requestFilesInDepe } - private static class requestFilesInDependency_resultTupleSchemeFactory implements SchemeFactory { - public requestFilesInDependency_resultTupleScheme getScheme() { - return new requestFilesInDependency_resultTupleScheme(); + private static class workerGetPriorityDependencyList_resultTupleSchemeFactory implements SchemeFactory { + public workerGetPriorityDependencyList_resultTupleScheme getScheme() { + return new workerGetPriorityDependencyList_resultTupleScheme(); } } - private static class requestFilesInDependency_resultTupleScheme extends TupleScheme { + private static class workerGetPriorityDependencyList_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, requestFilesInDependency_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, workerGetPriorityDependencyList_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetDdnee()) { + if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetDdnee()) { - struct.ddnee.write(oprot); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (int _iter232 : struct.success) + { + oprot.writeI32(_iter232); + } + } } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, requestFilesInDependency_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, workerGetPriorityDependencyList_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.ddnee = new DependencyDoesNotExistException(); - struct.ddnee.read(iprot); - struct.setDdneeIsSet(true); + { + org.apache.thrift.protocol.TList _list233 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.success = new ArrayList(_list233.size); + int _elem234; + for (int _i235 = 0; _i235 < _list233.size; ++_i235) + { + _elem234 = iprot.readI32(); + struct.success.add(_elem234); + } + } + struct.setSuccessIsSet(true); } } } diff --git a/common/src/main/java/tachyon/thrift/JobConfInfo.java b/common/src/main/java/tachyon/thrift/JobConfInfo.java index 82d072ee72e7..c44e3450aa70 100644 --- a/common/src/main/java/tachyon/thrift/JobConfInfo.java +++ b/common/src/main/java/tachyon/thrift/JobConfInfo.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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") public class JobConfInfo 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("JobConfInfo"); diff --git a/common/src/main/java/tachyon/thrift/LineageCommand.java b/common/src/main/java/tachyon/thrift/LineageCommand.java index 45bb85b4d7e5..ae3b0234dbed 100644 --- a/common/src/main/java/tachyon/thrift/LineageCommand.java +++ b/common/src/main/java/tachyon/thrift/LineageCommand.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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") public class LineageCommand 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("LineageCommand"); diff --git a/common/src/main/java/tachyon/thrift/LineageFileInfo.java b/common/src/main/java/tachyon/thrift/LineageFileInfo.java index 311e04388c8a..3387e2089d65 100644 --- a/common/src/main/java/tachyon/thrift/LineageFileInfo.java +++ b/common/src/main/java/tachyon/thrift/LineageFileInfo.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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") public class LineageFileInfo 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("LineageFileInfo"); diff --git a/common/src/main/java/tachyon/thrift/LineageInfo.java b/common/src/main/java/tachyon/thrift/LineageInfo.java index 41761b23718e..de10b43d0247 100644 --- a/common/src/main/java/tachyon/thrift/LineageInfo.java +++ b/common/src/main/java/tachyon/thrift/LineageInfo.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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") public class LineageInfo 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("LineageInfo"); diff --git a/common/src/main/java/tachyon/thrift/LineageMasterService.java b/common/src/main/java/tachyon/thrift/LineageMasterService.java index ac625ddc3bba..143882e8ee92 100644 --- a/common/src/main/java/tachyon/thrift/LineageMasterService.java +++ b/common/src/main/java/tachyon/thrift/LineageMasterService.java @@ -34,20 +34,20 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") public class LineageMasterService { public interface Iface { - public long createLineage(List inputFiles, List outputFiles, CommandLineJobInfo job) throws FileAlreadyExistException, BlockInfoException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException; + public long createLineage(List inputFiles, List outputFiles, CommandLineJobInfo job) throws TachyonTException, org.apache.thrift.TException; - public boolean deleteLineage(long lineageId, boolean cascade) throws LineageDoesNotExistException, LineageDeletionException, org.apache.thrift.TException; + public boolean deleteLineage(long lineageId, boolean cascade) throws TachyonTException, org.apache.thrift.TException; public List getLineageInfoList() throws org.apache.thrift.TException; - public long reinitializeFile(String path, long blockSizeBytes, long ttl) throws InvalidPathException, LineageDoesNotExistException, org.apache.thrift.TException; + public long reinitializeFile(String path, long blockSizeBytes, long ttl) throws TachyonTException, org.apache.thrift.TException; - public void asyncCompleteFile(long fileId) throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException; + public void asyncCompleteFile(long fileId) throws TachyonTException, org.apache.thrift.TException; public LineageCommand workerLineageHeartbeat(long workerId, List persistedFiles) throws org.apache.thrift.TException; @@ -89,7 +89,7 @@ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.prot super(iprot, oprot); } - public long createLineage(List inputFiles, List outputFiles, CommandLineJobInfo job) throws FileAlreadyExistException, BlockInfoException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException + public long createLineage(List inputFiles, List outputFiles, CommandLineJobInfo job) throws TachyonTException, org.apache.thrift.TException { send_createLineage(inputFiles, outputFiles, job); return recv_createLineage(); @@ -104,29 +104,20 @@ public void send_createLineage(List inputFiles, List outputFiles sendBase("createLineage", args); } - public long recv_createLineage() throws FileAlreadyExistException, BlockInfoException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException + public long recv_createLineage() throws TachyonTException, org.apache.thrift.TException { createLineage_result result = new createLineage_result(); receiveBase(result, "createLineage"); if (result.isSetSuccess()) { return result.success; } - if (result.faee != null) { - throw result.faee; - } - if (result.bie != null) { - throw result.bie; - } - if (result.sfse != null) { - throw result.sfse; - } - if (result.te != null) { - throw result.te; + if (result.e != null) { + throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createLineage failed: unknown result"); } - public boolean deleteLineage(long lineageId, boolean cascade) throws LineageDoesNotExistException, LineageDeletionException, org.apache.thrift.TException + public boolean deleteLineage(long lineageId, boolean cascade) throws TachyonTException, org.apache.thrift.TException { send_deleteLineage(lineageId, cascade); return recv_deleteLineage(); @@ -140,18 +131,15 @@ public void send_deleteLineage(long lineageId, boolean cascade) throws org.apach sendBase("deleteLineage", args); } - public boolean recv_deleteLineage() throws LineageDoesNotExistException, LineageDeletionException, org.apache.thrift.TException + public boolean recv_deleteLineage() throws TachyonTException, org.apache.thrift.TException { deleteLineage_result result = new deleteLineage_result(); receiveBase(result, "deleteLineage"); if (result.isSetSuccess()) { return result.success; } - if (result.lnee != null) { - throw result.lnee; - } - if (result.lde != null) { - throw result.lde; + if (result.e != null) { + throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteLineage failed: unknown result"); } @@ -178,7 +166,7 @@ public List recv_getLineageInfoList() throws org.apache.thrift.TExc throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLineageInfoList failed: unknown result"); } - public long reinitializeFile(String path, long blockSizeBytes, long ttl) throws InvalidPathException, LineageDoesNotExistException, org.apache.thrift.TException + public long reinitializeFile(String path, long blockSizeBytes, long ttl) throws TachyonTException, org.apache.thrift.TException { send_reinitializeFile(path, blockSizeBytes, ttl); return recv_reinitializeFile(); @@ -193,23 +181,20 @@ public void send_reinitializeFile(String path, long blockSizeBytes, long ttl) th sendBase("reinitializeFile", args); } - public long recv_reinitializeFile() throws InvalidPathException, LineageDoesNotExistException, org.apache.thrift.TException + public long recv_reinitializeFile() throws TachyonTException, org.apache.thrift.TException { reinitializeFile_result result = new reinitializeFile_result(); receiveBase(result, "reinitializeFile"); if (result.isSetSuccess()) { return result.success; } - if (result.ipe != null) { - throw result.ipe; - } - if (result.ldee != null) { - throw result.ldee; + if (result.e != null) { + throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "reinitializeFile failed: unknown result"); } - public void asyncCompleteFile(long fileId) throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException + public void asyncCompleteFile(long fileId) throws TachyonTException, org.apache.thrift.TException { send_asyncCompleteFile(fileId); recv_asyncCompleteFile(); @@ -222,15 +207,12 @@ public void send_asyncCompleteFile(long fileId) throws org.apache.thrift.TExcept sendBase("asyncCompleteFile", args); } - public void recv_asyncCompleteFile() throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException + public void recv_asyncCompleteFile() throws TachyonTException, org.apache.thrift.TException { asyncCompleteFile_result result = new asyncCompleteFile_result(); receiveBase(result, "asyncCompleteFile"); - if (result.fdnee != null) { - throw result.fdnee; - } - if (result.bie != null) { - throw result.bie; + if (result.e != null) { + throw result.e; } return; } @@ -305,7 +287,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public long getResult() throws FileAlreadyExistException, BlockInfoException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException { + public long getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -340,7 +322,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public boolean getResult() throws LineageDoesNotExistException, LineageDeletionException, org.apache.thrift.TException { + public boolean getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -407,7 +389,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public long getResult() throws InvalidPathException, LineageDoesNotExistException, org.apache.thrift.TException { + public long getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -439,7 +421,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException { + public void getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -524,14 +506,8 @@ public createLineage_result getResult(I iface, createLineage_args args) throws o try { result.success = iface.createLineage(args.inputFiles, args.outputFiles, args.job); result.setSuccessIsSet(true); - } catch (FileAlreadyExistException faee) { - result.faee = faee; - } catch (BlockInfoException bie) { - result.bie = bie; - } catch (SuspectedFileSizeException sfse) { - result.sfse = sfse; - } catch (TachyonException te) { - result.te = te; + } catch (TachyonTException e) { + result.e = e; } return result; } @@ -555,10 +531,8 @@ public deleteLineage_result getResult(I iface, deleteLineage_args args) throws o try { result.success = iface.deleteLineage(args.lineageId, args.cascade); result.setSuccessIsSet(true); - } catch (LineageDoesNotExistException lnee) { - result.lnee = lnee; - } catch (LineageDeletionException lde) { - result.lde = lde; + } catch (TachyonTException e) { + result.e = e; } return result; } @@ -602,10 +576,8 @@ public reinitializeFile_result getResult(I iface, reinitializeFile_args args) th try { result.success = iface.reinitializeFile(args.path, args.blockSizeBytes, args.ttl); result.setSuccessIsSet(true); - } catch (InvalidPathException ipe) { - result.ipe = ipe; - } catch (LineageDoesNotExistException ldee) { - result.ldee = ldee; + } catch (TachyonTException e) { + result.e = e; } return result; } @@ -628,10 +600,8 @@ public asyncCompleteFile_result getResult(I iface, asyncCompleteFile_args args) asyncCompleteFile_result result = new asyncCompleteFile_result(); try { iface.asyncCompleteFile(args.fileId); - } catch (FileDoesNotExistException fdnee) { - result.fdnee = fdnee; - } catch (BlockInfoException bie) { - result.bie = bie; + } catch (TachyonTException e) { + result.e = e; } return result; } @@ -707,24 +677,9 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; createLineage_result result = new createLineage_result(); - if (e instanceof FileAlreadyExistException) { - result.faee = (FileAlreadyExistException) e; - result.setFaeeIsSet(true); - msg = result; - } - else if (e instanceof BlockInfoException) { - result.bie = (BlockInfoException) e; - result.setBieIsSet(true); - msg = result; - } - else if (e instanceof SuspectedFileSizeException) { - result.sfse = (SuspectedFileSizeException) e; - result.setSfseIsSet(true); - msg = result; - } - else if (e instanceof TachyonException) { - result.te = (TachyonException) e; - result.setTeIsSet(true); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -780,14 +735,9 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; deleteLineage_result result = new deleteLineage_result(); - if (e instanceof LineageDoesNotExistException) { - result.lnee = (LineageDoesNotExistException) e; - result.setLneeIsSet(true); - msg = result; - } - else if (e instanceof LineageDeletionException) { - result.lde = (LineageDeletionException) e; - result.setLdeIsSet(true); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -894,14 +844,9 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; reinitializeFile_result result = new reinitializeFile_result(); - if (e instanceof InvalidPathException) { - result.ipe = (InvalidPathException) e; - result.setIpeIsSet(true); - msg = result; - } - else if (e instanceof LineageDoesNotExistException) { - result.ldee = (LineageDoesNotExistException) e; - result.setLdeeIsSet(true); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -955,14 +900,9 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; asyncCompleteFile_result result = new asyncCompleteFile_result(); - if (e instanceof FileDoesNotExistException) { - result.fdnee = (FileDoesNotExistException) e; - result.setFdneeIsSet(true); - msg = result; - } - else if (e instanceof BlockInfoException) { - result.bie = (BlockInfoException) e; - result.setBieIsSet(true); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -1721,10 +1661,7 @@ public static class createLineage_result implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -1733,18 +1670,12 @@ public static class createLineage_result implements org.apache.thrift.TBase byName = new HashMap(); @@ -1761,14 +1692,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // FAEE - return FAEE; - case 2: // BIE - return BIE; - case 3: // SFSE - return SFSE; - case 4: // TE - return TE; + case 1: // E + return E; default: return null; } @@ -1816,13 +1741,7 @@ public String getFieldName() { 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, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.FAEE, new org.apache.thrift.meta_data.FieldMetaData("faee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.BIE, new org.apache.thrift.meta_data.FieldMetaData("bie", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.SFSE, new org.apache.thrift.meta_data.FieldMetaData("sfse", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", 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(createLineage_result.class, metaDataMap); @@ -1833,18 +1752,12 @@ public createLineage_result() { public createLineage_result( long success, - FileAlreadyExistException faee, - BlockInfoException bie, - SuspectedFileSizeException sfse, - TachyonException te) + TachyonTException e) { this(); this.success = success; setSuccessIsSet(true); - this.faee = faee; - this.bie = bie; - this.sfse = sfse; - this.te = te; + this.e = e; } /** @@ -1853,17 +1766,8 @@ public createLineage_result( public createLineage_result(createLineage_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; - if (other.isSetFaee()) { - this.faee = new FileAlreadyExistException(other.faee); - } - if (other.isSetBie()) { - this.bie = new BlockInfoException(other.bie); - } - if (other.isSetSfse()) { - this.sfse = new SuspectedFileSizeException(other.sfse); - } - if (other.isSetTe()) { - this.te = new TachyonException(other.te); + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } @@ -1875,10 +1779,7 @@ public createLineage_result deepCopy() { public void clear() { setSuccessIsSet(false); this.success = 0; - this.faee = null; - this.bie = null; - this.sfse = null; - this.te = null; + this.e = null; } public long getSuccess() { @@ -1904,99 +1805,27 @@ public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public FileAlreadyExistException getFaee() { - return this.faee; - } - - public createLineage_result setFaee(FileAlreadyExistException faee) { - this.faee = faee; - return this; - } - - public void unsetFaee() { - this.faee = null; - } - - /** Returns true if field faee is set (has been assigned a value) and false otherwise */ - public boolean isSetFaee() { - return this.faee != null; - } - - public void setFaeeIsSet(boolean value) { - if (!value) { - this.faee = null; - } - } - - public BlockInfoException getBie() { - return this.bie; - } - - public createLineage_result setBie(BlockInfoException bie) { - this.bie = bie; - return this; - } - - public void unsetBie() { - this.bie = null; - } - - /** Returns true if field bie is set (has been assigned a value) and false otherwise */ - public boolean isSetBie() { - return this.bie != null; + public TachyonTException getE() { + return this.e; } - public void setBieIsSet(boolean value) { - if (!value) { - this.bie = null; - } - } - - public SuspectedFileSizeException getSfse() { - return this.sfse; - } - - public createLineage_result setSfse(SuspectedFileSizeException sfse) { - this.sfse = sfse; + public createLineage_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetSfse() { - this.sfse = null; + public void unsetE() { + this.e = null; } - /** Returns true if field sfse is set (has been assigned a value) and false otherwise */ - public boolean isSetSfse() { - return this.sfse != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setSfseIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.sfse = null; - } - } - - public TachyonException getTe() { - return this.te; - } - - public createLineage_result setTe(TachyonException te) { - this.te = te; - return this; - } - - public void unsetTe() { - this.te = null; - } - - /** Returns true if field te is set (has been assigned a value) and false otherwise */ - public boolean isSetTe() { - return this.te != null; - } - - public void setTeIsSet(boolean value) { - if (!value) { - this.te = null; + this.e = null; } } @@ -2010,35 +1839,11 @@ public void setFieldValue(_Fields field, Object value) { } break; - case FAEE: - if (value == null) { - unsetFaee(); - } else { - setFaee((FileAlreadyExistException)value); - } - break; - - case BIE: - if (value == null) { - unsetBie(); - } else { - setBie((BlockInfoException)value); - } - break; - - case SFSE: - if (value == null) { - unsetSfse(); - } else { - setSfse((SuspectedFileSizeException)value); - } - break; - - case TE: + case E: if (value == null) { - unsetTe(); + unsetE(); } else { - setTe((TachyonException)value); + setE((TachyonTException)value); } break; @@ -2050,17 +1855,8 @@ public Object getFieldValue(_Fields field) { case SUCCESS: return Long.valueOf(getSuccess()); - case FAEE: - return getFaee(); - - case BIE: - return getBie(); - - case SFSE: - return getSfse(); - - case TE: - return getTe(); + case E: + return getE(); } throw new IllegalStateException(); @@ -2075,14 +1871,8 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); - case FAEE: - return isSetFaee(); - case BIE: - return isSetBie(); - case SFSE: - return isSetSfse(); - case TE: - return isSetTe(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -2109,39 +1899,12 @@ public boolean equals(createLineage_result that) { return false; } - boolean this_present_faee = true && this.isSetFaee(); - boolean that_present_faee = true && that.isSetFaee(); - if (this_present_faee || that_present_faee) { - if (!(this_present_faee && that_present_faee)) - return false; - if (!this.faee.equals(that.faee)) - return false; - } - - boolean this_present_bie = true && this.isSetBie(); - boolean that_present_bie = true && that.isSetBie(); - if (this_present_bie || that_present_bie) { - if (!(this_present_bie && that_present_bie)) - return false; - if (!this.bie.equals(that.bie)) - return false; - } - - boolean this_present_sfse = true && this.isSetSfse(); - boolean that_present_sfse = true && that.isSetSfse(); - if (this_present_sfse || that_present_sfse) { - if (!(this_present_sfse && that_present_sfse)) - return false; - if (!this.sfse.equals(that.sfse)) - return false; - } - - boolean this_present_te = true && this.isSetTe(); - boolean that_present_te = true && that.isSetTe(); - if (this_present_te || that_present_te) { - if (!(this_present_te && that_present_te)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.te.equals(that.te)) + if (!this.e.equals(that.e)) return false; } @@ -2157,25 +1920,10 @@ public int hashCode() { if (present_success) list.add(success); - boolean present_faee = true && (isSetFaee()); - list.add(present_faee); - if (present_faee) - list.add(faee); - - boolean present_bie = true && (isSetBie()); - list.add(present_bie); - if (present_bie) - list.add(bie); - - boolean present_sfse = true && (isSetSfse()); - list.add(present_sfse); - if (present_sfse) - list.add(sfse); - - boolean present_te = true && (isSetTe()); - list.add(present_te); - if (present_te) - list.add(te); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @@ -2198,42 +1946,12 @@ public int compareTo(createLineage_result other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFaee()).compareTo(other.isSetFaee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFaee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.faee, other.faee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBie()).compareTo(other.isSetBie()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetBie()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bie, other.bie); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSfse()).compareTo(other.isSetSfse()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSfse()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sfse, other.sfse); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTe()).compareTo(other.isSetTe()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, other.te); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -2262,35 +1980,11 @@ public String toString() { sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("faee:"); - if (this.faee == null) { - sb.append("null"); - } else { - sb.append(this.faee); - } - first = false; - if (!first) sb.append(", "); - sb.append("bie:"); - if (this.bie == null) { - sb.append("null"); - } else { - sb.append(this.bie); - } - first = false; - if (!first) sb.append(", "); - sb.append("sfse:"); - if (this.sfse == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.sfse); - } - first = false; - if (!first) sb.append(", "); - sb.append("te:"); - if (this.te == null) { - sb.append("null"); - } else { - sb.append(this.te); + sb.append(this.e); } first = false; sb.append(")"); @@ -2346,38 +2040,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createLineage_resul org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // FAEE + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // BIE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // SFSE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.sfse = new SuspectedFileSizeException(); - struct.sfse.read(iprot); - struct.setSfseIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // TE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2402,24 +2069,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, createLineage_resu oprot.writeI64(struct.success); oprot.writeFieldEnd(); } - if (struct.faee != null) { - oprot.writeFieldBegin(FAEE_FIELD_DESC); - struct.faee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.bie != null) { - oprot.writeFieldBegin(BIE_FIELD_DESC); - struct.bie.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.sfse != null) { - oprot.writeFieldBegin(SFSE_FIELD_DESC); - struct.sfse.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.te != null) { - oprot.writeFieldBegin(TE_FIELD_DESC); - struct.te.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -2443,63 +2095,30 @@ public void write(org.apache.thrift.protocol.TProtocol prot, createLineage_resul if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetFaee()) { + if (struct.isSetE()) { optionals.set(1); } - if (struct.isSetBie()) { - optionals.set(2); - } - if (struct.isSetSfse()) { - optionals.set(3); - } - if (struct.isSetTe()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); + oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeI64(struct.success); } - if (struct.isSetFaee()) { - struct.faee.write(oprot); - } - if (struct.isSetBie()) { - struct.bie.write(oprot); - } - if (struct.isSetSfse()) { - struct.sfse.write(oprot); - } - if (struct.isSetTe()) { - struct.te.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, createLineage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); - } - if (incoming.get(2)) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); - } - if (incoming.get(3)) { - struct.sfse = new SuspectedFileSizeException(); - struct.sfse.read(iprot); - struct.setSfseIsSet(true); - } - if (incoming.get(4)) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } @@ -2968,8 +2587,7 @@ public static class deleteLineage_result implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -2978,14 +2596,12 @@ public static class deleteLineage_result implements org.apache.thrift.TBase byName = new HashMap(); @@ -3002,10 +2618,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // LNEE - return LNEE; - case 2: // LDE - return LDE; + case 1: // E + return E; default: return null; } @@ -3053,9 +2667,7 @@ public String getFieldName() { 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, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.LNEE, new org.apache.thrift.meta_data.FieldMetaData("lnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.LDE, new org.apache.thrift.meta_data.FieldMetaData("lde", 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(deleteLineage_result.class, metaDataMap); @@ -3066,14 +2678,12 @@ public deleteLineage_result() { public deleteLineage_result( boolean success, - LineageDoesNotExistException lnee, - LineageDeletionException lde) + TachyonTException e) { this(); this.success = success; setSuccessIsSet(true); - this.lnee = lnee; - this.lde = lde; + this.e = e; } /** @@ -3082,11 +2692,8 @@ public deleteLineage_result( public deleteLineage_result(deleteLineage_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; - if (other.isSetLnee()) { - this.lnee = new LineageDoesNotExistException(other.lnee); - } - if (other.isSetLde()) { - this.lde = new LineageDeletionException(other.lde); + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } @@ -3098,8 +2705,7 @@ public deleteLineage_result deepCopy() { public void clear() { setSuccessIsSet(false); this.success = false; - this.lnee = null; - this.lde = null; + this.e = null; } public boolean isSuccess() { @@ -3125,51 +2731,27 @@ public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public LineageDoesNotExistException getLnee() { - return this.lnee; + public TachyonTException getE() { + return this.e; } - public deleteLineage_result setLnee(LineageDoesNotExistException lnee) { - this.lnee = lnee; + public deleteLineage_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetLnee() { - this.lnee = null; + public void unsetE() { + this.e = null; } - /** Returns true if field lnee is set (has been assigned a value) and false otherwise */ - public boolean isSetLnee() { - return this.lnee != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setLneeIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.lnee = null; - } - } - - public LineageDeletionException getLde() { - return this.lde; - } - - public deleteLineage_result setLde(LineageDeletionException lde) { - this.lde = lde; - return this; - } - - public void unsetLde() { - this.lde = null; - } - - /** Returns true if field lde is set (has been assigned a value) and false otherwise */ - public boolean isSetLde() { - return this.lde != null; - } - - public void setLdeIsSet(boolean value) { - if (!value) { - this.lde = null; + this.e = null; } } @@ -3183,19 +2765,11 @@ public void setFieldValue(_Fields field, Object value) { } break; - case LNEE: + case E: if (value == null) { - unsetLnee(); + unsetE(); } else { - setLnee((LineageDoesNotExistException)value); - } - break; - - case LDE: - if (value == null) { - unsetLde(); - } else { - setLde((LineageDeletionException)value); + setE((TachyonTException)value); } break; @@ -3207,11 +2781,8 @@ public Object getFieldValue(_Fields field) { case SUCCESS: return Boolean.valueOf(isSuccess()); - case LNEE: - return getLnee(); - - case LDE: - return getLde(); + case E: + return getE(); } throw new IllegalStateException(); @@ -3226,10 +2797,8 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); - case LNEE: - return isSetLnee(); - case LDE: - return isSetLde(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -3256,21 +2825,12 @@ public boolean equals(deleteLineage_result that) { return false; } - boolean this_present_lnee = true && this.isSetLnee(); - boolean that_present_lnee = true && that.isSetLnee(); - if (this_present_lnee || that_present_lnee) { - if (!(this_present_lnee && that_present_lnee)) - return false; - if (!this.lnee.equals(that.lnee)) - return false; - } - - boolean this_present_lde = true && this.isSetLde(); - boolean that_present_lde = true && that.isSetLde(); - if (this_present_lde || that_present_lde) { - if (!(this_present_lde && that_present_lde)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.lde.equals(that.lde)) + if (!this.e.equals(that.e)) return false; } @@ -3286,15 +2846,10 @@ public int hashCode() { if (present_success) list.add(success); - boolean present_lnee = true && (isSetLnee()); - list.add(present_lnee); - if (present_lnee) - list.add(lnee); - - boolean present_lde = true && (isSetLde()); - list.add(present_lde); - if (present_lde) - list.add(lde); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @@ -3317,22 +2872,12 @@ public int compareTo(deleteLineage_result other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetLnee()).compareTo(other.isSetLnee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lnee, other.lnee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLde()).compareTo(other.isSetLde()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetLde()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lde, other.lde); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -3361,19 +2906,11 @@ public String toString() { sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("lnee:"); - if (this.lnee == null) { - sb.append("null"); - } else { - sb.append(this.lnee); - } - first = false; - if (!first) sb.append(", "); - sb.append("lde:"); - if (this.lde == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.lde); + sb.append(this.e); } first = false; sb.append(")"); @@ -3429,20 +2966,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLineage_resul org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // LNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.lnee = new LineageDoesNotExistException(); - struct.lnee.read(iprot); - struct.setLneeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // LDE + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.lde = new LineageDeletionException(); - struct.lde.read(iprot); - struct.setLdeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -3467,14 +2995,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLineage_resu oprot.writeBool(struct.success); oprot.writeFieldEnd(); } - if (struct.lnee != null) { - oprot.writeFieldBegin(LNEE_FIELD_DESC); - struct.lnee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.lde != null) { - oprot.writeFieldBegin(LDE_FIELD_DESC); - struct.lde.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -3498,41 +3021,30 @@ public void write(org.apache.thrift.protocol.TProtocol prot, deleteLineage_resul if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetLnee()) { + if (struct.isSetE()) { optionals.set(1); } - if (struct.isSetLde()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); + oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } - if (struct.isSetLnee()) { - struct.lnee.write(oprot); - } - if (struct.isSetLde()) { - struct.lde.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deleteLineage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.lnee = new LineageDoesNotExistException(); - struct.lnee.read(iprot); - struct.setLneeIsSet(true); - } - if (incoming.get(2)) { - struct.lde = new LineageDeletionException(); - struct.lde.read(iprot); - struct.setLdeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } @@ -4769,8 +4281,7 @@ public static class reinitializeFile_result implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -4779,14 +4290,12 @@ public static class reinitializeFile_result implements org.apache.thrift.TBase byName = new HashMap(); @@ -4803,10 +4312,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // IPE - return IPE; - case 2: // LDEE - return LDEE; + case 1: // E + return E; default: return null; } @@ -4854,9 +4361,7 @@ public String getFieldName() { 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, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.IPE, new org.apache.thrift.meta_data.FieldMetaData("ipe", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.LDEE, new org.apache.thrift.meta_data.FieldMetaData("ldee", 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(reinitializeFile_result.class, metaDataMap); @@ -4867,14 +4372,12 @@ public reinitializeFile_result() { public reinitializeFile_result( long success, - InvalidPathException ipe, - LineageDoesNotExistException ldee) + TachyonTException e) { this(); this.success = success; setSuccessIsSet(true); - this.ipe = ipe; - this.ldee = ldee; + this.e = e; } /** @@ -4883,11 +4386,8 @@ public reinitializeFile_result( public reinitializeFile_result(reinitializeFile_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; - if (other.isSetIpe()) { - this.ipe = new InvalidPathException(other.ipe); - } - if (other.isSetLdee()) { - this.ldee = new LineageDoesNotExistException(other.ldee); + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } @@ -4899,8 +4399,7 @@ public reinitializeFile_result deepCopy() { public void clear() { setSuccessIsSet(false); this.success = 0; - this.ipe = null; - this.ldee = null; + this.e = null; } public long getSuccess() { @@ -4926,51 +4425,27 @@ public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public InvalidPathException getIpe() { - return this.ipe; + public TachyonTException getE() { + return this.e; } - public reinitializeFile_result setIpe(InvalidPathException ipe) { - this.ipe = ipe; + public reinitializeFile_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetIpe() { - this.ipe = null; + public void unsetE() { + this.e = null; } - /** Returns true if field ipe is set (has been assigned a value) and false otherwise */ - public boolean isSetIpe() { - return this.ipe != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setIpeIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.ipe = null; - } - } - - public LineageDoesNotExistException getLdee() { - return this.ldee; - } - - public reinitializeFile_result setLdee(LineageDoesNotExistException ldee) { - this.ldee = ldee; - return this; - } - - public void unsetLdee() { - this.ldee = null; - } - - /** Returns true if field ldee is set (has been assigned a value) and false otherwise */ - public boolean isSetLdee() { - return this.ldee != null; - } - - public void setLdeeIsSet(boolean value) { - if (!value) { - this.ldee = null; + this.e = null; } } @@ -4984,19 +4459,11 @@ public void setFieldValue(_Fields field, Object value) { } break; - case IPE: - if (value == null) { - unsetIpe(); - } else { - setIpe((InvalidPathException)value); - } - break; - - case LDEE: + case E: if (value == null) { - unsetLdee(); + unsetE(); } else { - setLdee((LineageDoesNotExistException)value); + setE((TachyonTException)value); } break; @@ -5008,11 +4475,8 @@ public Object getFieldValue(_Fields field) { case SUCCESS: return Long.valueOf(getSuccess()); - case IPE: - return getIpe(); - - case LDEE: - return getLdee(); + case E: + return getE(); } throw new IllegalStateException(); @@ -5027,10 +4491,8 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); - case IPE: - return isSetIpe(); - case LDEE: - return isSetLdee(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -5057,21 +4519,12 @@ public boolean equals(reinitializeFile_result that) { return false; } - boolean this_present_ipe = true && this.isSetIpe(); - boolean that_present_ipe = true && that.isSetIpe(); - if (this_present_ipe || that_present_ipe) { - if (!(this_present_ipe && that_present_ipe)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.ipe.equals(that.ipe)) - return false; - } - - boolean this_present_ldee = true && this.isSetLdee(); - boolean that_present_ldee = true && that.isSetLdee(); - if (this_present_ldee || that_present_ldee) { - if (!(this_present_ldee && that_present_ldee)) - return false; - if (!this.ldee.equals(that.ldee)) + if (!this.e.equals(that.e)) return false; } @@ -5087,15 +4540,10 @@ public int hashCode() { if (present_success) list.add(success); - boolean present_ipe = true && (isSetIpe()); - list.add(present_ipe); - if (present_ipe) - list.add(ipe); - - boolean present_ldee = true && (isSetLdee()); - list.add(present_ldee); - if (present_ldee) - list.add(ldee); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @@ -5118,22 +4566,12 @@ public int compareTo(reinitializeFile_result other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIpe()).compareTo(other.isSetIpe()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetIpe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipe, other.ipe); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLdee()).compareTo(other.isSetLdee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLdee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ldee, other.ldee); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -5162,19 +4600,11 @@ public String toString() { sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("ipe:"); - if (this.ipe == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.ipe); - } - first = false; - if (!first) sb.append(", "); - sb.append("ldee:"); - if (this.ldee == null) { - sb.append("null"); - } else { - sb.append(this.ldee); + sb.append(this.e); } first = false; sb.append(")"); @@ -5230,20 +4660,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, reinitializeFile_re org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // IPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // LDEE + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ldee = new LineageDoesNotExistException(); - struct.ldee.read(iprot); - struct.setLdeeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5268,14 +4689,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, reinitializeFile_r oprot.writeI64(struct.success); oprot.writeFieldEnd(); } - if (struct.ipe != null) { - oprot.writeFieldBegin(IPE_FIELD_DESC); - struct.ipe.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ldee != null) { - oprot.writeFieldBegin(LDEE_FIELD_DESC); - struct.ldee.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -5299,41 +4715,30 @@ public void write(org.apache.thrift.protocol.TProtocol prot, reinitializeFile_re if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetIpe()) { + if (struct.isSetE()) { optionals.set(1); } - if (struct.isSetLdee()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); + oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeI64(struct.success); } - if (struct.isSetIpe()) { - struct.ipe.write(oprot); - } - if (struct.isSetLdee()) { - struct.ldee.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, reinitializeFile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); - } - if (incoming.get(2)) { - struct.ldee = new LineageDoesNotExistException(); - struct.ldee.read(iprot); - struct.setLdeeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } @@ -5702,8 +5107,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, asyncCompleteFile_ar public static class asyncCompleteFile_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("asyncCompleteFile_result"); - private static final org.apache.thrift.protocol.TField FDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("fdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField BIE_FIELD_DESC = new org.apache.thrift.protocol.TField("bie", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -5711,13 +5115,11 @@ public static class asyncCompleteFile_result implements org.apache.thrift.TBase< schemes.put(TupleScheme.class, new asyncCompleteFile_resultTupleSchemeFactory()); } - public FileDoesNotExistException fdnee; // required - public BlockInfoException bie; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FDNEE((short)1, "fdnee"), - BIE((short)2, "bie"); + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -5732,10 +5134,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FDNEE - return FDNEE; - case 2: // BIE - return BIE; + case 1: // E + return E; default: return null; } @@ -5779,9 +5179,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.FDNEE, new org.apache.thrift.meta_data.FieldMetaData("fdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.BIE, new org.apache.thrift.meta_data.FieldMetaData("bie", 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(asyncCompleteFile_result.class, metaDataMap); @@ -5791,23 +5189,18 @@ public asyncCompleteFile_result() { } public asyncCompleteFile_result( - FileDoesNotExistException fdnee, - BlockInfoException bie) + TachyonTException e) { this(); - this.fdnee = fdnee; - this.bie = bie; + this.e = e; } /** * Performs a deep copy on other. */ public asyncCompleteFile_result(asyncCompleteFile_result other) { - if (other.isSetFdnee()) { - this.fdnee = new FileDoesNotExistException(other.fdnee); - } - if (other.isSetBie()) { - this.bie = new BlockInfoException(other.bie); + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } @@ -5817,73 +5210,40 @@ public asyncCompleteFile_result deepCopy() { @Override public void clear() { - this.fdnee = null; - this.bie = null; - } - - public FileDoesNotExistException getFdnee() { - return this.fdnee; - } - - public asyncCompleteFile_result setFdnee(FileDoesNotExistException fdnee) { - this.fdnee = fdnee; - return this; - } - - public void unsetFdnee() { - this.fdnee = null; - } - - /** Returns true if field fdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetFdnee() { - return this.fdnee != null; - } - - public void setFdneeIsSet(boolean value) { - if (!value) { - this.fdnee = null; - } + this.e = null; } - public BlockInfoException getBie() { - return this.bie; + public TachyonTException getE() { + return this.e; } - public asyncCompleteFile_result setBie(BlockInfoException bie) { - this.bie = bie; + public asyncCompleteFile_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetBie() { - this.bie = null; + public void unsetE() { + this.e = null; } - /** Returns true if field bie is set (has been assigned a value) and false otherwise */ - public boolean isSetBie() { - return this.bie != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setBieIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.bie = null; + this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FDNEE: + case E: if (value == null) { - unsetFdnee(); + unsetE(); } else { - setFdnee((FileDoesNotExistException)value); - } - break; - - case BIE: - if (value == null) { - unsetBie(); - } else { - setBie((BlockInfoException)value); + setE((TachyonTException)value); } break; @@ -5892,11 +5252,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FDNEE: - return getFdnee(); - - case BIE: - return getBie(); + case E: + return getE(); } throw new IllegalStateException(); @@ -5909,10 +5266,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case FDNEE: - return isSetFdnee(); - case BIE: - return isSetBie(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -5930,21 +5285,12 @@ public boolean equals(asyncCompleteFile_result that) { if (that == null) return false; - boolean this_present_fdnee = true && this.isSetFdnee(); - boolean that_present_fdnee = true && that.isSetFdnee(); - if (this_present_fdnee || that_present_fdnee) { - if (!(this_present_fdnee && that_present_fdnee)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.fdnee.equals(that.fdnee)) - return false; - } - - boolean this_present_bie = true && this.isSetBie(); - boolean that_present_bie = true && that.isSetBie(); - if (this_present_bie || that_present_bie) { - if (!(this_present_bie && that_present_bie)) - return false; - if (!this.bie.equals(that.bie)) + if (!this.e.equals(that.e)) return false; } @@ -5955,15 +5301,10 @@ public boolean equals(asyncCompleteFile_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_fdnee = true && (isSetFdnee()); - list.add(present_fdnee); - if (present_fdnee) - list.add(fdnee); - - boolean present_bie = true && (isSetBie()); - list.add(present_bie); - if (present_bie) - list.add(bie); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @@ -5976,22 +5317,12 @@ public int compareTo(asyncCompleteFile_result other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFdnee()).compareTo(other.isSetFdnee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fdnee, other.fdnee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBie()).compareTo(other.isSetBie()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetBie()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bie, other.bie); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -6016,19 +5347,11 @@ public String toString() { StringBuilder sb = new StringBuilder("asyncCompleteFile_result("); boolean first = true; - sb.append("fdnee:"); - if (this.fdnee == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.fdnee); - } - first = false; - if (!first) sb.append(", "); - sb.append("bie:"); - if (this.bie == null) { - sb.append("null"); - } else { - sb.append(this.bie); + sb.append(this.e); } first = false; sb.append(")"); @@ -6074,20 +5397,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCompleteFile_r break; } switch (schemeField.id) { - case 1: // FDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.fdnee = new FileDoesNotExistException(); - struct.fdnee.read(iprot); - struct.setFdneeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // BIE + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.bie = new BlockInfoException(); - struct.bie.read(iprot); - struct.setBieIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -6107,14 +5421,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, asyncCompleteFile_ struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.fdnee != null) { - oprot.writeFieldBegin(FDNEE_FIELD_DESC); - struct.fdnee.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.bie != null) { - oprot.writeFieldBegin(BIE_FIELD_DESC); - struct.bie.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -6135,34 +5444,23 @@ private static class asyncCompleteFile_resultTupleScheme extends TupleScheme, 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/RawTableInfo.java b/common/src/main/java/tachyon/thrift/RawTableInfo.java index 2ae37862f073..f5bdd699728e 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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") 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 99b4643944ac..bec470a9143f 100644 --- a/common/src/main/java/tachyon/thrift/RawTableMasterService.java +++ b/common/src/main/java/tachyon/thrift/RawTableMasterService.java @@ -34,20 +34,20 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") public class RawTableMasterService { public interface Iface { - public long createRawTable(String path, int columns, ByteBuffer metadata) throws FileAlreadyExistException, InvalidPathException, TableColumnException, TachyonException, org.apache.thrift.TException; + public long createRawTable(String path, int columns, ByteBuffer metadata) throws TachyonTException, ThriftIOException, org.apache.thrift.TException; - public long getRawTableId(String path) throws InvalidPathException, TableDoesNotExistException, org.apache.thrift.TException; + public RawTableInfo getClientRawTableInfoById(long id) throws TachyonTException, org.apache.thrift.TException; - public RawTableInfo getClientRawTableInfoById(long id) throws TableDoesNotExistException, org.apache.thrift.TException; + public RawTableInfo getClientRawTableInfoByPath(String path) throws TachyonTException, org.apache.thrift.TException; - public RawTableInfo getClientRawTableInfoByPath(String path) throws TableDoesNotExistException, InvalidPathException, org.apache.thrift.TException; + public long getRawTableId(String path) throws TachyonTException, org.apache.thrift.TException; - public void updateRawTableMetadata(long tableId, ByteBuffer metadata) throws TableDoesNotExistException, TachyonException, org.apache.thrift.TException; + public void updateRawTableMetadata(long tableId, ByteBuffer metadata) throws TachyonTException, ThriftIOException, org.apache.thrift.TException; } @@ -55,12 +55,12 @@ public interface AsyncIface { public void createRawTable(String path, int columns, ByteBuffer metadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getRawTableId(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getClientRawTableInfoById(long id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getClientRawTableInfoByPath(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getRawTableId(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void updateRawTableMetadata(long tableId, ByteBuffer metadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } @@ -85,7 +85,7 @@ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.prot super(iprot, oprot); } - public long createRawTable(String path, int columns, ByteBuffer metadata) throws FileAlreadyExistException, InvalidPathException, TableColumnException, TachyonException, org.apache.thrift.TException + public long createRawTable(String path, int columns, ByteBuffer metadata) throws TachyonTException, ThriftIOException, org.apache.thrift.TException { send_createRawTable(path, columns, metadata); return recv_createRawTable(); @@ -100,58 +100,23 @@ public void send_createRawTable(String path, int columns, ByteBuffer metadata) t sendBase("createRawTable", args); } - public long recv_createRawTable() throws FileAlreadyExistException, InvalidPathException, TableColumnException, TachyonException, org.apache.thrift.TException + public long recv_createRawTable() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { createRawTable_result result = new createRawTable_result(); receiveBase(result, "createRawTable"); if (result.isSetSuccess()) { return result.success; } - if (result.faee != null) { - throw result.faee; + if (result.e != null) { + throw result.e; } - if (result.ipe != null) { - throw result.ipe; - } - if (result.tce != null) { - throw result.tce; - } - if (result.te != null) { - throw result.te; + if (result.ioe != null) { + throw result.ioe; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createRawTable failed: unknown result"); } - public long getRawTableId(String path) throws InvalidPathException, TableDoesNotExistException, org.apache.thrift.TException - { - send_getRawTableId(path); - return recv_getRawTableId(); - } - - public void send_getRawTableId(String path) throws org.apache.thrift.TException - { - getRawTableId_args args = new getRawTableId_args(); - args.setPath(path); - sendBase("getRawTableId", args); - } - - public long recv_getRawTableId() throws InvalidPathException, TableDoesNotExistException, org.apache.thrift.TException - { - getRawTableId_result result = new getRawTableId_result(); - receiveBase(result, "getRawTableId"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ipe != null) { - throw result.ipe; - } - if (result.tdnee != null) { - throw result.tdnee; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRawTableId failed: unknown result"); - } - - public RawTableInfo getClientRawTableInfoById(long id) throws TableDoesNotExistException, org.apache.thrift.TException + public RawTableInfo getClientRawTableInfoById(long id) throws TachyonTException, org.apache.thrift.TException { send_getClientRawTableInfoById(id); return recv_getClientRawTableInfoById(); @@ -164,20 +129,20 @@ public void send_getClientRawTableInfoById(long id) throws org.apache.thrift.TEx sendBase("getClientRawTableInfoById", args); } - public RawTableInfo recv_getClientRawTableInfoById() throws TableDoesNotExistException, org.apache.thrift.TException + public RawTableInfo recv_getClientRawTableInfoById() throws TachyonTException, org.apache.thrift.TException { getClientRawTableInfoById_result result = new getClientRawTableInfoById_result(); receiveBase(result, "getClientRawTableInfoById"); if (result.isSetSuccess()) { return result.success; } - if (result.tdnee != null) { - throw result.tdnee; + if (result.e != null) { + throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getClientRawTableInfoById failed: unknown result"); } - public RawTableInfo getClientRawTableInfoByPath(String path) throws TableDoesNotExistException, InvalidPathException, org.apache.thrift.TException + public RawTableInfo getClientRawTableInfoByPath(String path) throws TachyonTException, org.apache.thrift.TException { send_getClientRawTableInfoByPath(path); return recv_getClientRawTableInfoByPath(); @@ -190,23 +155,46 @@ public void send_getClientRawTableInfoByPath(String path) throws org.apache.thri sendBase("getClientRawTableInfoByPath", args); } - public RawTableInfo recv_getClientRawTableInfoByPath() throws TableDoesNotExistException, InvalidPathException, org.apache.thrift.TException + public RawTableInfo recv_getClientRawTableInfoByPath() throws TachyonTException, org.apache.thrift.TException { getClientRawTableInfoByPath_result result = new getClientRawTableInfoByPath_result(); receiveBase(result, "getClientRawTableInfoByPath"); if (result.isSetSuccess()) { return result.success; } - if (result.tdnee != null) { - throw result.tdnee; - } - if (result.ipe != null) { - throw result.ipe; + if (result.e != null) { + throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getClientRawTableInfoByPath failed: unknown result"); } - public void updateRawTableMetadata(long tableId, ByteBuffer metadata) throws TableDoesNotExistException, TachyonException, org.apache.thrift.TException + public long getRawTableId(String path) throws TachyonTException, org.apache.thrift.TException + { + send_getRawTableId(path); + return recv_getRawTableId(); + } + + public void send_getRawTableId(String path) throws org.apache.thrift.TException + { + getRawTableId_args args = new getRawTableId_args(); + args.setPath(path); + sendBase("getRawTableId", args); + } + + public long recv_getRawTableId() throws TachyonTException, org.apache.thrift.TException + { + getRawTableId_result result = new getRawTableId_result(); + receiveBase(result, "getRawTableId"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.e != null) { + throw result.e; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRawTableId failed: unknown result"); + } + + public void updateRawTableMetadata(long tableId, ByteBuffer metadata) throws TachyonTException, ThriftIOException, org.apache.thrift.TException { send_updateRawTableMetadata(tableId, metadata); recv_updateRawTableMetadata(); @@ -220,15 +208,15 @@ public void send_updateRawTableMetadata(long tableId, ByteBuffer metadata) throw sendBase("updateRawTableMetadata", args); } - public void recv_updateRawTableMetadata() throws TableDoesNotExistException, TachyonException, org.apache.thrift.TException + public void recv_updateRawTableMetadata() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { updateRawTableMetadata_result result = new updateRawTableMetadata_result(); receiveBase(result, "updateRawTableMetadata"); - if (result.tdnee != null) { - throw result.tdnee; + if (result.e != null) { + throw result.e; } - if (result.te != null) { - throw result.te; + if (result.ioe != null) { + throw result.ioe; } return; } @@ -279,7 +267,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public long getResult() throws FileAlreadyExistException, InvalidPathException, TableColumnException, TachyonException, org.apache.thrift.TException { + public long getResult() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -289,99 +277,99 @@ public long getResult() throws FileAlreadyExistException, InvalidPathException, } } - public void getRawTableId(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getClientRawTableInfoById(long id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getRawTableId_call method_call = new getRawTableId_call(path, resultHandler, this, ___protocolFactory, ___transport); + getClientRawTableInfoById_call method_call = new getClientRawTableInfoById_call(id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getRawTableId_call extends org.apache.thrift.async.TAsyncMethodCall { - private String path; - public getRawTableId_call(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public static class getClientRawTableInfoById_call extends org.apache.thrift.async.TAsyncMethodCall { + private long id; + public getClientRawTableInfoById_call(long id, 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.path = path; + this.id = id; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRawTableId", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getRawTableId_args args = new getRawTableId_args(); - args.setPath(path); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getClientRawTableInfoById", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getClientRawTableInfoById_args args = new getClientRawTableInfoById_args(); + args.setId(id); args.write(prot); prot.writeMessageEnd(); } - public long getResult() throws InvalidPathException, TableDoesNotExistException, org.apache.thrift.TException { + public RawTableInfo getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getRawTableId(); + return (new Client(prot)).recv_getClientRawTableInfoById(); } } - public void getClientRawTableInfoById(long id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getClientRawTableInfoByPath(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getClientRawTableInfoById_call method_call = new getClientRawTableInfoById_call(id, resultHandler, this, ___protocolFactory, ___transport); + getClientRawTableInfoByPath_call method_call = new getClientRawTableInfoByPath_call(path, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getClientRawTableInfoById_call extends org.apache.thrift.async.TAsyncMethodCall { - private long id; - public getClientRawTableInfoById_call(long id, 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 static class getClientRawTableInfoByPath_call extends org.apache.thrift.async.TAsyncMethodCall { + private String path; + public getClientRawTableInfoByPath_call(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); - this.id = id; + this.path = path; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getClientRawTableInfoById", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getClientRawTableInfoById_args args = new getClientRawTableInfoById_args(); - args.setId(id); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getClientRawTableInfoByPath", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getClientRawTableInfoByPath_args args = new getClientRawTableInfoByPath_args(); + args.setPath(path); args.write(prot); prot.writeMessageEnd(); } - public RawTableInfo getResult() throws TableDoesNotExistException, org.apache.thrift.TException { + public RawTableInfo getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getClientRawTableInfoById(); + return (new Client(prot)).recv_getClientRawTableInfoByPath(); } } - public void getClientRawTableInfoByPath(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getRawTableId(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getClientRawTableInfoByPath_call method_call = new getClientRawTableInfoByPath_call(path, resultHandler, this, ___protocolFactory, ___transport); + getRawTableId_call method_call = new getRawTableId_call(path, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getClientRawTableInfoByPath_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class getRawTableId_call extends org.apache.thrift.async.TAsyncMethodCall { private String path; - public getClientRawTableInfoByPath_call(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public getRawTableId_call(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.path = path; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getClientRawTableInfoByPath", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getClientRawTableInfoByPath_args args = new getClientRawTableInfoByPath_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRawTableId", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRawTableId_args args = new getRawTableId_args(); args.setPath(path); args.write(prot); prot.writeMessageEnd(); } - public RawTableInfo getResult() throws TableDoesNotExistException, InvalidPathException, org.apache.thrift.TException { + public long getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_getClientRawTableInfoByPath(); + return (new Client(prot)).recv_getRawTableId(); } } @@ -410,7 +398,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws TableDoesNotExistException, TachyonException, org.apache.thrift.TException { + public void getResult() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -434,9 +422,9 @@ protected Processor(I iface, Map Map> getProcessMap(Map> processMap) { processMap.put("createRawTable", new createRawTable()); - processMap.put("getRawTableId", new getRawTableId()); processMap.put("getClientRawTableInfoById", new getClientRawTableInfoById()); processMap.put("getClientRawTableInfoByPath", new getClientRawTableInfoByPath()); + processMap.put("getRawTableId", new getRawTableId()); processMap.put("updateRawTableMetadata", new updateRawTableMetadata()); return processMap; } @@ -459,41 +447,10 @@ public createRawTable_result getResult(I iface, createRawTable_args args) throws try { result.success = iface.createRawTable(args.path, args.columns, args.metadata); result.setSuccessIsSet(true); - } catch (FileAlreadyExistException faee) { - result.faee = faee; - } catch (InvalidPathException ipe) { - result.ipe = ipe; - } catch (TableColumnException tce) { - result.tce = tce; - } catch (TachyonException te) { - result.te = te; - } - return result; - } - } - - public static class getRawTableId extends org.apache.thrift.ProcessFunction { - public getRawTableId() { - super("getRawTableId"); - } - - public getRawTableId_args getEmptyArgsInstance() { - return new getRawTableId_args(); - } - - protected boolean isOneway() { - return false; - } - - public getRawTableId_result getResult(I iface, getRawTableId_args args) throws org.apache.thrift.TException { - getRawTableId_result result = new getRawTableId_result(); - try { - result.success = iface.getRawTableId(args.path); - result.setSuccessIsSet(true); - } catch (InvalidPathException ipe) { - result.ipe = ipe; - } catch (TableDoesNotExistException tdnee) { - result.tdnee = tdnee; + } catch (TachyonTException e) { + result.e = e; + } catch (ThriftIOException ioe) { + result.ioe = ioe; } return result; } @@ -516,8 +473,8 @@ public getClientRawTableInfoById_result getResult(I iface, getClientRawTableInfo getClientRawTableInfoById_result result = new getClientRawTableInfoById_result(); try { result.success = iface.getClientRawTableInfoById(args.id); - } catch (TableDoesNotExistException tdnee) { - result.tdnee = tdnee; + } catch (TachyonTException e) { + result.e = e; } return result; } @@ -540,10 +497,33 @@ public getClientRawTableInfoByPath_result getResult(I iface, getClientRawTableIn getClientRawTableInfoByPath_result result = new getClientRawTableInfoByPath_result(); try { result.success = iface.getClientRawTableInfoByPath(args.path); - } catch (TableDoesNotExistException tdnee) { - result.tdnee = tdnee; - } catch (InvalidPathException ipe) { - result.ipe = ipe; + } catch (TachyonTException e) { + result.e = e; + } + return result; + } + } + + public static class getRawTableId extends org.apache.thrift.ProcessFunction { + public getRawTableId() { + super("getRawTableId"); + } + + public getRawTableId_args getEmptyArgsInstance() { + return new getRawTableId_args(); + } + + protected boolean isOneway() { + return false; + } + + public getRawTableId_result getResult(I iface, getRawTableId_args args) throws org.apache.thrift.TException { + getRawTableId_result result = new getRawTableId_result(); + try { + result.success = iface.getRawTableId(args.path); + result.setSuccessIsSet(true); + } catch (TachyonTException e) { + result.e = e; } return result; } @@ -566,10 +546,10 @@ public updateRawTableMetadata_result getResult(I iface, updateRawTableMetadata_a updateRawTableMetadata_result result = new updateRawTableMetadata_result(); try { iface.updateRawTableMetadata(args.tableId, args.metadata); - } catch (TableDoesNotExistException tdnee) { - result.tdnee = tdnee; - } catch (TachyonException te) { - result.te = te; + } catch (TachyonTException e) { + result.e = e; + } catch (ThriftIOException ioe) { + result.ioe = ioe; } return result; } @@ -589,9 +569,9 @@ protected AsyncProcessor(I iface, Map Map> getProcessMap(Map> processMap) { processMap.put("createRawTable", new createRawTable()); - processMap.put("getRawTableId", new getRawTableId()); processMap.put("getClientRawTableInfoById", new getClientRawTableInfoById()); processMap.put("getClientRawTableInfoByPath", new getClientRawTableInfoByPath()); + processMap.put("getRawTableId", new getRawTableId()); processMap.put("updateRawTableMetadata", new updateRawTableMetadata()); return processMap; } @@ -624,24 +604,14 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; createRawTable_result result = new createRawTable_result(); - if (e instanceof FileAlreadyExistException) { - result.faee = (FileAlreadyExistException) e; - result.setFaeeIsSet(true); - msg = result; - } - else if (e instanceof InvalidPathException) { - result.ipe = (InvalidPathException) e; - result.setIpeIsSet(true); - msg = result; - } - else if (e instanceof TableColumnException) { - result.tce = (TableColumnException) e; - result.setTceIsSet(true); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } - else if (e instanceof TachyonException) { - result.te = (TachyonException) e; - result.setTeIsSet(true); + else if (e instanceof ThriftIOException) { + result.ioe = (ThriftIOException) e; + result.setIoeIsSet(true); msg = result; } else @@ -669,22 +639,21 @@ public void start(I iface, createRawTable_args args, org.apache.thrift.async.Asy } } - public static class getRawTableId extends org.apache.thrift.AsyncProcessFunction { - public getRawTableId() { - super("getRawTableId"); + public static class getClientRawTableInfoById extends org.apache.thrift.AsyncProcessFunction { + public getClientRawTableInfoById() { + super("getClientRawTableInfoById"); } - public getRawTableId_args getEmptyArgsInstance() { - return new getRawTableId_args(); + public getClientRawTableInfoById_args getEmptyArgsInstance() { + return new getClientRawTableInfoById_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Long o) { - getRawTableId_result result = new getRawTableId_result(); + return new AsyncMethodCallback() { + public void onComplete(RawTableInfo o) { + getClientRawTableInfoById_result result = new getClientRawTableInfoById_result(); result.success = o; - result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -696,15 +665,10 @@ public void onComplete(Long o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getRawTableId_result result = new getRawTableId_result(); - if (e instanceof InvalidPathException) { - result.ipe = (InvalidPathException) e; - result.setIpeIsSet(true); - msg = result; - } - else if (e instanceof TableDoesNotExistException) { - result.tdnee = (TableDoesNotExistException) e; - result.setTdneeIsSet(true); + getClientRawTableInfoById_result result = new getClientRawTableInfoById_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -727,25 +691,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getRawTableId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getRawTableId(args.path,resultHandler); + public void start(I iface, getClientRawTableInfoById_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getClientRawTableInfoById(args.id,resultHandler); } } - public static class getClientRawTableInfoById extends org.apache.thrift.AsyncProcessFunction { - public getClientRawTableInfoById() { - super("getClientRawTableInfoById"); + public static class getClientRawTableInfoByPath extends org.apache.thrift.AsyncProcessFunction { + public getClientRawTableInfoByPath() { + super("getClientRawTableInfoByPath"); } - public getClientRawTableInfoById_args getEmptyArgsInstance() { - return new getClientRawTableInfoById_args(); + public getClientRawTableInfoByPath_args getEmptyArgsInstance() { + return new getClientRawTableInfoByPath_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(RawTableInfo o) { - getClientRawTableInfoById_result result = new getClientRawTableInfoById_result(); + getClientRawTableInfoByPath_result result = new getClientRawTableInfoByPath_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -758,10 +722,10 @@ public void onComplete(RawTableInfo o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getClientRawTableInfoById_result result = new getClientRawTableInfoById_result(); - if (e instanceof TableDoesNotExistException) { - result.tdnee = (TableDoesNotExistException) e; - result.setTdneeIsSet(true); + getClientRawTableInfoByPath_result result = new getClientRawTableInfoByPath_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -784,26 +748,27 @@ protected boolean isOneway() { return false; } - public void start(I iface, getClientRawTableInfoById_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getClientRawTableInfoById(args.id,resultHandler); + public void start(I iface, getClientRawTableInfoByPath_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getClientRawTableInfoByPath(args.path,resultHandler); } } - public static class getClientRawTableInfoByPath extends org.apache.thrift.AsyncProcessFunction { - public getClientRawTableInfoByPath() { - super("getClientRawTableInfoByPath"); + public static class getRawTableId extends org.apache.thrift.AsyncProcessFunction { + public getRawTableId() { + super("getRawTableId"); } - public getClientRawTableInfoByPath_args getEmptyArgsInstance() { - return new getClientRawTableInfoByPath_args(); + public getRawTableId_args getEmptyArgsInstance() { + return new getRawTableId_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(RawTableInfo o) { - getClientRawTableInfoByPath_result result = new getClientRawTableInfoByPath_result(); + return new AsyncMethodCallback() { + public void onComplete(Long o) { + getRawTableId_result result = new getRawTableId_result(); result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -815,15 +780,10 @@ public void onComplete(RawTableInfo o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getClientRawTableInfoByPath_result result = new getClientRawTableInfoByPath_result(); - if (e instanceof TableDoesNotExistException) { - result.tdnee = (TableDoesNotExistException) e; - result.setTdneeIsSet(true); - msg = result; - } - else if (e instanceof InvalidPathException) { - result.ipe = (InvalidPathException) e; - result.setIpeIsSet(true); + getRawTableId_result result = new getRawTableId_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -846,8 +806,8 @@ protected boolean isOneway() { return false; } - public void start(I iface, getClientRawTableInfoByPath_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getClientRawTableInfoByPath(args.path,resultHandler); + public void start(I iface, getRawTableId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getRawTableId(args.path,resultHandler); } } @@ -877,14 +837,14 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; updateRawTableMetadata_result result = new updateRawTableMetadata_result(); - if (e instanceof TableDoesNotExistException) { - result.tdnee = (TableDoesNotExistException) e; - result.setTdneeIsSet(true); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } - else if (e instanceof TachyonException) { - result.te = (TachyonException) e; - result.setTeIsSet(true); + else if (e instanceof ThriftIOException) { + result.ioe = (ThriftIOException) e; + result.setIoeIsSet(true); msg = result; } else @@ -1497,10 +1457,8 @@ public static class createRawTable_result implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -1509,18 +1467,14 @@ public static class createRawTable_result implements org.apache.thrift.TBase byName = new HashMap(); @@ -1537,14 +1491,10 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // FAEE - return FAEE; - case 2: // IPE - return IPE; - case 3: // TCE - return TCE; - case 4: // TE - return TE; + case 1: // E + return E; + case 2: // IOE + return IOE; default: return null; } @@ -1592,13 +1542,9 @@ public String getFieldName() { 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, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.FAEE, new org.apache.thrift.meta_data.FieldMetaData("faee", 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))); - tmpMap.put(_Fields.IPE, new org.apache.thrift.meta_data.FieldMetaData("ipe", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.TCE, new org.apache.thrift.meta_data.FieldMetaData("tce", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IOE, new org.apache.thrift.meta_data.FieldMetaData("ioe", 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(createRawTable_result.class, metaDataMap); @@ -1609,18 +1555,14 @@ public createRawTable_result() { public createRawTable_result( long success, - FileAlreadyExistException faee, - InvalidPathException ipe, - TableColumnException tce, - TachyonException te) + TachyonTException e, + ThriftIOException ioe) { this(); this.success = success; setSuccessIsSet(true); - this.faee = faee; - this.ipe = ipe; - this.tce = tce; - this.te = te; + this.e = e; + this.ioe = ioe; } /** @@ -1629,17 +1571,11 @@ public createRawTable_result( public createRawTable_result(createRawTable_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; - if (other.isSetFaee()) { - this.faee = new FileAlreadyExistException(other.faee); - } - if (other.isSetIpe()) { - this.ipe = new InvalidPathException(other.ipe); - } - if (other.isSetTce()) { - this.tce = new TableColumnException(other.tce); + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } - if (other.isSetTe()) { - this.te = new TachyonException(other.te); + if (other.isSetIoe()) { + this.ioe = new ThriftIOException(other.ioe); } } @@ -1651,10 +1587,8 @@ public createRawTable_result deepCopy() { public void clear() { setSuccessIsSet(false); this.success = 0; - this.faee = null; - this.ipe = null; - this.tce = null; - this.te = null; + this.e = null; + this.ioe = null; } public long getSuccess() { @@ -1680,141 +1614,77 @@ public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public FileAlreadyExistException getFaee() { - return this.faee; + public TachyonTException getE() { + return this.e; } - public createRawTable_result setFaee(FileAlreadyExistException faee) { - this.faee = faee; + public createRawTable_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetFaee() { - this.faee = null; + public void unsetE() { + this.e = null; } - /** Returns true if field faee is set (has been assigned a value) and false otherwise */ - public boolean isSetFaee() { - return this.faee != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setFaeeIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.faee = null; + this.e = null; } } - public InvalidPathException getIpe() { - return this.ipe; + public ThriftIOException getIoe() { + return this.ioe; } - public createRawTable_result setIpe(InvalidPathException ipe) { - this.ipe = ipe; + public createRawTable_result setIoe(ThriftIOException ioe) { + this.ioe = ioe; return this; } - public void unsetIpe() { - this.ipe = null; + public void unsetIoe() { + this.ioe = null; } - /** Returns true if field ipe is set (has been assigned a value) and false otherwise */ - public boolean isSetIpe() { - return this.ipe != null; + /** Returns true if field ioe is set (has been assigned a value) and false otherwise */ + public boolean isSetIoe() { + return this.ioe != null; } - public void setIpeIsSet(boolean value) { + public void setIoeIsSet(boolean value) { if (!value) { - this.ipe = null; + this.ioe = null; } } - public TableColumnException getTce() { - return this.tce; - } - - public createRawTable_result setTce(TableColumnException tce) { - this.tce = tce; - return this; - } - - public void unsetTce() { - this.tce = null; - } + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Long)value); + } + break; - /** Returns true if field tce is set (has been assigned a value) and false otherwise */ - public boolean isSetTce() { - return this.tce != null; - } + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); + } + break; - public void setTceIsSet(boolean value) { - if (!value) { - this.tce = null; - } - } - - public TachyonException getTe() { - return this.te; - } - - public createRawTable_result setTe(TachyonException te) { - this.te = te; - return this; - } - - public void unsetTe() { - this.te = null; - } - - /** Returns true if field te is set (has been assigned a value) and false otherwise */ - public boolean isSetTe() { - return this.te != null; - } - - public void setTeIsSet(boolean value) { - if (!value) { - this.te = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Long)value); - } - break; - - case FAEE: - if (value == null) { - unsetFaee(); - } else { - setFaee((FileAlreadyExistException)value); - } - break; - - case IPE: - if (value == null) { - unsetIpe(); - } else { - setIpe((InvalidPathException)value); - } - break; - - case TCE: - if (value == null) { - unsetTce(); - } else { - setTce((TableColumnException)value); - } - break; - - case TE: + case IOE: if (value == null) { - unsetTe(); + unsetIoe(); } else { - setTe((TachyonException)value); + setIoe((ThriftIOException)value); } break; @@ -1826,17 +1696,11 @@ public Object getFieldValue(_Fields field) { case SUCCESS: return Long.valueOf(getSuccess()); - case FAEE: - return getFaee(); - - case IPE: - return getIpe(); + case E: + return getE(); - case TCE: - return getTce(); - - case TE: - return getTe(); + case IOE: + return getIoe(); } throw new IllegalStateException(); @@ -1851,14 +1715,10 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); - case FAEE: - return isSetFaee(); - case IPE: - return isSetIpe(); - case TCE: - return isSetTce(); - case TE: - return isSetTe(); + case E: + return isSetE(); + case IOE: + return isSetIoe(); } throw new IllegalStateException(); } @@ -1885,39 +1745,21 @@ public boolean equals(createRawTable_result that) { return false; } - boolean this_present_faee = true && this.isSetFaee(); - boolean that_present_faee = true && that.isSetFaee(); - if (this_present_faee || that_present_faee) { - if (!(this_present_faee && that_present_faee)) - return false; - if (!this.faee.equals(that.faee)) - return false; - } - - boolean this_present_ipe = true && this.isSetIpe(); - boolean that_present_ipe = true && that.isSetIpe(); - if (this_present_ipe || that_present_ipe) { - if (!(this_present_ipe && that_present_ipe)) - return false; - if (!this.ipe.equals(that.ipe)) - return false; - } - - boolean this_present_tce = true && this.isSetTce(); - boolean that_present_tce = true && that.isSetTce(); - if (this_present_tce || that_present_tce) { - if (!(this_present_tce && that_present_tce)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.tce.equals(that.tce)) + if (!this.e.equals(that.e)) return false; } - boolean this_present_te = true && this.isSetTe(); - boolean that_present_te = true && that.isSetTe(); - if (this_present_te || that_present_te) { - if (!(this_present_te && that_present_te)) + boolean this_present_ioe = true && this.isSetIoe(); + boolean that_present_ioe = true && that.isSetIoe(); + if (this_present_ioe || that_present_ioe) { + if (!(this_present_ioe && that_present_ioe)) return false; - if (!this.te.equals(that.te)) + if (!this.ioe.equals(that.ioe)) return false; } @@ -1933,25 +1775,15 @@ public int hashCode() { if (present_success) list.add(success); - boolean present_faee = true && (isSetFaee()); - list.add(present_faee); - if (present_faee) - list.add(faee); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); - boolean present_ipe = true && (isSetIpe()); - list.add(present_ipe); - if (present_ipe) - list.add(ipe); - - boolean present_tce = true && (isSetTce()); - list.add(present_tce); - if (present_tce) - list.add(tce); - - boolean present_te = true && (isSetTe()); - list.add(present_te); - if (present_te) - list.add(te); + boolean present_ioe = true && (isSetIoe()); + list.add(present_ioe); + if (present_ioe) + list.add(ioe); return list.hashCode(); } @@ -1974,42 +1806,22 @@ public int compareTo(createRawTable_result other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFaee()).compareTo(other.isSetFaee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFaee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.faee, other.faee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIpe()).compareTo(other.isSetIpe()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIpe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipe, other.ipe); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTce()).compareTo(other.isSetTce()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetTce()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tce, other.tce); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTe()).compareTo(other.isSetTe()); + lastComparison = Boolean.valueOf(isSetIoe()).compareTo(other.isSetIoe()); if (lastComparison != 0) { return lastComparison; } - if (isSetTe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, other.te); + if (isSetIoe()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioe, other.ioe); if (lastComparison != 0) { return lastComparison; } @@ -2038,35 +1850,19 @@ public String toString() { sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("faee:"); - if (this.faee == null) { - sb.append("null"); - } else { - sb.append(this.faee); - } - first = false; - if (!first) sb.append(", "); - sb.append("ipe:"); - if (this.ipe == null) { - sb.append("null"); - } else { - sb.append(this.ipe); - } - first = false; - if (!first) sb.append(", "); - sb.append("tce:"); - if (this.tce == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.tce); + sb.append(this.e); } first = false; if (!first) sb.append(", "); - sb.append("te:"); - if (this.te == null) { + sb.append("ioe:"); + if (this.ioe == null) { sb.append("null"); } else { - sb.append(this.te); + sb.append(this.ioe); } first = false; sb.append(")"); @@ -2122,38 +1918,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, createRawTable_resu org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // FAEE + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // IPE + case 2: // IOE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TCE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tce = new TableColumnException(); - struct.tce.read(iprot); - struct.setTceIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // TE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2178,24 +1956,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, createRawTable_res oprot.writeI64(struct.success); oprot.writeFieldEnd(); } - if (struct.faee != null) { - oprot.writeFieldBegin(FAEE_FIELD_DESC); - struct.faee.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } - if (struct.ipe != null) { - oprot.writeFieldBegin(IPE_FIELD_DESC); - struct.ipe.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.tce != null) { - oprot.writeFieldBegin(TCE_FIELD_DESC); - struct.tce.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.te != null) { - oprot.writeFieldBegin(TE_FIELD_DESC); - struct.te.write(oprot); + if (struct.ioe != null) { + oprot.writeFieldBegin(IOE_FIELD_DESC); + struct.ioe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -2219,85 +1987,63 @@ public void write(org.apache.thrift.protocol.TProtocol prot, createRawTable_resu if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetFaee()) { + if (struct.isSetE()) { optionals.set(1); } - if (struct.isSetIpe()) { + if (struct.isSetIoe()) { optionals.set(2); } - if (struct.isSetTce()) { - optionals.set(3); - } - if (struct.isSetTe()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); + oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeI64(struct.success); } - if (struct.isSetFaee()) { - struct.faee.write(oprot); - } - if (struct.isSetIpe()) { - struct.ipe.write(oprot); - } - if (struct.isSetTce()) { - struct.tce.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } - if (struct.isSetTe()) { - struct.te.write(oprot); + if (struct.isSetIoe()) { + struct.ioe.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, createRawTable_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.faee = new FileAlreadyExistException(); - struct.faee.read(iprot); - struct.setFaeeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } if (incoming.get(2)) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); - } - if (incoming.get(3)) { - struct.tce = new TableColumnException(); - struct.tce.read(iprot); - struct.setTceIsSet(true); - } - if (incoming.get(4)) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } } } } - public static class getRawTableId_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("getRawTableId_args"); + public static class getClientRawTableInfoById_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("getClientRawTableInfoById_args"); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getRawTableId_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getRawTableId_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getClientRawTableInfoById_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getClientRawTableInfoById_argsTupleSchemeFactory()); } - public String path; // required + public long id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"); + ID((short)1, "id"); private static final Map byName = new HashMap(); @@ -2312,8 +2058,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PATH - return PATH; + case 1: // ID + return ID; default: return null; } @@ -2354,74 +2100,76 @@ public String getFieldName() { } // isset id assignments + private static final int __ID_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", 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(getRawTableId_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getClientRawTableInfoById_args.class, metaDataMap); } - public getRawTableId_args() { + public getClientRawTableInfoById_args() { } - public getRawTableId_args( - String path) + public getClientRawTableInfoById_args( + long id) { this(); - this.path = path; + this.id = id; + setIdIsSet(true); } /** * Performs a deep copy on other. */ - public getRawTableId_args(getRawTableId_args other) { - if (other.isSetPath()) { - this.path = other.path; - } + public getClientRawTableInfoById_args(getClientRawTableInfoById_args other) { + __isset_bitfield = other.__isset_bitfield; + this.id = other.id; } - public getRawTableId_args deepCopy() { - return new getRawTableId_args(this); + public getClientRawTableInfoById_args deepCopy() { + return new getClientRawTableInfoById_args(this); } @Override public void clear() { - this.path = null; + setIdIsSet(false); + this.id = 0; } - public String getPath() { - return this.path; + public long getId() { + return this.id; } - public getRawTableId_args setPath(String path) { - this.path = path; + public getClientRawTableInfoById_args setId(long id) { + this.id = id; + setIdIsSet(true); return this; } - public void unsetPath() { - this.path = null; + public void unsetId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); } - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); } - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } + public void setIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case PATH: + case ID: if (value == null) { - unsetPath(); + unsetId(); } else { - setPath((String)value); + setId((Long)value); } break; @@ -2430,8 +2178,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case PATH: - return getPath(); + case ID: + return Long.valueOf(getId()); } throw new IllegalStateException(); @@ -2444,8 +2192,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case PATH: - return isSetPath(); + case ID: + return isSetId(); } throw new IllegalStateException(); } @@ -2454,21 +2202,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getRawTableId_args) - return this.equals((getRawTableId_args)that); + if (that instanceof getClientRawTableInfoById_args) + return this.equals((getClientRawTableInfoById_args)that); return false; } - public boolean equals(getRawTableId_args that) { + public boolean equals(getClientRawTableInfoById_args that) { if (that == null) return false; - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) + boolean this_present_id = true; + boolean that_present_id = true; + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) return false; - if (!this.path.equals(that.path)) + if (this.id != that.id) return false; } @@ -2479,28 +2227,28 @@ public boolean equals(getRawTableId_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_path = true && (isSetPath()); - list.add(present_path); - if (present_path) - list.add(path); + boolean present_id = true; + list.add(present_id); + if (present_id) + list.add(id); return list.hashCode(); } @Override - public int compareTo(getRawTableId_args other) { + public int compareTo(getClientRawTableInfoById_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); if (lastComparison != 0) { return lastComparison; } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); if (lastComparison != 0) { return lastComparison; } @@ -2522,15 +2270,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getRawTableId_args("); + StringBuilder sb = new StringBuilder("getClientRawTableInfoById_args("); boolean first = true; - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } + sb.append("id:"); + sb.append(this.id); first = false; sb.append(")"); return sb.toString(); @@ -2551,21 +2295,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getRawTableId_argsStandardSchemeFactory implements SchemeFactory { - public getRawTableId_argsStandardScheme getScheme() { - return new getRawTableId_argsStandardScheme(); + private static class getClientRawTableInfoById_argsStandardSchemeFactory implements SchemeFactory { + public getClientRawTableInfoById_argsStandardScheme getScheme() { + return new getClientRawTableInfoById_argsStandardScheme(); } } - private static class getRawTableId_argsStandardScheme extends StandardScheme { + private static class getClientRawTableInfoById_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getRawTableId_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableInfoById_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -2575,10 +2321,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getRawTableId_args break; } switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); + case 1: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.id = iprot.readI64(); + struct.setIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2594,77 +2340,72 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getRawTableId_args struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getRawTableId_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableInfoById_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeI64(struct.id); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getRawTableId_argsTupleSchemeFactory implements SchemeFactory { - public getRawTableId_argsTupleScheme getScheme() { - return new getRawTableId_argsTupleScheme(); + private static class getClientRawTableInfoById_argsTupleSchemeFactory implements SchemeFactory { + public getClientRawTableInfoById_argsTupleScheme getScheme() { + return new getClientRawTableInfoById_argsTupleScheme(); } } - private static class getRawTableId_argsTupleScheme extends TupleScheme { + private static class getClientRawTableInfoById_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getRawTableId_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoById_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetPath()) { + if (struct.isSetId()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetPath()) { - oprot.writeString(struct.path); + if (struct.isSetId()) { + oprot.writeI64(struct.id); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getRawTableId_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoById_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); + struct.id = iprot.readI64(); + struct.setIdIsSet(true); } } } } - public static class getRawTableId_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("getRawTableId_result"); + public static class getClientRawTableInfoById_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("getClientRawTableInfoById_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); - private static final org.apache.thrift.protocol.TField IPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ipe", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField TDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("tdnee", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getRawTableId_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getRawTableId_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getClientRawTableInfoById_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getClientRawTableInfoById_resultTupleSchemeFactory()); } - public long success; // required - public InvalidPathException ipe; // required - public TableDoesNotExistException tdnee; // required + public RawTableInfo success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), - IPE((short)1, "ipe"), - TDNEE((short)2, "tdnee"); + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -2681,10 +2422,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // IPE - return IPE; - case 2: // TDNEE - return TDNEE; + case 1: // E + return E; default: return null; } @@ -2725,130 +2464,96 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.IPE, new org.apache.thrift.meta_data.FieldMetaData("ipe", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.TDNEE, new org.apache.thrift.meta_data.FieldMetaData("tdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RawTableInfo.class))); + 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(getRawTableId_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getClientRawTableInfoById_result.class, metaDataMap); } - public getRawTableId_result() { + public getClientRawTableInfoById_result() { } - public getRawTableId_result( - long success, - InvalidPathException ipe, - TableDoesNotExistException tdnee) + public getClientRawTableInfoById_result( + RawTableInfo success, + TachyonTException e) { this(); this.success = success; - setSuccessIsSet(true); - this.ipe = ipe; - this.tdnee = tdnee; + this.e = e; } /** * Performs a deep copy on other. */ - public getRawTableId_result(getRawTableId_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetIpe()) { - this.ipe = new InvalidPathException(other.ipe); + public getClientRawTableInfoById_result(getClientRawTableInfoById_result other) { + if (other.isSetSuccess()) { + this.success = new RawTableInfo(other.success); } - if (other.isSetTdnee()) { - this.tdnee = new TableDoesNotExistException(other.tdnee); + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public getRawTableId_result deepCopy() { - return new getRawTableId_result(this); + public getClientRawTableInfoById_result deepCopy() { + return new getClientRawTableInfoById_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.ipe = null; - this.tdnee = null; + this.success = null; + this.e = null; } - public long getSuccess() { + public RawTableInfo getSuccess() { return this.success; } - public getRawTableId_result setSuccess(long success) { + public getClientRawTableInfoById_result setSuccess(RawTableInfo success) { this.success = success; - setSuccessIsSet(true); return this; } public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public InvalidPathException getIpe() { - return this.ipe; - } - - public getRawTableId_result setIpe(InvalidPathException ipe) { - this.ipe = ipe; - return this; - } - - public void unsetIpe() { - this.ipe = null; - } - - /** Returns true if field ipe is set (has been assigned a value) and false otherwise */ - public boolean isSetIpe() { - return this.ipe != null; - } - - public void setIpeIsSet(boolean value) { if (!value) { - this.ipe = null; + this.success = null; } } - public TableDoesNotExistException getTdnee() { - return this.tdnee; + public TachyonTException getE() { + return this.e; } - public getRawTableId_result setTdnee(TableDoesNotExistException tdnee) { - this.tdnee = tdnee; + public getClientRawTableInfoById_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetTdnee() { - this.tdnee = null; + public void unsetE() { + this.e = null; } - /** Returns true if field tdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetTdnee() { - return this.tdnee != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setTdneeIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.tdnee = null; + this.e = null; } } @@ -2858,23 +2563,15 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((Long)value); - } - break; - - case IPE: - if (value == null) { - unsetIpe(); - } else { - setIpe((InvalidPathException)value); + setSuccess((RawTableInfo)value); } break; - case TDNEE: + case E: if (value == null) { - unsetTdnee(); + unsetE(); } else { - setTdnee((TableDoesNotExistException)value); + setE((TachyonTException)value); } break; @@ -2884,13 +2581,10 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return Long.valueOf(getSuccess()); - - case IPE: - return getIpe(); + return getSuccess(); - case TDNEE: - return getTdnee(); + case E: + return getE(); } throw new IllegalStateException(); @@ -2905,10 +2599,8 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); - case IPE: - return isSetIpe(); - case TDNEE: - return isSetTdnee(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -2917,39 +2609,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getRawTableId_result) - return this.equals((getRawTableId_result)that); + if (that instanceof getClientRawTableInfoById_result) + return this.equals((getClientRawTableInfoById_result)that); return false; } - public boolean equals(getRawTableId_result that) { + public boolean equals(getClientRawTableInfoById_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (this.success != that.success) - return false; - } - - boolean this_present_ipe = true && this.isSetIpe(); - boolean that_present_ipe = true && that.isSetIpe(); - if (this_present_ipe || that_present_ipe) { - if (!(this_present_ipe && that_present_ipe)) - return false; - if (!this.ipe.equals(that.ipe)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_tdnee = true && this.isSetTdnee(); - boolean that_present_tdnee = true && that.isSetTdnee(); - if (this_present_tdnee || that_present_tdnee) { - if (!(this_present_tdnee && that_present_tdnee)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.tdnee.equals(that.tdnee)) + if (!this.e.equals(that.e)) return false; } @@ -2960,26 +2643,21 @@ public boolean equals(getRawTableId_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; + boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); - boolean present_ipe = true && (isSetIpe()); - list.add(present_ipe); - if (present_ipe) - list.add(ipe); - - boolean present_tdnee = true && (isSetTdnee()); - list.add(present_tdnee); - if (present_tdnee) - list.add(tdnee); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(getRawTableId_result other) { + public int compareTo(getClientRawTableInfoById_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -2996,22 +2674,12 @@ public int compareTo(getRawTableId_result other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIpe()).compareTo(other.isSetIpe()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetIpe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipe, other.ipe); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTdnee()).compareTo(other.isSetTdnee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdnee, other.tdnee); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -3033,26 +2701,22 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getRawTableId_result("); + StringBuilder sb = new StringBuilder("getClientRawTableInfoById_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("ipe:"); - if (this.ipe == null) { + if (this.success == null) { sb.append("null"); } else { - sb.append(this.ipe); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("tdnee:"); - if (this.tdnee == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.tdnee); + sb.append(this.e); } first = false; sb.append(")"); @@ -3062,6 +2726,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -3074,23 +2741,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getRawTableId_resultStandardSchemeFactory implements SchemeFactory { - public getRawTableId_resultStandardScheme getScheme() { - return new getRawTableId_resultStandardScheme(); + private static class getClientRawTableInfoById_resultStandardSchemeFactory implements SchemeFactory { + public getClientRawTableInfoById_resultStandardScheme getScheme() { + return new getClientRawTableInfoById_resultStandardScheme(); } } - private static class getRawTableId_resultStandardScheme extends StandardScheme { + private static class getClientRawTableInfoById_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getRawTableId_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableInfoById_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -3101,27 +2766,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getRawTableId_resul } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // IPE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); + struct.success = new RawTableInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // TDNEE + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tdnee = new TableDoesNotExistException(); - struct.tdnee.read(iprot); - struct.setTdneeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -3137,23 +2794,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getRawTableId_resul struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getRawTableId_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableInfoById_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { + if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); - oprot.writeFieldEnd(); - } - if (struct.ipe != null) { - oprot.writeFieldBegin(IPE_FIELD_DESC); - struct.ipe.write(oprot); + struct.success.write(oprot); oprot.writeFieldEnd(); } - if (struct.tdnee != null) { - oprot.writeFieldBegin(TDNEE_FIELD_DESC); - struct.tdnee.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -3162,78 +2814,68 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getRawTableId_resu } - private static class getRawTableId_resultTupleSchemeFactory implements SchemeFactory { - public getRawTableId_resultTupleScheme getScheme() { - return new getRawTableId_resultTupleScheme(); + private static class getClientRawTableInfoById_resultTupleSchemeFactory implements SchemeFactory { + public getClientRawTableInfoById_resultTupleScheme getScheme() { + return new getClientRawTableInfoById_resultTupleScheme(); } } - private static class getRawTableId_resultTupleScheme extends TupleScheme { + private static class getClientRawTableInfoById_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getRawTableId_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoById_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetIpe()) { + if (struct.isSetE()) { optionals.set(1); } - if (struct.isSetTdnee()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); + oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); - } - if (struct.isSetIpe()) { - struct.ipe.write(oprot); + struct.success.write(oprot); } - if (struct.isSetTdnee()) { - struct.tdnee.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getRawTableId_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoById_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readI64(); + struct.success = new RawTableInfo(); + struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); - } - if (incoming.get(2)) { - struct.tdnee = new TableDoesNotExistException(); - struct.tdnee.read(iprot); - struct.setTdneeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class getClientRawTableInfoById_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("getClientRawTableInfoById_args"); + public static class getClientRawTableInfoByPath_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("getClientRawTableInfoByPath_args"); - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getClientRawTableInfoById_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getClientRawTableInfoById_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getClientRawTableInfoByPath_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getClientRawTableInfoByPath_argsTupleSchemeFactory()); } - public long id; // required + public String path; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"); + PATH((short)1, "path"); private static final Map byName = new HashMap(); @@ -3248,8 +2890,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // ID - return ID; + case 1: // PATH + return PATH; default: return null; } @@ -3290,76 +2932,74 @@ public String getFieldName() { } // isset id assignments - private static final int __ID_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getClientRawTableInfoById_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getClientRawTableInfoByPath_args.class, metaDataMap); } - public getClientRawTableInfoById_args() { + public getClientRawTableInfoByPath_args() { } - public getClientRawTableInfoById_args( - long id) + public getClientRawTableInfoByPath_args( + String path) { this(); - this.id = id; - setIdIsSet(true); + this.path = path; } /** * Performs a deep copy on other. */ - public getClientRawTableInfoById_args(getClientRawTableInfoById_args other) { - __isset_bitfield = other.__isset_bitfield; - this.id = other.id; + public getClientRawTableInfoByPath_args(getClientRawTableInfoByPath_args other) { + if (other.isSetPath()) { + this.path = other.path; + } } - public getClientRawTableInfoById_args deepCopy() { - return new getClientRawTableInfoById_args(this); + public getClientRawTableInfoByPath_args deepCopy() { + return new getClientRawTableInfoByPath_args(this); } @Override public void clear() { - setIdIsSet(false); - this.id = 0; + this.path = null; } - public long getId() { - return this.id; + public String getPath() { + return this.path; } - public getClientRawTableInfoById_args setId(long id) { - this.id = id; - setIdIsSet(true); + public getClientRawTableInfoByPath_args setPath(String path) { + this.path = path; return this; } - public void unsetId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); + public void unsetPath() { + this.path = null; } - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); + /** Returns true if field path is set (has been assigned a value) and false otherwise */ + public boolean isSetPath() { + return this.path != null; } - public void setIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); + public void setPathIsSet(boolean value) { + if (!value) { + this.path = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case ID: + case PATH: if (value == null) { - unsetId(); + unsetPath(); } else { - setId((Long)value); + setPath((String)value); } break; @@ -3368,8 +3008,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case ID: - return Long.valueOf(getId()); + case PATH: + return getPath(); } throw new IllegalStateException(); @@ -3382,8 +3022,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case ID: - return isSetId(); + case PATH: + return isSetPath(); } throw new IllegalStateException(); } @@ -3392,21 +3032,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getClientRawTableInfoById_args) - return this.equals((getClientRawTableInfoById_args)that); + if (that instanceof getClientRawTableInfoByPath_args) + return this.equals((getClientRawTableInfoByPath_args)that); return false; } - public boolean equals(getClientRawTableInfoById_args that) { + public boolean equals(getClientRawTableInfoByPath_args that) { if (that == null) return false; - boolean this_present_id = true; - boolean that_present_id = true; - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) + boolean this_present_path = true && this.isSetPath(); + boolean that_present_path = true && that.isSetPath(); + if (this_present_path || that_present_path) { + if (!(this_present_path && that_present_path)) return false; - if (this.id != that.id) + if (!this.path.equals(that.path)) return false; } @@ -3417,28 +3057,28 @@ public boolean equals(getClientRawTableInfoById_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_id = true; - list.add(present_id); - if (present_id) - list.add(id); + boolean present_path = true && (isSetPath()); + list.add(present_path); + if (present_path) + list.add(path); return list.hashCode(); } @Override - public int compareTo(getClientRawTableInfoById_args other) { + public int compareTo(getClientRawTableInfoByPath_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); if (lastComparison != 0) { return lastComparison; } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (isSetPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); if (lastComparison != 0) { return lastComparison; } @@ -3460,11 +3100,15 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getClientRawTableInfoById_args("); + StringBuilder sb = new StringBuilder("getClientRawTableInfoByPath_args("); boolean first = true; - sb.append("id:"); - sb.append(this.id); + sb.append("path:"); + if (this.path == null) { + sb.append("null"); + } else { + sb.append(this.path); + } first = false; sb.append(")"); return sb.toString(); @@ -3485,23 +3129,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getClientRawTableInfoById_argsStandardSchemeFactory implements SchemeFactory { - public getClientRawTableInfoById_argsStandardScheme getScheme() { - return new getClientRawTableInfoById_argsStandardScheme(); + private static class getClientRawTableInfoByPath_argsStandardSchemeFactory implements SchemeFactory { + public getClientRawTableInfoByPath_argsStandardScheme getScheme() { + return new getClientRawTableInfoByPath_argsStandardScheme(); } } - private static class getClientRawTableInfoById_argsStandardScheme extends StandardScheme { + private static class getClientRawTableInfoByPath_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableInfoById_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableInfoByPath_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -3511,10 +3153,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableIn break; } switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.id = iprot.readI64(); - struct.setIdIsSet(true); + case 1: // PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -3530,72 +3172,74 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableIn struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableInfoById_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableInfoByPath_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeI64(struct.id); - oprot.writeFieldEnd(); + if (struct.path != null) { + oprot.writeFieldBegin(PATH_FIELD_DESC); + oprot.writeString(struct.path); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getClientRawTableInfoById_argsTupleSchemeFactory implements SchemeFactory { - public getClientRawTableInfoById_argsTupleScheme getScheme() { - return new getClientRawTableInfoById_argsTupleScheme(); + private static class getClientRawTableInfoByPath_argsTupleSchemeFactory implements SchemeFactory { + public getClientRawTableInfoByPath_argsTupleScheme getScheme() { + return new getClientRawTableInfoByPath_argsTupleScheme(); } } - private static class getClientRawTableInfoById_argsTupleScheme extends TupleScheme { + private static class getClientRawTableInfoByPath_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoById_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoByPath_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetId()) { + if (struct.isSetPath()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetId()) { - oprot.writeI64(struct.id); + if (struct.isSetPath()) { + oprot.writeString(struct.path); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoById_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoByPath_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.id = iprot.readI64(); - struct.setIdIsSet(true); + struct.path = iprot.readString(); + struct.setPathIsSet(true); } } } } - public static class getClientRawTableInfoById_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("getClientRawTableInfoById_result"); + public static class getClientRawTableInfoByPath_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("getClientRawTableInfoByPath_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField TDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("tdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getClientRawTableInfoById_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getClientRawTableInfoById_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getClientRawTableInfoByPath_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getClientRawTableInfoByPath_resultTupleSchemeFactory()); } public RawTableInfo success; // required - public TableDoesNotExistException tdnee; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), - TDNEE((short)1, "tdnee"); + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -3612,8 +3256,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // TDNEE - return TDNEE; + case 1: // E + return E; default: return null; } @@ -3659,51 +3303,51 @@ public String getFieldName() { 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, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RawTableInfo.class))); - tmpMap.put(_Fields.TDNEE, new org.apache.thrift.meta_data.FieldMetaData("tdnee", 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(getClientRawTableInfoById_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getClientRawTableInfoByPath_result.class, metaDataMap); } - public getClientRawTableInfoById_result() { + public getClientRawTableInfoByPath_result() { } - public getClientRawTableInfoById_result( + public getClientRawTableInfoByPath_result( RawTableInfo success, - TableDoesNotExistException tdnee) + TachyonTException e) { this(); this.success = success; - this.tdnee = tdnee; + this.e = e; } /** * Performs a deep copy on other. */ - public getClientRawTableInfoById_result(getClientRawTableInfoById_result other) { + public getClientRawTableInfoByPath_result(getClientRawTableInfoByPath_result other) { if (other.isSetSuccess()) { this.success = new RawTableInfo(other.success); } - if (other.isSetTdnee()) { - this.tdnee = new TableDoesNotExistException(other.tdnee); + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public getClientRawTableInfoById_result deepCopy() { - return new getClientRawTableInfoById_result(this); + public getClientRawTableInfoByPath_result deepCopy() { + return new getClientRawTableInfoByPath_result(this); } @Override public void clear() { this.success = null; - this.tdnee = null; + this.e = null; } public RawTableInfo getSuccess() { return this.success; } - public getClientRawTableInfoById_result setSuccess(RawTableInfo success) { + public getClientRawTableInfoByPath_result setSuccess(RawTableInfo success) { this.success = success; return this; } @@ -3723,27 +3367,27 @@ public void setSuccessIsSet(boolean value) { } } - public TableDoesNotExistException getTdnee() { - return this.tdnee; + public TachyonTException getE() { + return this.e; } - public getClientRawTableInfoById_result setTdnee(TableDoesNotExistException tdnee) { - this.tdnee = tdnee; + public getClientRawTableInfoByPath_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetTdnee() { - this.tdnee = null; + public void unsetE() { + this.e = null; } - /** Returns true if field tdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetTdnee() { - return this.tdnee != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setTdneeIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.tdnee = null; + this.e = null; } } @@ -3757,11 +3401,11 @@ public void setFieldValue(_Fields field, Object value) { } break; - case TDNEE: + case E: if (value == null) { - unsetTdnee(); + unsetE(); } else { - setTdnee((TableDoesNotExistException)value); + setE((TachyonTException)value); } break; @@ -3773,8 +3417,8 @@ public Object getFieldValue(_Fields field) { case SUCCESS: return getSuccess(); - case TDNEE: - return getTdnee(); + case E: + return getE(); } throw new IllegalStateException(); @@ -3789,8 +3433,8 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); - case TDNEE: - return isSetTdnee(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -3799,12 +3443,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getClientRawTableInfoById_result) - return this.equals((getClientRawTableInfoById_result)that); + if (that instanceof getClientRawTableInfoByPath_result) + return this.equals((getClientRawTableInfoByPath_result)that); return false; } - public boolean equals(getClientRawTableInfoById_result that) { + public boolean equals(getClientRawTableInfoByPath_result that) { if (that == null) return false; @@ -3817,12 +3461,12 @@ public boolean equals(getClientRawTableInfoById_result that) { return false; } - boolean this_present_tdnee = true && this.isSetTdnee(); - boolean that_present_tdnee = true && that.isSetTdnee(); - if (this_present_tdnee || that_present_tdnee) { - if (!(this_present_tdnee && that_present_tdnee)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.tdnee.equals(that.tdnee)) + if (!this.e.equals(that.e)) return false; } @@ -3838,16 +3482,16 @@ public int hashCode() { if (present_success) list.add(success); - boolean present_tdnee = true && (isSetTdnee()); - list.add(present_tdnee); - if (present_tdnee) - list.add(tdnee); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(getClientRawTableInfoById_result other) { + public int compareTo(getClientRawTableInfoByPath_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -3864,12 +3508,12 @@ public int compareTo(getClientRawTableInfoById_result other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTdnee()).compareTo(other.isSetTdnee()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetTdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdnee, other.tdnee); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -3891,7 +3535,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getClientRawTableInfoById_result("); + StringBuilder sb = new StringBuilder("getClientRawTableInfoByPath_result("); boolean first = true; sb.append("success:"); @@ -3902,11 +3546,11 @@ public String toString() { } first = false; if (!first) sb.append(", "); - sb.append("tdnee:"); - if (this.tdnee == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.tdnee); + sb.append(this.e); } first = false; sb.append(")"); @@ -3935,17 +3579,17 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } - } - - private static class getClientRawTableInfoById_resultStandardSchemeFactory implements SchemeFactory { - public getClientRawTableInfoById_resultStandardScheme getScheme() { - return new getClientRawTableInfoById_resultStandardScheme(); + } + + private static class getClientRawTableInfoByPath_resultStandardSchemeFactory implements SchemeFactory { + public getClientRawTableInfoByPath_resultStandardScheme getScheme() { + return new getClientRawTableInfoByPath_resultStandardScheme(); } } - private static class getClientRawTableInfoById_resultStandardScheme extends StandardScheme { + private static class getClientRawTableInfoByPath_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableInfoById_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableInfoByPath_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -3964,11 +3608,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableIn org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // TDNEE + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tdnee = new TableDoesNotExistException(); - struct.tdnee.read(iprot); - struct.setTdneeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -3984,7 +3628,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableIn struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableInfoById_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableInfoByPath_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -3993,9 +3637,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableI struct.success.write(oprot); oprot.writeFieldEnd(); } - if (struct.tdnee != null) { - oprot.writeFieldBegin(TDNEE_FIELD_DESC); - struct.tdnee.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -4004,35 +3648,35 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableI } - private static class getClientRawTableInfoById_resultTupleSchemeFactory implements SchemeFactory { - public getClientRawTableInfoById_resultTupleScheme getScheme() { - return new getClientRawTableInfoById_resultTupleScheme(); + private static class getClientRawTableInfoByPath_resultTupleSchemeFactory implements SchemeFactory { + public getClientRawTableInfoByPath_resultTupleScheme getScheme() { + return new getClientRawTableInfoByPath_resultTupleScheme(); } } - private static class getClientRawTableInfoById_resultTupleScheme extends TupleScheme { + private static class getClientRawTableInfoByPath_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoById_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoByPath_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetTdnee()) { + if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } - if (struct.isSetTdnee()) { - struct.tdnee.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoById_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoByPath_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { @@ -4041,24 +3685,24 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInf struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.tdnee = new TableDoesNotExistException(); - struct.tdnee.read(iprot); - struct.setTdneeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class getClientRawTableInfoByPath_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("getClientRawTableInfoByPath_args"); + public static class getRawTableId_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("getRawTableId_args"); private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getClientRawTableInfoByPath_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getClientRawTableInfoByPath_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getRawTableId_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRawTableId_argsTupleSchemeFactory()); } public String path; // required @@ -4128,13 +3772,13 @@ public String getFieldName() { tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getClientRawTableInfoByPath_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRawTableId_args.class, metaDataMap); } - public getClientRawTableInfoByPath_args() { + public getRawTableId_args() { } - public getClientRawTableInfoByPath_args( + public getRawTableId_args( String path) { this(); @@ -4144,14 +3788,14 @@ public getClientRawTableInfoByPath_args( /** * Performs a deep copy on other. */ - public getClientRawTableInfoByPath_args(getClientRawTableInfoByPath_args other) { + public getRawTableId_args(getRawTableId_args other) { if (other.isSetPath()) { this.path = other.path; } } - public getClientRawTableInfoByPath_args deepCopy() { - return new getClientRawTableInfoByPath_args(this); + public getRawTableId_args deepCopy() { + return new getRawTableId_args(this); } @Override @@ -4163,7 +3807,7 @@ public String getPath() { return this.path; } - public getClientRawTableInfoByPath_args setPath(String path) { + public getRawTableId_args setPath(String path) { this.path = path; return this; } @@ -4222,12 +3866,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getClientRawTableInfoByPath_args) - return this.equals((getClientRawTableInfoByPath_args)that); + if (that instanceof getRawTableId_args) + return this.equals((getRawTableId_args)that); return false; } - public boolean equals(getClientRawTableInfoByPath_args that) { + public boolean equals(getRawTableId_args that) { if (that == null) return false; @@ -4256,7 +3900,7 @@ public int hashCode() { } @Override - public int compareTo(getClientRawTableInfoByPath_args other) { + public int compareTo(getRawTableId_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -4290,7 +3934,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getClientRawTableInfoByPath_args("); + StringBuilder sb = new StringBuilder("getRawTableId_args("); boolean first = true; sb.append("path:"); @@ -4325,15 +3969,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getClientRawTableInfoByPath_argsStandardSchemeFactory implements SchemeFactory { - public getClientRawTableInfoByPath_argsStandardScheme getScheme() { - return new getClientRawTableInfoByPath_argsStandardScheme(); + private static class getRawTableId_argsStandardSchemeFactory implements SchemeFactory { + public getRawTableId_argsStandardScheme getScheme() { + return new getRawTableId_argsStandardScheme(); } } - private static class getClientRawTableInfoByPath_argsStandardScheme extends StandardScheme { + private static class getRawTableId_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableInfoByPath_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getRawTableId_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4362,7 +4006,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableIn struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableInfoByPath_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getRawTableId_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -4377,16 +4021,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableI } - private static class getClientRawTableInfoByPath_argsTupleSchemeFactory implements SchemeFactory { - public getClientRawTableInfoByPath_argsTupleScheme getScheme() { - return new getClientRawTableInfoByPath_argsTupleScheme(); + private static class getRawTableId_argsTupleSchemeFactory implements SchemeFactory { + public getRawTableId_argsTupleScheme getScheme() { + return new getRawTableId_argsTupleScheme(); } } - private static class getClientRawTableInfoByPath_argsTupleScheme extends TupleScheme { + private static class getRawTableId_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoByPath_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getRawTableId_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPath()) { @@ -4399,7 +4043,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, getClientRawTableIn } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoByPath_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getRawTableId_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { @@ -4411,28 +4055,25 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInf } - public static class getClientRawTableInfoByPath_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("getClientRawTableInfoByPath_result"); + public static class getRawTableId_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("getRawTableId_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField TDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("tdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField IPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ipe", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getClientRawTableInfoByPath_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getClientRawTableInfoByPath_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getRawTableId_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRawTableId_resultTupleSchemeFactory()); } - public RawTableInfo success; // required - public TableDoesNotExistException tdnee; // required - public InvalidPathException ipe; // required + public long success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), - TDNEE((short)1, "tdnee"), - IPE((short)2, "ipe"); + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -4449,10 +4090,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // TDNEE - return TDNEE; - case 2: // IPE - return IPE; + case 1: // E + return E; default: return null; } @@ -4493,128 +4132,98 @@ public String getFieldName() { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RawTableInfo.class))); - tmpMap.put(_Fields.TDNEE, new org.apache.thrift.meta_data.FieldMetaData("tdnee", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.IPE, new org.apache.thrift.meta_data.FieldMetaData("ipe", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + 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(getClientRawTableInfoByPath_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRawTableId_result.class, metaDataMap); } - public getClientRawTableInfoByPath_result() { + public getRawTableId_result() { } - public getClientRawTableInfoByPath_result( - RawTableInfo success, - TableDoesNotExistException tdnee, - InvalidPathException ipe) + public getRawTableId_result( + long success, + TachyonTException e) { this(); this.success = success; - this.tdnee = tdnee; - this.ipe = ipe; + setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public getClientRawTableInfoByPath_result(getClientRawTableInfoByPath_result other) { - if (other.isSetSuccess()) { - this.success = new RawTableInfo(other.success); - } - if (other.isSetTdnee()) { - this.tdnee = new TableDoesNotExistException(other.tdnee); - } - if (other.isSetIpe()) { - this.ipe = new InvalidPathException(other.ipe); + public getRawTableId_result(getRawTableId_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public getClientRawTableInfoByPath_result deepCopy() { - return new getClientRawTableInfoByPath_result(this); + public getRawTableId_result deepCopy() { + return new getRawTableId_result(this); } @Override public void clear() { - this.success = null; - this.tdnee = null; - this.ipe = null; + setSuccessIsSet(false); + this.success = 0; + this.e = null; } - public RawTableInfo getSuccess() { + public long getSuccess() { return this.success; } - public getClientRawTableInfoByPath_result setSuccess(RawTableInfo success) { + public getRawTableId_result setSuccess(long success) { this.success = success; + setSuccessIsSet(true); return this; } public void unsetSuccess() { - this.success = null; + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.success != null; + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public TableDoesNotExistException getTdnee() { - return this.tdnee; - } - - public getClientRawTableInfoByPath_result setTdnee(TableDoesNotExistException tdnee) { - this.tdnee = tdnee; - return this; - } - - public void unsetTdnee() { - this.tdnee = null; - } - - /** Returns true if field tdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetTdnee() { - return this.tdnee != null; - } - - public void setTdneeIsSet(boolean value) { - if (!value) { - this.tdnee = null; - } + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public InvalidPathException getIpe() { - return this.ipe; + public TachyonTException getE() { + return this.e; } - public getClientRawTableInfoByPath_result setIpe(InvalidPathException ipe) { - this.ipe = ipe; + public getRawTableId_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetIpe() { - this.ipe = null; + public void unsetE() { + this.e = null; } - /** Returns true if field ipe is set (has been assigned a value) and false otherwise */ - public boolean isSetIpe() { - return this.ipe != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setIpeIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.ipe = null; + this.e = null; } } @@ -4624,23 +4233,15 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((RawTableInfo)value); - } - break; - - case TDNEE: - if (value == null) { - unsetTdnee(); - } else { - setTdnee((TableDoesNotExistException)value); + setSuccess((Long)value); } break; - case IPE: + case E: if (value == null) { - unsetIpe(); + unsetE(); } else { - setIpe((InvalidPathException)value); + setE((TachyonTException)value); } break; @@ -4650,13 +4251,10 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); - - case TDNEE: - return getTdnee(); + return Long.valueOf(getSuccess()); - case IPE: - return getIpe(); + case E: + return getE(); } throw new IllegalStateException(); @@ -4671,10 +4269,8 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); - case TDNEE: - return isSetTdnee(); - case IPE: - return isSetIpe(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -4683,39 +4279,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getClientRawTableInfoByPath_result) - return this.equals((getClientRawTableInfoByPath_result)that); + if (that instanceof getRawTableId_result) + return this.equals((getRawTableId_result)that); return false; } - public boolean equals(getClientRawTableInfoByPath_result that) { + public boolean equals(getRawTableId_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_tdnee = true && this.isSetTdnee(); - boolean that_present_tdnee = true && that.isSetTdnee(); - if (this_present_tdnee || that_present_tdnee) { - if (!(this_present_tdnee && that_present_tdnee)) - return false; - if (!this.tdnee.equals(that.tdnee)) + if (this.success != that.success) return false; } - boolean this_present_ipe = true && this.isSetIpe(); - boolean that_present_ipe = true && that.isSetIpe(); - if (this_present_ipe || that_present_ipe) { - if (!(this_present_ipe && that_present_ipe)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.ipe.equals(that.ipe)) + if (!this.e.equals(that.e)) return false; } @@ -4726,26 +4313,21 @@ public boolean equals(getClientRawTableInfoByPath_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); + boolean present_success = true; list.add(present_success); if (present_success) list.add(success); - boolean present_tdnee = true && (isSetTdnee()); - list.add(present_tdnee); - if (present_tdnee) - list.add(tdnee); - - boolean present_ipe = true && (isSetIpe()); - list.add(present_ipe); - if (present_ipe) - list.add(ipe); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(getClientRawTableInfoByPath_result other) { + public int compareTo(getRawTableId_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -4762,22 +4344,12 @@ public int compareTo(getClientRawTableInfoByPath_result other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTdnee()).compareTo(other.isSetTdnee()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdnee, other.tdnee); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIpe()).compareTo(other.isSetIpe()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetIpe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipe, other.ipe); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -4799,30 +4371,18 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getClientRawTableInfoByPath_result("); + StringBuilder sb = new StringBuilder("getRawTableId_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("tdnee:"); - if (this.tdnee == null) { - sb.append("null"); - } else { - sb.append(this.tdnee); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("ipe:"); - if (this.ipe == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.ipe); + sb.append(this.e); } first = false; sb.append(")"); @@ -4832,9 +4392,6 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -4847,21 +4404,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getClientRawTableInfoByPath_resultStandardSchemeFactory implements SchemeFactory { - public getClientRawTableInfoByPath_resultStandardScheme getScheme() { - return new getClientRawTableInfoByPath_resultStandardScheme(); + private static class getRawTableId_resultStandardSchemeFactory implements SchemeFactory { + public getRawTableId_resultStandardScheme getScheme() { + return new getRawTableId_resultStandardScheme(); } } - private static class getClientRawTableInfoByPath_resultStandardScheme extends StandardScheme { + private static class getRawTableId_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableInfoByPath_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getRawTableId_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4872,28 +4431,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableIn } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new RawTableInfo(); - struct.success.read(iprot); + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // TDNEE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tdnee = new TableDoesNotExistException(); - struct.tdnee.read(iprot); - struct.setTdneeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // IPE + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -4909,23 +4458,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getClientRawTableIn struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableInfoByPath_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getRawTableId_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { + if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.tdnee != null) { - oprot.writeFieldBegin(TDNEE_FIELD_DESC); - struct.tdnee.write(oprot); + oprot.writeI64(struct.success); oprot.writeFieldEnd(); } - if (struct.ipe != null) { - oprot.writeFieldBegin(IPE_FIELD_DESC); - struct.ipe.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -4934,57 +4478,45 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getClientRawTableI } - private static class getClientRawTableInfoByPath_resultTupleSchemeFactory implements SchemeFactory { - public getClientRawTableInfoByPath_resultTupleScheme getScheme() { - return new getClientRawTableInfoByPath_resultTupleScheme(); + private static class getRawTableId_resultTupleSchemeFactory implements SchemeFactory { + public getRawTableId_resultTupleScheme getScheme() { + return new getRawTableId_resultTupleScheme(); } } - private static class getClientRawTableInfoByPath_resultTupleScheme extends TupleScheme { + private static class getRawTableId_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoByPath_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getRawTableId_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetTdnee()) { + if (struct.isSetE()) { optionals.set(1); } - if (struct.isSetIpe()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); + oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetTdnee()) { - struct.tdnee.write(oprot); + oprot.writeI64(struct.success); } - if (struct.isSetIpe()) { - struct.ipe.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getClientRawTableInfoByPath_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getRawTableId_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = new RawTableInfo(); - struct.success.read(iprot); + struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.tdnee = new TableDoesNotExistException(); - struct.tdnee.read(iprot); - struct.setTdneeIsSet(true); - } - if (incoming.get(2)) { - struct.ipe = new InvalidPathException(); - struct.ipe.read(iprot); - struct.setIpeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } @@ -5468,8 +5000,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, updateRawTableMetada public static class updateRawTableMetadata_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("updateRawTableMetadata_result"); - private static final org.apache.thrift.protocol.TField TDNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("tdnee", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IOE_FIELD_DESC = new org.apache.thrift.protocol.TField("ioe", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -5477,13 +5009,13 @@ public static class updateRawTableMetadata_result implements org.apache.thrift.T schemes.put(TupleScheme.class, new updateRawTableMetadata_resultTupleSchemeFactory()); } - public TableDoesNotExistException tdnee; // required - public TachyonException te; // required + public TachyonTException e; // required + public ThriftIOException ioe; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TDNEE((short)1, "tdnee"), - TE((short)2, "te"); + E((short)1, "e"), + IOE((short)2, "ioe"); private static final Map byName = new HashMap(); @@ -5498,10 +5030,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TDNEE - return TDNEE; - case 2: // TE - return TE; + case 1: // E + return E; + case 2: // IOE + return IOE; default: return null; } @@ -5545,9 +5077,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.TDNEE, new org.apache.thrift.meta_data.FieldMetaData("tdnee", 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))); - tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IOE, new org.apache.thrift.meta_data.FieldMetaData("ioe", 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(updateRawTableMetadata_result.class, metaDataMap); @@ -5557,23 +5089,23 @@ public updateRawTableMetadata_result() { } public updateRawTableMetadata_result( - TableDoesNotExistException tdnee, - TachyonException te) + TachyonTException e, + ThriftIOException ioe) { this(); - this.tdnee = tdnee; - this.te = te; + this.e = e; + this.ioe = ioe; } /** * Performs a deep copy on other. */ public updateRawTableMetadata_result(updateRawTableMetadata_result other) { - if (other.isSetTdnee()) { - this.tdnee = new TableDoesNotExistException(other.tdnee); + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } - if (other.isSetTe()) { - this.te = new TachyonException(other.te); + if (other.isSetIoe()) { + this.ioe = new ThriftIOException(other.ioe); } } @@ -5583,73 +5115,73 @@ public updateRawTableMetadata_result deepCopy() { @Override public void clear() { - this.tdnee = null; - this.te = null; + this.e = null; + this.ioe = null; } - public TableDoesNotExistException getTdnee() { - return this.tdnee; + public TachyonTException getE() { + return this.e; } - public updateRawTableMetadata_result setTdnee(TableDoesNotExistException tdnee) { - this.tdnee = tdnee; + public updateRawTableMetadata_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetTdnee() { - this.tdnee = null; + public void unsetE() { + this.e = null; } - /** Returns true if field tdnee is set (has been assigned a value) and false otherwise */ - public boolean isSetTdnee() { - return this.tdnee != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setTdneeIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.tdnee = null; + this.e = null; } } - public TachyonException getTe() { - return this.te; + public ThriftIOException getIoe() { + return this.ioe; } - public updateRawTableMetadata_result setTe(TachyonException te) { - this.te = te; + public updateRawTableMetadata_result setIoe(ThriftIOException ioe) { + this.ioe = ioe; return this; } - public void unsetTe() { - this.te = null; + public void unsetIoe() { + this.ioe = null; } - /** Returns true if field te is set (has been assigned a value) and false otherwise */ - public boolean isSetTe() { - return this.te != null; + /** Returns true if field ioe is set (has been assigned a value) and false otherwise */ + public boolean isSetIoe() { + return this.ioe != null; } - public void setTeIsSet(boolean value) { + public void setIoeIsSet(boolean value) { if (!value) { - this.te = null; + this.ioe = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TDNEE: + case E: if (value == null) { - unsetTdnee(); + unsetE(); } else { - setTdnee((TableDoesNotExistException)value); + setE((TachyonTException)value); } break; - case TE: + case IOE: if (value == null) { - unsetTe(); + unsetIoe(); } else { - setTe((TachyonException)value); + setIoe((ThriftIOException)value); } break; @@ -5658,11 +5190,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case TDNEE: - return getTdnee(); + case E: + return getE(); - case TE: - return getTe(); + case IOE: + return getIoe(); } throw new IllegalStateException(); @@ -5675,10 +5207,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case TDNEE: - return isSetTdnee(); - case TE: - return isSetTe(); + case E: + return isSetE(); + case IOE: + return isSetIoe(); } throw new IllegalStateException(); } @@ -5696,21 +5228,21 @@ public boolean equals(updateRawTableMetadata_result that) { if (that == null) return false; - boolean this_present_tdnee = true && this.isSetTdnee(); - boolean that_present_tdnee = true && that.isSetTdnee(); - if (this_present_tdnee || that_present_tdnee) { - if (!(this_present_tdnee && that_present_tdnee)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.tdnee.equals(that.tdnee)) + if (!this.e.equals(that.e)) return false; } - boolean this_present_te = true && this.isSetTe(); - boolean that_present_te = true && that.isSetTe(); - if (this_present_te || that_present_te) { - if (!(this_present_te && that_present_te)) + boolean this_present_ioe = true && this.isSetIoe(); + boolean that_present_ioe = true && that.isSetIoe(); + if (this_present_ioe || that_present_ioe) { + if (!(this_present_ioe && that_present_ioe)) return false; - if (!this.te.equals(that.te)) + if (!this.ioe.equals(that.ioe)) return false; } @@ -5721,15 +5253,15 @@ public boolean equals(updateRawTableMetadata_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_tdnee = true && (isSetTdnee()); - list.add(present_tdnee); - if (present_tdnee) - list.add(tdnee); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); - boolean present_te = true && (isSetTe()); - list.add(present_te); - if (present_te) - list.add(te); + boolean present_ioe = true && (isSetIoe()); + list.add(present_ioe); + if (present_ioe) + list.add(ioe); return list.hashCode(); } @@ -5742,22 +5274,22 @@ public int compareTo(updateRawTableMetadata_result other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTdnee()).compareTo(other.isSetTdnee()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetTdnee()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdnee, other.tdnee); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTe()).compareTo(other.isSetTe()); + lastComparison = Boolean.valueOf(isSetIoe()).compareTo(other.isSetIoe()); if (lastComparison != 0) { return lastComparison; } - if (isSetTe()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, other.te); + if (isSetIoe()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioe, other.ioe); if (lastComparison != 0) { return lastComparison; } @@ -5782,19 +5314,19 @@ public String toString() { StringBuilder sb = new StringBuilder("updateRawTableMetadata_result("); boolean first = true; - sb.append("tdnee:"); - if (this.tdnee == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.tdnee); + sb.append(this.e); } first = false; if (!first) sb.append(", "); - sb.append("te:"); - if (this.te == null) { + sb.append("ioe:"); + if (this.ioe == null) { sb.append("null"); } else { - sb.append(this.te); + sb.append(this.ioe); } first = false; sb.append(")"); @@ -5840,20 +5372,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, updateRawTableMetad break; } switch (schemeField.id) { - case 1: // TDNEE + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tdnee = new TableDoesNotExistException(); - struct.tdnee.read(iprot); - struct.setTdneeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // TE + case 2: // IOE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5873,14 +5405,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, updateRawTableMeta struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.tdnee != null) { - oprot.writeFieldBegin(TDNEE_FIELD_DESC); - struct.tdnee.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } - if (struct.te != null) { - oprot.writeFieldBegin(TE_FIELD_DESC); - struct.te.write(oprot); + if (struct.ioe != null) { + oprot.writeFieldBegin(IOE_FIELD_DESC); + struct.ioe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -5901,18 +5433,18 @@ private static class updateRawTableMetadata_resultTupleScheme extends TupleSchem public void write(org.apache.thrift.protocol.TProtocol prot, updateRawTableMetadata_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetTdnee()) { + if (struct.isSetE()) { optionals.set(0); } - if (struct.isSetTe()) { + if (struct.isSetIoe()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetTdnee()) { - struct.tdnee.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } - if (struct.isSetTe()) { - struct.te.write(oprot); + if (struct.isSetIoe()) { + struct.ioe.write(oprot); } } @@ -5921,14 +5453,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, updateRawTableMetada TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.tdnee = new TableDoesNotExistException(); - struct.tdnee.read(iprot); - struct.setTdneeIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } if (incoming.get(1)) { - struct.te = new TachyonException(); - struct.te.read(iprot); - struct.setTeIsSet(true); + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } } } diff --git a/common/src/main/java/tachyon/thrift/TachyonTException.java b/common/src/main/java/tachyon/thrift/TachyonTException.java new file mode 100644 index 000000000000..3ae8472de260 --- /dev/null +++ b/common/src/main/java/tachyon/thrift/TachyonTException.java @@ -0,0 +1,503 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package tachyon.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") +public class TachyonTException 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("TachyonTException"); + + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TachyonTExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TachyonTExceptionTupleSchemeFactory()); + } + + public String type; // required + public String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TYPE((short)1, "type"), + MESSAGE((short)2, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TYPE + return TYPE; + case 2: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TachyonTException.class, metaDataMap); + } + + public TachyonTException() { + } + + public TachyonTException( + String type, + String message) + { + this(); + this.type = type; + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public TachyonTException(TachyonTException other) { + if (other.isSetType()) { + this.type = other.type; + } + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public TachyonTException deepCopy() { + return new TachyonTException(this); + } + + @Override + public void clear() { + this.type = null; + this.message = null; + } + + public String getType() { + return this.type; + } + + public TachyonTException setType(String type) { + this.type = type; + return this; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public String getMessage() { + return this.message; + } + + public TachyonTException setMessage(String message) { + this.message = message; + return this; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((String)value); + } + break; + + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TYPE: + return getType(); + + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TYPE: + return isSetType(); + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TachyonTException) + return this.equals((TachyonTException)that); + return false; + } + + public boolean equals(TachyonTException that) { + if (that == null) + return false; + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(TachyonTException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TachyonTException("); + boolean first = true; + + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TachyonTExceptionStandardSchemeFactory implements SchemeFactory { + public TachyonTExceptionStandardScheme getScheme() { + return new TachyonTExceptionStandardScheme(); + } + } + + private static class TachyonTExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TachyonTException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TachyonTException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeString(struct.type); + oprot.writeFieldEnd(); + } + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TachyonTExceptionTupleSchemeFactory implements SchemeFactory { + public TachyonTExceptionTupleScheme getScheme() { + return new TachyonTExceptionTupleScheme(); + } + } + + private static class TachyonTExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TachyonTException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetType()) { + optionals.set(0); + } + if (struct.isSetMessage()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetType()) { + oprot.writeString(struct.type); + } + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TachyonTException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + } + if (incoming.get(1)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + +} + diff --git a/common/src/main/java/tachyon/thrift/ThriftIOException.java b/common/src/main/java/tachyon/thrift/ThriftIOException.java new file mode 100644 index 000000000000..982426deeef8 --- /dev/null +++ b/common/src/main/java/tachyon/thrift/ThriftIOException.java @@ -0,0 +1,398 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package tachyon.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") +public class ThriftIOException 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("ThriftIOException"); + + private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ThriftIOExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ThriftIOExceptionTupleSchemeFactory()); + } + + public String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ThriftIOException.class, metaDataMap); + } + + public ThriftIOException() { + } + + public ThriftIOException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public ThriftIOException(ThriftIOException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public ThriftIOException deepCopy() { + return new ThriftIOException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public ThriftIOException setMessage(String message) { + this.message = message; + return this; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ThriftIOException) + return this.equals((ThriftIOException)that); + return false; + } + + public boolean equals(ThriftIOException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(ThriftIOException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ThriftIOException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ThriftIOExceptionStandardSchemeFactory implements SchemeFactory { + public ThriftIOExceptionStandardScheme getScheme() { + return new ThriftIOExceptionStandardScheme(); + } + } + + private static class ThriftIOExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ThriftIOException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ThriftIOException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ThriftIOExceptionTupleSchemeFactory implements SchemeFactory { + public ThriftIOExceptionTupleScheme getScheme() { + return new ThriftIOExceptionTupleScheme(); + } + } + + private static class ThriftIOExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ThriftIOException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ThriftIOException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + +} + diff --git a/common/src/main/java/tachyon/thrift/WorkerInfo.java b/common/src/main/java/tachyon/thrift/WorkerInfo.java index 60c9ae526691..6c0ea183614d 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-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") 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 8e924330d0c1..c266ded077cd 100644 --- a/common/src/main/java/tachyon/thrift/WorkerService.java +++ b/common/src/main/java/tachyon/thrift/WorkerService.java @@ -34,16 +34,14 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-30") public class WorkerService { public interface Iface { public void accessBlock(long blockId) throws org.apache.thrift.TException; - public void persistFile(long fileId, long nonce, String path) throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException; - - public boolean asyncCheckpoint(long fileId) throws TachyonException, org.apache.thrift.TException; + public boolean asyncCheckpoint(long fileId) throws TachyonTException, org.apache.thrift.TException; /** * Used to cache a block into Tachyon space, worker will move the temporary block file from session @@ -53,7 +51,7 @@ public interface Iface { * @param sessionId * @param blockId */ - public void cacheBlock(long sessionId, long blockId) throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException; + public void cacheBlock(long sessionId, long blockId) throws TachyonTException, ThriftIOException, org.apache.thrift.TException; /** * Used to cancel a block which is being written. worker will delete the temporary block file and @@ -62,7 +60,7 @@ public interface Iface { * @param sessionId * @param blockId */ - public void cancelBlock(long sessionId, long blockId) throws org.apache.thrift.TException; + public void cancelBlock(long sessionId, long blockId) throws TachyonTException, ThriftIOException, org.apache.thrift.TException; /** * Lock the file in Tachyon's space while the session is reading it, and the path of the block file @@ -72,7 +70,9 @@ public interface Iface { * @param blockId * @param sessionId */ - public String lockBlock(long blockId, long sessionId) throws FileDoesNotExistException, org.apache.thrift.TException; + public String lockBlock(long blockId, long sessionId) throws TachyonTException, org.apache.thrift.TException; + + public void persistFile(long fileId, long nonce, String path) throws TachyonTException, org.apache.thrift.TException; /** * Used to promote block on under storage layer to top storage layer when there are more than one @@ -81,20 +81,20 @@ public interface Iface { * * @param blockId */ - public boolean promoteBlock(long blockId) throws org.apache.thrift.TException; + public boolean promoteBlock(long blockId) throws TachyonTException, ThriftIOException, org.apache.thrift.TException; /** * Used to allocate location and space for a new coming block, worker will choose the appropriate * storage directory which fits the initial block size by some allocation strategy, and the * 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. + * FileAlreadyExistsException will be thrown. * * @param sessionId * @param blockId * @param initialBytes */ - public String requestBlockLocation(long sessionId, long blockId, long initialBytes) throws OutOfSpaceException, FileAlreadyExistException, org.apache.thrift.TException; + public String requestBlockLocation(long sessionId, long blockId, long initialBytes) throws TachyonTException, ThriftIOException, org.apache.thrift.TException; /** * Used to request space for some block file. return true if the worker successfully allocates @@ -105,26 +105,26 @@ public interface Iface { * @param blockId * @param requestBytes */ - public boolean requestSpace(long sessionId, long blockId, long requestBytes) throws FileDoesNotExistException, org.apache.thrift.TException; + public boolean requestSpace(long sessionId, long blockId, long requestBytes) throws TachyonTException, org.apache.thrift.TException; /** - * 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. + * Local session send heartbeat to local worker to keep its temporary folder. It also sends client + * metrics to the worker. * - * @param blockId * @param sessionId + * @param metrics */ - public boolean unlockBlock(long blockId, long sessionId) throws org.apache.thrift.TException; + public void sessionHeartbeat(long sessionId, List metrics) throws org.apache.thrift.TException; /** - * Local session send heartbeat to local worker to keep its temporary folder. It also sends client - * metrics to the worker. + * 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 - * @param metrics */ - public void sessionHeartbeat(long sessionId, List metrics) throws org.apache.thrift.TException; + public boolean unlockBlock(long blockId, long sessionId) throws org.apache.thrift.TException; } @@ -132,8 +132,6 @@ public interface AsyncIface { public void accessBlock(long blockId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void persistFile(long fileId, long nonce, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void asyncCheckpoint(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void cacheBlock(long sessionId, long blockId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -142,16 +140,18 @@ public interface AsyncIface { public void lockBlock(long blockId, long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void persistFile(long fileId, long nonce, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void promoteBlock(long blockId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void requestBlockLocation(long sessionId, long blockId, long initialBytes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void requestSpace(long sessionId, long blockId, long requestBytes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void unlockBlock(long blockId, long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void sessionHeartbeat(long sessionId, List metrics, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void unlockBlock(long blockId, long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -194,41 +194,7 @@ public void recv_accessBlock() throws org.apache.thrift.TException return; } - public void persistFile(long fileId, long nonce, String path) throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException - { - send_persistFile(fileId, nonce, path); - recv_persistFile(); - } - - public void send_persistFile(long fileId, long nonce, String path) throws org.apache.thrift.TException - { - persistFile_args args = new persistFile_args(); - args.setFileId(fileId); - args.setNonce(nonce); - args.setPath(path); - sendBase("persistFile", args); - } - - public void recv_persistFile() throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException - { - persistFile_result result = new persistFile_result(); - receiveBase(result, "persistFile"); - if (result.eP != null) { - throw result.eP; - } - if (result.eS != null) { - throw result.eS; - } - if (result.eF != null) { - throw result.eF; - } - if (result.eB != null) { - throw result.eB; - } - return; - } - - public boolean asyncCheckpoint(long fileId) throws TachyonException, org.apache.thrift.TException + public boolean asyncCheckpoint(long fileId) throws TachyonTException, org.apache.thrift.TException { send_asyncCheckpoint(fileId); return recv_asyncCheckpoint(); @@ -241,7 +207,7 @@ public void send_asyncCheckpoint(long fileId) throws org.apache.thrift.TExceptio sendBase("asyncCheckpoint", args); } - public boolean recv_asyncCheckpoint() throws TachyonException, org.apache.thrift.TException + public boolean recv_asyncCheckpoint() throws TachyonTException, org.apache.thrift.TException { asyncCheckpoint_result result = new asyncCheckpoint_result(); receiveBase(result, "asyncCheckpoint"); @@ -254,7 +220,7 @@ public boolean recv_asyncCheckpoint() throws TachyonException, org.apache.thrift throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "asyncCheckpoint failed: unknown result"); } - public void cacheBlock(long sessionId, long blockId) throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException + public void cacheBlock(long sessionId, long blockId) throws TachyonTException, ThriftIOException, org.apache.thrift.TException { send_cacheBlock(sessionId, blockId); recv_cacheBlock(); @@ -268,20 +234,20 @@ public void send_cacheBlock(long sessionId, long blockId) throws org.apache.thri sendBase("cacheBlock", args); } - public void recv_cacheBlock() throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException + public void recv_cacheBlock() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { cacheBlock_result result = new cacheBlock_result(); receiveBase(result, "cacheBlock"); - if (result.eP != null) { - throw result.eP; + if (result.e != null) { + throw result.e; } - if (result.eB != null) { - throw result.eB; + if (result.ioe != null) { + throw result.ioe; } return; } - public void cancelBlock(long sessionId, long blockId) throws org.apache.thrift.TException + public void cancelBlock(long sessionId, long blockId) throws TachyonTException, ThriftIOException, org.apache.thrift.TException { send_cancelBlock(sessionId, blockId); recv_cancelBlock(); @@ -295,14 +261,20 @@ public void send_cancelBlock(long sessionId, long blockId) throws org.apache.thr sendBase("cancelBlock", args); } - public void recv_cancelBlock() throws org.apache.thrift.TException + public void recv_cancelBlock() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { cancelBlock_result result = new cancelBlock_result(); receiveBase(result, "cancelBlock"); + if (result.e != null) { + throw result.e; + } + if (result.ioe != null) { + throw result.ioe; + } return; } - public String lockBlock(long blockId, long sessionId) throws FileDoesNotExistException, org.apache.thrift.TException + public String lockBlock(long blockId, long sessionId) throws TachyonTException, org.apache.thrift.TException { send_lockBlock(blockId, sessionId); return recv_lockBlock(); @@ -316,20 +288,45 @@ public void send_lockBlock(long blockId, long sessionId) throws org.apache.thrif sendBase("lockBlock", args); } - public String recv_lockBlock() throws FileDoesNotExistException, org.apache.thrift.TException + public String recv_lockBlock() throws TachyonTException, org.apache.thrift.TException { lockBlock_result result = new lockBlock_result(); receiveBase(result, "lockBlock"); if (result.isSetSuccess()) { return result.success; } - if (result.eP != null) { - throw result.eP; + if (result.e != null) { + throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "lockBlock failed: unknown result"); } - public boolean promoteBlock(long blockId) throws org.apache.thrift.TException + public void persistFile(long fileId, long nonce, String path) throws TachyonTException, org.apache.thrift.TException + { + send_persistFile(fileId, nonce, path); + recv_persistFile(); + } + + public void send_persistFile(long fileId, long nonce, String path) throws org.apache.thrift.TException + { + persistFile_args args = new persistFile_args(); + args.setFileId(fileId); + args.setNonce(nonce); + args.setPath(path); + sendBase("persistFile", args); + } + + public void recv_persistFile() throws TachyonTException, org.apache.thrift.TException + { + persistFile_result result = new persistFile_result(); + receiveBase(result, "persistFile"); + if (result.e != null) { + throw result.e; + } + return; + } + + public boolean promoteBlock(long blockId) throws TachyonTException, ThriftIOException, org.apache.thrift.TException { send_promoteBlock(blockId); return recv_promoteBlock(); @@ -342,17 +339,23 @@ public void send_promoteBlock(long blockId) throws org.apache.thrift.TException sendBase("promoteBlock", args); } - public boolean recv_promoteBlock() throws org.apache.thrift.TException + public boolean recv_promoteBlock() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { promoteBlock_result result = new promoteBlock_result(); receiveBase(result, "promoteBlock"); if (result.isSetSuccess()) { return result.success; } + if (result.e != null) { + throw result.e; + } + if (result.ioe != null) { + throw result.ioe; + } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "promoteBlock failed: unknown result"); } - public String requestBlockLocation(long sessionId, long blockId, long initialBytes) throws OutOfSpaceException, FileAlreadyExistException, org.apache.thrift.TException + public String requestBlockLocation(long sessionId, long blockId, long initialBytes) throws TachyonTException, ThriftIOException, org.apache.thrift.TException { send_requestBlockLocation(sessionId, blockId, initialBytes); return recv_requestBlockLocation(); @@ -367,23 +370,23 @@ public void send_requestBlockLocation(long sessionId, long blockId, long initial sendBase("requestBlockLocation", args); } - public String recv_requestBlockLocation() throws OutOfSpaceException, FileAlreadyExistException, org.apache.thrift.TException + public String recv_requestBlockLocation() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { requestBlockLocation_result result = new requestBlockLocation_result(); receiveBase(result, "requestBlockLocation"); if (result.isSetSuccess()) { return result.success; } - if (result.eP != null) { - throw result.eP; + if (result.e != null) { + throw result.e; } - if (result.eS != null) { - throw result.eS; + if (result.ioe != null) { + throw result.ioe; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestBlockLocation failed: unknown result"); } - public boolean requestSpace(long sessionId, long blockId, long requestBytes) throws FileDoesNotExistException, org.apache.thrift.TException + public boolean requestSpace(long sessionId, long blockId, long requestBytes) throws TachyonTException, org.apache.thrift.TException { send_requestSpace(sessionId, blockId, requestBytes); return recv_requestSpace(); @@ -398,19 +401,40 @@ public void send_requestSpace(long sessionId, long blockId, long requestBytes) t sendBase("requestSpace", args); } - public boolean recv_requestSpace() throws FileDoesNotExistException, org.apache.thrift.TException + public boolean recv_requestSpace() throws TachyonTException, org.apache.thrift.TException { requestSpace_result result = new requestSpace_result(); receiveBase(result, "requestSpace"); if (result.isSetSuccess()) { return result.success; } - if (result.eP != null) { - throw result.eP; + if (result.e != null) { + throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestSpace failed: unknown result"); } + public void sessionHeartbeat(long sessionId, List metrics) throws org.apache.thrift.TException + { + send_sessionHeartbeat(sessionId, metrics); + recv_sessionHeartbeat(); + } + + public void send_sessionHeartbeat(long sessionId, List metrics) throws org.apache.thrift.TException + { + sessionHeartbeat_args args = new sessionHeartbeat_args(); + args.setSessionId(sessionId); + args.setMetrics(metrics); + sendBase("sessionHeartbeat", args); + } + + public void recv_sessionHeartbeat() throws org.apache.thrift.TException + { + sessionHeartbeat_result result = new sessionHeartbeat_result(); + receiveBase(result, "sessionHeartbeat"); + return; + } + public boolean unlockBlock(long blockId, long sessionId) throws org.apache.thrift.TException { send_unlockBlock(blockId, sessionId); @@ -435,27 +459,6 @@ public boolean recv_unlockBlock() throws org.apache.thrift.TException throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "unlockBlock failed: unknown result"); } - public void sessionHeartbeat(long sessionId, List metrics) throws org.apache.thrift.TException - { - send_sessionHeartbeat(sessionId, metrics); - recv_sessionHeartbeat(); - } - - public void send_sessionHeartbeat(long sessionId, List metrics) throws org.apache.thrift.TException - { - sessionHeartbeat_args args = new sessionHeartbeat_args(); - args.setSessionId(sessionId); - args.setMetrics(metrics); - sendBase("sessionHeartbeat", args); - } - - public void recv_sessionHeartbeat() throws org.apache.thrift.TException - { - sessionHeartbeat_result result = new sessionHeartbeat_result(); - receiveBase(result, "sessionHeartbeat"); - return; - } - } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { @@ -506,44 +509,6 @@ public void getResult() throws org.apache.thrift.TException { } } - public void persistFile(long fileId, long nonce, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - persistFile_call method_call = new persistFile_call(fileId, nonce, path, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class persistFile_call extends org.apache.thrift.async.TAsyncMethodCall { - private long fileId; - private long nonce; - private String path; - public persistFile_call(long fileId, long nonce, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.fileId = fileId; - this.nonce = nonce; - this.path = path; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("persistFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - persistFile_args args = new persistFile_args(); - args.setFileId(fileId); - args.setNonce(nonce); - args.setPath(path); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_persistFile(); - } - } - public void asyncCheckpoint(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); asyncCheckpoint_call method_call = new asyncCheckpoint_call(fileId, resultHandler, this, ___protocolFactory, ___transport); @@ -566,7 +531,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public boolean getResult() throws TachyonException, org.apache.thrift.TException { + public boolean getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -601,7 +566,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException { + public void getResult() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -636,7 +601,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + public void getResult() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -671,7 +636,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public String getResult() throws FileDoesNotExistException, org.apache.thrift.TException { + public String getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -681,6 +646,44 @@ public String getResult() throws FileDoesNotExistException, org.apache.thrift.TE } } + public void persistFile(long fileId, long nonce, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + persistFile_call method_call = new persistFile_call(fileId, nonce, path, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class persistFile_call extends org.apache.thrift.async.TAsyncMethodCall { + private long fileId; + private long nonce; + private String path; + public persistFile_call(long fileId, long nonce, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.fileId = fileId; + this.nonce = nonce; + this.path = path; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("persistFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); + persistFile_args args = new persistFile_args(); + args.setFileId(fileId); + args.setNonce(nonce); + args.setPath(path); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws TachyonTException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_persistFile(); + } + } + public void promoteBlock(long blockId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); promoteBlock_call method_call = new promoteBlock_call(blockId, resultHandler, this, ___protocolFactory, ___transport); @@ -703,7 +706,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public boolean getResult() throws org.apache.thrift.TException { + public boolean getResult() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -741,7 +744,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public String getResult() throws OutOfSpaceException, FileAlreadyExistException, org.apache.thrift.TException { + public String getResult() throws TachyonTException, ThriftIOException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -779,7 +782,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public boolean getResult() throws FileDoesNotExistException, org.apache.thrift.TException { + public boolean getResult() throws TachyonTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -789,73 +792,73 @@ public boolean getResult() throws FileDoesNotExistException, org.apache.thrift.T } } - public void unlockBlock(long blockId, long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void sessionHeartbeat(long sessionId, List metrics, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - unlockBlock_call method_call = new unlockBlock_call(blockId, sessionId, resultHandler, this, ___protocolFactory, ___transport); + sessionHeartbeat_call method_call = new sessionHeartbeat_call(sessionId, metrics, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class unlockBlock_call extends org.apache.thrift.async.TAsyncMethodCall { - private long blockId; + public static class sessionHeartbeat_call extends org.apache.thrift.async.TAsyncMethodCall { private long sessionId; - public unlockBlock_call(long blockId, long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private List metrics; + public sessionHeartbeat_call(long sessionId, List metrics, 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.blockId = blockId; this.sessionId = sessionId; + this.metrics = metrics; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unlockBlock", org.apache.thrift.protocol.TMessageType.CALL, 0)); - unlockBlock_args args = new unlockBlock_args(); - args.setBlockId(blockId); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sessionHeartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0)); + sessionHeartbeat_args args = new sessionHeartbeat_args(); args.setSessionId(sessionId); + args.setMetrics(metrics); args.write(prot); prot.writeMessageEnd(); } - public boolean getResult() throws org.apache.thrift.TException { + public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } 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_unlockBlock(); + (new Client(prot)).recv_sessionHeartbeat(); } } - public void sessionHeartbeat(long sessionId, List metrics, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void unlockBlock(long blockId, long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - sessionHeartbeat_call method_call = new sessionHeartbeat_call(sessionId, metrics, resultHandler, this, ___protocolFactory, ___transport); + unlockBlock_call method_call = new unlockBlock_call(blockId, sessionId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class sessionHeartbeat_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class unlockBlock_call extends org.apache.thrift.async.TAsyncMethodCall { + private long blockId; private long sessionId; - private List metrics; - public sessionHeartbeat_call(long sessionId, List metrics, 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 unlockBlock_call(long blockId, long sessionId, 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.blockId = blockId; this.sessionId = sessionId; - this.metrics = metrics; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sessionHeartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0)); - sessionHeartbeat_args args = new sessionHeartbeat_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unlockBlock", org.apache.thrift.protocol.TMessageType.CALL, 0)); + unlockBlock_args args = new unlockBlock_args(); + args.setBlockId(blockId); args.setSessionId(sessionId); - args.setMetrics(metrics); args.write(prot); prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + public boolean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_sessionHeartbeat(); + return (new Client(prot)).recv_unlockBlock(); } } @@ -873,16 +876,16 @@ protected Processor(I iface, Map Map> getProcessMap(Map> processMap) { processMap.put("accessBlock", new accessBlock()); - processMap.put("persistFile", new persistFile()); processMap.put("asyncCheckpoint", new asyncCheckpoint()); processMap.put("cacheBlock", new cacheBlock()); processMap.put("cancelBlock", new cancelBlock()); processMap.put("lockBlock", new lockBlock()); + processMap.put("persistFile", new persistFile()); processMap.put("promoteBlock", new promoteBlock()); processMap.put("requestBlockLocation", new requestBlockLocation()); processMap.put("requestSpace", new requestSpace()); - processMap.put("unlockBlock", new unlockBlock()); processMap.put("sessionHeartbeat", new sessionHeartbeat()); + processMap.put("unlockBlock", new unlockBlock()); return processMap; } @@ -906,36 +909,6 @@ public accessBlock_result getResult(I iface, accessBlock_args args) throws org.a } } - public static class persistFile extends org.apache.thrift.ProcessFunction { - public persistFile() { - super("persistFile"); - } - - public persistFile_args getEmptyArgsInstance() { - return new persistFile_args(); - } - - protected boolean isOneway() { - return false; - } - - public persistFile_result getResult(I iface, persistFile_args args) throws org.apache.thrift.TException { - persistFile_result result = new persistFile_result(); - try { - iface.persistFile(args.fileId, args.nonce, args.path); - } catch (FileDoesNotExistException eP) { - result.eP = eP; - } catch (SuspectedFileSizeException eS) { - result.eS = eS; - } catch (FailedToCheckpointException eF) { - result.eF = eF; - } catch (BlockInfoException eB) { - result.eB = eB; - } - return result; - } - } - public static class asyncCheckpoint extends org.apache.thrift.ProcessFunction { public asyncCheckpoint() { super("asyncCheckpoint"); @@ -954,7 +927,7 @@ public asyncCheckpoint_result getResult(I iface, asyncCheckpoint_args args) thro try { result.success = iface.asyncCheckpoint(args.fileId); result.setSuccessIsSet(true); - } catch (TachyonException e) { + } catch (TachyonTException e) { result.e = e; } return result; @@ -978,10 +951,10 @@ public cacheBlock_result getResult(I iface, cacheBlock_args args) throws org.apa cacheBlock_result result = new cacheBlock_result(); try { iface.cacheBlock(args.sessionId, args.blockId); - } catch (FileDoesNotExistException eP) { - result.eP = eP; - } catch (BlockInfoException eB) { - result.eB = eB; + } catch (TachyonTException e) { + result.e = e; + } catch (ThriftIOException ioe) { + result.ioe = ioe; } return result; } @@ -1002,7 +975,13 @@ protected boolean isOneway() { public cancelBlock_result getResult(I iface, cancelBlock_args args) throws org.apache.thrift.TException { cancelBlock_result result = new cancelBlock_result(); - iface.cancelBlock(args.sessionId, args.blockId); + try { + iface.cancelBlock(args.sessionId, args.blockId); + } catch (TachyonTException e) { + result.e = e; + } catch (ThriftIOException ioe) { + result.ioe = ioe; + } return result; } } @@ -1024,8 +1003,32 @@ public lockBlock_result getResult(I iface, lockBlock_args args) throws org.apach lockBlock_result result = new lockBlock_result(); try { result.success = iface.lockBlock(args.blockId, args.sessionId); - } catch (FileDoesNotExistException eP) { - result.eP = eP; + } catch (TachyonTException e) { + result.e = e; + } + return result; + } + } + + public static class persistFile extends org.apache.thrift.ProcessFunction { + public persistFile() { + super("persistFile"); + } + + public persistFile_args getEmptyArgsInstance() { + return new persistFile_args(); + } + + protected boolean isOneway() { + return false; + } + + public persistFile_result getResult(I iface, persistFile_args args) throws org.apache.thrift.TException { + persistFile_result result = new persistFile_result(); + try { + iface.persistFile(args.fileId, args.nonce, args.path); + } catch (TachyonTException e) { + result.e = e; } return result; } @@ -1046,8 +1049,14 @@ protected boolean isOneway() { public promoteBlock_result getResult(I iface, promoteBlock_args args) throws org.apache.thrift.TException { promoteBlock_result result = new promoteBlock_result(); - result.success = iface.promoteBlock(args.blockId); - result.setSuccessIsSet(true); + try { + result.success = iface.promoteBlock(args.blockId); + result.setSuccessIsSet(true); + } catch (TachyonTException e) { + result.e = e; + } catch (ThriftIOException ioe) { + result.ioe = ioe; + } return result; } } @@ -1069,10 +1078,10 @@ public requestBlockLocation_result getResult(I iface, requestBlockLocation_args requestBlockLocation_result result = new requestBlockLocation_result(); try { result.success = iface.requestBlockLocation(args.sessionId, args.blockId, args.initialBytes); - } catch (OutOfSpaceException eP) { - result.eP = eP; - } catch (FileAlreadyExistException eS) { - result.eS = eS; + } catch (TachyonTException e) { + result.e = e; + } catch (ThriftIOException ioe) { + result.ioe = ioe; } return result; } @@ -1096,50 +1105,50 @@ public requestSpace_result getResult(I iface, requestSpace_args args) throws org try { result.success = iface.requestSpace(args.sessionId, args.blockId, args.requestBytes); result.setSuccessIsSet(true); - } catch (FileDoesNotExistException eP) { - result.eP = eP; + } catch (TachyonTException e) { + result.e = e; } return result; } } - public static class unlockBlock extends org.apache.thrift.ProcessFunction { - public unlockBlock() { - super("unlockBlock"); + public static class sessionHeartbeat extends org.apache.thrift.ProcessFunction { + public sessionHeartbeat() { + super("sessionHeartbeat"); } - public unlockBlock_args getEmptyArgsInstance() { - return new unlockBlock_args(); + public sessionHeartbeat_args getEmptyArgsInstance() { + return new sessionHeartbeat_args(); } protected boolean isOneway() { return false; } - public unlockBlock_result getResult(I iface, unlockBlock_args args) throws org.apache.thrift.TException { - unlockBlock_result result = new unlockBlock_result(); - result.success = iface.unlockBlock(args.blockId, args.sessionId); - result.setSuccessIsSet(true); + public sessionHeartbeat_result getResult(I iface, sessionHeartbeat_args args) throws org.apache.thrift.TException { + sessionHeartbeat_result result = new sessionHeartbeat_result(); + iface.sessionHeartbeat(args.sessionId, args.metrics); return result; } } - public static class sessionHeartbeat extends org.apache.thrift.ProcessFunction { - public sessionHeartbeat() { - super("sessionHeartbeat"); + public static class unlockBlock extends org.apache.thrift.ProcessFunction { + public unlockBlock() { + super("unlockBlock"); } - public sessionHeartbeat_args getEmptyArgsInstance() { - return new sessionHeartbeat_args(); + public unlockBlock_args getEmptyArgsInstance() { + return new unlockBlock_args(); } protected boolean isOneway() { return false; } - public sessionHeartbeat_result getResult(I iface, sessionHeartbeat_args args) throws org.apache.thrift.TException { - sessionHeartbeat_result result = new sessionHeartbeat_result(); - iface.sessionHeartbeat(args.sessionId, args.metrics); + public unlockBlock_result getResult(I iface, unlockBlock_args args) throws org.apache.thrift.TException { + unlockBlock_result result = new unlockBlock_result(); + result.success = iface.unlockBlock(args.blockId, args.sessionId); + result.setSuccessIsSet(true); return result; } } @@ -1158,16 +1167,16 @@ protected AsyncProcessor(I iface, Map Map> getProcessMap(Map> processMap) { processMap.put("accessBlock", new accessBlock()); - processMap.put("persistFile", new persistFile()); processMap.put("asyncCheckpoint", new asyncCheckpoint()); processMap.put("cacheBlock", new cacheBlock()); processMap.put("cancelBlock", new cancelBlock()); processMap.put("lockBlock", new lockBlock()); + processMap.put("persistFile", new persistFile()); processMap.put("promoteBlock", new promoteBlock()); processMap.put("requestBlockLocation", new requestBlockLocation()); processMap.put("requestSpace", new requestSpace()); - processMap.put("unlockBlock", new unlockBlock()); processMap.put("sessionHeartbeat", new sessionHeartbeat()); + processMap.put("unlockBlock", new unlockBlock()); return processMap; } @@ -1221,77 +1230,6 @@ public void start(I iface, accessBlock_args args, org.apache.thrift.async.AsyncM } } - public static class persistFile extends org.apache.thrift.AsyncProcessFunction { - public persistFile() { - super("persistFile"); - } - - 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(Void o) { - persistFile_result result = new persistFile_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - persistFile_result result = new persistFile_result(); - if (e instanceof FileDoesNotExistException) { - result.eP = (FileDoesNotExistException) e; - result.setEPIsSet(true); - msg = result; - } - else if (e instanceof SuspectedFileSizeException) { - result.eS = (SuspectedFileSizeException) e; - result.setESIsSet(true); - msg = result; - } - else if (e instanceof FailedToCheckpointException) { - result.eF = (FailedToCheckpointException) e; - result.setEFIsSet(true); - msg = result; - } - else if (e instanceof BlockInfoException) { - result.eB = (BlockInfoException) e; - result.setEBIsSet(true); - msg = result; - } - 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()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, persistFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.persistFile(args.fileId, args.nonce, args.path,resultHandler); - } - } - public static class asyncCheckpoint extends org.apache.thrift.AsyncProcessFunction { public asyncCheckpoint() { super("asyncCheckpoint"); @@ -1320,8 +1258,8 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; asyncCheckpoint_result result = new asyncCheckpoint_result(); - if (e instanceof TachyonException) { - result.e = (TachyonException) e; + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; result.setEIsSet(true); msg = result; } @@ -1376,14 +1314,14 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; cacheBlock_result result = new cacheBlock_result(); - if (e instanceof FileDoesNotExistException) { - result.eP = (FileDoesNotExistException) e; - result.setEPIsSet(true); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } - else if (e instanceof BlockInfoException) { - result.eB = (BlockInfoException) e; - result.setEBIsSet(true); + else if (e instanceof ThriftIOException) { + result.ioe = (ThriftIOException) e; + result.setIoeIsSet(true); msg = result; } else @@ -1437,6 +1375,17 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; cancelBlock_result result = new cancelBlock_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); + msg = result; + } + else if (e instanceof ThriftIOException) { + result.ioe = (ThriftIOException) e; + result.setIoeIsSet(true); + msg = result; + } + 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()); @@ -1488,9 +1437,9 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; lockBlock_result result = new lockBlock_result(); - if (e instanceof FileDoesNotExistException) { - result.eP = (FileDoesNotExistException) e; - result.setEPIsSet(true); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -1518,6 +1467,62 @@ public void start(I iface, lockBlock_args args, org.apache.thrift.async.AsyncMet } } + public static class persistFile extends org.apache.thrift.AsyncProcessFunction { + public persistFile() { + super("persistFile"); + } + + 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(Void o) { + persistFile_result result = new persistFile_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + persistFile_result result = new persistFile_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); + msg = result; + } + 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()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, persistFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.persistFile(args.fileId, args.nonce, args.path,resultHandler); + } + } + public static class promoteBlock extends org.apache.thrift.AsyncProcessFunction { public promoteBlock() { super("promoteBlock"); @@ -1546,6 +1551,17 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; promoteBlock_result result = new promoteBlock_result(); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); + msg = result; + } + else if (e instanceof ThriftIOException) { + result.ioe = (ThriftIOException) e; + result.setIoeIsSet(true); + msg = result; + } + 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()); @@ -1597,14 +1613,14 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; requestBlockLocation_result result = new requestBlockLocation_result(); - if (e instanceof OutOfSpaceException) { - result.eP = (OutOfSpaceException) e; - result.setEPIsSet(true); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } - else if (e instanceof FileAlreadyExistException) { - result.eS = (FileAlreadyExistException) e; - result.setESIsSet(true); + else if (e instanceof ThriftIOException) { + result.ioe = (ThriftIOException) e; + result.setIoeIsSet(true); msg = result; } else @@ -1660,9 +1676,9 @@ public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; requestSpace_result result = new requestSpace_result(); - if (e instanceof FileDoesNotExistException) { - result.eP = (FileDoesNotExistException) e; - result.setEPIsSet(true); + if (e instanceof TachyonTException) { + result.e = (TachyonTException) e; + result.setEIsSet(true); msg = result; } else @@ -1690,22 +1706,20 @@ public void start(I iface, requestSpace_args args, org.apache.thrift.async.Async } } - public static class unlockBlock extends org.apache.thrift.AsyncProcessFunction { - public unlockBlock() { - super("unlockBlock"); + public static class sessionHeartbeat extends org.apache.thrift.AsyncProcessFunction { + public sessionHeartbeat() { + super("sessionHeartbeat"); } - public unlockBlock_args getEmptyArgsInstance() { - return new unlockBlock_args(); + public sessionHeartbeat_args getEmptyArgsInstance() { + return new sessionHeartbeat_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - unlockBlock_result result = new unlockBlock_result(); - result.success = o; - result.setSuccessIsSet(true); + return new AsyncMethodCallback() { + public void onComplete(Void o) { + sessionHeartbeat_result result = new sessionHeartbeat_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -1717,7 +1731,7 @@ public void onComplete(Boolean o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - unlockBlock_result result = new unlockBlock_result(); + sessionHeartbeat_result result = new sessionHeartbeat_result(); { 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()); @@ -1737,25 +1751,27 @@ protected boolean isOneway() { return false; } - public void start(I iface, unlockBlock_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.unlockBlock(args.blockId, args.sessionId,resultHandler); + public void start(I iface, sessionHeartbeat_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.sessionHeartbeat(args.sessionId, args.metrics,resultHandler); } } - public static class sessionHeartbeat extends org.apache.thrift.AsyncProcessFunction { - public sessionHeartbeat() { - super("sessionHeartbeat"); - } - - public sessionHeartbeat_args getEmptyArgsInstance() { - return new sessionHeartbeat_args(); + public static class unlockBlock extends org.apache.thrift.AsyncProcessFunction { + public unlockBlock() { + super("unlockBlock"); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public unlockBlock_args getEmptyArgsInstance() { + return new unlockBlock_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - sessionHeartbeat_result result = new sessionHeartbeat_result(); + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + unlockBlock_result result = new unlockBlock_result(); + result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -1767,7 +1783,7 @@ public void onComplete(Void o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - sessionHeartbeat_result result = new sessionHeartbeat_result(); + unlockBlock_result result = new unlockBlock_result(); { 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()); @@ -1787,8 +1803,8 @@ protected boolean isOneway() { return false; } - public void start(I iface, sessionHeartbeat_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.sessionHeartbeat(args.sessionId, args.metrics,resultHandler); + public void start(I iface, unlockBlock_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.unlockBlock(args.blockId, args.sessionId,resultHandler); } } @@ -2401,28 +2417,22 @@ public void read(org.apache.thrift.protocol.TProtocol prot, accessBlock_result s } - 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"); + public static class asyncCheckpoint_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("asyncCheckpoint_args"); private static final org.apache.thrift.protocol.TField FILE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fileId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField NONCE_FIELD_DESC = new org.apache.thrift.protocol.TField("nonce", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new persistFile_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new persistFile_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new asyncCheckpoint_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new asyncCheckpoint_argsTupleSchemeFactory()); } public long fileId; // required - public long nonce; // required - public String path; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"), - NONCE((short)2, "nonce"), - PATH((short)3, "path"); + FILE_ID((short)1, "fileId"); private static final Map byName = new HashMap(); @@ -2439,10 +2449,6 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // FILE_ID return FILE_ID; - case 2: // NONCE - return NONCE; - case 3: // PATH - return PATH; default: return null; } @@ -2484,67 +2490,50 @@ public String getFieldName() { // isset id assignments private static final int __FILEID_ISSET_ID = 0; - private static final int __NONCE_ISSET_ID = 1; private byte __isset_bitfield = 0; 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, 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, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(persistFile_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(asyncCheckpoint_args.class, metaDataMap); } - public persistFile_args() { + public asyncCheckpoint_args() { } - public persistFile_args( - long fileId, - long nonce, - String path) + public asyncCheckpoint_args( + long fileId) { this(); this.fileId = fileId; setFileIdIsSet(true); - this.nonce = nonce; - setNonceIsSet(true); - this.path = path; } /** * Performs a deep copy on other. */ - public persistFile_args(persistFile_args other) { + public asyncCheckpoint_args(asyncCheckpoint_args other) { __isset_bitfield = other.__isset_bitfield; this.fileId = other.fileId; - this.nonce = other.nonce; - if (other.isSetPath()) { - this.path = other.path; - } } - public persistFile_args deepCopy() { - return new persistFile_args(this); + public asyncCheckpoint_args deepCopy() { + return new asyncCheckpoint_args(this); } @Override public void clear() { setFileIdIsSet(false); this.fileId = 0; - setNonceIsSet(false); - this.nonce = 0; - this.path = null; } public long getFileId() { return this.fileId; } - public persistFile_args setFileId(long fileId) { + public asyncCheckpoint_args setFileId(long fileId) { this.fileId = fileId; setFileIdIsSet(true); return this; @@ -2563,53 +2552,6 @@ public void setFileIdIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } - public long getNonce() { - return this.nonce; - } - - public persistFile_args setNonce(long nonce) { - this.nonce = nonce; - setNonceIsSet(true); - return this; - } - - public void unsetNonce() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NONCE_ISSET_ID); - } - - /** Returns true if field nonce is set (has been assigned a value) and false otherwise */ - public boolean isSetNonce() { - return EncodingUtils.testBit(__isset_bitfield, __NONCE_ISSET_ID); - } - - public void setNonceIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NONCE_ISSET_ID, value); - } - - public String getPath() { - return this.path; - } - - public persistFile_args setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - public void setFieldValue(_Fields field, Object value) { switch (field) { case FILE_ID: @@ -2620,22 +2562,6 @@ public void setFieldValue(_Fields field, Object value) { } break; - case NONCE: - if (value == null) { - unsetNonce(); - } else { - setNonce((Long)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - } } @@ -2644,12 +2570,6 @@ public Object getFieldValue(_Fields field) { case FILE_ID: return Long.valueOf(getFileId()); - case NONCE: - return Long.valueOf(getNonce()); - - case PATH: - return getPath(); - } throw new IllegalStateException(); } @@ -2663,10 +2583,6 @@ public boolean isSet(_Fields field) { switch (field) { case FILE_ID: return isSetFileId(); - case NONCE: - return isSetNonce(); - case PATH: - return isSetPath(); } throw new IllegalStateException(); } @@ -2675,12 +2591,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof persistFile_args) - return this.equals((persistFile_args)that); + if (that instanceof asyncCheckpoint_args) + return this.equals((asyncCheckpoint_args)that); return false; } - public boolean equals(persistFile_args that) { + public boolean equals(asyncCheckpoint_args that) { if (that == null) return false; @@ -2693,24 +2609,6 @@ public boolean equals(persistFile_args that) { return false; } - boolean this_present_nonce = true; - boolean that_present_nonce = true; - if (this_present_nonce || that_present_nonce) { - if (!(this_present_nonce && that_present_nonce)) - return false; - if (this.nonce != that.nonce) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - return true; } @@ -2723,21 +2621,11 @@ public int hashCode() { if (present_fileId) list.add(fileId); - boolean present_nonce = true; - list.add(present_nonce); - if (present_nonce) - list.add(nonce); - - boolean present_path = true && (isSetPath()); - list.add(present_path); - if (present_path) - list.add(path); - return list.hashCode(); } @Override - public int compareTo(persistFile_args other) { + public int compareTo(asyncCheckpoint_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -2754,26 +2642,6 @@ public int compareTo(persistFile_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNonce()).compareTo(other.isSetNonce()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNonce()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonce, other.nonce); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -2791,24 +2659,12 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("persistFile_args("); + StringBuilder sb = new StringBuilder("asyncCheckpoint_args("); boolean first = true; sb.append("fileId:"); sb.append(this.fileId); first = false; - if (!first) sb.append(", "); - sb.append("nonce:"); - sb.append(this.nonce); - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; sb.append(")"); return sb.toString(); } @@ -2836,15 +2692,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class persistFile_argsStandardSchemeFactory implements SchemeFactory { - public persistFile_argsStandardScheme getScheme() { - return new persistFile_argsStandardScheme(); + private static class asyncCheckpoint_argsStandardSchemeFactory implements SchemeFactory { + public asyncCheckpoint_argsStandardScheme getScheme() { + return new asyncCheckpoint_argsStandardScheme(); } } - private static class persistFile_argsStandardScheme extends StandardScheme { + private static class asyncCheckpoint_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -2862,22 +2718,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_args st org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // NONCE - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.nonce = iprot.readI64(); - struct.setNonceIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2889,106 +2729,72 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_args st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, persistFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, asyncCheckpoint_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(FILE_ID_FIELD_DESC); oprot.writeI64(struct.fileId); oprot.writeFieldEnd(); - oprot.writeFieldBegin(NONCE_FIELD_DESC); - oprot.writeI64(struct.nonce); - oprot.writeFieldEnd(); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class persistFile_argsTupleSchemeFactory implements SchemeFactory { - public persistFile_argsTupleScheme getScheme() { - return new persistFile_argsTupleScheme(); + private static class asyncCheckpoint_argsTupleSchemeFactory implements SchemeFactory { + public asyncCheckpoint_argsTupleScheme getScheme() { + return new asyncCheckpoint_argsTupleScheme(); } } - private static class persistFile_argsTupleScheme extends TupleScheme { + private static class asyncCheckpoint_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, persistFile_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetNonce()) { - optionals.set(1); - } - if (struct.isSetPath()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); + oprot.writeBitSet(optionals, 1); if (struct.isSetFileId()) { oprot.writeI64(struct.fileId); } - if (struct.isSetNonce()) { - oprot.writeI64(struct.nonce); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, persistFile_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.fileId = iprot.readI64(); struct.setFileIdIsSet(true); } - if (incoming.get(1)) { - struct.nonce = iprot.readI64(); - struct.setNonceIsSet(true); - } - if (incoming.get(2)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } } } } - 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"); + public static class asyncCheckpoint_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("asyncCheckpoint_result"); - private static final org.apache.thrift.protocol.TField E_P_FIELD_DESC = new org.apache.thrift.protocol.TField("eP", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField E_S_FIELD_DESC = new org.apache.thrift.protocol.TField("eS", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField E_F_FIELD_DESC = new org.apache.thrift.protocol.TField("eF", org.apache.thrift.protocol.TType.STRUCT, (short)3); - private static final org.apache.thrift.protocol.TField E_B_FIELD_DESC = new org.apache.thrift.protocol.TField("eB", org.apache.thrift.protocol.TType.STRUCT, (short)4); + 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_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new persistFile_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new persistFile_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new asyncCheckpoint_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new asyncCheckpoint_resultTupleSchemeFactory()); } - public FileDoesNotExistException eP; // required - public SuspectedFileSizeException eS; // required - public FailedToCheckpointException eF; // required - public BlockInfoException eB; // required + public boolean success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - E_P((short)1, "eP"), - E_S((short)2, "eS"), - E_F((short)3, "eF"), - E_B((short)4, "eB"); + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -3003,14 +2809,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // E_P - return E_P; - case 2: // E_S - return E_S; - case 3: // E_F - return E_F; - case 4: // E_B - return E_B; + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -3051,194 +2853,116 @@ public String getFieldName() { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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, - 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, - 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, - 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.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, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(persistFile_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(asyncCheckpoint_result.class, metaDataMap); } - public persistFile_result() { + public asyncCheckpoint_result() { } - public persistFile_result( - FileDoesNotExistException eP, - SuspectedFileSizeException eS, - FailedToCheckpointException eF, - BlockInfoException eB) + public asyncCheckpoint_result( + boolean success, + TachyonTException e) { this(); - this.eP = eP; - this.eS = eS; - this.eF = eF; - this.eB = eB; + this.success = success; + setSuccessIsSet(true); + this.e = e; } /** * Performs a deep copy on other. */ - public persistFile_result(persistFile_result other) { - if (other.isSetEP()) { - this.eP = new FileDoesNotExistException(other.eP); - } - if (other.isSetES()) { - this.eS = new SuspectedFileSizeException(other.eS); - } - if (other.isSetEF()) { - this.eF = new FailedToCheckpointException(other.eF); - } - if (other.isSetEB()) { - this.eB = new BlockInfoException(other.eB); + public asyncCheckpoint_result(asyncCheckpoint_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public persistFile_result deepCopy() { - return new persistFile_result(this); + public asyncCheckpoint_result deepCopy() { + return new asyncCheckpoint_result(this); } @Override public void clear() { - this.eP = null; - this.eS = null; - this.eF = null; - this.eB = null; - } - - public FileDoesNotExistException getEP() { - return this.eP; - } - - public persistFile_result setEP(FileDoesNotExistException eP) { - this.eP = eP; - return this; - } - - public void unsetEP() { - this.eP = null; - } - - /** Returns true if field eP is set (has been assigned a value) and false otherwise */ - public boolean isSetEP() { - return this.eP != null; - } - - public void setEPIsSet(boolean value) { - if (!value) { - this.eP = null; - } - } - - public SuspectedFileSizeException getES() { - return this.eS; - } - - public persistFile_result setES(SuspectedFileSizeException eS) { - this.eS = eS; - return this; - } - - public void unsetES() { - this.eS = null; - } - - /** Returns true if field eS is set (has been assigned a value) and false otherwise */ - public boolean isSetES() { - return this.eS != null; - } - - public void setESIsSet(boolean value) { - if (!value) { - this.eS = null; - } + setSuccessIsSet(false); + this.success = false; + this.e = null; } - public FailedToCheckpointException getEF() { - return this.eF; + public boolean isSuccess() { + return this.success; } - public persistFile_result setEF(FailedToCheckpointException eF) { - this.eF = eF; + public asyncCheckpoint_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetEF() { - this.eF = null; + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field eF is set (has been assigned a value) and false otherwise */ - public boolean isSetEF() { - return this.eF != null; + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setEFIsSet(boolean value) { - if (!value) { - this.eF = null; - } + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public BlockInfoException getEB() { - return this.eB; + public TachyonTException getE() { + return this.e; } - public persistFile_result setEB(BlockInfoException eB) { - this.eB = eB; + public asyncCheckpoint_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetEB() { - this.eB = null; + public void unsetE() { + this.e = null; } - /** Returns true if field eB is set (has been assigned a value) and false otherwise */ - public boolean isSetEB() { - return this.eB != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setEBIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.eB = null; + this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case E_P: - if (value == null) { - unsetEP(); - } else { - setEP((FileDoesNotExistException)value); - } - break; - - case E_S: - if (value == null) { - unsetES(); - } else { - setES((SuspectedFileSizeException)value); - } - break; - - case E_F: + case SUCCESS: if (value == null) { - unsetEF(); + unsetSuccess(); } else { - setEF((FailedToCheckpointException)value); + setSuccess((Boolean)value); } break; - case E_B: + case E: if (value == null) { - unsetEB(); + unsetE(); } else { - setEB((BlockInfoException)value); + setE((TachyonTException)value); } break; @@ -3247,17 +2971,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case E_P: - return getEP(); - - case E_S: - return getES(); - - case E_F: - return getEF(); + case SUCCESS: + return Boolean.valueOf(isSuccess()); - case E_B: - return getEB(); + case E: + return getE(); } throw new IllegalStateException(); @@ -3270,14 +2988,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case E_P: - return isSetEP(); - case E_S: - return isSetES(); - case E_F: - return isSetEF(); - case E_B: - return isSetEB(); + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -3286,48 +3000,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof persistFile_result) - return this.equals((persistFile_result)that); + if (that instanceof asyncCheckpoint_result) + return this.equals((asyncCheckpoint_result)that); return false; } - public boolean equals(persistFile_result that) { + public boolean equals(asyncCheckpoint_result that) { if (that == null) return false; - boolean this_present_eP = true && this.isSetEP(); - boolean that_present_eP = true && that.isSetEP(); - if (this_present_eP || that_present_eP) { - if (!(this_present_eP && that_present_eP)) - return false; - if (!this.eP.equals(that.eP)) - return false; - } - - boolean this_present_eS = true && this.isSetES(); - boolean that_present_eS = true && that.isSetES(); - if (this_present_eS || that_present_eS) { - if (!(this_present_eS && that_present_eS)) - return false; - if (!this.eS.equals(that.eS)) - return false; - } - - boolean this_present_eF = true && this.isSetEF(); - boolean that_present_eF = true && that.isSetEF(); - if (this_present_eF || that_present_eF) { - if (!(this_present_eF && that_present_eF)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.eF.equals(that.eF)) + if (this.success != that.success) return false; } - boolean this_present_eB = true && this.isSetEB(); - boolean that_present_eB = true && that.isSetEB(); - if (this_present_eB || that_present_eB) { - if (!(this_present_eB && that_present_eB)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.eB.equals(that.eB)) + if (!this.e.equals(that.e)) return false; } @@ -3338,73 +3034,43 @@ public boolean equals(persistFile_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_eP = true && (isSetEP()); - list.add(present_eP); - if (present_eP) - list.add(eP); - - boolean present_eS = true && (isSetES()); - list.add(present_eS); - if (present_eS) - list.add(eS); - - boolean present_eF = true && (isSetEF()); - list.add(present_eF); - if (present_eF) - list.add(eF); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); - boolean present_eB = true && (isSetEB()); - list.add(present_eB); - if (present_eB) - list.add(eB); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(persistFile_result other) { + public int compareTo(asyncCheckpoint_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetEP()).compareTo(other.isSetEP()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEP()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eP, other.eP); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetES()).compareTo(other.isSetES()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetES()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eS, other.eS); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEF()).compareTo(other.isSetEF()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetEF()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eF, other.eF); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetEB()).compareTo(other.isSetEB()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetEB()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eB, other.eB); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -3426,38 +3092,18 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("persistFile_result("); + StringBuilder sb = new StringBuilder("asyncCheckpoint_result("); boolean first = true; - sb.append("eP:"); - if (this.eP == null) { - sb.append("null"); - } else { - sb.append(this.eP); - } - first = false; - if (!first) sb.append(", "); - sb.append("eS:"); - if (this.eS == null) { - sb.append("null"); - } else { - sb.append(this.eS); - } - first = false; - if (!first) sb.append(", "); - sb.append("eF:"); - if (this.eF == null) { - sb.append("null"); - } else { - sb.append(this.eF); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("eB:"); - if (this.eB == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.eB); + sb.append(this.e); } first = false; sb.append(")"); @@ -3479,21 +3125,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class persistFile_resultStandardSchemeFactory implements SchemeFactory { - public persistFile_resultStandardScheme getScheme() { - return new persistFile_resultStandardScheme(); + private static class asyncCheckpoint_resultStandardSchemeFactory implements SchemeFactory { + public asyncCheckpoint_resultStandardScheme getScheme() { + return new asyncCheckpoint_resultStandardScheme(); } } - private static class persistFile_resultStandardScheme extends StandardScheme { + private static class asyncCheckpoint_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -3503,38 +3151,19 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_result break; } switch (schemeField.id) { - case 1: // E_P - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eP = new FileDoesNotExistException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // E_S + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eS = new SuspectedFileSizeException(); - struct.eS.read(iprot); - struct.setESIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // E_F - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eF = new FailedToCheckpointException(); - struct.eF.read(iprot); - struct.setEFIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // E_B - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eB = new BlockInfoException(); - struct.eB.read(iprot); - struct.setEBIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -3550,28 +3179,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, persistFile_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, persistFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, asyncCheckpoint_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.eP != null) { - oprot.writeFieldBegin(E_P_FIELD_DESC); - struct.eP.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.eS != null) { - oprot.writeFieldBegin(E_S_FIELD_DESC); - struct.eS.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.eF != null) { - oprot.writeFieldBegin(E_F_FIELD_DESC); - struct.eF.write(oprot); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); oprot.writeFieldEnd(); } - if (struct.eB != null) { - oprot.writeFieldBegin(E_B_FIELD_DESC); - struct.eB.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -3580,90 +3199,70 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, persistFile_result } - private static class persistFile_resultTupleSchemeFactory implements SchemeFactory { - public persistFile_resultTupleScheme getScheme() { - return new persistFile_resultTupleScheme(); + private static class asyncCheckpoint_resultTupleSchemeFactory implements SchemeFactory { + public asyncCheckpoint_resultTupleScheme getScheme() { + return new asyncCheckpoint_resultTupleScheme(); } } - private static class persistFile_resultTupleScheme extends TupleScheme { + private static class asyncCheckpoint_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, persistFile_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetEP()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetES()) { + if (struct.isSetE()) { optionals.set(1); } - if (struct.isSetEF()) { - optionals.set(2); - } - if (struct.isSetEB()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetEP()) { - struct.eP.write(oprot); - } - if (struct.isSetES()) { - struct.eS.write(oprot); - } - if (struct.isSetEF()) { - struct.eF.write(oprot); + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); } - if (struct.isSetEB()) { - struct.eB.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, persistFile_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.eP = new FileDoesNotExistException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.eS = new SuspectedFileSizeException(); - struct.eS.read(iprot); - struct.setESIsSet(true); - } - if (incoming.get(2)) { - struct.eF = new FailedToCheckpointException(); - struct.eF.read(iprot); - struct.setEFIsSet(true); - } - if (incoming.get(3)) { - struct.eB = new BlockInfoException(); - struct.eB.read(iprot); - struct.setEBIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class asyncCheckpoint_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("asyncCheckpoint_args"); + public static class cacheBlock_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("cacheBlock_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 SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new asyncCheckpoint_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new asyncCheckpoint_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new cacheBlock_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cacheBlock_argsTupleSchemeFactory()); } - public long fileId; // required + public long sessionId; // required + public long blockId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_ID((short)1, "fileId"); + SESSION_ID((short)1, "sessionId"), + BLOCK_ID((short)2, "blockId"); private static final Map byName = new HashMap(); @@ -3678,8 +3277,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE_ID - return FILE_ID; + case 1: // SESSION_ID + return SESSION_ID; + case 2: // BLOCK_ID + return BLOCK_ID; default: return null; } @@ -3720,76 +3321,116 @@ public String getFieldName() { } // isset id assignments - private static final int __FILEID_ISSET_ID = 0; + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __BLOCKID_ISSET_ID = 1; private byte __isset_bitfield = 0; 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.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, 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); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cacheBlock_args.class, metaDataMap); } - public asyncCheckpoint_args() { + public cacheBlock_args() { } - public asyncCheckpoint_args( - long fileId) + public cacheBlock_args( + long sessionId, + long blockId) { this(); - this.fileId = fileId; - setFileIdIsSet(true); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.blockId = blockId; + setBlockIdIsSet(true); } /** * Performs a deep copy on other. */ - public asyncCheckpoint_args(asyncCheckpoint_args other) { + public cacheBlock_args(cacheBlock_args other) { __isset_bitfield = other.__isset_bitfield; - this.fileId = other.fileId; + this.sessionId = other.sessionId; + this.blockId = other.blockId; } - public asyncCheckpoint_args deepCopy() { - return new asyncCheckpoint_args(this); + public cacheBlock_args deepCopy() { + return new cacheBlock_args(this); } @Override public void clear() { - setFileIdIsSet(false); - this.fileId = 0; + setSessionIdIsSet(false); + this.sessionId = 0; + setBlockIdIsSet(false); + this.blockId = 0; } - public long getFileId() { - return this.fileId; + public long getSessionId() { + return this.sessionId; } - public asyncCheckpoint_args setFileId(long fileId) { - this.fileId = fileId; - setFileIdIsSet(true); + public cacheBlock_args setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); return this; } - public void unsetFileId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); + public void unsetSessionId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); } - /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ - public boolean isSetFileId() { - return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); } - public void setFileIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public long getBlockId() { + return this.blockId; + } + + public cacheBlock_args setBlockId(long blockId) { + this.blockId = blockId; + setBlockIdIsSet(true); + return this; + } + + public void unsetBlockId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID); + } + + /** Returns true if field blockId is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockId() { + return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID); + } + + public void setBlockIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FILE_ID: + case SESSION_ID: if (value == null) { - unsetFileId(); + unsetSessionId(); } else { - setFileId((Long)value); + setSessionId((Long)value); + } + break; + + case BLOCK_ID: + if (value == null) { + unsetBlockId(); + } else { + setBlockId((Long)value); } break; @@ -3798,8 +3439,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case FILE_ID: - return Long.valueOf(getFileId()); + case SESSION_ID: + return Long.valueOf(getSessionId()); + + case BLOCK_ID: + return Long.valueOf(getBlockId()); } throw new IllegalStateException(); @@ -3812,8 +3456,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE_ID: - return isSetFileId(); + case SESSION_ID: + return isSetSessionId(); + case BLOCK_ID: + return isSetBlockId(); } throw new IllegalStateException(); } @@ -3822,21 +3468,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof asyncCheckpoint_args) - return this.equals((asyncCheckpoint_args)that); + if (that instanceof cacheBlock_args) + return this.equals((cacheBlock_args)that); return false; } - public boolean equals(asyncCheckpoint_args that) { + public boolean equals(cacheBlock_args that) { if (that == null) return false; - boolean this_present_fileId = true; - boolean that_present_fileId = true; - if (this_present_fileId || that_present_fileId) { - if (!(this_present_fileId && that_present_fileId)) + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) return false; - if (this.fileId != that.fileId) + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_blockId = true; + boolean that_present_blockId = true; + if (this_present_blockId || that_present_blockId) { + if (!(this_present_blockId && that_present_blockId)) + return false; + if (this.blockId != that.blockId) return false; } @@ -3847,28 +3502,43 @@ public boolean equals(asyncCheckpoint_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_fileId = true; - list.add(present_fileId); - if (present_fileId) - list.add(fileId); + boolean present_sessionId = true; + list.add(present_sessionId); + if (present_sessionId) + list.add(sessionId); + + boolean present_blockId = true; + list.add(present_blockId); + if (present_blockId) + list.add(blockId); return list.hashCode(); } @Override - public int compareTo(asyncCheckpoint_args other) { + public int compareTo(cacheBlock_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(other.isSetBlockId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBlockId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, other.blockId); if (lastComparison != 0) { return lastComparison; } @@ -3890,11 +3560,15 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("asyncCheckpoint_args("); + StringBuilder sb = new StringBuilder("cacheBlock_args("); boolean first = true; - sb.append("fileId:"); - sb.append(this.fileId); + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("blockId:"); + sb.append(this.blockId); first = false; sb.append(")"); return sb.toString(); @@ -3923,15 +3597,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class asyncCheckpoint_argsStandardSchemeFactory implements SchemeFactory { - public asyncCheckpoint_argsStandardScheme getScheme() { - return new asyncCheckpoint_argsStandardScheme(); + private static class cacheBlock_argsStandardSchemeFactory implements SchemeFactory { + public cacheBlock_argsStandardScheme getScheme() { + return new cacheBlock_argsStandardScheme(); } } - private static class asyncCheckpoint_argsStandardScheme extends StandardScheme { + private static class cacheBlock_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -3941,10 +3615,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_arg break; } switch (schemeField.id) { - case 1: // FILE_ID + case 1: // SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // BLOCK_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.blockId = iprot.readI64(); + struct.setBlockIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -3960,12 +3642,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_arg struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, asyncCheckpoint_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, cacheBlock_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FILE_ID_FIELD_DESC); - oprot.writeI64(struct.fileId); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC); + oprot.writeI64(struct.blockId); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -3973,59 +3658,69 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, asyncCheckpoint_ar } - private static class asyncCheckpoint_argsTupleSchemeFactory implements SchemeFactory { - public asyncCheckpoint_argsTupleScheme getScheme() { - return new asyncCheckpoint_argsTupleScheme(); + private static class cacheBlock_argsTupleSchemeFactory implements SchemeFactory { + public cacheBlock_argsTupleScheme getScheme() { + return new cacheBlock_argsTupleScheme(); } } - private static class asyncCheckpoint_argsTupleScheme extends TupleScheme { + private static class cacheBlock_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, cacheBlock_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFileId()) { + if (struct.isSetSessionId()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetFileId()) { - oprot.writeI64(struct.fileId); + if (struct.isSetBlockId()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSessionId()) { + oprot.writeI64(struct.sessionId); + } + if (struct.isSetBlockId()) { + oprot.writeI64(struct.blockId); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, cacheBlock_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.fileId = iprot.readI64(); - struct.setFileIdIsSet(true); + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } + if (incoming.get(1)) { + struct.blockId = iprot.readI64(); + struct.setBlockIdIsSet(true); } } } } - public static class asyncCheckpoint_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("asyncCheckpoint_result"); + public static class cacheBlock_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("cacheBlock_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_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IOE_FIELD_DESC = new org.apache.thrift.protocol.TField("ioe", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new asyncCheckpoint_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new asyncCheckpoint_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new cacheBlock_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cacheBlock_resultTupleSchemeFactory()); } - public boolean success; // required - public TachyonException e; // required + public TachyonTException e; // required + public ThriftIOException ioe; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - E((short)1, "e"); + E((short)1, "e"), + IOE((short)2, "ioe"); private static final Map byName = new HashMap(); @@ -4040,10 +3735,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; case 1: // E return E; + case 2: // IOE + return IOE; default: return null; } @@ -4084,116 +3779,114 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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, - 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, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IOE, new org.apache.thrift.meta_data.FieldMetaData("ioe", 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); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cacheBlock_result.class, metaDataMap); } - public asyncCheckpoint_result() { + public cacheBlock_result() { } - public asyncCheckpoint_result( - boolean success, - TachyonException e) + public cacheBlock_result( + TachyonTException e, + ThriftIOException ioe) { this(); - this.success = success; - setSuccessIsSet(true); this.e = e; + this.ioe = ioe; } /** * Performs a deep copy on other. */ - public asyncCheckpoint_result(asyncCheckpoint_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; + public cacheBlock_result(cacheBlock_result other) { if (other.isSetE()) { - this.e = new TachyonException(other.e); + this.e = new TachyonTException(other.e); + } + if (other.isSetIoe()) { + this.ioe = new ThriftIOException(other.ioe); } } - public asyncCheckpoint_result deepCopy() { - return new asyncCheckpoint_result(this); + public cacheBlock_result deepCopy() { + return new cacheBlock_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; this.e = null; + this.ioe = null; } - public boolean isSuccess() { - return this.success; + public TachyonTException getE() { + return this.e; } - public asyncCheckpoint_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); + public cacheBlock_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + public void unsetE() { + this.e = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } } - public TachyonException getE() { - return this.e; + public ThriftIOException getIoe() { + return this.ioe; } - public asyncCheckpoint_result setE(TachyonException e) { - this.e = e; + public cacheBlock_result setIoe(ThriftIOException ioe) { + this.ioe = ioe; return this; } - public void unsetE() { - this.e = null; + public void unsetIoe() { + this.ioe = null; } - /** Returns true if field e is set (has been assigned a value) and false otherwise */ - public boolean isSetE() { - return this.e != null; + /** Returns true if field ioe is set (has been assigned a value) and false otherwise */ + public boolean isSetIoe() { + return this.ioe != null; } - public void setEIsSet(boolean value) { + public void setIoeIsSet(boolean value) { if (!value) { - this.e = null; + this.ioe = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case E: if (value == null) { - unsetSuccess(); + unsetE(); } else { - setSuccess((Boolean)value); + setE((TachyonTException)value); } break; - case E: + case IOE: if (value == null) { - unsetE(); + unsetIoe(); } else { - setE((TachyonException)value); + setIoe((ThriftIOException)value); } break; @@ -4202,12 +3895,12 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); - case E: return getE(); + case IOE: + return getIoe(); + } throw new IllegalStateException(); } @@ -4219,10 +3912,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); case E: return isSetE(); + case IOE: + return isSetIoe(); } throw new IllegalStateException(); } @@ -4231,24 +3924,15 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof asyncCheckpoint_result) - return this.equals((asyncCheckpoint_result)that); + if (that instanceof cacheBlock_result) + return this.equals((cacheBlock_result)that); return false; } - public boolean equals(asyncCheckpoint_result that) { + public boolean equals(cacheBlock_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { @@ -4258,6 +3942,15 @@ public boolean equals(asyncCheckpoint_result that) { return false; } + boolean this_present_ioe = true && this.isSetIoe(); + boolean that_present_ioe = true && that.isSetIoe(); + if (this_present_ioe || that_present_ioe) { + if (!(this_present_ioe && that_present_ioe)) + return false; + if (!this.ioe.equals(that.ioe)) + return false; + } + return true; } @@ -4265,43 +3958,43 @@ public boolean equals(asyncCheckpoint_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); + boolean present_ioe = true && (isSetIoe()); + list.add(present_ioe); + if (present_ioe) + list.add(ioe); + return list.hashCode(); } @Override - public int compareTo(asyncCheckpoint_result other) { + public int compareTo(cacheBlock_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + lastComparison = Boolean.valueOf(isSetIoe()).compareTo(other.isSetIoe()); if (lastComparison != 0) { return lastComparison; } - if (isSetE()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); + if (isSetIoe()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioe, other.ioe); if (lastComparison != 0) { return lastComparison; } @@ -4323,13 +4016,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("asyncCheckpoint_result("); + StringBuilder sb = new StringBuilder("cacheBlock_result("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); @@ -4337,6 +4026,14 @@ public String toString() { sb.append(this.e); } first = false; + if (!first) sb.append(", "); + sb.append("ioe:"); + if (this.ioe == null) { + sb.append("null"); + } else { + sb.append(this.ioe); + } + first = false; sb.append(")"); return sb.toString(); } @@ -4356,23 +4053,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class asyncCheckpoint_resultStandardSchemeFactory implements SchemeFactory { - public asyncCheckpoint_resultStandardScheme getScheme() { - return new asyncCheckpoint_resultStandardScheme(); + private static class cacheBlock_resultStandardSchemeFactory implements SchemeFactory { + public cacheBlock_resultStandardScheme getScheme() { + return new cacheBlock_resultStandardScheme(); } } - private static class asyncCheckpoint_resultStandardScheme extends StandardScheme { + private static class cacheBlock_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4382,19 +4077,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_res break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // E + case 2: // IOE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.e = new TachyonException(); - struct.e.read(iprot); - struct.setEIsSet(true); + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -4410,81 +4106,82 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_res struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, asyncCheckpoint_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, cacheBlock_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } + if (struct.ioe != null) { + oprot.writeFieldBegin(IOE_FIELD_DESC); + struct.ioe.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class asyncCheckpoint_resultTupleSchemeFactory implements SchemeFactory { - public asyncCheckpoint_resultTupleScheme getScheme() { - return new asyncCheckpoint_resultTupleScheme(); + private static class cacheBlock_resultTupleSchemeFactory implements SchemeFactory { + public cacheBlock_resultTupleScheme getScheme() { + return new cacheBlock_resultTupleScheme(); } } - private static class asyncCheckpoint_resultTupleScheme extends TupleScheme { + private static class cacheBlock_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, cacheBlock_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetE()) { optionals.set(0); } - if (struct.isSetE()) { + if (struct.isSetIoe()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } if (struct.isSetE()) { struct.e.write(oprot); } + if (struct.isSetIoe()) { + struct.ioe.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, cacheBlock_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.e = new TachyonException(); + struct.e = new TachyonTException(); struct.e.read(iprot); struct.setEIsSet(true); } + if (incoming.get(1)) { + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); + } } } } - public static class cacheBlock_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("cacheBlock_args"); + public static class cancelBlock_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("cancelBlock_args"); private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new cacheBlock_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new cacheBlock_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new cancelBlock_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cancelBlock_argsTupleSchemeFactory()); } public long sessionId; // required @@ -4563,13 +4260,13 @@ public String getFieldName() { 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); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelBlock_args.class, metaDataMap); } - public cacheBlock_args() { + public cancelBlock_args() { } - public cacheBlock_args( + public cancelBlock_args( long sessionId, long blockId) { @@ -4583,14 +4280,14 @@ public cacheBlock_args( /** * Performs a deep copy on other. */ - public cacheBlock_args(cacheBlock_args other) { + public cancelBlock_args(cancelBlock_args other) { __isset_bitfield = other.__isset_bitfield; this.sessionId = other.sessionId; this.blockId = other.blockId; } - public cacheBlock_args deepCopy() { - return new cacheBlock_args(this); + public cancelBlock_args deepCopy() { + return new cancelBlock_args(this); } @Override @@ -4605,7 +4302,7 @@ public long getSessionId() { return this.sessionId; } - public cacheBlock_args setSessionId(long sessionId) { + public cancelBlock_args setSessionId(long sessionId) { this.sessionId = sessionId; setSessionIdIsSet(true); return this; @@ -4628,7 +4325,7 @@ public long getBlockId() { return this.blockId; } - public cacheBlock_args setBlockId(long blockId) { + public cancelBlock_args setBlockId(long blockId) { this.blockId = blockId; setBlockIdIsSet(true); return this; @@ -4699,12 +4396,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof cacheBlock_args) - return this.equals((cacheBlock_args)that); + if (that instanceof cancelBlock_args) + return this.equals((cancelBlock_args)that); return false; } - public boolean equals(cacheBlock_args that) { + public boolean equals(cancelBlock_args that) { if (that == null) return false; @@ -4747,7 +4444,7 @@ public int hashCode() { } @Override - public int compareTo(cacheBlock_args other) { + public int compareTo(cancelBlock_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -4791,7 +4488,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("cacheBlock_args("); + StringBuilder sb = new StringBuilder("cancelBlock_args("); boolean first = true; sb.append("sessionId:"); @@ -4828,15 +4525,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class cacheBlock_argsStandardSchemeFactory implements SchemeFactory { - public cacheBlock_argsStandardScheme getScheme() { - return new cacheBlock_argsStandardScheme(); + private static class cancelBlock_argsStandardSchemeFactory implements SchemeFactory { + public cancelBlock_argsStandardScheme getScheme() { + return new cancelBlock_argsStandardScheme(); } } - private static class cacheBlock_argsStandardScheme extends StandardScheme { + private static class cancelBlock_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4873,7 +4570,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_args str struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, cacheBlock_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, cancelBlock_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -4889,16 +4586,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, cacheBlock_args st } - private static class cacheBlock_argsTupleSchemeFactory implements SchemeFactory { - public cacheBlock_argsTupleScheme getScheme() { - return new cacheBlock_argsTupleScheme(); + private static class cancelBlock_argsTupleSchemeFactory implements SchemeFactory { + public cancelBlock_argsTupleScheme getScheme() { + return new cancelBlock_argsTupleScheme(); } } - private static class cacheBlock_argsTupleScheme extends TupleScheme { + private static class cancelBlock_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, cacheBlock_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, cancelBlock_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSessionId()) { @@ -4917,7 +4614,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, cacheBlock_args str } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, cacheBlock_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, cancelBlock_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { @@ -4933,25 +4630,25 @@ public void read(org.apache.thrift.protocol.TProtocol prot, cacheBlock_args stru } - public static class cacheBlock_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("cacheBlock_result"); + public static class cancelBlock_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("cancelBlock_result"); - private static final org.apache.thrift.protocol.TField E_P_FIELD_DESC = new org.apache.thrift.protocol.TField("eP", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField E_B_FIELD_DESC = new org.apache.thrift.protocol.TField("eB", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IOE_FIELD_DESC = new org.apache.thrift.protocol.TField("ioe", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new cacheBlock_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new cacheBlock_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new cancelBlock_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cancelBlock_resultTupleSchemeFactory()); } - public FileDoesNotExistException eP; // required - public BlockInfoException eB; // required + public TachyonTException e; // required + public ThriftIOException ioe; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - E_P((short)1, "eP"), - E_B((short)2, "eB"); + E((short)1, "e"), + IOE((short)2, "ioe"); private static final Map byName = new HashMap(); @@ -4966,10 +4663,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // E_P - return E_P; - case 2: // E_B - return E_B; + case 1: // E + return E; + case 2: // IOE + return IOE; default: return null; } @@ -5013,111 +4710,111 @@ 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, 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))); - tmpMap.put(_Fields.E_B, new org.apache.thrift.meta_data.FieldMetaData("eB", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IOE, new org.apache.thrift.meta_data.FieldMetaData("ioe", 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); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelBlock_result.class, metaDataMap); } - public cacheBlock_result() { + public cancelBlock_result() { } - public cacheBlock_result( - FileDoesNotExistException eP, - BlockInfoException eB) + public cancelBlock_result( + TachyonTException e, + ThriftIOException ioe) { this(); - this.eP = eP; - this.eB = eB; + this.e = e; + this.ioe = ioe; } /** * Performs a deep copy on other. */ - public cacheBlock_result(cacheBlock_result other) { - if (other.isSetEP()) { - this.eP = new FileDoesNotExistException(other.eP); + public cancelBlock_result(cancelBlock_result other) { + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } - if (other.isSetEB()) { - this.eB = new BlockInfoException(other.eB); + if (other.isSetIoe()) { + this.ioe = new ThriftIOException(other.ioe); } } - public cacheBlock_result deepCopy() { - return new cacheBlock_result(this); + public cancelBlock_result deepCopy() { + return new cancelBlock_result(this); } @Override public void clear() { - this.eP = null; - this.eB = null; + this.e = null; + this.ioe = null; } - public FileDoesNotExistException getEP() { - return this.eP; + public TachyonTException getE() { + return this.e; } - public cacheBlock_result setEP(FileDoesNotExistException eP) { - this.eP = eP; + public cancelBlock_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetEP() { - this.eP = null; + public void unsetE() { + this.e = null; } - /** Returns true if field eP is set (has been assigned a value) and false otherwise */ - public boolean isSetEP() { - return this.eP != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setEPIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.eP = null; + this.e = null; } } - public BlockInfoException getEB() { - return this.eB; + public ThriftIOException getIoe() { + return this.ioe; } - public cacheBlock_result setEB(BlockInfoException eB) { - this.eB = eB; + public cancelBlock_result setIoe(ThriftIOException ioe) { + this.ioe = ioe; return this; } - public void unsetEB() { - this.eB = null; + public void unsetIoe() { + this.ioe = null; } - /** Returns true if field eB is set (has been assigned a value) and false otherwise */ - public boolean isSetEB() { - return this.eB != null; + /** Returns true if field ioe is set (has been assigned a value) and false otherwise */ + public boolean isSetIoe() { + return this.ioe != null; } - public void setEBIsSet(boolean value) { + public void setIoeIsSet(boolean value) { if (!value) { - this.eB = null; + this.ioe = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case E_P: + case E: if (value == null) { - unsetEP(); + unsetE(); } else { - setEP((FileDoesNotExistException)value); + setE((TachyonTException)value); } break; - case E_B: + case IOE: if (value == null) { - unsetEB(); + unsetIoe(); } else { - setEB((BlockInfoException)value); + setIoe((ThriftIOException)value); } break; @@ -5126,11 +4823,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case E_P: - return getEP(); + case E: + return getE(); - case E_B: - return getEB(); + case IOE: + return getIoe(); } throw new IllegalStateException(); @@ -5143,10 +4840,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case E_P: - return isSetEP(); - case E_B: - return isSetEB(); + case E: + return isSetE(); + case IOE: + return isSetIoe(); } throw new IllegalStateException(); } @@ -5155,30 +4852,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof cacheBlock_result) - return this.equals((cacheBlock_result)that); + if (that instanceof cancelBlock_result) + return this.equals((cancelBlock_result)that); return false; } - public boolean equals(cacheBlock_result that) { + public boolean equals(cancelBlock_result that) { if (that == null) return false; - boolean this_present_eP = true && this.isSetEP(); - boolean that_present_eP = true && that.isSetEP(); - if (this_present_eP || that_present_eP) { - if (!(this_present_eP && that_present_eP)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.eP.equals(that.eP)) + if (!this.e.equals(that.e)) return false; } - boolean this_present_eB = true && this.isSetEB(); - boolean that_present_eB = true && that.isSetEB(); - if (this_present_eB || that_present_eB) { - if (!(this_present_eB && that_present_eB)) + boolean this_present_ioe = true && this.isSetIoe(); + boolean that_present_ioe = true && that.isSetIoe(); + if (this_present_ioe || that_present_ioe) { + if (!(this_present_ioe && that_present_ioe)) return false; - if (!this.eB.equals(that.eB)) + if (!this.ioe.equals(that.ioe)) return false; } @@ -5189,43 +4886,43 @@ public boolean equals(cacheBlock_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_eP = true && (isSetEP()); - list.add(present_eP); - if (present_eP) - list.add(eP); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); - boolean present_eB = true && (isSetEB()); - list.add(present_eB); - if (present_eB) - list.add(eB); + boolean present_ioe = true && (isSetIoe()); + list.add(present_ioe); + if (present_ioe) + list.add(ioe); return list.hashCode(); } @Override - public int compareTo(cacheBlock_result other) { + public int compareTo(cancelBlock_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetEP()).compareTo(other.isSetEP()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetEP()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eP, other.eP); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetEB()).compareTo(other.isSetEB()); + lastComparison = Boolean.valueOf(isSetIoe()).compareTo(other.isSetIoe()); if (lastComparison != 0) { return lastComparison; } - if (isSetEB()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eB, other.eB); + if (isSetIoe()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioe, other.ioe); if (lastComparison != 0) { return lastComparison; } @@ -5247,22 +4944,22 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("cacheBlock_result("); + StringBuilder sb = new StringBuilder("cancelBlock_result("); boolean first = true; - sb.append("eP:"); - if (this.eP == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.eP); + sb.append(this.e); } first = false; if (!first) sb.append(", "); - sb.append("eB:"); - if (this.eB == null) { + sb.append("ioe:"); + if (this.ioe == null) { sb.append("null"); } else { - sb.append(this.eB); + sb.append(this.ioe); } first = false; sb.append(")"); @@ -5290,15 +4987,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class cacheBlock_resultStandardSchemeFactory implements SchemeFactory { - public cacheBlock_resultStandardScheme getScheme() { - return new cacheBlock_resultStandardScheme(); + private static class cancelBlock_resultStandardSchemeFactory implements SchemeFactory { + public cancelBlock_resultStandardScheme getScheme() { + return new cancelBlock_resultStandardScheme(); } } - private static class cacheBlock_resultStandardScheme extends StandardScheme { + private static class cancelBlock_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5308,20 +5005,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_result s break; } switch (schemeField.id) { - case 1: // E_P + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eP = new FileDoesNotExistException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // E_B + case 2: // IOE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eB = new BlockInfoException(); - struct.eB.read(iprot); - struct.setEBIsSet(true); + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5337,18 +5034,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_result s struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, cacheBlock_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, cancelBlock_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.eP != null) { - oprot.writeFieldBegin(E_P_FIELD_DESC); - struct.eP.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } - if (struct.eB != null) { - oprot.writeFieldBegin(E_B_FIELD_DESC); - struct.eB.write(oprot); + if (struct.ioe != null) { + oprot.writeFieldBegin(IOE_FIELD_DESC); + struct.ioe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -5357,71 +5054,71 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, cacheBlock_result } - private static class cacheBlock_resultTupleSchemeFactory implements SchemeFactory { - public cacheBlock_resultTupleScheme getScheme() { - return new cacheBlock_resultTupleScheme(); + private static class cancelBlock_resultTupleSchemeFactory implements SchemeFactory { + public cancelBlock_resultTupleScheme getScheme() { + return new cancelBlock_resultTupleScheme(); } } - private static class cacheBlock_resultTupleScheme extends TupleScheme { + private static class cancelBlock_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, cacheBlock_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, cancelBlock_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetEP()) { + if (struct.isSetE()) { optionals.set(0); } - if (struct.isSetEB()) { + if (struct.isSetIoe()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetEP()) { - struct.eP.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } - if (struct.isSetEB()) { - struct.eB.write(oprot); + if (struct.isSetIoe()) { + struct.ioe.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, cacheBlock_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, cancelBlock_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.eP = new FileDoesNotExistException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } if (incoming.get(1)) { - struct.eB = new BlockInfoException(); - struct.eB.read(iprot); - struct.setEBIsSet(true); + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } } } } - public static class cancelBlock_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("cancelBlock_args"); + public static class lockBlock_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("lockBlock_args"); - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new cancelBlock_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new cancelBlock_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new lockBlock_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new lockBlock_argsTupleSchemeFactory()); } - public long sessionId; // required public long blockId; // required + public long sessionId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - BLOCK_ID((short)2, "blockId"); + BLOCK_ID((short)1, "blockId"), + SESSION_ID((short)2, "sessionId"); private static final Map byName = new HashMap(); @@ -5436,10 +5133,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // BLOCK_ID + case 1: // BLOCK_ID return BLOCK_ID; + case 2: // SESSION_ID + return SESSION_ID; default: return null; } @@ -5480,83 +5177,60 @@ public String getFieldName() { } // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __BLOCKID_ISSET_ID = 1; + private static final int __BLOCKID_ISSET_ID = 0; + private static final int __SESSIONID_ISSET_ID = 1; private byte __isset_bitfield = 0; 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, - 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, 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, + 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); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(lockBlock_args.class, metaDataMap); } - public cancelBlock_args() { + public lockBlock_args() { } - public cancelBlock_args( - long sessionId, - long blockId) + public lockBlock_args( + long blockId, + long sessionId) { this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); this.blockId = blockId; setBlockIdIsSet(true); + this.sessionId = sessionId; + setSessionIdIsSet(true); } /** * Performs a deep copy on other. */ - public cancelBlock_args(cancelBlock_args other) { + public lockBlock_args(lockBlock_args other) { __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; this.blockId = other.blockId; + this.sessionId = other.sessionId; } - public cancelBlock_args deepCopy() { - return new cancelBlock_args(this); + public lockBlock_args deepCopy() { + return new lockBlock_args(this); } @Override public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; setBlockIdIsSet(false); this.blockId = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public cancelBlock_args setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + setSessionIdIsSet(false); + this.sessionId = 0; } public long getBlockId() { return this.blockId; } - public cancelBlock_args setBlockId(long blockId) { + public lockBlock_args setBlockId(long blockId) { this.blockId = blockId; setBlockIdIsSet(true); return this; @@ -5575,35 +5249,58 @@ public void setBlockIdIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((Long)value); - } - break; + public long getSessionId() { + return this.sessionId; + } - case BLOCK_ID: - if (value == null) { + public lockBlock_args setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case BLOCK_ID: + if (value == null) { unsetBlockId(); } else { setBlockId((Long)value); } break; + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((Long)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { - case SESSION_ID: - return Long.valueOf(getSessionId()); - case BLOCK_ID: return Long.valueOf(getBlockId()); + case SESSION_ID: + return Long.valueOf(getSessionId()); + } throw new IllegalStateException(); } @@ -5615,10 +5312,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case SESSION_ID: - return isSetSessionId(); case BLOCK_ID: return isSetBlockId(); + case SESSION_ID: + return isSetSessionId(); } throw new IllegalStateException(); } @@ -5627,24 +5324,15 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof cancelBlock_args) - return this.equals((cancelBlock_args)that); + if (that instanceof lockBlock_args) + return this.equals((lockBlock_args)that); return false; } - public boolean equals(cancelBlock_args that) { + public boolean equals(lockBlock_args that) { if (that == null) return false; - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - boolean this_present_blockId = true; boolean that_present_blockId = true; if (this_present_blockId || that_present_blockId) { @@ -5654,6 +5342,15 @@ public boolean equals(cancelBlock_args that) { return false; } + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + return true; } @@ -5661,43 +5358,43 @@ public boolean equals(cancelBlock_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_sessionId = true; - list.add(present_sessionId); - if (present_sessionId) - list.add(sessionId); - boolean present_blockId = true; list.add(present_blockId); if (present_blockId) list.add(blockId); + boolean present_sessionId = true; + list.add(present_sessionId); + if (present_sessionId) + list.add(sessionId); + return list.hashCode(); } @Override - public int compareTo(cancelBlock_args other) { + public int compareTo(lockBlock_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); + lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(other.isSetBlockId()); if (lastComparison != 0) { return lastComparison; } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (isSetBlockId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, other.blockId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(other.isSetBlockId()); + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } - if (isSetBlockId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, other.blockId); + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); if (lastComparison != 0) { return lastComparison; } @@ -5719,16 +5416,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("cancelBlock_args("); + StringBuilder sb = new StringBuilder("lockBlock_args("); boolean first = true; - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); sb.append("blockId:"); sb.append(this.blockId); first = false; + if (!first) sb.append(", "); + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; sb.append(")"); return sb.toString(); } @@ -5756,15 +5453,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class cancelBlock_argsStandardSchemeFactory implements SchemeFactory { - public cancelBlock_argsStandardScheme getScheme() { - return new cancelBlock_argsStandardScheme(); + private static class lockBlock_argsStandardSchemeFactory implements SchemeFactory { + public lockBlock_argsStandardScheme getScheme() { + return new lockBlock_argsStandardScheme(); } } - private static class cancelBlock_argsStandardScheme extends StandardScheme { + private static class lockBlock_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5774,18 +5471,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_args st break; } switch (schemeField.id) { - case 1: // SESSION_ID + case 1: // BLOCK_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); + struct.blockId = iprot.readI64(); + struct.setBlockIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // BLOCK_ID + case 2: // SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.blockId = iprot.readI64(); - struct.setBlockIdIsSet(true); + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5801,80 +5498,85 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_args st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, cancelBlock_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, lockBlock_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC); oprot.writeI64(struct.blockId); oprot.writeFieldEnd(); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class cancelBlock_argsTupleSchemeFactory implements SchemeFactory { - public cancelBlock_argsTupleScheme getScheme() { - return new cancelBlock_argsTupleScheme(); + private static class lockBlock_argsTupleSchemeFactory implements SchemeFactory { + public lockBlock_argsTupleScheme getScheme() { + return new lockBlock_argsTupleScheme(); } } - private static class cancelBlock_argsTupleScheme extends TupleScheme { + private static class lockBlock_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, cancelBlock_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, lockBlock_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSessionId()) { + if (struct.isSetBlockId()) { optionals.set(0); } - if (struct.isSetBlockId()) { + if (struct.isSetSessionId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetSessionId()) { - oprot.writeI64(struct.sessionId); - } if (struct.isSetBlockId()) { oprot.writeI64(struct.blockId); } + if (struct.isSetSessionId()) { + oprot.writeI64(struct.sessionId); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, cancelBlock_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, lockBlock_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } - if (incoming.get(1)) { struct.blockId = iprot.readI64(); struct.setBlockIdIsSet(true); } + if (incoming.get(1)) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } } } } - public static class cancelBlock_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("cancelBlock_result"); + public static class lockBlock_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("lockBlock_result"); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new cancelBlock_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new cancelBlock_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new lockBlock_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new lockBlock_resultTupleSchemeFactory()); } + public String success; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + SUCCESS((short)0, "success"), + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -5889,6 +5591,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; default: return null; } @@ -5927,83 +5633,228 @@ public String getFieldName() { return _fieldName; } } + + // isset id assignments 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + 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(cancelBlock_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(lockBlock_result.class, metaDataMap); } - public cancelBlock_result() { + public lockBlock_result() { + } + + public lockBlock_result( + String success, + TachyonTException e) + { + this(); + this.success = success; + this.e = e; } /** * Performs a deep copy on other. */ - public cancelBlock_result(cancelBlock_result other) { + public lockBlock_result(lockBlock_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } } - public cancelBlock_result deepCopy() { - return new cancelBlock_result(this); + public lockBlock_result deepCopy() { + return new lockBlock_result(this); } @Override public void clear() { + this.success = null; + this.e = null; } - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } + public String getSuccess() { + return this.success; } - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); + public lockBlock_result setSuccess(String success) { + this.success = success; + return this; } - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } + public void unsetSuccess() { + this.success = null; + } - switch (field) { + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; } - throw new IllegalStateException(); } - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof cancelBlock_result) - return this.equals((cancelBlock_result)that); - return false; + public TachyonTException getE() { + return this.e; } - public boolean equals(cancelBlock_result that) { - if (that == null) - return false; + public lockBlock_result setE(TachyonTException e) { + this.e = e; + return this; + } - return true; + public void unsetE() { + this.e = null; } - @Override + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; + } + + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((String)value); + } + break; + + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case E: + return getE(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case E: + return isSetE(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof lockBlock_result) + return this.equals((lockBlock_result)that); + return false; + } + + public boolean equals(lockBlock_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) + return false; + } + + return true; + } + + @Override public int hashCode() { List list = new ArrayList(); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); + return list.hashCode(); } @Override - public int compareTo(cancelBlock_result other) { + public int compareTo(lockBlock_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -6021,9 +5872,24 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("cancelBlock_result("); + StringBuilder sb = new StringBuilder("lockBlock_result("); boolean first = true; + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } + first = false; sb.append(")"); return sb.toString(); } @@ -6049,15 +5915,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class cancelBlock_resultStandardSchemeFactory implements SchemeFactory { - public cancelBlock_resultStandardScheme getScheme() { - return new cancelBlock_resultStandardScheme(); + private static class lockBlock_resultStandardSchemeFactory implements SchemeFactory { + public lockBlock_resultStandardScheme getScheme() { + return new lockBlock_resultStandardScheme(); } } - private static class cancelBlock_resultStandardScheme extends StandardScheme { + private static class lockBlock_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6067,6 +5933,23 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_result break; } switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -6078,56 +5961,93 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelBlock_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, cancelBlock_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, lockBlock_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(struct.success); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class cancelBlock_resultTupleSchemeFactory implements SchemeFactory { - public cancelBlock_resultTupleScheme getScheme() { - return new cancelBlock_resultTupleScheme(); + private static class lockBlock_resultTupleSchemeFactory implements SchemeFactory { + public lockBlock_resultTupleScheme getScheme() { + return new lockBlock_resultTupleScheme(); } } - private static class cancelBlock_resultTupleScheme extends TupleScheme { + private static class lockBlock_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, cancelBlock_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, lockBlock_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetE()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeString(struct.success); + } + if (struct.isSetE()) { + struct.e.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, cancelBlock_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, lockBlock_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } } } } - public static class lockBlock_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("lockBlock_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 BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField FILE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fileId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField NONCE_FIELD_DESC = new org.apache.thrift.protocol.TField("nonce", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new lockBlock_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new lockBlock_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new persistFile_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new persistFile_argsTupleSchemeFactory()); } - public long blockId; // required - public long sessionId; // required + public long fileId; // required + public long nonce; // required + public String path; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - BLOCK_ID((short)1, "blockId"), - SESSION_ID((short)2, "sessionId"); + FILE_ID((short)1, "fileId"), + NONCE((short)2, "nonce"), + PATH((short)3, "path"); private static final Map byName = new HashMap(); @@ -6142,10 +6062,12 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // BLOCK_ID - return BLOCK_ID; - case 2: // SESSION_ID - return SESSION_ID; + case 1: // FILE_ID + return FILE_ID; + case 2: // NONCE + return NONCE; + case 3: // PATH + return PATH; default: return null; } @@ -6186,116 +6108,156 @@ public String getFieldName() { } // isset id assignments - private static final int __BLOCKID_ISSET_ID = 0; - private static final int __SESSIONID_ISSET_ID = 1; + private static final int __FILEID_ISSET_ID = 0; + private static final int __NONCE_ISSET_ID = 1; private byte __isset_bitfield = 0; 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.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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.NONCE, new org.apache.thrift.meta_data.FieldMetaData("nonce", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(lockBlock_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(persistFile_args.class, metaDataMap); } - public lockBlock_args() { + public persistFile_args() { } - public lockBlock_args( - long blockId, - long sessionId) + public persistFile_args( + long fileId, + long nonce, + String path) { this(); - this.blockId = blockId; - setBlockIdIsSet(true); - this.sessionId = sessionId; - setSessionIdIsSet(true); + this.fileId = fileId; + setFileIdIsSet(true); + this.nonce = nonce; + setNonceIsSet(true); + this.path = path; } /** * Performs a deep copy on other. */ - public lockBlock_args(lockBlock_args other) { + public persistFile_args(persistFile_args other) { __isset_bitfield = other.__isset_bitfield; - this.blockId = other.blockId; - this.sessionId = other.sessionId; + this.fileId = other.fileId; + this.nonce = other.nonce; + if (other.isSetPath()) { + this.path = other.path; + } } - public lockBlock_args deepCopy() { - return new lockBlock_args(this); + public persistFile_args deepCopy() { + return new persistFile_args(this); } @Override public void clear() { - setBlockIdIsSet(false); - this.blockId = 0; - setSessionIdIsSet(false); - this.sessionId = 0; + setFileIdIsSet(false); + this.fileId = 0; + setNonceIsSet(false); + this.nonce = 0; + this.path = null; } - public long getBlockId() { - return this.blockId; + public long getFileId() { + return this.fileId; } - public lockBlock_args setBlockId(long blockId) { - this.blockId = blockId; - setBlockIdIsSet(true); + public persistFile_args setFileId(long fileId) { + this.fileId = fileId; + setFileIdIsSet(true); return this; } - public void unsetBlockId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID); + public void unsetFileId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } - /** Returns true if field blockId is set (has been assigned a value) and false otherwise */ - public boolean isSetBlockId() { - return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID); + /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ + public boolean isSetFileId() { + return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } - public void setBlockIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value); + public void setFileIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } - public long getSessionId() { - return this.sessionId; + public long getNonce() { + return this.nonce; } - public lockBlock_args setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); + public persistFile_args setNonce(long nonce) { + this.nonce = nonce; + setNonceIsSet(true); return this; } - public void unsetSessionId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + public void unsetNonce() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NONCE_ISSET_ID); } - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + /** Returns true if field nonce is set (has been assigned a value) and false otherwise */ + public boolean isSetNonce() { + return EncodingUtils.testBit(__isset_bitfield, __NONCE_ISSET_ID); } - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + public void setNonceIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NONCE_ISSET_ID, value); + } + + public String getPath() { + return this.path; + } + + public persistFile_args setPath(String path) { + this.path = path; + return this; + } + + public void unsetPath() { + this.path = null; + } + + /** Returns true if field path is set (has been assigned a value) and false otherwise */ + public boolean isSetPath() { + return this.path != null; + } + + public void setPathIsSet(boolean value) { + if (!value) { + this.path = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case BLOCK_ID: + case FILE_ID: if (value == null) { - unsetBlockId(); + unsetFileId(); } else { - setBlockId((Long)value); + setFileId((Long)value); } break; - case SESSION_ID: + case NONCE: if (value == null) { - unsetSessionId(); + unsetNonce(); } else { - setSessionId((Long)value); + setNonce((Long)value); + } + break; + + case PATH: + if (value == null) { + unsetPath(); + } else { + setPath((String)value); } break; @@ -6304,11 +6266,14 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case BLOCK_ID: - return Long.valueOf(getBlockId()); + case FILE_ID: + return Long.valueOf(getFileId()); - case SESSION_ID: - return Long.valueOf(getSessionId()); + case NONCE: + return Long.valueOf(getNonce()); + + case PATH: + return getPath(); } throw new IllegalStateException(); @@ -6321,10 +6286,12 @@ public boolean isSet(_Fields field) { } switch (field) { - case BLOCK_ID: - return isSetBlockId(); - case SESSION_ID: - return isSetSessionId(); + case FILE_ID: + return isSetFileId(); + case NONCE: + return isSetNonce(); + case PATH: + return isSetPath(); } throw new IllegalStateException(); } @@ -6333,30 +6300,39 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof lockBlock_args) - return this.equals((lockBlock_args)that); + if (that instanceof persistFile_args) + return this.equals((persistFile_args)that); return false; } - public boolean equals(lockBlock_args that) { + public boolean equals(persistFile_args that) { if (that == null) return false; - boolean this_present_blockId = true; - boolean that_present_blockId = true; - if (this_present_blockId || that_present_blockId) { - if (!(this_present_blockId && that_present_blockId)) + boolean this_present_fileId = true; + boolean that_present_fileId = true; + if (this_present_fileId || that_present_fileId) { + if (!(this_present_fileId && that_present_fileId)) return false; - if (this.blockId != that.blockId) + if (this.fileId != that.fileId) return false; } - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) + boolean this_present_nonce = true; + boolean that_present_nonce = true; + if (this_present_nonce || that_present_nonce) { + if (!(this_present_nonce && that_present_nonce)) return false; - if (this.sessionId != that.sessionId) + if (this.nonce != that.nonce) + return false; + } + + boolean this_present_path = true && this.isSetPath(); + boolean that_present_path = true && that.isSetPath(); + if (this_present_path || that_present_path) { + if (!(this_present_path && that_present_path)) + return false; + if (!this.path.equals(that.path)) return false; } @@ -6367,43 +6343,58 @@ public boolean equals(lockBlock_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_blockId = true; - list.add(present_blockId); - if (present_blockId) - list.add(blockId); + boolean present_fileId = true; + list.add(present_fileId); + if (present_fileId) + list.add(fileId); - boolean present_sessionId = true; - list.add(present_sessionId); - if (present_sessionId) - list.add(sessionId); + boolean present_nonce = true; + list.add(present_nonce); + if (present_nonce) + list.add(nonce); + + boolean present_path = true && (isSetPath()); + list.add(present_path); + if (present_path) + list.add(path); return list.hashCode(); } @Override - public int compareTo(lockBlock_args other) { + public int compareTo(persistFile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(other.isSetBlockId()); + lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } - if (isSetBlockId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, other.blockId); + if (isSetFileId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNonce()).compareTo(other.isSetNonce()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNonce()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonce, other.nonce); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); + lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); if (lastComparison != 0) { return lastComparison; } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (isSetPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); if (lastComparison != 0) { return lastComparison; } @@ -6425,15 +6416,23 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("lockBlock_args("); + StringBuilder sb = new StringBuilder("persistFile_args("); boolean first = true; - sb.append("blockId:"); - sb.append(this.blockId); + sb.append("fileId:"); + sb.append(this.fileId); first = false; if (!first) sb.append(", "); - sb.append("sessionId:"); - sb.append(this.sessionId); + sb.append("nonce:"); + sb.append(this.nonce); + first = false; + if (!first) sb.append(", "); + sb.append("path:"); + if (this.path == null) { + sb.append("null"); + } else { + sb.append(this.path); + } first = false; sb.append(")"); return sb.toString(); @@ -6462,15 +6461,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class lockBlock_argsStandardSchemeFactory implements SchemeFactory { - public lockBlock_argsStandardScheme getScheme() { - return new lockBlock_argsStandardScheme(); + private static class persistFile_argsStandardSchemeFactory implements SchemeFactory { + public persistFile_argsStandardScheme getScheme() { + return new persistFile_argsStandardScheme(); } } - private static class lockBlock_argsStandardScheme extends StandardScheme { + private static class persistFile_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_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) @@ -6480,18 +6479,26 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_args stru break; } switch (schemeField.id) { - case 1: // BLOCK_ID + case 1: // FILE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.blockId = iprot.readI64(); - struct.setBlockIdIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // SESSION_ID + case 2: // NONCE if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); + struct.nonce = iprot.readI64(); + struct.setNonceIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -6507,85 +6514,97 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_args stru struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, lockBlock_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); - oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC); - oprot.writeI64(struct.blockId); + oprot.writeFieldBegin(FILE_ID_FIELD_DESC); + oprot.writeI64(struct.fileId); oprot.writeFieldEnd(); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); + oprot.writeFieldBegin(NONCE_FIELD_DESC); + oprot.writeI64(struct.nonce); oprot.writeFieldEnd(); + if (struct.path != null) { + oprot.writeFieldBegin(PATH_FIELD_DESC); + oprot.writeString(struct.path); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class lockBlock_argsTupleSchemeFactory implements SchemeFactory { - public lockBlock_argsTupleScheme getScheme() { - return new lockBlock_argsTupleScheme(); + private static class persistFile_argsTupleSchemeFactory implements SchemeFactory { + public persistFile_argsTupleScheme getScheme() { + return new persistFile_argsTupleScheme(); } } - private static class lockBlock_argsTupleScheme extends TupleScheme { + private static class persistFile_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, lockBlock_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.isSetBlockId()) { + if (struct.isSetFileId()) { optionals.set(0); } - if (struct.isSetSessionId()) { + if (struct.isSetNonce()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); - if (struct.isSetBlockId()) { - oprot.writeI64(struct.blockId); + if (struct.isSetPath()) { + optionals.set(2); } - if (struct.isSetSessionId()) { - oprot.writeI64(struct.sessionId); + oprot.writeBitSet(optionals, 3); + if (struct.isSetFileId()) { + oprot.writeI64(struct.fileId); + } + if (struct.isSetNonce()) { + oprot.writeI64(struct.nonce); + } + if (struct.isSetPath()) { + oprot.writeString(struct.path); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, lockBlock_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, persistFile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { - struct.blockId = iprot.readI64(); - struct.setBlockIdIsSet(true); + struct.fileId = iprot.readI64(); + struct.setFileIdIsSet(true); } if (incoming.get(1)) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); + struct.nonce = iprot.readI64(); + struct.setNonceIsSet(true); + } + if (incoming.get(2)) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); } } } } - public static class lockBlock_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("lockBlock_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.STRING, (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); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new lockBlock_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new lockBlock_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new persistFile_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new persistFile_resultTupleSchemeFactory()); } - public String success; // required - public FileDoesNotExistException eP; // required + public TachyonTException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - E_P((short)1, "eP"); + E((short)1, "e"); private static final Map byName = new HashMap(); @@ -6600,10 +6619,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // E_P - return E_P; + case 1: // E + return E; default: return null; } @@ -6647,111 +6664,71 @@ 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, - 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, 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(lockBlock_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(persistFile_result.class, metaDataMap); } - public lockBlock_result() { + public persistFile_result() { } - public lockBlock_result( - String success, - FileDoesNotExistException eP) + public persistFile_result( + TachyonTException e) { this(); - this.success = success; - this.eP = eP; + this.e = e; } /** * Performs a deep copy on other. */ - public lockBlock_result(lockBlock_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } - if (other.isSetEP()) { - this.eP = new FileDoesNotExistException(other.eP); + public persistFile_result(persistFile_result other) { + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } - public lockBlock_result deepCopy() { - return new lockBlock_result(this); + public persistFile_result deepCopy() { + return new persistFile_result(this); } @Override public void clear() { - this.success = null; - this.eP = null; - } - - public String getSuccess() { - return this.success; - } - - public lockBlock_result setSuccess(String success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + this.e = null; } - public FileDoesNotExistException getEP() { - return this.eP; + public TachyonTException getE() { + return this.e; } - public lockBlock_result setEP(FileDoesNotExistException eP) { - this.eP = eP; + public persistFile_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetEP() { - this.eP = null; + public void unsetE() { + this.e = null; } - /** Returns true if field eP is set (has been assigned a value) and false otherwise */ - public boolean isSetEP() { - return this.eP != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setEPIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.eP = null; + this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((String)value); - } - break; - - case E_P: + case E: if (value == null) { - unsetEP(); + unsetE(); } else { - setEP((FileDoesNotExistException)value); + setE((TachyonTException)value); } break; @@ -6760,11 +6737,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case E_P: - return getEP(); + case E: + return getE(); } throw new IllegalStateException(); @@ -6777,10 +6751,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case E_P: - return isSetEP(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -6789,30 +6761,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof lockBlock_result) - return this.equals((lockBlock_result)that); + if (that instanceof persistFile_result) + return this.equals((persistFile_result)that); return false; } - public boolean equals(lockBlock_result that) { + public boolean equals(persistFile_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_eP = true && this.isSetEP(); - boolean that_present_eP = true && that.isSetEP(); - if (this_present_eP || that_present_eP) { - if (!(this_present_eP && that_present_eP)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.eP.equals(that.eP)) + if (!this.e.equals(that.e)) return false; } @@ -6823,43 +6786,28 @@ public boolean equals(lockBlock_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_eP = true && (isSetEP()); - list.add(present_eP); - if (present_eP) - list.add(eP); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @Override - public int compareTo(lockBlock_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } + public int compareTo(persistFile_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); } - lastComparison = Boolean.valueOf(isSetEP()).compareTo(other.isSetEP()); + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetEP()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eP, other.eP); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -6881,22 +6829,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("lockBlock_result("); + StringBuilder sb = new StringBuilder("persistFile_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("eP:"); - if (this.eP == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.eP); + sb.append(this.e); } first = false; sb.append(")"); @@ -6924,15 +6864,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class lockBlock_resultStandardSchemeFactory implements SchemeFactory { - public lockBlock_resultStandardScheme getScheme() { - return new lockBlock_resultStandardScheme(); + private static class persistFile_resultStandardSchemeFactory implements SchemeFactory { + public persistFile_resultStandardScheme getScheme() { + return new persistFile_resultStandardScheme(); } } - private static class lockBlock_resultStandardScheme extends StandardScheme { + private static class persistFile_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_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) @@ -6942,19 +6882,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_result st break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.success = iprot.readString(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // E_P + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eP = new FileDoesNotExistException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -6970,18 +6902,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_result st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, lockBlock_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); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(struct.success); - oprot.writeFieldEnd(); - } - if (struct.eP != null) { - oprot.writeFieldBegin(E_P_FIELD_DESC); - struct.eP.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -6990,45 +6917,35 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, lockBlock_result s } - private static class lockBlock_resultTupleSchemeFactory implements SchemeFactory { - public lockBlock_resultTupleScheme getScheme() { - return new lockBlock_resultTupleScheme(); + private static class persistFile_resultTupleSchemeFactory implements SchemeFactory { + public persistFile_resultTupleScheme getScheme() { + return new persistFile_resultTupleScheme(); } } - private static class lockBlock_resultTupleScheme extends TupleScheme { + private static class persistFile_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, lockBlock_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()) { + if (struct.isSetE()) { optionals.set(0); } - if (struct.isSetEP()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeString(struct.success); - } - if (struct.isSetEP()) { - struct.eP.write(oprot); + oprot.writeBitSet(optionals, 1); + if (struct.isSetE()) { + struct.e.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, lockBlock_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(2); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = iprot.readString(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.eP = new FileDoesNotExistException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } @@ -7398,6 +7315,8 @@ public static class promoteBlock_result implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -7406,10 +7325,14 @@ public static class promoteBlock_result implements org.apache.thrift.TBase byName = new HashMap(); @@ -7426,6 +7349,10 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; + case 1: // E + return E; + case 2: // IOE + return IOE; default: return null; } @@ -7473,6 +7400,10 @@ public String getFieldName() { 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, 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IOE, new org.apache.thrift.meta_data.FieldMetaData("ioe", 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(promoteBlock_result.class, metaDataMap); } @@ -7481,11 +7412,15 @@ public promoteBlock_result() { } public promoteBlock_result( - boolean success) + boolean success, + TachyonTException e, + ThriftIOException ioe) { this(); this.success = success; setSuccessIsSet(true); + this.e = e; + this.ioe = ioe; } /** @@ -7494,6 +7429,12 @@ public promoteBlock_result( public promoteBlock_result(promoteBlock_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; + if (other.isSetE()) { + this.e = new TachyonTException(other.e); + } + if (other.isSetIoe()) { + this.ioe = new ThriftIOException(other.ioe); + } } public promoteBlock_result deepCopy() { @@ -7504,6 +7445,8 @@ public promoteBlock_result deepCopy() { public void clear() { setSuccessIsSet(false); this.success = false; + this.e = null; + this.ioe = null; } public boolean isSuccess() { @@ -7529,6 +7472,54 @@ public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } + public TachyonTException getE() { + return this.e; + } + + public promoteBlock_result setE(TachyonTException e) { + this.e = e; + return this; + } + + public void unsetE() { + this.e = null; + } + + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; + } + + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } + } + + public ThriftIOException getIoe() { + return this.ioe; + } + + public promoteBlock_result setIoe(ThriftIOException ioe) { + this.ioe = ioe; + return this; + } + + public void unsetIoe() { + this.ioe = null; + } + + /** Returns true if field ioe is set (has been assigned a value) and false otherwise */ + public boolean isSetIoe() { + return this.ioe != null; + } + + public void setIoeIsSet(boolean value) { + if (!value) { + this.ioe = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: @@ -7539,6 +7530,22 @@ public void setFieldValue(_Fields field, Object value) { } break; + case E: + if (value == null) { + unsetE(); + } else { + setE((TachyonTException)value); + } + break; + + case IOE: + if (value == null) { + unsetIoe(); + } else { + setIoe((ThriftIOException)value); + } + break; + } } @@ -7547,6 +7554,12 @@ public Object getFieldValue(_Fields field) { case SUCCESS: return Boolean.valueOf(isSuccess()); + case E: + return getE(); + + case IOE: + return getIoe(); + } throw new IllegalStateException(); } @@ -7560,6 +7573,10 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); + case E: + return isSetE(); + case IOE: + return isSetIoe(); } throw new IllegalStateException(); } @@ -7586,6 +7603,24 @@ public boolean equals(promoteBlock_result that) { return false; } + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) + return false; + } + + boolean this_present_ioe = true && this.isSetIoe(); + boolean that_present_ioe = true && that.isSetIoe(); + if (this_present_ioe || that_present_ioe) { + if (!(this_present_ioe && that_present_ioe)) + return false; + if (!this.ioe.equals(that.ioe)) + return false; + } + return true; } @@ -7598,6 +7633,16 @@ public int hashCode() { if (present_success) list.add(success); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); + + boolean present_ioe = true && (isSetIoe()); + list.add(present_ioe); + if (present_ioe) + list.add(ioe); + return list.hashCode(); } @@ -7619,6 +7664,26 @@ public int compareTo(promoteBlock_result other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIoe()).compareTo(other.isSetIoe()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIoe()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioe, other.ioe); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -7642,6 +7707,22 @@ public String toString() { sb.append("success:"); sb.append(this.success); first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } + first = false; + if (!first) sb.append(", "); + sb.append("ioe:"); + if (this.ioe == null) { + sb.append("null"); + } else { + sb.append(this.ioe); + } + first = false; sb.append(")"); return sb.toString(); } @@ -7695,6 +7776,24 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, promoteBlock_result org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IOE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -7715,6 +7814,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, promoteBlock_resul oprot.writeBool(struct.success); oprot.writeFieldEnd(); } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ioe != null) { + oprot.writeFieldBegin(IOE_FIELD_DESC); + struct.ioe.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -7736,20 +7845,42 @@ public void write(org.apache.thrift.protocol.TProtocol prot, promoteBlock_result if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetE()) { + optionals.set(1); + } + if (struct.isSetIoe()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } + if (struct.isSetE()) { + struct.e.write(oprot); + } + if (struct.isSetIoe()) { + struct.ioe.write(oprot); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, promoteBlock_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } + if (incoming.get(1)) { + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } + if (incoming.get(2)) { + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); + } } } @@ -8316,8 +8447,8 @@ public static class requestBlockLocation_result implements org.apache.thrift.TBa private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestBlockLocation_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (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); - private static final org.apache.thrift.protocol.TField E_S_FIELD_DESC = new org.apache.thrift.protocol.TField("eS", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IOE_FIELD_DESC = new org.apache.thrift.protocol.TField("ioe", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -8326,14 +8457,14 @@ public static class requestBlockLocation_result implements org.apache.thrift.TBa } public String success; // required - public OutOfSpaceException eP; // required - public FileAlreadyExistException eS; // required + public TachyonTException e; // required + public ThriftIOException ioe; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), - E_P((short)1, "eP"), - E_S((short)2, "eS"); + E((short)1, "e"), + IOE((short)2, "ioe"); private static final Map byName = new HashMap(); @@ -8350,10 +8481,10 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // E_P - return E_P; - case 2: // E_S - return E_S; + case 1: // E + return E; + case 2: // IOE + return IOE; default: return null; } @@ -8399,9 +8530,9 @@ public String getFieldName() { 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, 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, 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))); - tmpMap.put(_Fields.E_S, new org.apache.thrift.meta_data.FieldMetaData("eS", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IOE, new org.apache.thrift.meta_data.FieldMetaData("ioe", 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); @@ -8412,13 +8543,13 @@ public requestBlockLocation_result() { public requestBlockLocation_result( String success, - OutOfSpaceException eP, - FileAlreadyExistException eS) + TachyonTException e, + ThriftIOException ioe) { this(); this.success = success; - this.eP = eP; - this.eS = eS; + this.e = e; + this.ioe = ioe; } /** @@ -8428,11 +8559,11 @@ public requestBlockLocation_result(requestBlockLocation_result other) { if (other.isSetSuccess()) { this.success = other.success; } - if (other.isSetEP()) { - this.eP = new OutOfSpaceException(other.eP); + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } - if (other.isSetES()) { - this.eS = new FileAlreadyExistException(other.eS); + if (other.isSetIoe()) { + this.ioe = new ThriftIOException(other.ioe); } } @@ -8443,8 +8574,8 @@ public requestBlockLocation_result deepCopy() { @Override public void clear() { this.success = null; - this.eP = null; - this.eS = null; + this.e = null; + this.ioe = null; } public String getSuccess() { @@ -8471,51 +8602,51 @@ public void setSuccessIsSet(boolean value) { } } - public OutOfSpaceException getEP() { - return this.eP; + public TachyonTException getE() { + return this.e; } - public requestBlockLocation_result setEP(OutOfSpaceException eP) { - this.eP = eP; + public requestBlockLocation_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetEP() { - this.eP = null; + public void unsetE() { + this.e = null; } - /** Returns true if field eP is set (has been assigned a value) and false otherwise */ - public boolean isSetEP() { - return this.eP != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setEPIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.eP = null; + this.e = null; } } - public FileAlreadyExistException getES() { - return this.eS; + public ThriftIOException getIoe() { + return this.ioe; } - public requestBlockLocation_result setES(FileAlreadyExistException eS) { - this.eS = eS; + public requestBlockLocation_result setIoe(ThriftIOException ioe) { + this.ioe = ioe; return this; } - public void unsetES() { - this.eS = null; + public void unsetIoe() { + this.ioe = null; } - /** Returns true if field eS is set (has been assigned a value) and false otherwise */ - public boolean isSetES() { - return this.eS != null; + /** Returns true if field ioe is set (has been assigned a value) and false otherwise */ + public boolean isSetIoe() { + return this.ioe != null; } - public void setESIsSet(boolean value) { + public void setIoeIsSet(boolean value) { if (!value) { - this.eS = null; + this.ioe = null; } } @@ -8529,19 +8660,19 @@ public void setFieldValue(_Fields field, Object value) { } break; - case E_P: + case E: if (value == null) { - unsetEP(); + unsetE(); } else { - setEP((OutOfSpaceException)value); + setE((TachyonTException)value); } break; - case E_S: + case IOE: if (value == null) { - unsetES(); + unsetIoe(); } else { - setES((FileAlreadyExistException)value); + setIoe((ThriftIOException)value); } break; @@ -8553,11 +8684,11 @@ public Object getFieldValue(_Fields field) { case SUCCESS: return getSuccess(); - case E_P: - return getEP(); + case E: + return getE(); - case E_S: - return getES(); + case IOE: + return getIoe(); } throw new IllegalStateException(); @@ -8572,10 +8703,10 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); - case E_P: - return isSetEP(); - case E_S: - return isSetES(); + case E: + return isSetE(); + case IOE: + return isSetIoe(); } throw new IllegalStateException(); } @@ -8602,21 +8733,21 @@ public boolean equals(requestBlockLocation_result that) { return false; } - boolean this_present_eP = true && this.isSetEP(); - boolean that_present_eP = true && that.isSetEP(); - if (this_present_eP || that_present_eP) { - if (!(this_present_eP && that_present_eP)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.eP.equals(that.eP)) + if (!this.e.equals(that.e)) return false; } - boolean this_present_eS = true && this.isSetES(); - boolean that_present_eS = true && that.isSetES(); - if (this_present_eS || that_present_eS) { - if (!(this_present_eS && that_present_eS)) + boolean this_present_ioe = true && this.isSetIoe(); + boolean that_present_ioe = true && that.isSetIoe(); + if (this_present_ioe || that_present_ioe) { + if (!(this_present_ioe && that_present_ioe)) return false; - if (!this.eS.equals(that.eS)) + if (!this.ioe.equals(that.ioe)) return false; } @@ -8632,15 +8763,15 @@ public int hashCode() { if (present_success) list.add(success); - boolean present_eP = true && (isSetEP()); - list.add(present_eP); - if (present_eP) - list.add(eP); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); - boolean present_eS = true && (isSetES()); - list.add(present_eS); - if (present_eS) - list.add(eS); + boolean present_ioe = true && (isSetIoe()); + list.add(present_ioe); + if (present_ioe) + list.add(ioe); return list.hashCode(); } @@ -8663,22 +8794,22 @@ public int compareTo(requestBlockLocation_result other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetEP()).compareTo(other.isSetEP()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetEP()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eP, other.eP); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetES()).compareTo(other.isSetES()); + lastComparison = Boolean.valueOf(isSetIoe()).compareTo(other.isSetIoe()); if (lastComparison != 0) { return lastComparison; } - if (isSetES()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eS, other.eS); + if (isSetIoe()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioe, other.ioe); if (lastComparison != 0) { return lastComparison; } @@ -8711,19 +8842,19 @@ public String toString() { } first = false; if (!first) sb.append(", "); - sb.append("eP:"); - if (this.eP == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.eP); + sb.append(this.e); } first = false; if (!first) sb.append(", "); - sb.append("eS:"); - if (this.eS == null) { + sb.append("ioe:"); + if (this.ioe == null) { sb.append("null"); } else { - sb.append(this.eS); + sb.append(this.ioe); } first = false; sb.append(")"); @@ -8777,20 +8908,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestBlockLocatio org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // E_P + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eP = new OutOfSpaceException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // E_S + case 2: // IOE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eS = new FileAlreadyExistException(); - struct.eS.read(iprot); - struct.setESIsSet(true); + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -8815,14 +8946,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, requestBlockLocati oprot.writeString(struct.success); oprot.writeFieldEnd(); } - if (struct.eP != null) { - oprot.writeFieldBegin(E_P_FIELD_DESC); - struct.eP.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } - if (struct.eS != null) { - oprot.writeFieldBegin(E_S_FIELD_DESC); - struct.eS.write(oprot); + if (struct.ioe != null) { + oprot.writeFieldBegin(IOE_FIELD_DESC); + struct.ioe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -8846,21 +8977,21 @@ public void write(org.apache.thrift.protocol.TProtocol prot, requestBlockLocatio if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetEP()) { + if (struct.isSetE()) { optionals.set(1); } - if (struct.isSetES()) { + if (struct.isSetIoe()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } - if (struct.isSetEP()) { - struct.eP.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } - if (struct.isSetES()) { - struct.eS.write(oprot); + if (struct.isSetIoe()) { + struct.ioe.write(oprot); } } @@ -8873,14 +9004,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, requestBlockLocation struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.eP = new OutOfSpaceException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } if (incoming.get(2)) { - struct.eS = new FileAlreadyExistException(); - struct.eS.read(iprot); - struct.setESIsSet(true); + struct.ioe = new ThriftIOException(); + struct.ioe.read(iprot); + struct.setIoeIsSet(true); } } } @@ -9448,7 +9579,7 @@ public static class requestSpace_result implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -9457,12 +9588,12 @@ public static class requestSpace_result implements org.apache.thrift.TBase byName = new HashMap(); @@ -9479,8 +9610,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // E_P - return E_P; + case 1: // E + return E; default: return null; } @@ -9528,7 +9659,7 @@ public String getFieldName() { 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, 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, 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(requestSpace_result.class, metaDataMap); @@ -9539,12 +9670,12 @@ public requestSpace_result() { public requestSpace_result( boolean success, - FileDoesNotExistException eP) + TachyonTException e) { this(); this.success = success; setSuccessIsSet(true); - this.eP = eP; + this.e = e; } /** @@ -9553,8 +9684,8 @@ public requestSpace_result( public requestSpace_result(requestSpace_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; - if (other.isSetEP()) { - this.eP = new FileDoesNotExistException(other.eP); + if (other.isSetE()) { + this.e = new TachyonTException(other.e); } } @@ -9566,7 +9697,7 @@ public requestSpace_result deepCopy() { public void clear() { setSuccessIsSet(false); this.success = false; - this.eP = null; + this.e = null; } public boolean isSuccess() { @@ -9592,27 +9723,27 @@ public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - public FileDoesNotExistException getEP() { - return this.eP; + public TachyonTException getE() { + return this.e; } - public requestSpace_result setEP(FileDoesNotExistException eP) { - this.eP = eP; + public requestSpace_result setE(TachyonTException e) { + this.e = e; return this; } - public void unsetEP() { - this.eP = null; + public void unsetE() { + this.e = null; } - /** Returns true if field eP is set (has been assigned a value) and false otherwise */ - public boolean isSetEP() { - return this.eP != null; + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; } - public void setEPIsSet(boolean value) { + public void setEIsSet(boolean value) { if (!value) { - this.eP = null; + this.e = null; } } @@ -9626,11 +9757,11 @@ public void setFieldValue(_Fields field, Object value) { } break; - case E_P: + case E: if (value == null) { - unsetEP(); + unsetE(); } else { - setEP((FileDoesNotExistException)value); + setE((TachyonTException)value); } break; @@ -9642,8 +9773,8 @@ public Object getFieldValue(_Fields field) { case SUCCESS: return Boolean.valueOf(isSuccess()); - case E_P: - return getEP(); + case E: + return getE(); } throw new IllegalStateException(); @@ -9658,8 +9789,8 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); - case E_P: - return isSetEP(); + case E: + return isSetE(); } throw new IllegalStateException(); } @@ -9686,12 +9817,12 @@ public boolean equals(requestSpace_result that) { return false; } - boolean this_present_eP = true && this.isSetEP(); - boolean that_present_eP = true && that.isSetEP(); - if (this_present_eP || that_present_eP) { - if (!(this_present_eP && that_present_eP)) + boolean this_present_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) return false; - if (!this.eP.equals(that.eP)) + if (!this.e.equals(that.e)) return false; } @@ -9707,10 +9838,10 @@ public int hashCode() { if (present_success) list.add(success); - boolean present_eP = true && (isSetEP()); - list.add(present_eP); - if (present_eP) - list.add(eP); + boolean present_e = true && (isSetE()); + list.add(present_e); + if (present_e) + list.add(e); return list.hashCode(); } @@ -9733,12 +9864,12 @@ public int compareTo(requestSpace_result other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetEP()).compareTo(other.isSetEP()); + lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } - if (isSetEP()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eP, other.eP); + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } @@ -9767,11 +9898,11 @@ public String toString() { sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("eP:"); - if (this.eP == null) { + sb.append("e:"); + if (this.e == null) { sb.append("null"); } else { - sb.append(this.eP); + sb.append(this.e); } first = false; sb.append(")"); @@ -9827,11 +9958,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, requestSpace_result org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // E_P + case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.eP = new FileDoesNotExistException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -9856,9 +9987,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, requestSpace_resul oprot.writeBool(struct.success); oprot.writeFieldEnd(); } - if (struct.eP != null) { - oprot.writeFieldBegin(E_P_FIELD_DESC); - struct.eP.write(oprot); + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -9882,15 +10013,15 @@ public void write(org.apache.thrift.protocol.TProtocol prot, requestSpace_result if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetEP()) { + if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } - if (struct.isSetEP()) { - struct.eP.write(oprot); + if (struct.isSetE()) { + struct.e.write(oprot); } } @@ -9903,34 +10034,34 @@ public void read(org.apache.thrift.protocol.TProtocol prot, requestSpace_result struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.eP = new FileDoesNotExistException(); - struct.eP.read(iprot); - struct.setEPIsSet(true); + struct.e = new TachyonTException(); + struct.e.read(iprot); + struct.setEIsSet(true); } } } } - public static class unlockBlock_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("unlockBlock_args"); + public static class sessionHeartbeat_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("sessionHeartbeat_args"); - private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField METRICS_FIELD_DESC = new org.apache.thrift.protocol.TField("metrics", org.apache.thrift.protocol.TType.LIST, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new unlockBlock_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new unlockBlock_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new sessionHeartbeat_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new sessionHeartbeat_argsTupleSchemeFactory()); } - public long blockId; // required public long sessionId; // required + public List metrics; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - BLOCK_ID((short)1, "blockId"), - SESSION_ID((short)2, "sessionId"); + SESSION_ID((short)1, "sessionId"), + METRICS((short)2, "metrics"); private static final Map byName = new HashMap(); @@ -9945,10 +10076,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // BLOCK_ID - return BLOCK_ID; - case 2: // SESSION_ID + case 1: // SESSION_ID return SESSION_ID; + case 2: // METRICS + return METRICS; default: return null; } @@ -9989,83 +10120,61 @@ public String getFieldName() { } // isset id assignments - private static final int __BLOCKID_ISSET_ID = 0; - private static final int __SESSIONID_ISSET_ID = 1; + private static final int __SESSIONID_ISSET_ID = 0; private byte __isset_bitfield = 0; 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, - 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, 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, + 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); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionHeartbeat_args.class, metaDataMap); } - public unlockBlock_args() { + public sessionHeartbeat_args() { } - public unlockBlock_args( - long blockId, - long sessionId) + public sessionHeartbeat_args( + long sessionId, + List metrics) { this(); - this.blockId = blockId; - setBlockIdIsSet(true); this.sessionId = sessionId; setSessionIdIsSet(true); + this.metrics = metrics; } /** * Performs a deep copy on other. */ - public unlockBlock_args(unlockBlock_args other) { + public sessionHeartbeat_args(sessionHeartbeat_args other) { __isset_bitfield = other.__isset_bitfield; - this.blockId = other.blockId; this.sessionId = other.sessionId; + if (other.isSetMetrics()) { + List __this__metrics = new ArrayList(other.metrics); + this.metrics = __this__metrics; + } } - public unlockBlock_args deepCopy() { - return new unlockBlock_args(this); + public sessionHeartbeat_args deepCopy() { + return new sessionHeartbeat_args(this); } @Override public void clear() { - setBlockIdIsSet(false); - this.blockId = 0; setSessionIdIsSet(false); this.sessionId = 0; - } - - public long getBlockId() { - return this.blockId; - } - - public unlockBlock_args setBlockId(long blockId) { - this.blockId = blockId; - setBlockIdIsSet(true); - return this; - } - - public void unsetBlockId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID); - } - - /** Returns true if field blockId is set (has been assigned a value) and false otherwise */ - public boolean isSetBlockId() { - return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID); - } - - public void setBlockIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value); + this.metrics = null; } public long getSessionId() { return this.sessionId; } - public unlockBlock_args setSessionId(long sessionId) { + public sessionHeartbeat_args setSessionId(long sessionId) { this.sessionId = sessionId; setSessionIdIsSet(true); return this; @@ -10084,21 +10193,60 @@ public void setSessionIdIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); } + public int getMetricsSize() { + return (this.metrics == null) ? 0 : this.metrics.size(); + } + + public java.util.Iterator getMetricsIterator() { + return (this.metrics == null) ? null : this.metrics.iterator(); + } + + public void addToMetrics(long elem) { + if (this.metrics == null) { + this.metrics = new ArrayList(); + } + this.metrics.add(elem); + } + + public List getMetrics() { + return this.metrics; + } + + public sessionHeartbeat_args setMetrics(List metrics) { + this.metrics = metrics; + return this; + } + + public void unsetMetrics() { + this.metrics = null; + } + + /** Returns true if field metrics is set (has been assigned a value) and false otherwise */ + public boolean isSetMetrics() { + return this.metrics != null; + } + + public void setMetricsIsSet(boolean value) { + if (!value) { + this.metrics = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { - case BLOCK_ID: + case SESSION_ID: if (value == null) { - unsetBlockId(); + unsetSessionId(); } else { - setBlockId((Long)value); + setSessionId((Long)value); } break; - case SESSION_ID: + case METRICS: if (value == null) { - unsetSessionId(); + unsetMetrics(); } else { - setSessionId((Long)value); + setMetrics((List)value); } break; @@ -10107,12 +10255,12 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case BLOCK_ID: - return Long.valueOf(getBlockId()); - case SESSION_ID: return Long.valueOf(getSessionId()); + case METRICS: + return getMetrics(); + } throw new IllegalStateException(); } @@ -10124,10 +10272,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case BLOCK_ID: - return isSetBlockId(); case SESSION_ID: return isSetSessionId(); + case METRICS: + return isSetMetrics(); } throw new IllegalStateException(); } @@ -10136,24 +10284,15 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof unlockBlock_args) - return this.equals((unlockBlock_args)that); + if (that instanceof sessionHeartbeat_args) + return this.equals((sessionHeartbeat_args)that); return false; } - public boolean equals(unlockBlock_args that) { + public boolean equals(sessionHeartbeat_args that) { if (that == null) return false; - boolean this_present_blockId = true; - boolean that_present_blockId = true; - if (this_present_blockId || that_present_blockId) { - if (!(this_present_blockId && that_present_blockId)) - return false; - if (this.blockId != that.blockId) - return false; - } - boolean this_present_sessionId = true; boolean that_present_sessionId = true; if (this_present_sessionId || that_present_sessionId) { @@ -10163,50 +10302,59 @@ public boolean equals(unlockBlock_args that) { return false; } + boolean this_present_metrics = true && this.isSetMetrics(); + boolean that_present_metrics = true && that.isSetMetrics(); + if (this_present_metrics || that_present_metrics) { + if (!(this_present_metrics && that_present_metrics)) + return false; + if (!this.metrics.equals(that.metrics)) + return false; + } + return true; } @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_blockId = true; - list.add(present_blockId); - if (present_blockId) - list.add(blockId); + public int hashCode() { + List list = new ArrayList(); boolean present_sessionId = true; list.add(present_sessionId); if (present_sessionId) list.add(sessionId); + boolean present_metrics = true && (isSetMetrics()); + list.add(present_metrics); + if (present_metrics) + list.add(metrics); + return list.hashCode(); } @Override - public int compareTo(unlockBlock_args other) { + public int compareTo(sessionHeartbeat_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(other.isSetBlockId()); + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } - if (isSetBlockId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, other.blockId); + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); + lastComparison = Boolean.valueOf(isSetMetrics()).compareTo(other.isSetMetrics()); if (lastComparison != 0) { return lastComparison; } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (isSetMetrics()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metrics, other.metrics); if (lastComparison != 0) { return lastComparison; } @@ -10228,16 +10376,20 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("unlockBlock_args("); + StringBuilder sb = new StringBuilder("sessionHeartbeat_args("); boolean first = true; - sb.append("blockId:"); - sb.append(this.blockId); - first = false; - if (!first) sb.append(", "); sb.append("sessionId:"); sb.append(this.sessionId); first = false; + if (!first) sb.append(", "); + sb.append("metrics:"); + if (this.metrics == null) { + sb.append("null"); + } else { + sb.append(this.metrics); + } + first = false; sb.append(")"); return sb.toString(); } @@ -10265,15 +10417,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class unlockBlock_argsStandardSchemeFactory implements SchemeFactory { - public unlockBlock_argsStandardScheme getScheme() { - return new unlockBlock_argsStandardScheme(); + private static class sessionHeartbeat_argsStandardSchemeFactory implements SchemeFactory { + public sessionHeartbeat_argsStandardScheme getScheme() { + return new sessionHeartbeat_argsStandardScheme(); } } - private static class unlockBlock_argsStandardScheme extends StandardScheme { + private static class sessionHeartbeat_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -10283,18 +10435,28 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_args st break; } switch (schemeField.id) { - case 1: // BLOCK_ID + case 1: // SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.blockId = iprot.readI64(); - struct.setBlockIdIsSet(true); + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); + case 2: // METRICS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list268 = iprot.readListBegin(); + struct.metrics = new ArrayList(_list268.size); + long _elem269; + for (int _i270 = 0; _i270 < _list268.size; ++_i270) + { + _elem269 = iprot.readI64(); + struct.metrics.add(_elem269); + } + iprot.readListEnd(); + } + struct.setMetricsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -10310,82 +10472,104 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_args st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, unlockBlock_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, sessionHeartbeat_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC); - oprot.writeI64(struct.blockId); - oprot.writeFieldEnd(); oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); oprot.writeI64(struct.sessionId); oprot.writeFieldEnd(); + if (struct.metrics != null) { + oprot.writeFieldBegin(METRICS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.metrics.size())); + for (long _iter271 : struct.metrics) + { + oprot.writeI64(_iter271); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class unlockBlock_argsTupleSchemeFactory implements SchemeFactory { - public unlockBlock_argsTupleScheme getScheme() { - return new unlockBlock_argsTupleScheme(); + private static class sessionHeartbeat_argsTupleSchemeFactory implements SchemeFactory { + public sessionHeartbeat_argsTupleScheme getScheme() { + return new sessionHeartbeat_argsTupleScheme(); } } - private static class unlockBlock_argsTupleScheme extends TupleScheme { + private static class sessionHeartbeat_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, unlockBlock_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, sessionHeartbeat_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetBlockId()) { + if (struct.isSetSessionId()) { optionals.set(0); } - if (struct.isSetSessionId()) { + if (struct.isSetMetrics()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetBlockId()) { - oprot.writeI64(struct.blockId); - } if (struct.isSetSessionId()) { oprot.writeI64(struct.sessionId); } + if (struct.isSetMetrics()) { + { + oprot.writeI32(struct.metrics.size()); + for (long _iter272 : struct.metrics) + { + oprot.writeI64(_iter272); + } + } + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, unlockBlock_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, sessionHeartbeat_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.blockId = iprot.readI64(); - struct.setBlockIdIsSet(true); - } - if (incoming.get(1)) { struct.sessionId = iprot.readI64(); struct.setSessionIdIsSet(true); } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list273 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.metrics = new ArrayList(_list273.size); + long _elem274; + for (int _i275 = 0; _i275 < _list273.size; ++_i275) + { + _elem274 = iprot.readI64(); + struct.metrics.add(_elem274); + } + } + struct.setMetricsIsSet(true); + } } } } - public static class unlockBlock_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("unlockBlock_result"); + public static class sessionHeartbeat_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("sessionHeartbeat_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new unlockBlock_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new unlockBlock_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new sessionHeartbeat_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new sessionHeartbeat_resultTupleSchemeFactory()); } - public boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); +; private static final Map byName = new HashMap(); @@ -10400,8 +10584,6 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; default: return null; } @@ -10440,89 +10622,37 @@ public String getFieldName() { return _fieldName; } } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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, - 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); - } - - public unlockBlock_result() { + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionHeartbeat_result.class, metaDataMap); } - public unlockBlock_result( - boolean success) - { - this(); - this.success = success; - setSuccessIsSet(true); + public sessionHeartbeat_result() { } /** * Performs a deep copy on other. */ - public unlockBlock_result(unlockBlock_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; + public sessionHeartbeat_result(sessionHeartbeat_result other) { } - public unlockBlock_result deepCopy() { - return new unlockBlock_result(this); + public sessionHeartbeat_result deepCopy() { + return new sessionHeartbeat_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public unlockBlock_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - } } public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); - } throw new IllegalStateException(); } @@ -10534,8 +10664,6 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); } throw new IllegalStateException(); } @@ -10544,24 +10672,15 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof unlockBlock_result) - return this.equals((unlockBlock_result)that); + if (that instanceof sessionHeartbeat_result) + return this.equals((sessionHeartbeat_result)that); return false; } - public boolean equals(unlockBlock_result that) { + public boolean equals(sessionHeartbeat_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - return true; } @@ -10569,32 +10688,17 @@ public boolean equals(unlockBlock_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - return list.hashCode(); } @Override - public int compareTo(unlockBlock_result other) { + public int compareTo(sessionHeartbeat_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -10612,12 +10716,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("unlockBlock_result("); + StringBuilder sb = new StringBuilder("sessionHeartbeat_result("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; sb.append(")"); return sb.toString(); } @@ -10637,23 +10738,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class unlockBlock_resultStandardSchemeFactory implements SchemeFactory { - public unlockBlock_resultStandardScheme getScheme() { - return new unlockBlock_resultStandardScheme(); + private static class sessionHeartbeat_resultStandardSchemeFactory implements SchemeFactory { + public sessionHeartbeat_resultStandardScheme getScheme() { + return new sessionHeartbeat_resultStandardScheme(); } } - private static class unlockBlock_resultStandardScheme extends StandardScheme { + private static class sessionHeartbeat_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -10663,14 +10762,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_result break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -10682,74 +10773,56 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, unlockBlock_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, sessionHeartbeat_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class unlockBlock_resultTupleSchemeFactory implements SchemeFactory { - public unlockBlock_resultTupleScheme getScheme() { - return new unlockBlock_resultTupleScheme(); + private static class sessionHeartbeat_resultTupleSchemeFactory implements SchemeFactory { + public sessionHeartbeat_resultTupleScheme getScheme() { + return new sessionHeartbeat_resultTupleScheme(); } } - private static class unlockBlock_resultTupleScheme extends TupleScheme { + private static class sessionHeartbeat_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, unlockBlock_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, sessionHeartbeat_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, unlockBlock_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, sessionHeartbeat_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } } } } - public static class sessionHeartbeat_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("sessionHeartbeat_args"); + public static class unlockBlock_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("unlockBlock_args"); - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField METRICS_FIELD_DESC = new org.apache.thrift.protocol.TField("metrics", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new sessionHeartbeat_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new sessionHeartbeat_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new unlockBlock_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new unlockBlock_argsTupleSchemeFactory()); } + public long blockId; // required public long sessionId; // required - public List metrics; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - METRICS((short)2, "metrics"); + BLOCK_ID((short)1, "blockId"), + SESSION_ID((short)2, "sessionId"); private static final Map byName = new HashMap(); @@ -10764,10 +10837,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // SESSION_ID + case 1: // BLOCK_ID + return BLOCK_ID; + case 2: // SESSION_ID return SESSION_ID; - case 2: // METRICS - return METRICS; default: return null; } @@ -10808,133 +10881,116 @@ public String getFieldName() { } // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; + private static final int __BLOCKID_ISSET_ID = 0; + private static final int __SESSIONID_ISSET_ID = 1; private byte __isset_bitfield = 0; 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, + 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, 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, - 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); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unlockBlock_args.class, metaDataMap); } - public sessionHeartbeat_args() { + public unlockBlock_args() { } - public sessionHeartbeat_args( - long sessionId, - List metrics) + public unlockBlock_args( + long blockId, + long sessionId) { this(); + this.blockId = blockId; + setBlockIdIsSet(true); this.sessionId = sessionId; setSessionIdIsSet(true); - this.metrics = metrics; } /** * Performs a deep copy on other. */ - public sessionHeartbeat_args(sessionHeartbeat_args other) { + public unlockBlock_args(unlockBlock_args other) { __isset_bitfield = other.__isset_bitfield; + this.blockId = other.blockId; this.sessionId = other.sessionId; - if (other.isSetMetrics()) { - List __this__metrics = new ArrayList(other.metrics); - this.metrics = __this__metrics; - } } - public sessionHeartbeat_args deepCopy() { - return new sessionHeartbeat_args(this); + public unlockBlock_args deepCopy() { + return new unlockBlock_args(this); } @Override public void clear() { + setBlockIdIsSet(false); + this.blockId = 0; setSessionIdIsSet(false); this.sessionId = 0; - this.metrics = null; } - public long getSessionId() { - return this.sessionId; + public long getBlockId() { + return this.blockId; } - public sessionHeartbeat_args setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); + public unlockBlock_args setBlockId(long blockId) { + this.blockId = blockId; + setBlockIdIsSet(true); return this; } - public void unsetSessionId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getMetricsSize() { - return (this.metrics == null) ? 0 : this.metrics.size(); + public void unsetBlockId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID); } - public java.util.Iterator getMetricsIterator() { - return (this.metrics == null) ? null : this.metrics.iterator(); + /** Returns true if field blockId is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockId() { + return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID); } - public void addToMetrics(long elem) { - if (this.metrics == null) { - this.metrics = new ArrayList(); - } - this.metrics.add(elem); + public void setBlockIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value); } - public List getMetrics() { - return this.metrics; + public long getSessionId() { + return this.sessionId; } - public sessionHeartbeat_args setMetrics(List metrics) { - this.metrics = metrics; + public unlockBlock_args setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); return this; } - public void unsetMetrics() { - this.metrics = null; + public void unsetSessionId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); } - /** Returns true if field metrics is set (has been assigned a value) and false otherwise */ - public boolean isSetMetrics() { - return this.metrics != null; + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); } - public void setMetricsIsSet(boolean value) { - if (!value) { - this.metrics = null; - } + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SESSION_ID: + case BLOCK_ID: if (value == null) { - unsetSessionId(); + unsetBlockId(); } else { - setSessionId((Long)value); + setBlockId((Long)value); } break; - case METRICS: + case SESSION_ID: if (value == null) { - unsetMetrics(); + unsetSessionId(); } else { - setMetrics((List)value); + setSessionId((Long)value); } break; @@ -10943,12 +10999,12 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { + case BLOCK_ID: + return Long.valueOf(getBlockId()); + case SESSION_ID: return Long.valueOf(getSessionId()); - case METRICS: - return getMetrics(); - } throw new IllegalStateException(); } @@ -10960,10 +11016,10 @@ public boolean isSet(_Fields field) { } switch (field) { + case BLOCK_ID: + return isSetBlockId(); case SESSION_ID: return isSetSessionId(); - case METRICS: - return isSetMetrics(); } throw new IllegalStateException(); } @@ -10972,15 +11028,24 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof sessionHeartbeat_args) - return this.equals((sessionHeartbeat_args)that); + if (that instanceof unlockBlock_args) + return this.equals((unlockBlock_args)that); return false; } - public boolean equals(sessionHeartbeat_args that) { + public boolean equals(unlockBlock_args that) { if (that == null) return false; + boolean this_present_blockId = true; + boolean that_present_blockId = true; + if (this_present_blockId || that_present_blockId) { + if (!(this_present_blockId && that_present_blockId)) + return false; + if (this.blockId != that.blockId) + return false; + } + boolean this_present_sessionId = true; boolean that_present_sessionId = true; if (this_present_sessionId || that_present_sessionId) { @@ -10990,15 +11055,6 @@ public boolean equals(sessionHeartbeat_args that) { return false; } - boolean this_present_metrics = true && this.isSetMetrics(); - boolean that_present_metrics = true && that.isSetMetrics(); - if (this_present_metrics || that_present_metrics) { - if (!(this_present_metrics && that_present_metrics)) - return false; - if (!this.metrics.equals(that.metrics)) - return false; - } - return true; } @@ -11006,43 +11062,43 @@ public boolean equals(sessionHeartbeat_args that) { public int hashCode() { List list = new ArrayList(); + boolean present_blockId = true; + list.add(present_blockId); + if (present_blockId) + list.add(blockId); + boolean present_sessionId = true; list.add(present_sessionId); if (present_sessionId) list.add(sessionId); - boolean present_metrics = true && (isSetMetrics()); - list.add(present_metrics); - if (present_metrics) - list.add(metrics); - return list.hashCode(); } @Override - public int compareTo(sessionHeartbeat_args other) { + public int compareTo(unlockBlock_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); + lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(other.isSetBlockId()); if (lastComparison != 0) { return lastComparison; } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (isSetBlockId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, other.blockId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMetrics()).compareTo(other.isSetMetrics()); + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } - if (isSetMetrics()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metrics, other.metrics); + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); if (lastComparison != 0) { return lastComparison; } @@ -11064,19 +11120,15 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("sessionHeartbeat_args("); + StringBuilder sb = new StringBuilder("unlockBlock_args("); boolean first = true; - sb.append("sessionId:"); - sb.append(this.sessionId); + sb.append("blockId:"); + sb.append(this.blockId); first = false; if (!first) sb.append(", "); - sb.append("metrics:"); - if (this.metrics == null) { - sb.append("null"); - } else { - sb.append(this.metrics); - } + sb.append("sessionId:"); + sb.append(this.sessionId); first = false; sb.append(")"); return sb.toString(); @@ -11105,15 +11157,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class sessionHeartbeat_argsStandardSchemeFactory implements SchemeFactory { - public sessionHeartbeat_argsStandardScheme getScheme() { - return new sessionHeartbeat_argsStandardScheme(); + private static class unlockBlock_argsStandardSchemeFactory implements SchemeFactory { + public unlockBlock_argsStandardScheme getScheme() { + return new unlockBlock_argsStandardScheme(); } } - private static class sessionHeartbeat_argsStandardScheme extends StandardScheme { + private static class unlockBlock_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -11123,28 +11175,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_ar break; } switch (schemeField.id) { - case 1: // SESSION_ID + case 1: // BLOCK_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); + struct.blockId = iprot.readI64(); + struct.setBlockIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // METRICS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list268 = iprot.readListBegin(); - struct.metrics = new ArrayList(_list268.size); - long _elem269; - for (int _i270 = 0; _i270 < _list268.size; ++_i270) - { - _elem269 = iprot.readI64(); - struct.metrics.add(_elem269); - } - iprot.readListEnd(); - } - struct.setMetricsIsSet(true); + case 2: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -11160,104 +11202,82 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_ar struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, sessionHeartbeat_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, unlockBlock_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC); + oprot.writeI64(struct.blockId); + oprot.writeFieldEnd(); oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); oprot.writeI64(struct.sessionId); oprot.writeFieldEnd(); - if (struct.metrics != null) { - oprot.writeFieldBegin(METRICS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.metrics.size())); - for (long _iter271 : struct.metrics) - { - oprot.writeI64(_iter271); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class sessionHeartbeat_argsTupleSchemeFactory implements SchemeFactory { - public sessionHeartbeat_argsTupleScheme getScheme() { - return new sessionHeartbeat_argsTupleScheme(); + private static class unlockBlock_argsTupleSchemeFactory implements SchemeFactory { + public unlockBlock_argsTupleScheme getScheme() { + return new unlockBlock_argsTupleScheme(); } } - private static class sessionHeartbeat_argsTupleScheme extends TupleScheme { + private static class unlockBlock_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, sessionHeartbeat_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, unlockBlock_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSessionId()) { + if (struct.isSetBlockId()) { optionals.set(0); } - if (struct.isSetMetrics()) { + if (struct.isSetSessionId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); + if (struct.isSetBlockId()) { + oprot.writeI64(struct.blockId); + } if (struct.isSetSessionId()) { oprot.writeI64(struct.sessionId); } - if (struct.isSetMetrics()) { - { - oprot.writeI32(struct.metrics.size()); - for (long _iter272 : struct.metrics) - { - oprot.writeI64(_iter272); - } - } - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, sessionHeartbeat_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, unlockBlock_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); + struct.blockId = iprot.readI64(); + struct.setBlockIdIsSet(true); } if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list273 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.metrics = new ArrayList(_list273.size); - long _elem274; - for (int _i275 = 0; _i275 < _list273.size; ++_i275) - { - _elem274 = iprot.readI64(); - struct.metrics.add(_elem274); - } - } - struct.setMetricsIsSet(true); + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); } } } } - public static class sessionHeartbeat_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("sessionHeartbeat_result"); + public static class unlockBlock_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("unlockBlock_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new sessionHeartbeat_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new sessionHeartbeat_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new unlockBlock_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new unlockBlock_resultTupleSchemeFactory()); } + public boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -11272,6 +11292,8 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; default: return null; } @@ -11310,37 +11332,89 @@ public String getFieldName() { return _fieldName; } } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionHeartbeat_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unlockBlock_result.class, metaDataMap); } - public sessionHeartbeat_result() { + public unlockBlock_result() { + } + + public unlockBlock_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); } /** * Performs a deep copy on other. */ - public sessionHeartbeat_result(sessionHeartbeat_result other) { + public unlockBlock_result(unlockBlock_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; } - public sessionHeartbeat_result deepCopy() { - return new sessionHeartbeat_result(this); + public unlockBlock_result deepCopy() { + return new unlockBlock_result(this); } @Override public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public unlockBlock_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + } throw new IllegalStateException(); } @@ -11352,6 +11426,8 @@ public boolean isSet(_Fields field) { } switch (field) { + case SUCCESS: + return isSetSuccess(); } throw new IllegalStateException(); } @@ -11360,15 +11436,24 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof sessionHeartbeat_result) - return this.equals((sessionHeartbeat_result)that); + if (that instanceof unlockBlock_result) + return this.equals((unlockBlock_result)that); return false; } - public boolean equals(sessionHeartbeat_result that) { + public boolean equals(unlockBlock_result that) { if (that == null) return false; + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + return true; } @@ -11376,17 +11461,32 @@ public boolean equals(sessionHeartbeat_result that) { public int hashCode() { List list = new ArrayList(); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + return list.hashCode(); } @Override - public int compareTo(sessionHeartbeat_result other) { + public int compareTo(unlockBlock_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -11404,9 +11504,12 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("sessionHeartbeat_result("); + StringBuilder sb = new StringBuilder("unlockBlock_result("); boolean first = true; + sb.append("success:"); + sb.append(this.success); + first = false; sb.append(")"); return sb.toString(); } @@ -11426,21 +11529,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class sessionHeartbeat_resultStandardSchemeFactory implements SchemeFactory { - public sessionHeartbeat_resultStandardScheme getScheme() { - return new sessionHeartbeat_resultStandardScheme(); + private static class unlockBlock_resultStandardSchemeFactory implements SchemeFactory { + public unlockBlock_resultStandardScheme getScheme() { + return new unlockBlock_resultStandardScheme(); } } - private static class sessionHeartbeat_resultStandardScheme extends StandardScheme { + private static class unlockBlock_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -11450,6 +11555,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_re break; } switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -11461,32 +11574,50 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, sessionHeartbeat_re struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, sessionHeartbeat_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, unlockBlock_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class sessionHeartbeat_resultTupleSchemeFactory implements SchemeFactory { - public sessionHeartbeat_resultTupleScheme getScheme() { - return new sessionHeartbeat_resultTupleScheme(); + private static class unlockBlock_resultTupleSchemeFactory implements SchemeFactory { + public unlockBlock_resultTupleScheme getScheme() { + return new unlockBlock_resultTupleScheme(); } } - private static class sessionHeartbeat_resultTupleScheme extends TupleScheme { + private static class unlockBlock_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, sessionHeartbeat_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, unlockBlock_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, sessionHeartbeat_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, unlockBlock_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } } } diff --git a/common/src/main/java/tachyon/util/io/FileUtils.java b/common/src/main/java/tachyon/util/io/FileUtils.java index 61340c058d35..bf339e68ebc6 100644 --- a/common/src/main/java/tachyon/util/io/FileUtils.java +++ b/common/src/main/java/tachyon/util/io/FileUtils.java @@ -29,7 +29,7 @@ import com.google.common.io.Files; import tachyon.TachyonURI; -import tachyon.thrift.InvalidPathException; +import tachyon.exception.InvalidPathException; /** * Provides utility methods for working with files and directories. diff --git a/common/src/main/java/tachyon/util/io/PathUtils.java b/common/src/main/java/tachyon/util/io/PathUtils.java index 16adc00f353d..39bb46553068 100644 --- a/common/src/main/java/tachyon/util/io/PathUtils.java +++ b/common/src/main/java/tachyon/util/io/PathUtils.java @@ -25,7 +25,7 @@ import com.google.common.base.Preconditions; import tachyon.TachyonURI; -import tachyon.thrift.InvalidPathException; +import tachyon.exception.InvalidPathException; /** * Utilities related to both Tachyon paths like {@link tachyon.TachyonURI} and local file paths. diff --git a/common/src/main/java/tachyon/worker/WorkerClient.java b/common/src/main/java/tachyon/worker/WorkerClient.java index ec148ec3b7dd..a85877197fa9 100644 --- a/common/src/main/java/tachyon/worker/WorkerClient.java +++ b/common/src/main/java/tachyon/worker/WorkerClient.java @@ -36,14 +36,9 @@ import tachyon.HeartbeatExecutor; import tachyon.HeartbeatThread; import tachyon.conf.TachyonConf; -import tachyon.thrift.BlockInfoException; -import tachyon.thrift.FailedToCheckpointException; -import tachyon.thrift.FileAlreadyExistException; -import tachyon.thrift.FileDoesNotExistException; +import tachyon.exception.TachyonExceptionType; import tachyon.thrift.NetAddress; -import tachyon.thrift.OutOfSpaceException; -import tachyon.thrift.SuspectedFileSizeException; -import tachyon.thrift.TachyonException; +import tachyon.thrift.TachyonTException; import tachyon.thrift.WorkerService; import tachyon.util.network.NetworkAddressUtils; @@ -126,13 +121,7 @@ public synchronized void persistFile(long fileId, long nonce, String path) throw try { mClient.persistFile(fileId, nonce, path); - } catch (FileDoesNotExistException e) { - throw new IOException(e); - } catch (SuspectedFileSizeException e) { - throw new IOException(e); - } catch (FailedToCheckpointException e) { - throw new IOException(e); - } catch (BlockInfoException e) { + } catch (TachyonTException e) { throw new IOException(e); } catch (TException e) { mConnected = false; @@ -152,7 +141,7 @@ public synchronized boolean asyncCheckpoint(long fileId) throws IOException { try { return mClient.asyncCheckpoint(fileId); - } catch (TachyonException e) { + } catch (TachyonTException e) { throw new IOException(e); } catch (TException e) { mConnected = false; @@ -171,9 +160,7 @@ public synchronized void cacheBlock(long blockId) throws IOException { try { mClient.cacheBlock(mSessionId, blockId); - } catch (FileDoesNotExistException e) { - throw new IOException(e); - } catch (BlockInfoException e) { + } catch (TachyonTException e) { throw new IOException(e); } catch (TException e) { mConnected = false; @@ -308,10 +295,15 @@ public synchronized boolean isLocal() { public synchronized String lockBlock(long blockId) throws IOException { mustConnect(); + // TODO(jiri) Would be nice to have a helper method to execute this try-catch logic try { return mClient.lockBlock(blockId, mSessionId); - } catch (FileDoesNotExistException e) { - return null; + } catch (TachyonTException e) { + if (e.getType().equals(TachyonExceptionType.FILE_DOES_NOT_EXIST.name())) { + return null; + } else { + throw new IOException(e); + } } catch (TException e) { mConnected = false; throw new IOException(e); @@ -365,10 +357,12 @@ public synchronized String requestBlockLocation(long blockId, long initialBytes) try { return mClient.requestBlockLocation(mSessionId, blockId, initialBytes); - } catch (OutOfSpaceException e) { - throw new IOException("Failed to request " + initialBytes, e); - } catch (FileAlreadyExistException e) { - throw new IOException(e); + } catch (TachyonTException e) { + if (e.getType().equals(TachyonExceptionType.WORKER_OUT_OF_SPACE.name())) { + throw new IOException("Failed to request " + initialBytes, e); + } else { + throw new IOException(e); + } } catch (TException e) { mConnected = false; throw new IOException(e); @@ -388,10 +382,12 @@ public synchronized boolean requestSpace(long blockId, long requestBytes) throws try { return mClient.requestSpace(mSessionId, blockId, requestBytes); - } catch (OutOfSpaceException e) { - return false; - } catch (FileDoesNotExistException e) { - throw new IOException(e); + } catch (TachyonTException e) { + if (e.getType().equals(TachyonExceptionType.WORKER_OUT_OF_SPACE.name())) { + return false; + } else { + throw new IOException(e); + } } catch (TException e) { mConnected = false; throw new IOException(e); diff --git a/common/src/test/java/tachyon/util/io/PathUtilsTest.java b/common/src/test/java/tachyon/util/io/PathUtilsTest.java index d3ee9b177964..e0d3c8afa456 100644 --- a/common/src/test/java/tachyon/util/io/PathUtilsTest.java +++ b/common/src/test/java/tachyon/util/io/PathUtilsTest.java @@ -24,7 +24,7 @@ import org.junit.rules.ExpectedException; import tachyon.Constants; -import tachyon.thrift.InvalidPathException; +import tachyon.exception.InvalidPathException; public class PathUtilsTest { @Rule diff --git a/common/src/thrift/tachyon.thrift b/common/src/thrift/tachyon.thrift index bfa8a80a4499..7cca734f7f2b 100644 --- a/common/src/thrift/tachyon.thrift +++ b/common/src/thrift/tachyon.thrift @@ -85,7 +85,7 @@ struct RawTableInfo { enum CommandType { Unknown = 0, Nothing = 1, - Register = 2, // Ask the worker to re-register. + Register = 2, // Ask the worker to re-register. Free = 3, // Ask the worker to free files. Delete = 4, // Ask the worker to delete files. Persist = 5, // Ask the worker to persist a file for lineage @@ -98,7 +98,7 @@ struct Command { struct LineageCommand { 1: CommandType commandType - 2: list checkpointFiles + 2: list checkpointFiles } struct CheckpointFile { @@ -112,7 +112,7 @@ struct JobConfInfo { struct CommandLineJobInfo { 1: string command - 2: JobConfInfo conf + 2: JobConfInfo conf } struct LineageFileInfo { @@ -131,64 +131,17 @@ struct LineageInfo { 7: list children } -exception BlockInfoException { - 1: string message -} - -exception OutOfSpaceException { - 1: string message -} - -exception FailedToCheckpointException { - 1: string message -} - -exception FileAlreadyExistException { - 1: string message -} - -exception FileDoesNotExistException { - 1: string message -} - -exception NoWorkerException { - 1: string message -} - -exception SuspectedFileSizeException { - 1: string message -} - -exception InvalidPathException { - 1: string message -} - -exception TableColumnException { - 1: string message +exception TachyonTException { + 1: string type + 2: string message } -exception TableDoesNotExistException { - 1: string message -} - -exception TachyonException { - 1: string message -} - -exception DependencyDoesNotExistException { - 1: string message -} - -exception LineageDoesNotExistException { - 1: string message -} - -exception LineageDeletionException { +exception ThriftIOException { 1: string message } service BlockMasterService { - BlockInfo getBlockInfo(1: i64 blockId) throws (1: BlockInfoException bie) + BlockInfo getBlockInfo(1: i64 blockId) throws (1: TachyonTException e) i64 getCapacityBytes() @@ -198,64 +151,60 @@ service BlockMasterService { void workerCommitBlock(1: i64 workerId, 2: i64 usedBytesOnTier, 3: i32 tier, 4: i64 blockId, 5: i64 length) - throws (1: BlockInfoException bie) + throws (1: TachyonTException e) i64 workerGetWorkerId(1: NetAddress workerNetAddress) Command workerHeartbeat(1: i64 workerId, 2: list usedBytesOnTiers, 3: list removedBlockIds, 4: map> addedBlocksOnTiers) - throws (1: BlockInfoException bie) + throws (1: TachyonTException e) void workerRegister(1: i64 workerId, 2: list totalBytesOnTiers, 3: list usedBytesOnTiers, 4: map> currentBlocksOnTiers) - throws (1: TachyonException te) + throws (1: TachyonTException e) } service FileSystemMasterService { - void completeFile(1: i64 fileId) - throws (1: BlockInfoException bie, 2: FileDoesNotExistException fdnee, - 3: InvalidPathException ipe) + void completeFile(1: i64 fileId) throws (1: TachyonTException e) // Lineage Features i32 createDependency(1: list parents, 2: list children, 3: string commandPrefix, 4: list data, 5: string comment, 6: string framework, 7: string frameworkVersion, 8: i32 dependencyType, 9: i64 childrenBlockSizeByte) - throws (1: InvalidPathException ipe, 2: FileDoesNotExistException fdnee, - 3: FileAlreadyExistException faee, 4: BlockInfoException bie, 5: TachyonException te) + throws (1: TachyonTException e) bool createDirectory(1: string path, 2: bool recursive) - throws (1: FileAlreadyExistException faee, 2: InvalidPathException ipe) + throws (1: TachyonTException e) i64 createFile(1: string path, 2: i64 blockSizeBytes, 3: bool recursive, 4: i64 ttl) - throws (1: FileAlreadyExistException faee, 2: BlockInfoException bie, - 3: SuspectedFileSizeException sfse, 4: TachyonException te) + throws (1: TachyonTException e) bool deleteFile(1: i64 fileId, 2: bool recursive) - throws (1: TachyonException te) + throws (1: TachyonTException e) bool free(1: i64 fileId, 2: bool recursive) - throws (1: FileDoesNotExistException fdnee) + throws (1: TachyonTException e) DependencyInfo getDependencyInfo(1: i32 dependencyId) - throws (1: DependencyDoesNotExistException ddnee) + throws (1: TachyonTException e) FileBlockInfo getFileBlockInfo(1: i64 fileId, 2: i32 fileBlockIndex) - throws (1: FileDoesNotExistException fdnee, 2: BlockInfoException bie) + throws (1: TachyonTException e) list getFileBlockInfoList(1: i64 fileId) - throws (1: FileDoesNotExistException fdnee) + throws (1: TachyonTException e) i64 getFileId(1: string path) - throws (1: InvalidPathException ipe) + throws (1: TachyonTException e) FileInfo getFileInfo(1: i64 fileId) - throws (1: FileDoesNotExistException fdnee) + throws (1: TachyonTException e) list getFileInfoList(1: i64 fileId) - throws (1: FileDoesNotExistException fdnee) + throws (1: TachyonTException e) i64 getNewBlockIdForFile(1: i64 fileId) - throws (1: FileDoesNotExistException fdnee, 2: BlockInfoException bie) + throws (1: TachyonTException e) // TODO(gene): Is this necessary? string getUfsAddress() @@ -263,41 +212,36 @@ service FileSystemMasterService { /** * Loads metadata for the file identified by the given Tachyon path from UFS into Tachyon. */ - i64 loadFileInfoFromUfs(1: string ufsPath, 2: bool recursive) - throws (1: BlockInfoException bie, 2: FileDoesNotExistException fdnee, - 3: FileAlreadyExistException faee, 4: InvalidPathException ipe, - 5: SuspectedFileSizeException sfse, 6: TachyonException te) + i64 loadFileInfoFromUfs(1: string ufsPath, 2: bool recursive) throws (1: TachyonTException e) /** * Creates a new "mount point", mounts the given UFS path in the Tachyon namespace at the given * path. The path should not exist and should not be nested under any existing mount point. */ bool mount(1: string tachyonPath, 2: string ufsPath) - throws (1: TachyonException te) + throws (1: TachyonTException e, 2: ThriftIOException ioe) bool persistFile(1: i64 fileId, 2: i64 length) - throws (1: FileDoesNotExistException eP, 2: SuspectedFileSizeException eS, - 3: BlockInfoException eB) + throws (1: TachyonTException e) bool renameFile(1: i64 fileId, 2: string dstPath) - throws (1:FileAlreadyExistException faee, 2: FileDoesNotExistException fdnee, - 3: InvalidPathException ipe) + throws (1: TachyonTException e) void reportLostFile(1: i64 fileId) - throws (1: FileDoesNotExistException fdnee) + throws (1: TachyonTException e) void requestFilesInDependency(1: i32 depId) - throws (1: DependencyDoesNotExistException ddnee) + throws (1: TachyonTException e) void setPinned(1: i64 fileId, 2: bool pinned) - throws (1: FileDoesNotExistException fdnee) + throws (1: TachyonTException e) /** * Deletes an existing "mount point", voiding the Tachyon namespace at the given path. The path * should correspond to an existing mount point. Any files in its subtree that are backed by UFS * will be persisted before they are removed from the Tachyon namespace. */ - bool unmount(1: string tachyonPath) throws (1: TachyonException te) + bool unmount(1: string tachyonPath) throws (1: TachyonTException e, 2: ThriftIOException ioe) set workerGetPinIdList() @@ -306,48 +250,46 @@ service FileSystemMasterService { service LineageMasterService { // for client - i64 createLineage(1: list inputFiles, 2: list outputFiles, 3: CommandLineJobInfo job) - throws (1: FileAlreadyExistException faee, 2: BlockInfoException bie, - 3: SuspectedFileSizeException sfse, 4: TachyonException te) - + i64 createLineage(1: list inputFiles, 2: list outputFiles, 3: CommandLineJobInfo job) + throws (1: TachyonTException e) + bool deleteLineage(1: i64 lineageId, 2: bool cascade) - throws (1: LineageDoesNotExistException lnee, 2: LineageDeletionException lde) - + throws (1: TachyonTException e) + list getLineageInfoList() - + i64 reinitializeFile(1: string path, 2: i64 blockSizeBytes, 3: i64 ttl) - throws (1: InvalidPathException ipe, 2: LineageDoesNotExistException ldee) - + throws (1: TachyonTException e) + void asyncCompleteFile(1: i64 fileId) - throws (1: FileDoesNotExistException fdnee, 2: BlockInfoException bie) - + throws (1: TachyonTException e) + // for workers LineageCommand workerLineageHeartbeat(1: i64 workerId, 2: list persistedFiles) } service RawTableMasterService { i64 createRawTable(1: string path, 2: i32 columns, 3: binary metadata) - throws (1: FileAlreadyExistException faee, 2: InvalidPathException ipe, 3: TableColumnException tce, - 4: TachyonException te) + throws (1: TachyonTException e, 2: ThriftIOException ioe) RawTableInfo getClientRawTableInfoById(1: i64 id) - throws (1: TableDoesNotExistException tdnee) + throws (1: TachyonTException e) RawTableInfo getClientRawTableInfoByPath(1: string path) - throws (1: TableDoesNotExistException tdnee, 2: InvalidPathException ipe) + throws (1: TachyonTException e) i64 getRawTableId(1: string path) - throws (1: InvalidPathException ipe, 2: TableDoesNotExistException tdnee) + throws (1: TachyonTException e) void updateRawTableMetadata(1: i64 tableId, 2: binary metadata) - throws (1: TableDoesNotExistException tdnee, 2: TachyonException te) + throws (1: TachyonTException e, 2: ThriftIOException ioe) } service WorkerService { void accessBlock(1: i64 blockId) bool asyncCheckpoint(1: i64 fileId) - throws (1: TachyonException e) + throws (1: TachyonTException e) /** * Used to cache a block into Tachyon space, worker will move the temporary block file from session @@ -355,13 +297,14 @@ service WorkerService { * information to master. */ void cacheBlock(1: i64 sessionId, 2: i64 blockId) - throws (1: FileDoesNotExistException eP, 2: BlockInfoException eB) + throws (1: TachyonTException e, 2: ThriftIOException ioe) /** * 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. */ void cancelBlock(1: i64 sessionId, 2: i64 blockId) + throws (1: TachyonTException e, 2: ThriftIOException ioe) /** * Lock the file in Tachyon's space while the session is reading it, and the path of the block file @@ -369,11 +312,10 @@ service WorkerService { * thrown. */ string lockBlock(1: i64 blockId, 2: i64 sessionId) - throws (1: FileDoesNotExistException eP) + throws (1: TachyonTException e) void persistFile(1: i64 fileId, 2: i64 nonce, 3: string path) - throws (1: FileDoesNotExistException eP, 2: SuspectedFileSizeException eS, - 3: FailedToCheckpointException eF, 4: BlockInfoException eB) + throws (1: TachyonTException e) /** * Used to promote block on under storage layer to top storage layer when there are more than one @@ -381,16 +323,17 @@ service WorkerService { * otherwise. */ bool promoteBlock(1: i64 blockId) + throws (1: TachyonTException e, 2: ThriftIOException ioe) /** * Used to allocate location and space for a new coming block, worker will choose the appropriate * storage directory which fits the initial block size by some allocation strategy, and the * 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. + * FileAlreadyExistsException will be thrown. */ string requestBlockLocation(1: i64 sessionId, 2: i64 blockId, 3: i64 initialBytes) - throws (1: OutOfSpaceException eP, 2: FileAlreadyExistException eS) + throws (1: TachyonTException e, 2: ThriftIOException ioe) /** * Used to request space for some block file. return true if the worker successfully allocates @@ -398,7 +341,7 @@ service WorkerService { * information of the block on worker, FileDoesNotExistException will be thrown. */ bool requestSpace(1: i64 sessionId, 2: i64 blockId, 3: i64 requestBytes) - throws (1: FileDoesNotExistException eP) + throws (1: TachyonTException e) /** * Local session send heartbeat to local worker to keep its temporary folder. It also sends client diff --git a/examples/src/main/java/tachyon/examples/BasicRawTableOperations.java b/examples/src/main/java/tachyon/examples/BasicRawTableOperations.java index 81162638972d..6b31d2de0b66 100644 --- a/examples/src/main/java/tachyon/examples/BasicRawTableOperations.java +++ b/examples/src/main/java/tachyon/examples/BasicRawTableOperations.java @@ -27,8 +27,8 @@ import tachyon.TachyonURI; import tachyon.Version; import tachyon.client.ReadType; -import tachyon.client.TachyonFile; import tachyon.client.TachyonFS; +import tachyon.client.TachyonFile; import tachyon.client.WriteType; import tachyon.client.file.FileInStream; import tachyon.client.file.FileOutStream; diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index a8dc84943279..d38c77448318 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -50,7 +50,7 @@ test - + org.powermock powermock-module-junit4 test diff --git a/integration-tests/src/test/java/tachyon/client/TachyonFileSystemIntegrationTest.java b/integration-tests/src/test/java/tachyon/client/TachyonFileSystemIntegrationTest.java index 865b61d16ad0..fab1a24b7c7c 100644 --- a/integration-tests/src/test/java/tachyon/client/TachyonFileSystemIntegrationTest.java +++ b/integration-tests/src/test/java/tachyon/client/TachyonFileSystemIntegrationTest.java @@ -107,7 +107,7 @@ public void createFileTest() throws IOException, TachyonException { } @Test - public void createFileWithFileAlreadyExistExceptionTest() throws IOException, TachyonException { + public void createFileWithFileAlreadyExistsExceptionTest() throws IOException, TachyonException { TachyonURI uri = new TachyonURI(PathUtils.uniqPath()); sTfs.getOutStream(uri, sWriteBoth).close(); Assert.assertNotNull(sTfs.getInfo(sTfs.open(uri))); diff --git a/integration-tests/src/test/java/tachyon/master/FileSystemMasterClientIntegrationTest.java b/integration-tests/src/test/java/tachyon/master/FileSystemMasterClientIntegrationTest.java index 381376a84536..7f33dec918bd 100644 --- a/integration-tests/src/test/java/tachyon/master/FileSystemMasterClientIntegrationTest.java +++ b/integration-tests/src/test/java/tachyon/master/FileSystemMasterClientIntegrationTest.java @@ -19,7 +19,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import org.apache.thrift.TException; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -28,7 +27,7 @@ import tachyon.Constants; import tachyon.client.FileSystemMasterClient; import tachyon.conf.TachyonConf; -import tachyon.thrift.FileDoesNotExistException; +import tachyon.exception.TachyonException; /** * Test the internal implementation of tachyon Master via a @@ -55,7 +54,7 @@ public final void before() throws Exception { } @Test - public void openCloseTest() throws TException, IOException { + public void openCloseTest() throws TachyonException, IOException { FileSystemMasterClient fsMasterClient = new FileSystemMasterClient(mLocalTachyonCluster.getMaster().getAddress(), mExecutorService, mMasterTachyonConf); @@ -72,9 +71,8 @@ public void openCloseTest() throws TException, IOException { fsMasterClient.close(); } - @Test(timeout = 3000, expected = FileDoesNotExistException.class) - public void user_getClientBlockInfoReturnsOnError() throws IOException, - FileDoesNotExistException { + @Test(timeout = 3000, expected = TachyonException.class) + public void user_getClientBlockInfoReturnsOnError() throws IOException, TachyonException { // This test was created to show that an infinite loop occurs. // The timeout will protect against this, and the change was to throw a IOException // in the cases we don't want to disconnect from master diff --git a/integration-tests/src/test/java/tachyon/master/JournalIntegrationTest.java b/integration-tests/src/test/java/tachyon/master/JournalIntegrationTest.java index 5112a6749bbf..82b342622692 100644 --- a/integration-tests/src/test/java/tachyon/master/JournalIntegrationTest.java +++ b/integration-tests/src/test/java/tachyon/master/JournalIntegrationTest.java @@ -35,13 +35,12 @@ import tachyon.client.file.options.OutStreamOptions; import tachyon.client.file.options.SetStateOptions; import tachyon.conf.TachyonConf; -import tachyon.exception.TachyonException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.master.file.FileSystemMaster; import tachyon.master.journal.Journal; import tachyon.master.journal.ReadWriteJournal; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; import tachyon.underfs.UnderFileSystem; import tachyon.util.io.PathUtils; @@ -119,7 +118,7 @@ public void loadMetadataTest() throws Exception { try { mTfs.getInfo(mTfs.open(new TachyonURI("/xyz"))); Assert.fail("File /xyz should not exist."); - } catch (TachyonException e) { + } catch (InvalidPathException e) { // This is to expected. } LoadMetadataOptions recursive = diff --git a/integration-tests/src/test/java/tachyon/master/JournalShutdownIntegrationTest.java b/integration-tests/src/test/java/tachyon/master/JournalShutdownIntegrationTest.java index d645796a4b21..88d2c62ab98e 100644 --- a/integration-tests/src/test/java/tachyon/master/JournalShutdownIntegrationTest.java +++ b/integration-tests/src/test/java/tachyon/master/JournalShutdownIntegrationTest.java @@ -30,10 +30,10 @@ import tachyon.TachyonURI; import tachyon.client.file.TachyonFileSystem; import tachyon.conf.TachyonConf; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; +import tachyon.exception.TableDoesNotExistException; import tachyon.master.file.FileSystemMaster; -import tachyon.thrift.FileDoesNotExistException; -import tachyon.thrift.InvalidPathException; -import tachyon.thrift.TableDoesNotExistException; import tachyon.util.CommonUtils; /** 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 b675ea4f4e66..c44c72d21961 100644 --- a/integration-tests/src/test/java/tachyon/master/file/FileSystemMasterIntegrationTest.java +++ b/integration-tests/src/test/java/tachyon/master/file/FileSystemMasterIntegrationTest.java @@ -38,13 +38,13 @@ import tachyon.Constants; import tachyon.TachyonURI; import tachyon.conf.TachyonConf; +import tachyon.exception.FileAlreadyExistsException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.master.LocalTachyonCluster; import tachyon.master.MasterTestUtils; import tachyon.master.block.BlockMaster; -import tachyon.thrift.FileAlreadyExistException; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; import tachyon.util.CommonUtils; /** @@ -85,9 +85,8 @@ public void exec(int depth, int concurrencyDepth, TachyonURI path) throws Except ExecutorService executor = Executors.newCachedThreadPool(); ArrayList> futures = new ArrayList>(FILES_PER_NODE); for (int i = 0; i < FILES_PER_NODE; i ++) { - Callable call = - (new ConcurrentCreator(depth - 1, concurrencyDepth - 1, - path.join(Integer.toString(i)))); + Callable call = (new ConcurrentCreator(depth - 1, concurrencyDepth - 1, + path.join(Integer.toString(i)))); futures.add(executor.submit(call)); } for (Future f : futures) { @@ -142,9 +141,8 @@ public void exec(int depth, int concurrencyDepth, TachyonURI path) throws Except ExecutorService executor = Executors.newCachedThreadPool(); ArrayList> futures = new ArrayList>(FILES_PER_NODE); for (int i = 0; i < FILES_PER_NODE; i ++) { - Callable call = - (new ConcurrentDeleter(depth - 1, concurrencyDepth - 1, path.join(Integer - .toString(i)))); + Callable call = (new ConcurrentDeleter(depth - 1, concurrencyDepth - 1, + path.join(Integer.toString(i)))); futures.add(executor.submit(call)); } for (Future f : futures) { @@ -190,13 +188,13 @@ public void exec(int depth, int concurrencyDepth, TachyonURI path) throws Except // Sometimes we want to try renaming a path when we're not all the way down, which is what // the second condition is for. We have to create the path in the destination up till what // we're renaming. This might already exist, so createFile could throw a - // FileAlreadyExistException, which we silently handle. + // FileAlreadyExistsException, which we silently handle. TachyonURI srcPath = mRootPath.join(path); TachyonURI dstPath = mRootPath2.join(path); long fileId = mFsMaster.getFileId(srcPath); try { mFsMaster.mkdir(dstPath.getParent(), true); - } catch (FileAlreadyExistException e) { + } catch (FileAlreadyExistsException e) { // This is an acceptable exception to get, since we don't know if the parent has been // created yet by another thread. } catch (InvalidPathException e) { @@ -208,9 +206,8 @@ public void exec(int depth, int concurrencyDepth, TachyonURI path) throws Except ExecutorService executor = Executors.newCachedThreadPool(); ArrayList> futures = new ArrayList>(FILES_PER_NODE); for (int i = 0; i < FILES_PER_NODE; i ++) { - Callable call = - (new ConcurrentRenamer(depth - 1, concurrencyDepth - 1, mRootPath, mRootPath2, - path.join(Integer.toString(i)))); + Callable call = (new ConcurrentRenamer(depth - 1, concurrencyDepth - 1, mRootPath, + mRootPath2, path.join(Integer.toString(i)))); futures.add(executor.submit(call)); } for (Future f : futures) { @@ -346,9 +343,8 @@ public void concurrentRenameTest() throws Exception { int numFiles = mFsMaster.getFileInfoList(mFsMaster.getFileId(ROOT_PATH)).size(); - ConcurrentRenamer concurrentRenamer = - new ConcurrentRenamer( - DEPTH, CONCURRENCY_DEPTH, ROOT_PATH, ROOT_PATH2, TachyonURI.EMPTY_URI); + ConcurrentRenamer concurrentRenamer = new ConcurrentRenamer(DEPTH, CONCURRENCY_DEPTH, ROOT_PATH, + ROOT_PATH2, TachyonURI.EMPTY_URI); concurrentRenamer.call(); Assert.assertEquals(numFiles, @@ -357,7 +353,7 @@ public void concurrentRenameTest() throws Exception { @Test public void createAlreadyExistFileTest() throws Exception { - mThrown.expect(FileAlreadyExistException.class); + mThrown.expect(FileAlreadyExistsException.class); mFsMaster.createFile(new TachyonURI("/testFile"), Constants.DEFAULT_BLOCK_SIZE_BYTE, false); mFsMaster.mkdir(new TachyonURI("/testFile"), true); } @@ -377,7 +373,7 @@ public void createFileInvalidPathTest() throws Exception { @Test public void createFileInvalidPathTest2() throws Exception { - mThrown.expect(FileAlreadyExistException.class); + mThrown.expect(FileAlreadyExistsException.class); mFsMaster.createFile(new TachyonURI("/"), Constants.DEFAULT_BLOCK_SIZE_BYTE, true); } @@ -399,8 +395,8 @@ public void createFilePerfTest() throws Exception { // System.out.println(System.currentTimeMillis() - sMs); // sMs = System.currentTimeMillis(); for (int k = 0; k < 200; k ++) { - mFsMaster.getFileInfo(mFsMaster.getFileId(new TachyonURI("/testFile").join( - Constants.MASTER_COLUMN_FILE_PREFIX + k).join("0"))); + mFsMaster.getFileInfo(mFsMaster.getFileId( + new TachyonURI("/testFile").join(Constants.MASTER_COLUMN_FILE_PREFIX + k).join("0"))); } // System.out.println(System.currentTimeMillis() - sMs); } @@ -670,8 +666,8 @@ public void ttlCreateFileTest() throws Exception { long ttl = 100; mFsMaster.createFileInternal(new TachyonURI("/testFolder/testFile"), Constants.DEFAULT_BLOCK_SIZE_BYTE, true, System.currentTimeMillis(), ttl); - FileInfo folderInfo = mFsMaster.getFileInfo( - mFsMaster.getFileId(new TachyonURI("/testFolder/testFile"))); + FileInfo folderInfo = + mFsMaster.getFileInfo(mFsMaster.getFileId(new TachyonURI("/testFolder/testFile"))); Assert.assertEquals(ttl, folderInfo.ttl); } @@ -681,8 +677,8 @@ public void ttlExpiredCreateFileTest() throws Exception { long ttl = 1; long fileId = mFsMaster.createFile(new TachyonURI("/testFolder/testFile1"), Constants.DEFAULT_BLOCK_SIZE_BYTE, true, ttl); - FileInfo folderInfo = mFsMaster.getFileInfo(mFsMaster.getFileId( - new TachyonURI("/testFolder/testFile1"))); + FileInfo folderInfo = + mFsMaster.getFileInfo(mFsMaster.getFileId(new TachyonURI("/testFolder/testFile1"))); Assert.assertEquals(fileId, folderInfo.fileId); Assert.assertEquals(ttl, folderInfo.ttl); CommonUtils.sleepMs(5000); @@ -698,56 +694,56 @@ public void ttlRenameTest() throws Exception { Constants.DEFAULT_BLOCK_SIZE_BYTE, true, ttl); mFsMaster.renameInternal(fileId, new TachyonURI("/testFolder/testFile2"), true, System.currentTimeMillis()); - FileInfo folderInfo = mFsMaster.getFileInfo(mFsMaster.getFileId( - new TachyonURI("/testFolder/testFile2"))); + FileInfo folderInfo = + mFsMaster.getFileInfo(mFsMaster.getFileId(new TachyonURI("/testFolder/testFile2"))); Assert.assertEquals(ttl, folderInfo.ttl); } // TODO(gene): Journal format has changed, maybe add Version to the format and add this test back // or remove this test when we have better tests against journal checkpoint. - //@Test - //public void writeImageTest() throws IOException { - // // initialize the MasterInfo - // Journal journal = - // new Journal(mLocalTachyonCluster.getTachyonHome() + "journal/", "image.data", "log.data", - // mMasterTachyonConf); - // Journal - // MasterInfo info = - // new MasterInfo(new InetSocketAddress(9999), journal, mExecutorService, mMasterTachyonConf); - - // // create the output streams - // ByteArrayOutputStream os = new ByteArrayOutputStream(); - // DataOutputStream dos = new DataOutputStream(os); - // ObjectMapper mapper = JsonObject.createObjectMapper(); - // ObjectWriter writer = mapper.writer(); - // ImageElement version = null; - // ImageElement checkpoint = null; - - // // write the image - // info.writeImage(writer, dos); - - // // parse the written bytes and look for the Checkpoint and Version ImageElements - // String[] splits = new String(os.toByteArray()).split("\n"); - // for (String split : splits) { - // byte[] bytes = split.getBytes(); - // JsonParser parser = mapper.getFactory().createParser(bytes); - // ImageElement ele = parser.readValueAs(ImageElement.class); - - // if (ele.mType.equals(ImageElementType.Checkpoint)) { - // checkpoint = ele; - // } - - // if (ele.mType.equals(ImageElementType.Version)) { - // version = ele; - // } - // } - - // // test the elements - // Assert.assertNotNull(checkpoint); - // Assert.assertEquals(checkpoint.mType, ImageElementType.Checkpoint); - // Assert.assertEquals(Constants.JOURNAL_VERSION, version.getInt("version").intValue()); - // Assert.assertEquals(1, checkpoint.getInt("inodeCounter").intValue()); - // Assert.assertEquals(0, checkpoint.getInt("editTransactionCounter").intValue()); - // Assert.assertEquals(0, checkpoint.getInt("dependencyCounter").intValue()); - //} + // @Test + // public void writeImageTest() throws IOException { + // // initialize the MasterInfo + // Journal journal = + // new Journal(mLocalTachyonCluster.getTachyonHome() + "journal/", "image.data", "log.data", + // mMasterTachyonConf); + // Journal + // MasterInfo info = + // new MasterInfo(new InetSocketAddress(9999), journal, mExecutorService, mMasterTachyonConf); + + // // create the output streams + // ByteArrayOutputStream os = new ByteArrayOutputStream(); + // DataOutputStream dos = new DataOutputStream(os); + // ObjectMapper mapper = JsonObject.createObjectMapper(); + // ObjectWriter writer = mapper.writer(); + // ImageElement version = null; + // ImageElement checkpoint = null; + + // // write the image + // info.writeImage(writer, dos); + + // // parse the written bytes and look for the Checkpoint and Version ImageElements + // String[] splits = new String(os.toByteArray()).split("\n"); + // for (String split : splits) { + // byte[] bytes = split.getBytes(); + // JsonParser parser = mapper.getFactory().createParser(bytes); + // ImageElement ele = parser.readValueAs(ImageElement.class); + + // if (ele.mType.equals(ImageElementType.Checkpoint)) { + // checkpoint = ele; + // } + + // if (ele.mType.equals(ImageElementType.Version)) { + // version = ele; + // } + // } + + // // test the elements + // Assert.assertNotNull(checkpoint); + // Assert.assertEquals(checkpoint.mType, ImageElementType.Checkpoint); + // Assert.assertEquals(Constants.JOURNAL_VERSION, version.getInt("version").intValue()); + // Assert.assertEquals(1, checkpoint.getInt("inodeCounter").intValue()); + // Assert.assertEquals(0, checkpoint.getInt("editTransactionCounter").intValue()); + // Assert.assertEquals(0, checkpoint.getInt("dependencyCounter").intValue()); + // } } diff --git a/integration-tests/src/test/java/tachyon/master/rawtable/RawTableMasterIntegrationTest.java b/integration-tests/src/test/java/tachyon/master/rawtable/RawTableMasterIntegrationTest.java index c4759109dddb..98fdb70142bd 100644 --- a/integration-tests/src/test/java/tachyon/master/rawtable/RawTableMasterIntegrationTest.java +++ b/integration-tests/src/test/java/tachyon/master/rawtable/RawTableMasterIntegrationTest.java @@ -15,6 +15,8 @@ package tachyon.master.rawtable; +import java.io.IOException; + import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -26,13 +28,13 @@ import tachyon.Constants; import tachyon.TachyonURI; import tachyon.conf.TachyonConf; +import tachyon.exception.FileAlreadyExistsException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; +import tachyon.exception.TableColumnException; +import tachyon.exception.TachyonException; import tachyon.master.LocalTachyonCluster; import tachyon.master.file.FileSystemMaster; -import tachyon.thrift.FileAlreadyExistException; -import tachyon.thrift.FileDoesNotExistException; -import tachyon.thrift.InvalidPathException; -import tachyon.thrift.TableColumnException; -import tachyon.thrift.TachyonException; public class RawTableMasterIntegrationTest { private LocalTachyonCluster mLocalTachyonCluster = null; @@ -59,23 +61,23 @@ public final void before() throws Exception { @Ignore @Test - public void createRawTableTest() throws InvalidPathException, FileAlreadyExistException, - TableColumnException, FileDoesNotExistException, TachyonException { + public void createRawTableTest() throws InvalidPathException, FileAlreadyExistsException, + TableColumnException, FileDoesNotExistException, TachyonException, IOException { mRawTableMaster.createRawTable(new TachyonURI("/testTable"), 1, null); Assert.assertTrue( mFsMaster.getFileInfo(mFsMaster.getFileId(new TachyonURI("/testTable"))).isFolder); } @Test - public void negativeColumnTest() throws InvalidPathException, FileAlreadyExistException, - TableColumnException, TachyonException { + public void negativeColumnTest() throws InvalidPathException, FileAlreadyExistsException, + TableColumnException, TachyonException, IOException { mException.expect(TableColumnException.class); mRawTableMaster.createRawTable(new TachyonURI("/testTable"), -1, null); } @Test - public void tooManyColumnsTest() throws InvalidPathException, FileAlreadyExistException, - TableColumnException, TachyonException { + public void tooManyColumnsTest() throws InvalidPathException, FileAlreadyExistsException, + TableColumnException, TachyonException, IOException { mException.expect(TableColumnException.class); mRawTableMaster.createRawTable(new TachyonURI("/testTable"), mMasterConf.getInt(Constants.MAX_COLUMNS) + 1, null); diff --git a/integration-tests/src/test/java/tachyon/worker/BlockServiceHandlerIntegrationTest.java b/integration-tests/src/test/java/tachyon/worker/BlockServiceHandlerIntegrationTest.java index 6d8c5be360ca..b4fe246daa74 100644 --- a/integration-tests/src/test/java/tachyon/worker/BlockServiceHandlerIntegrationTest.java +++ b/integration-tests/src/test/java/tachyon/worker/BlockServiceHandlerIntegrationTest.java @@ -39,13 +39,12 @@ import tachyon.client.file.TachyonFileSystem; import tachyon.client.file.options.OutStreamOptions; import tachyon.conf.TachyonConf; +import tachyon.exception.InvalidPathException; import tachyon.master.LocalTachyonCluster; import tachyon.master.MasterContext; import tachyon.master.block.BlockId; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; -import tachyon.thrift.OutOfSpaceException; +import tachyon.thrift.TachyonTException; import tachyon.underfs.UnderFileSystem; import tachyon.util.CommonUtils; import tachyon.util.ThreadFactoryUtils; @@ -208,8 +207,8 @@ public void lockBlockFailureTest() throws Exception { Exception exception = null; try { mWorkerServiceHandler.lockBlock(blockId, SESSION_ID); - } catch (FileDoesNotExistException fdne) { - exception = fdne; + } catch (TachyonTException e) { + exception = e; } // A file does not exist exception should have been thrown @@ -275,8 +274,8 @@ public void requestSpaceTest() throws Exception { Exception exception = null; try { mWorkerServiceHandler.requestBlockLocation(SESSION_ID, blockId2, WORKER_CAPACITY_BYTES + 1); - } catch (OutOfSpaceException oose) { - exception = oose; + } catch (TachyonTException e) { + exception = e; } Assert.assertNotNull(exception); } diff --git a/integration-tests/src/test/java/tachyon/worker/DataServerIntegrationTest.java b/integration-tests/src/test/java/tachyon/worker/DataServerIntegrationTest.java index 080d6b7e3e25..b00ee64ee2c0 100644 --- a/integration-tests/src/test/java/tachyon/worker/DataServerIntegrationTest.java +++ b/integration-tests/src/test/java/tachyon/worker/DataServerIntegrationTest.java @@ -25,7 +25,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import org.apache.thrift.TException; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/servers/src/main/java/tachyon/master/MasterInfo.java b/servers/src/main/java/tachyon/master/MasterInfo.java index a90de9289f1d..6f5d4c573035 100644 --- a/servers/src/main/java/tachyon/master/MasterInfo.java +++ b/servers/src/main/java/tachyon/master/MasterInfo.java @@ -24,15 +24,15 @@ import tachyon.Constants; import tachyon.TachyonURI; import tachyon.conf.TachyonConf; +import tachyon.exception.DependencyDoesNotExistException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.master.block.BlockMaster; import tachyon.master.file.FileSystemMaster; import tachyon.master.file.meta.InodeFile; -import tachyon.thrift.DependencyDoesNotExistException; import tachyon.thrift.DependencyInfo; import tachyon.thrift.FileBlockInfo; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; import tachyon.thrift.WorkerInfo; import tachyon.underfs.UnderFileSystem; import tachyon.underfs.UnderFileSystem.SpaceType; diff --git a/servers/src/main/java/tachyon/master/block/BlockMaster.java b/servers/src/main/java/tachyon/master/block/BlockMaster.java index 5fc66c895f31..f3da9aa64577 100644 --- a/servers/src/main/java/tachyon/master/block/BlockMaster.java +++ b/servers/src/main/java/tachyon/master/block/BlockMaster.java @@ -43,7 +43,9 @@ import tachyon.StorageDirId; import tachyon.StorageLevelAlias; import tachyon.conf.TachyonConf; +import tachyon.exception.BlockInfoException; import tachyon.exception.ExceptionMessage; +import tachyon.exception.NoWorkerException; import tachyon.master.MasterBase; import tachyon.master.MasterContext; import tachyon.master.block.journal.BlockContainerIdGeneratorEntry; @@ -58,13 +60,11 @@ import tachyon.test.Testable; import tachyon.test.Tester; import tachyon.thrift.BlockInfo; -import tachyon.thrift.BlockInfoException; import tachyon.thrift.BlockLocation; import tachyon.thrift.BlockMasterService; import tachyon.thrift.Command; import tachyon.thrift.CommandType; import tachyon.thrift.NetAddress; -import tachyon.thrift.TachyonException; import tachyon.thrift.WorkerInfo; import tachyon.util.CommonUtils; import tachyon.util.FormatUtils; @@ -467,15 +467,15 @@ public long getWorkerId(NetAddress workerNetAddress) { * @param totalBytesOnTiers list of total bytes on each tier * @param usedBytesOnTiers list of the used byes on each tier * @param currentBlocksOnTiers a mapping of each storage dir, to all the blocks on that storage - * @throws TachyonException if workerId cannot be found + * @throws NoWorkerException if workerId cannot be found */ public void workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers) - throws TachyonException { + throws NoWorkerException { synchronized (mBlocks) { synchronized (mWorkers) { if (!mWorkers.contains(mIdIndex, workerId)) { - throw new TachyonException("Could not find worker id: " + workerId + " to register."); + throw new NoWorkerException("Could not find worker id: " + workerId + " to register."); } MasterWorkerInfo workerInfo = mWorkers.getFirstByField(mIdIndex, workerId); workerInfo.updateLastUpdatedTimeMs(); diff --git a/servers/src/main/java/tachyon/master/block/BlockMasterServiceHandler.java b/servers/src/main/java/tachyon/master/block/BlockMasterServiceHandler.java index 7477c1273cd5..61f18cc6c5ba 100644 --- a/servers/src/main/java/tachyon/master/block/BlockMasterServiceHandler.java +++ b/servers/src/main/java/tachyon/master/block/BlockMasterServiceHandler.java @@ -20,12 +20,12 @@ import org.apache.thrift.TException; +import tachyon.exception.TachyonException; import tachyon.thrift.BlockInfo; -import tachyon.thrift.BlockInfoException; import tachyon.thrift.BlockMasterService; import tachyon.thrift.Command; import tachyon.thrift.NetAddress; -import tachyon.thrift.TachyonException; +import tachyon.thrift.TachyonTException; import tachyon.thrift.WorkerInfo; public class BlockMasterServiceHandler implements BlockMasterService.Iface { @@ -43,42 +43,49 @@ public long workerGetWorkerId(NetAddress workerNetAddress) throws TException { @Override public void workerRegister(long workerId, List totalBytesOnTiers, List usedBytesOnTiers, Map> currentBlocksOnTiers) - throws TachyonException, TException { - mBlockMaster.workerRegister(workerId, totalBytesOnTiers, usedBytesOnTiers, - currentBlocksOnTiers); + throws TachyonTException { + try { + mBlockMaster.workerRegister(workerId, totalBytesOnTiers, usedBytesOnTiers, + currentBlocksOnTiers); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override public Command workerHeartbeat(long workerId, List usedBytesOnTiers, - List removedBlockIds, Map> addedBlocksOnTiers) - throws BlockInfoException, TException { + List removedBlockIds, Map> addedBlocksOnTiers) { return mBlockMaster.workerHeartbeat(workerId, usedBytesOnTiers, removedBlockIds, addedBlocksOnTiers); } @Override public void workerCommitBlock(long workerId, long usedBytesOnTier, int tier, long blockId, - long length) throws BlockInfoException, TException { + long length) { mBlockMaster.commitBlock(workerId, usedBytesOnTier, tier, blockId, length); } @Override - public List getWorkerInfoList() throws TException { + public List getWorkerInfoList() { return mBlockMaster.getWorkerInfoList(); } @Override - public long getCapacityBytes() throws TException { + public long getCapacityBytes() { return mBlockMaster.getCapacityBytes(); } @Override - public long getUsedBytes() throws TException { + public long getUsedBytes() { return mBlockMaster.getUsedBytes(); } @Override - public BlockInfo getBlockInfo(long blockId) throws BlockInfoException { - return mBlockMaster.getBlockInfo(blockId); + public BlockInfo getBlockInfo(long blockId) throws TachyonTException { + try { + return mBlockMaster.getBlockInfo(blockId); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } } diff --git a/servers/src/main/java/tachyon/master/file/FileSystemMaster.java b/servers/src/main/java/tachyon/master/file/FileSystemMaster.java index 7c2ea9e6bf99..023e4040607c 100644 --- a/servers/src/main/java/tachyon/master/file/FileSystemMaster.java +++ b/servers/src/main/java/tachyon/master/file/FileSystemMaster.java @@ -41,7 +41,13 @@ import tachyon.StorageLevelAlias; import tachyon.TachyonURI; import tachyon.conf.TachyonConf; +import tachyon.exception.BlockInfoException; +import tachyon.exception.DependencyDoesNotExistException; import tachyon.exception.ExceptionMessage; +import tachyon.exception.FileAlreadyExistsException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; +import tachyon.exception.SuspectedFileSizeException; import tachyon.master.MasterBase; import tachyon.master.MasterContext; import tachyon.master.block.BlockId; @@ -73,19 +79,12 @@ import tachyon.master.journal.JournalEntry; import tachyon.master.journal.JournalOutputStream; import tachyon.thrift.BlockInfo; -import tachyon.thrift.BlockInfoException; import tachyon.thrift.BlockLocation; -import tachyon.thrift.DependencyDoesNotExistException; import tachyon.thrift.DependencyInfo; -import tachyon.thrift.FileAlreadyExistException; import tachyon.thrift.FileBlockInfo; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; import tachyon.thrift.FileSystemMasterService; -import tachyon.thrift.InvalidPathException; import tachyon.thrift.NetAddress; -import tachyon.thrift.SuspectedFileSizeException; -import tachyon.thrift.TachyonException; import tachyon.underfs.UnderFileSystem; import tachyon.util.IdUtils; import tachyon.util.ThreadFactoryUtils; @@ -122,8 +121,8 @@ public static String getJournalDirectory(String baseDirectory) { } public FileSystemMaster(BlockMaster blockMaster, Journal journal) { - super(journal, Executors.newFixedThreadPool(2, - ThreadFactoryUtils.build("file-system-master-%d", true))); + super(journal, + Executors.newFixedThreadPool(2, ThreadFactoryUtils.build("file-system-master-%d", true))); mBlockMaster = blockMaster; mDirectoryIdGenerator = new InodeDirectoryIdGenerator(mBlockMaster); @@ -167,12 +166,11 @@ public void processJournalEntry(JournalEntry entry) throws IOException { } } else if (entry instanceof DependencyEntry) { DependencyEntry dependencyEntry = (DependencyEntry) entry; - Dependency dependency = - new Dependency(dependencyEntry.mId, dependencyEntry.mParentFiles, - dependencyEntry.mChildrenFiles, dependencyEntry.mCommandPrefix, - dependencyEntry.mData, dependencyEntry.mComment, dependencyEntry.mFramework, - dependencyEntry.mFrameworkVersion, dependencyEntry.mDependencyType, - dependencyEntry.mParentDependencies, dependencyEntry.mCreationTimeMs); + Dependency dependency = new Dependency(dependencyEntry.mId, dependencyEntry.mParentFiles, + dependencyEntry.mChildrenFiles, dependencyEntry.mCommandPrefix, dependencyEntry.mData, + dependencyEntry.mComment, dependencyEntry.mFramework, dependencyEntry.mFrameworkVersion, + dependencyEntry.mDependencyType, dependencyEntry.mParentDependencies, + dependencyEntry.mCreationTimeMs); for (int childDependencyId : dependencyEntry.mChildrenDependencies) { dependency.addChildrenDependency(childDependencyId); } @@ -263,8 +261,8 @@ public void stop() throws IOException { * @throws BlockInfoException * @throws FileDoesNotExistException */ - public boolean persistFile(long fileId, long length) throws SuspectedFileSizeException, - BlockInfoException, FileDoesNotExistException { + public boolean persistFile(long fileId, long length) + throws SuspectedFileSizeException, BlockInfoException, FileDoesNotExistException { synchronized (mInodeTree) { long opTimeMs = System.currentTimeMillis(); if (persistFileInternal(fileId, length, opTimeMs)) { @@ -293,8 +291,8 @@ boolean persistFileInternal(long fileId, long length, long opTimeMs) if (file.isCompleted()) { if (file.getLength() != length) { - throw new SuspectedFileSizeException(fileId + ". Original Size: " + file.getLength() - + ". New Size: " + length); + throw new SuspectedFileSizeException( + fileId + ". Original Size: " + file.getLength() + ". New Size: " + length); } } else { file.setLength(length); @@ -381,7 +379,7 @@ public long getFileId(TachyonURI path) throws InvalidPathException { * @return the {@link FileInfo} for the given file id * @throws FileDoesNotExistException */ - public FileInfo getFileInfo(long fileId) throws FileDoesNotExistException, InvalidPathException { + public FileInfo getFileInfo(long fileId) throws FileDoesNotExistException { MasterContext.getMasterSource().incGetFileStatusOps(); synchronized (mInodeTree) { Inode inode = mInodeTree.getInodeById(fileId); @@ -389,13 +387,18 @@ public FileInfo getFileInfo(long fileId) throws FileDoesNotExistException, Inval } } - private FileInfo getFileInfoInternal(Inode inode) throws FileDoesNotExistException, - InvalidPathException { + private FileInfo getFileInfoInternal(Inode inode) + throws FileDoesNotExistException { // This function should only be called from within synchronized (mInodeTree) blocks. FileInfo fileInfo = inode.generateClientFileInfo(mInodeTree.getPath(inode).toString()); fileInfo.inMemoryPercentage = getInMemoryPercentage(inode); TachyonURI path = mInodeTree.getPath(inode); - TachyonURI resolvedPath = mMountTable.resolve(path); + TachyonURI resolvedPath; + try { + resolvedPath = mMountTable.resolve(path); + } catch (InvalidPathException e) { + throw new FileDoesNotExistException(e.getMessage(), e); + } // Only set the UFS path if the path is nested under a mount point. if (!path.equals(resolvedPath)) { fileInfo.setUfsPath(resolvedPath.toString()); @@ -413,8 +416,8 @@ private FileInfo getFileInfoInternal(Inode inode) throws FileDoesNotExistExcepti * @throws FileDoesNotExistException * @throws InvalidPathException */ - public List getFileInfoList(long fileId) throws FileDoesNotExistException, - InvalidPathException { + public List getFileInfoList(long fileId) + throws FileDoesNotExistException, InvalidPathException { synchronized (mInodeTree) { Inode inode = mInodeTree.getInodeById(fileId); @@ -437,8 +440,8 @@ public List getFileInfoList(long fileId) throws FileDoesNotExistExcept * @throws FileDoesNotExistException * @throws BlockInfoException */ - public void completeFile(long fileId) throws BlockInfoException, FileDoesNotExistException, - InvalidPathException { + public void completeFile(long fileId) + throws BlockInfoException, FileDoesNotExistException, InvalidPathException { synchronized (mInodeTree) { long opTimeMs = System.currentTimeMillis(); Inode inode = mInodeTree.getInodeById(fileId); @@ -461,9 +464,9 @@ public void completeFile(long fileId) throws BlockInfoException, FileDoesNotExis BlockInfo blockInfo = blockInfoList.get(i); fileLength += blockInfo.getLength(); if (i < blockInfoList.size() - 1 && blockInfo.getLength() != fileBlockSize) { - throw new BlockInfoException("Block index " + i - + " has a block size smaller than the file block size (" - + fileInode.getBlockSizeBytes() + ")"); + throw new BlockInfoException( + "Block index " + i + " has a block size smaller than the file block size (" + + fileInode.getBlockSizeBytes() + ")"); } } @@ -494,8 +497,8 @@ void completeFileInternal(List blockIds, long fileId, long fileLength, boo * @throws FileDoesNotExistException if a non-existent file is encountered * @throws InvalidPathException if an invalid path is encountered */ - private void propagatePersisted(Inode inode, boolean replayed) throws FileDoesNotExistException, - InvalidPathException { + private void propagatePersisted(Inode inode, boolean replayed) + throws FileDoesNotExistException, InvalidPathException { if (!inode.isPersisted()) { return; } @@ -534,13 +537,13 @@ private void completeFileFromEntry(CompleteFileEntry entry) throws InvalidPathEx * @param blockSizeBytes the block size of the file * @param recursive if true, will recursively create all the missing directories along the path. * @return the file id of the create file - * @throws InvalidPathException - * @throws FileAlreadyExistException - * @throws BlockInfoException + * @throws InvalidPathException if the path is invalid + * @throws FileAlreadyExistsException if there is already a file at the given path + * @throws BlockInfoException if the block size is invalid */ public long createFile(TachyonURI path, long blockSizeBytes, boolean recursive) - throws InvalidPathException, FileAlreadyExistException, BlockInfoException { - return createFile(path, blockSizeBytes, recursive, Constants.NO_TTL); + throws InvalidPathException, FileAlreadyExistsException, BlockInfoException { + return this.createFile(path, blockSizeBytes, recursive, Constants.NO_TTL); } /** @@ -551,12 +554,12 @@ public long createFile(TachyonURI path, long blockSizeBytes, boolean recursive) * @param recursive if true, will recursively create all the missing directories along the path. * @param ttl time to live for file * @return the file id of the create file - * @throws InvalidPathException - * @throws FileAlreadyExistException - * @throws BlockInfoException + * @throws InvalidPathException if the path is invalid + * @throws FileAlreadyExistsException if there is already a file at the given path + * @throws BlockInfoException if the block size is invalid */ public long createFile(TachyonURI path, long blockSizeBytes, boolean recursive, long ttl) - throws InvalidPathException, FileAlreadyExistException, BlockInfoException { + throws InvalidPathException, FileAlreadyExistsException, BlockInfoException { MasterContext.getMasterSource().incCreateFileOps(); synchronized (mInodeTree) { InodeTree.CreatePathResult createResult = @@ -571,8 +574,8 @@ public long createFile(TachyonURI path, long blockSizeBytes, boolean recursive, } InodeTree.CreatePathResult createFileInternal(TachyonURI path, long blockSizeBytes, - boolean recursive, long opTimeMs, long ttl) throws InvalidPathException, - FileAlreadyExistException, BlockInfoException { + boolean recursive, long opTimeMs, long ttl) + throws InvalidPathException, FileAlreadyExistsException, BlockInfoException { // This function should only be called from within synchronized (mInodeTree) blocks. InodeTree.CreatePathResult createResult = mInodeTree.createPath(path, blockSizeBytes, recursive, false, opTimeMs, ttl); @@ -623,7 +626,7 @@ private void resetBlockFileFromEntry(ReinitializeFileEntry entry) { * * @param fileId the file id to get the next block id for * @return the next block id for the file - * @throws FileDoesNotExistException + * @throws FileDoesNotExistException if the file does not exist */ public long getNewBlockIdForFile(long fileId) throws FileDoesNotExistException { Inode inode; @@ -650,6 +653,7 @@ public int getNumberOfFiles() { /** * Get the number of pinned files and directories. + * * @return the number of pinned files and directories. */ public int getNumberOfPinnedFiles() { @@ -664,12 +668,11 @@ 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 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 + * @throws FileDoesNotExistException if the file does not exist + * @throws IOException if an I/O error occurs */ - public boolean deleteFile(long fileId, boolean recursive) throws FileDoesNotExistException, - InvalidPathException, IOException { + public boolean deleteFile(long fileId, boolean recursive) + throws IOException, FileDoesNotExistException { MasterContext.getMasterSource().incDeleteFileOps(); synchronized (mInodeTree) { long opTimeMs = System.currentTimeMillis(); @@ -700,11 +703,10 @@ private void deleteFileFromEntry(DeleteFileEntry entry) { * @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 replayed, - long opTimeMs) throws FileDoesNotExistException, InvalidPathException, IOException { + boolean deleteFileInternal(long fileId, boolean recursive, boolean replayed, long opTimeMs) + throws FileDoesNotExistException, 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 @@ -738,13 +740,17 @@ boolean deleteFileInternal(long fileId, boolean recursive, boolean replayed, // Currently, it will result in an inconsistency between Tachyon and UFS. if (!replayed && delInode.isPersisted()) { // Delete the file in the under file system. - String ufsPath = mMountTable.resolve(mInodeTree.getPath(delInode)).toString(); - UnderFileSystem ufs = UnderFileSystem.get(ufsPath, MasterContext.getConf()); - 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; + try { + String ufsPath = mMountTable.resolve(mInodeTree.getPath(delInode)).toString(); + UnderFileSystem ufs = UnderFileSystem.get(ufsPath, MasterContext.getConf()); + 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 (InvalidPathException e) { + LOG.warn(e.getMessage()); } } @@ -765,8 +771,8 @@ boolean deleteFileInternal(long fileId, boolean recursive, boolean replayed, * @param fileId the file id to get the info for * @param fileBlockIndex the block index of the file to get the block info for * @return the {@link FileBlockInfo} for the file and block index - * @throws FileDoesNotExistException - * @throws BlockInfoException + * @throws FileDoesNotExistException if the file does not exist + * @throws BlockInfoException if the block size is invalid */ public FileBlockInfo getFileBlockInfo(long fileId, int fileBlockIndex) throws BlockInfoException, FileDoesNotExistException, InvalidPathException { @@ -774,15 +780,15 @@ public FileBlockInfo getFileBlockInfo(long fileId, int fileBlockIndex) Inode inode = mInodeTree.getInodeById(fileId); if (inode.isDirectory()) { throw new FileDoesNotExistException( - ExceptionMessage.FILEID_MUST_BE_FILE.getMessage(fileId)); + ExceptionMessage.FILEID_MUST_BE_FILE.getMessage(fileId)); } InodeFile file = (InodeFile) inode; List blockIdList = new ArrayList(1); blockIdList.add(file.getBlockIdByIndex(fileBlockIndex)); List blockInfoList = mBlockMaster.getBlockInfoList(blockIdList); if (blockInfoList.size() != 1) { - throw new BlockInfoException("FileId " + fileId + " BlockIndex " + fileBlockIndex - + " is not a valid block."); + throw new BlockInfoException( + "FileId " + fileId + " BlockIndex " + fileBlockIndex + " is not a valid block."); } return generateFileBlockInfo(file, blockInfoList.get(0)); } @@ -793,15 +799,15 @@ public FileBlockInfo getFileBlockInfo(long fileId, int fileBlockIndex) * * @param fileId the file id to get the info for * @return a list of {@link FileBlockInfo} for all the blocks of the file. - * @throws FileDoesNotExistException + * @throws FileDoesNotExistException if the file does not exist */ - public List getFileBlockInfoList(long fileId) throws FileDoesNotExistException, - InvalidPathException { + public List getFileBlockInfoList(long fileId) + throws FileDoesNotExistException, InvalidPathException { synchronized (mInodeTree) { Inode inode = mInodeTree.getInodeById(fileId); if (inode.isDirectory()) { throw new FileDoesNotExistException( - ExceptionMessage.FILEID_MUST_BE_FILE.getMessage(fileId)); + ExceptionMessage.FILEID_MUST_BE_FILE.getMessage(fileId)); } InodeFile file = (InodeFile) inode; List blockInfoList = mBlockMaster.getBlockInfoList(file.getBlockIds()); @@ -819,8 +825,8 @@ public List getFileBlockInfoList(long fileId) throws FileDoesNotE * * @param path the path to the file * @return a list of {@link FileBlockInfo} for all the blocks of the file. - * @throws FileDoesNotExistException - * @throws InvalidPathException + * @throws FileDoesNotExistException if the file does not exist + * @throws InvalidPathException if the path is invalid */ public List getFileBlockInfoList(TachyonURI path) throws FileDoesNotExistException, InvalidPathException { @@ -836,8 +842,8 @@ public List getFileBlockInfoList(TachyonURI path) * @param blockInfo the {@link BlockInfo} to generate the {@link FileBlockInfo} from * @return a new {@link FileBlockInfo} for the block */ - private FileBlockInfo generateFileBlockInfo(InodeFile file, BlockInfo blockInfo) throws - InvalidPathException { + private FileBlockInfo generateFileBlockInfo(InodeFile file, BlockInfo blockInfo) + throws InvalidPathException { // This function should only be called from within synchronized (mInodeTree) blocks. FileBlockInfo fileBlockInfo = new FileBlockInfo(); fileBlockInfo.blockInfo = blockInfo; @@ -899,8 +905,8 @@ public List getInMemoryFiles() { new LinkedList>(); synchronized (mInodeTree) { // TODO(yupeng): Verify we want to use absolute path. - nodesQueue.add(new Pair(mInodeTree.getRoot(), new TachyonURI( - TachyonURI.SEPARATOR))); + nodesQueue.add(new Pair(mInodeTree.getRoot(), + new TachyonURI(TachyonURI.SEPARATOR))); while (!nodesQueue.isEmpty()) { Pair pair = nodesQueue.poll(); InodeDirectory directory = pair.getFirst(); @@ -967,10 +973,10 @@ private boolean isInMemory(BlockInfo blockInfo) { * the parent directories must already exist * @throws InvalidPathException when the path is invalid, please see documentation on * {@link InodeTree#createPath} for more details - * @throws FileAlreadyExistException when there is already a file at path + * @throws FileAlreadyExistsException when there is already a file at path */ public InodeTree.CreatePathResult mkdir(TachyonURI path, boolean recursive) - throws InvalidPathException, FileAlreadyExistException { + throws InvalidPathException, FileAlreadyExistsException { // TODO(gene): metrics synchronized (mInodeTree) { try { @@ -997,8 +1003,8 @@ public InodeTree.CreatePathResult mkdir(TachyonURI path, boolean recursive) */ private void journalCreatePathResult(InodeTree.CreatePathResult createResult) { for (Inode inode : createResult.getModified()) { - writeJournalEntry(new InodeLastModificationTimeEntry(inode.getId(), - inode.getLastModificationTimeMs())); + writeJournalEntry( + new InodeLastModificationTimeEntry(inode.getId(), inode.getLastModificationTimeMs())); } for (Inode inode : createResult.getCreated()) { writeJournalEntry(inode.toJournalEntry()); @@ -1015,8 +1021,8 @@ private void journalCreatePathResult(InodeTree.CreatePathResult createResult) { * @throws InvalidPathException if an invalid path is encountered * @throws IOException if an I/O error occurs */ - public boolean rename(long fileId, TachyonURI dstPath) throws FileAlreadyExistException, - FileDoesNotExistException, InvalidPathException, IOException { + public boolean rename(long fileId, TachyonURI dstPath) + throws FileDoesNotExistException, InvalidPathException, IOException { MasterContext.getMasterSource().incRenameOps(); synchronized (mInodeTree) { Inode srcInode = mInodeTree.getInodeById(fileId); @@ -1032,8 +1038,7 @@ public boolean rename(long fileId, TachyonURI dstPath) throws FileAlreadyExistEx // Renaming across mount points is not allowed. String srcMount = mMountTable.getMountPoint(srcPath); String dstMount = mMountTable.getMountPoint(dstPath); - if ((srcMount == null && dstMount != null) - || (srcMount != null && dstMount == null) + if ((srcMount == null && dstMount != null) || (srcMount != null && dstMount == null) || (srcMount != null && dstMount != null && !srcMount.equals(dstMount))) { LOG.warn("Renaming " + srcPath + " to " + dstPath + " spans mount points."); return false; @@ -1045,8 +1050,8 @@ public boolean rename(long fileId, TachyonURI dstPath) throws FileAlreadyExistEx // Renaming a path to one of its subpaths is not allowed. Check for that, by making sure // srcComponents isn't a prefix of dstComponents. if (PathUtils.hasPrefix(dstPath.getPath(), srcPath.getPath())) { - throw new InvalidPathException("Failed to rename: " + srcPath + " is a prefix of " - + dstPath); + throw new InvalidPathException( + "Failed to rename: " + srcPath + " is a prefix of " + dstPath); } TachyonURI dstParentURI = dstPath.getParent(); @@ -1151,7 +1156,7 @@ private void renameFromEntry(RenameEntry entry) { * * @param fileId the file id to set the pin status for * @param pinned the pin status - * @throws FileDoesNotExistException + * @throws FileDoesNotExistException if the file does not exist */ public void setPinned(long fileId, boolean pinned) throws FileDoesNotExistException { // TODO(gene): metrics @@ -1186,7 +1191,7 @@ private void setPinnedFromEntry(SetPinnedEntry entry) { * @param fileId the file to free * @param recursive if true, and the file is a directory, all descendants will be freed * @return true if the file was freed - * @throws FileDoesNotExistException + * @throws FileDoesNotExistException if the file does not exist */ public boolean free(long fileId, boolean recursive) throws FileDoesNotExistException { // TODO(gene): metrics @@ -1323,8 +1328,8 @@ public List getPriorityDependencyList() { // TODO(jiri): Make it possible to load directories and not just individual files. public long loadFileInfoFromUfs(TachyonURI path, boolean recursive) - throws BlockInfoException, FileAlreadyExistException, FileDoesNotExistException, - InvalidPathException, SuspectedFileSizeException, TachyonException { + throws BlockInfoException, FileAlreadyExistsException, FileDoesNotExistException, + InvalidPathException, SuspectedFileSizeException, IOException { TachyonURI ufsPath; synchronized (mInodeTree) { ufsPath = mMountTable.resolve(path); @@ -1342,12 +1347,13 @@ public long loadFileInfoFromUfs(TachyonURI path, boolean recursive) return fileId; } catch (IOException e) { LOG.error(ExceptionUtils.getStackTrace(e)); - throw new TachyonException(e.getMessage()); + throw e; } } - public boolean mount(TachyonURI tachyonPath, TachyonURI ufsPath) throws FileAlreadyExistException, - FileDoesNotExistException, InvalidPathException, IOException { + public boolean mount(TachyonURI tachyonPath, TachyonURI ufsPath) + throws FileAlreadyExistsException, FileDoesNotExistException, InvalidPathException, + IOException { synchronized (mInodeTree) { InodeTree.CreatePathResult createResult = mkdir(tachyonPath, false); if (mountInternal(tachyonPath, ufsPath)) { @@ -1374,8 +1380,8 @@ boolean mountInternal(TachyonURI tachyonPath, TachyonURI ufsPath) throws Invalid return mMountTable.add(tachyonPath, ufsPath); } - public boolean unmount(TachyonURI tachyonPath) throws FileDoesNotExistException, - InvalidPathException, IOException { + public boolean unmount(TachyonURI tachyonPath) + throws FileDoesNotExistException, InvalidPathException, IOException { synchronized (mInodeTree) { if (unmountInternal(tachyonPath)) { Inode inode = mInodeTree.getInodeByPath(tachyonPath); @@ -1425,7 +1431,7 @@ public void resetFile(long fileId) throws FileDoesNotExistException { */ private final class MasterInodeTTLCheckExecutor implements HeartbeatExecutor { @Override - public void heartbeat() { + public void heartbeat() { synchronized (mInodeTree) { Set expiredBuckets = mTTLBuckets.getExpiredBuckets(System.currentTimeMillis()); for (TTLBucket bucket : expiredBuckets) { @@ -1437,8 +1443,6 @@ public void heartbeat() { deleteFile(file.getId(), false); } catch (FileDoesNotExistException e) { LOG.error("file does not exit " + file.toString()); - } catch (InvalidPathException e) { - LOG.error("invalid path for ttl check " + file.toString()); } catch (IOException e) { LOG.error("IO exception for ttl check" + file.toString()); } diff --git a/servers/src/main/java/tachyon/master/file/FileSystemMasterServiceHandler.java b/servers/src/main/java/tachyon/master/file/FileSystemMasterServiceHandler.java index b5e0888a4356..7485a303e2c3 100644 --- a/servers/src/main/java/tachyon/master/file/FileSystemMasterServiceHandler.java +++ b/servers/src/main/java/tachyon/master/file/FileSystemMasterServiceHandler.java @@ -21,17 +21,13 @@ import java.util.Set; import tachyon.TachyonURI; -import tachyon.thrift.BlockInfoException; -import tachyon.thrift.DependencyDoesNotExistException; +import tachyon.exception.TachyonException; import tachyon.thrift.DependencyInfo; -import tachyon.thrift.FileAlreadyExistException; import tachyon.thrift.FileBlockInfo; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; import tachyon.thrift.FileSystemMasterService; -import tachyon.thrift.InvalidPathException; -import tachyon.thrift.SuspectedFileSizeException; -import tachyon.thrift.TachyonException; +import tachyon.thrift.TachyonTException; +import tachyon.thrift.ThriftIOException; public final class FileSystemMasterServiceHandler implements FileSystemMasterService.Iface { private final FileSystemMaster mFileSystemMaster; @@ -50,43 +46,67 @@ public List workerGetPriorityDependencyList() { return mFileSystemMaster.getPriorityDependencyList(); } + // TODO(jiri) Reduce exception handling boilerplate here @Override - public boolean persistFile(long fileId, long length) - throws BlockInfoException, FileDoesNotExistException, SuspectedFileSizeException { - return mFileSystemMaster.persistFile(fileId, length); + public boolean persistFile(long fileId, long length) throws TachyonTException { + try { + return mFileSystemMaster.persistFile(fileId, length); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public long getFileId(String path) throws InvalidPathException { - return mFileSystemMaster.getFileId(new TachyonURI(path)); + public long getFileId(String path) throws TachyonTException { + try { + return mFileSystemMaster.getFileId(new TachyonURI(path)); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public FileInfo getFileInfo(long fileId) throws FileDoesNotExistException, InvalidPathException { - return mFileSystemMaster.getFileInfo(fileId); + public FileInfo getFileInfo(long fileId) throws TachyonTException { + try { + return mFileSystemMaster.getFileInfo(fileId); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } - @Override - public List getFileInfoList(long fileId) throws FileDoesNotExistException, - InvalidPathException { - return mFileSystemMaster.getFileInfoList(fileId); + public List getFileInfoList(long fileId) throws TachyonTException { + try { + return mFileSystemMaster.getFileInfoList(fileId); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public FileBlockInfo getFileBlockInfo(long fileId, int fileBlockIndex) - throws BlockInfoException, FileDoesNotExistException, InvalidPathException { - return mFileSystemMaster.getFileBlockInfo(fileId, fileBlockIndex); + public FileBlockInfo getFileBlockInfo(long fileId, int fileBlockIndex) throws TachyonTException { + try { + return mFileSystemMaster.getFileBlockInfo(fileId, fileBlockIndex); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public List getFileBlockInfoList(long fileId) throws FileDoesNotExistException, - InvalidPathException { - return mFileSystemMaster.getFileBlockInfoList(fileId); + public List getFileBlockInfoList(long fileId) throws TachyonTException { + try { + return mFileSystemMaster.getFileBlockInfoList(fileId); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public long getNewBlockIdForFile(long fileId) throws FileDoesNotExistException { - return mFileSystemMaster.getNewBlockIdForFile(fileId); + public long getNewBlockIdForFile(long fileId) throws TachyonTException { + try { + return mFileSystemMaster.getNewBlockIdForFile(fileId); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override @@ -97,109 +117,138 @@ public String getUfsAddress() { // TODO: need to add another create option object for passing ttl @Override public long createFile(String path, long blockSizeBytes, boolean recursive, long ttl) - throws FileAlreadyExistException, BlockInfoException, InvalidPathException { - return mFileSystemMaster.createFile(new TachyonURI(path), blockSizeBytes, recursive, ttl); + throws TachyonTException { + try { + return mFileSystemMaster.createFile(new TachyonURI(path), blockSizeBytes, recursive, ttl); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public void completeFile(long fileId) throws BlockInfoException, FileDoesNotExistException, - InvalidPathException { - mFileSystemMaster.completeFile(fileId); + public void completeFile(long fileId) throws TachyonTException { + try { + mFileSystemMaster.completeFile(fileId); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public boolean deleteFile(long fileId, boolean recursive) throws FileDoesNotExistException, - InvalidPathException, TachyonException { + public boolean deleteFile(long fileId, boolean recursive) + throws TachyonTException, ThriftIOException { try { return mFileSystemMaster.deleteFile(fileId, recursive); + } catch (TachyonException e) { + throw e.toTachyonTException(); } catch (IOException e) { - throw new TachyonException(e.getMessage()); + throw new ThriftIOException(e.getMessage()); } } @Override - public boolean renameFile(long fileId, String dstPath) throws FileAlreadyExistException, - FileDoesNotExistException, InvalidPathException, TachyonException { + public boolean renameFile(long fileId, String dstPath) + throws TachyonTException, ThriftIOException { try { return mFileSystemMaster.rename(fileId, new TachyonURI(dstPath)); + } catch (TachyonException e) { + throw e.toTachyonTException(); } catch (IOException e) { - throw new TachyonException(e.getMessage()); + throw new ThriftIOException(e.getMessage()); } } @Override - public void setPinned(long fileId, boolean pinned) throws FileDoesNotExistException { - mFileSystemMaster.setPinned(fileId, pinned); + public void setPinned(long fileId, boolean pinned) throws TachyonTException { + try { + mFileSystemMaster.setPinned(fileId, pinned); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public boolean createDirectory(String path, boolean recursive) throws FileAlreadyExistException, - InvalidPathException { - mFileSystemMaster.mkdir(new TachyonURI(path), recursive); - return true; + public boolean createDirectory(String path, boolean recursive) throws TachyonTException { + try { + mFileSystemMaster.mkdir(new TachyonURI(path), recursive); + return true; + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public boolean free(long fileId, boolean recursive) throws FileDoesNotExistException { - return mFileSystemMaster.free(fileId, recursive); + public boolean free(long fileId, boolean recursive) throws TachyonTException { + try { + return mFileSystemMaster.free(fileId, recursive); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override public int createDependency(List parents, List children, String commandPrefix, List data, String comment, String framework, String frameworkVersion, - int dependencyType, long childrenBlockSizeByte) throws InvalidPathException, - FileDoesNotExistException, FileAlreadyExistException, BlockInfoException, TachyonException { + int dependencyType, long childrenBlockSizeByte) { // TODO(gene): Implement lineage. return 0; } @Override - public DependencyInfo getDependencyInfo(int dependencyId) throws DependencyDoesNotExistException { - return mFileSystemMaster.getClientDependencyInfo(dependencyId); + public DependencyInfo getDependencyInfo(int dependencyId) throws TachyonTException { + try { + return mFileSystemMaster.getClientDependencyInfo(dependencyId); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public void reportLostFile(long fileId) throws FileDoesNotExistException { - mFileSystemMaster.reportLostFile(fileId); + public void reportLostFile(long fileId) throws TachyonTException { + try { + mFileSystemMaster.reportLostFile(fileId); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public void requestFilesInDependency(int depId) throws DependencyDoesNotExistException { + public void requestFilesInDependency(int depId) { mFileSystemMaster.requestFilesInDependency(depId); } @Override public long loadFileInfoFromUfs(String tachyonPath, boolean recursive) - throws BlockInfoException, FileAlreadyExistException, FileDoesNotExistException, - InvalidPathException, SuspectedFileSizeException, TachyonException { - return mFileSystemMaster.loadFileInfoFromUfs(new TachyonURI(tachyonPath), recursive); + throws TachyonTException, ThriftIOException { + try { + return mFileSystemMaster.loadFileInfoFromUfs(new TachyonURI(tachyonPath), recursive); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } catch (IOException e) { + throw new ThriftIOException(e.getMessage()); + } } @Override - public boolean mount(String tachyonPath, String ufsPath) throws TachyonException { + public boolean mount(String tachyonPath, String ufsPath) + throws TachyonTException, ThriftIOException { try { return mFileSystemMaster.mount(new TachyonURI(tachyonPath), new TachyonURI(ufsPath)); - } catch (FileAlreadyExistException e) { - throw new TachyonException(e.getMessage()); - } catch (FileDoesNotExistException e) { - throw new TachyonException(e.getMessage()); - } catch (InvalidPathException e) { - throw new TachyonException(e.getMessage()); + } catch (TachyonException e) { + throw e.toTachyonTException(); } catch (IOException e) { - throw new TachyonException(e.getMessage()); + throw new ThriftIOException(e.getMessage()); } } @Override - public boolean unmount(String tachyonPath) throws TachyonException { + public boolean unmount(String tachyonPath) throws TachyonTException, ThriftIOException { try { return mFileSystemMaster.unmount(new TachyonURI(tachyonPath)); - } catch (FileDoesNotExistException e) { - throw new TachyonException(e.getMessage()); - } catch (InvalidPathException e) { - throw new TachyonException(e.getMessage()); + } catch (TachyonException e) { + throw e.toTachyonTException(); } catch (IOException e) { - throw new TachyonException(e.getMessage()); + throw new ThriftIOException(e.getMessage()); } } } 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 e9b8927d4af6..a5e8025f26d2 100644 --- a/servers/src/main/java/tachyon/master/file/meta/InodeFile.java +++ b/servers/src/main/java/tachyon/master/file/meta/InodeFile.java @@ -21,12 +21,12 @@ import com.google.common.base.Preconditions; import com.google.common.collect.Lists; +import tachyon.exception.BlockInfoException; +import tachyon.exception.SuspectedFileSizeException; import tachyon.master.block.BlockId; import tachyon.master.file.journal.InodeFileEntry; import tachyon.master.journal.JournalEntry; -import tachyon.thrift.BlockInfoException; import tachyon.thrift.FileInfo; -import tachyon.thrift.SuspectedFileSizeException; import tachyon.util.IdUtils; /** 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 e5835bca8628..fda46bc1d878 100644 --- a/servers/src/main/java/tachyon/master/file/meta/InodeTree.java +++ b/servers/src/main/java/tachyon/master/file/meta/InodeTree.java @@ -33,18 +33,18 @@ import com.google.common.collect.Sets; import tachyon.Constants; -import tachyon.collections.IndexedSet; import tachyon.TachyonURI; +import tachyon.collections.IndexedSet; +import tachyon.exception.BlockInfoException; +import tachyon.exception.FileAlreadyExistsException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.master.block.ContainerIdGenerable; import tachyon.master.file.journal.InodeDirectoryEntry; import tachyon.master.file.journal.InodeEntry; import tachyon.master.file.journal.InodeFileEntry; import tachyon.master.journal.JournalCheckpointStreamable; import tachyon.master.journal.JournalOutputStream; -import tachyon.thrift.BlockInfoException; -import tachyon.thrift.FileAlreadyExistException; -import tachyon.thrift.FileDoesNotExistException; -import tachyon.thrift.InvalidPathException; import tachyon.util.FormatUtils; import tachyon.util.io.PathUtils; @@ -130,7 +130,7 @@ public int getPinnedSize() { /** * @param id the id to get the inode for * @return the inode with the given id - * @throws FileDoesNotExistException + * @throws FileDoesNotExistException if the file does not exist */ public Inode getInodeById(long id) throws FileDoesNotExistException { Inode inode = mInodes.getFirstByField(mIdIndex, id); @@ -143,7 +143,7 @@ public Inode getInodeById(long id) throws FileDoesNotExistException { /** * @param path the path to get the inode for * @return the inode with the given path - * @throws InvalidPathException + * @throws InvalidPathException if the path is invalid */ public Inode getInodeByPath(TachyonURI path) throws InvalidPathException { TraversalResult traversalResult = traverseToInode(PathUtils.getPathComponents(path.toString())); @@ -186,13 +186,13 @@ public InodeDirectory getRoot() { * @param directory if it is true, create a directory, otherwise, create a file * @return a {@link CreatePathResult} representing the modified inodes and created inodes during * path creation. - * @throws FileAlreadyExistException - * @throws BlockInfoException - * @throws InvalidPathException + * @throws FileAlreadyExistsException if there is already a file at the given path + * @throws BlockInfoException if the block size is invalid + * @throws InvalidPathException if the path is invalid */ public CreatePathResult createPath(TachyonURI path, long blockSizeBytes, boolean recursive, boolean directory) - throws FileAlreadyExistException, BlockInfoException, InvalidPathException { + throws FileAlreadyExistsException, BlockInfoException, InvalidPathException { return createPath(path, blockSizeBytes, recursive, directory, System.currentTimeMillis(), Constants.NO_TTL); } @@ -210,13 +210,13 @@ public CreatePathResult createPath(TachyonURI path, long blockSizeBytes, boolean * @param directory if it is true, create a directory, otherwise, create a file * @return a {@link CreatePathResult} representing the modified inodes and created inodes during * path creation. - * @throws FileAlreadyExistException - * @throws BlockInfoException - * @throws InvalidPathException + * @throws FileAlreadyExistsException if there is already a file at the given path + * @throws BlockInfoException if the block size is invalid + * @throws InvalidPathException if the path is invalid */ public CreatePathResult createPath(TachyonURI path, long blockSizeBytes, boolean recursive, boolean directory, long ttl) - throws FileAlreadyExistException, BlockInfoException, InvalidPathException { + throws FileAlreadyExistsException, BlockInfoException, InvalidPathException { return createPath(path, blockSizeBytes, recursive, directory, System.currentTimeMillis(), ttl); } @@ -234,7 +234,7 @@ public CreatePathResult createPath(TachyonURI path, long blockSizeBytes, boolean * @param ttl time to live for file expiration * @return a {@link CreatePathResult} representing the modified inodes and created inodes during * path creation. - * @throws FileAlreadyExistException when there is already a file at path if we want to create a + * @throws FileAlreadyExistsException when there is already a file at path if we want to create a * directory there * @throws BlockInfoException when blockSizeBytes is invalid * @throws InvalidPathException when path is invalid, for example, (1) when there is nonexistent @@ -243,10 +243,10 @@ public CreatePathResult createPath(TachyonURI path, long blockSizeBytes, boolean */ public CreatePathResult createPath(TachyonURI path, long blockSizeBytes, boolean recursive, boolean directory, long creationTimeMs, long ttl) - throws FileAlreadyExistException, BlockInfoException, InvalidPathException { + throws FileAlreadyExistsException, BlockInfoException, InvalidPathException { if (path.isRoot()) { - LOG.info("FileAlreadyExistException: " + path); - throw new FileAlreadyExistException(path.toString()); + LOG.info("FileAlreadyExistsException: " + path); + throw new FileAlreadyExistsException(path.toString()); } if (!directory && blockSizeBytes < 1) { throw new BlockInfoException("Invalid block size " + blockSizeBytes); @@ -309,8 +309,8 @@ public CreatePathResult createPath(TachyonURI path, long blockSizeBytes, boolean if (lastInode.isDirectory() && directory) { return new CreatePathResult(); } - LOG.info("FileAlreadyExistException: " + path); - throw new FileAlreadyExistException(path.toString()); + LOG.info("FileAlreadyExistsException: " + path); + throw new FileAlreadyExistsException(path.toString()); } if (directory) { lastInode = new InodeDirectory(name, mDirectoryIdGenerator.getNewDirectoryId(), diff --git a/servers/src/main/java/tachyon/master/file/meta/MountTable.java b/servers/src/main/java/tachyon/master/file/meta/MountTable.java index 2b1a318c3eeb..fe9ab5ed0c63 100644 --- a/servers/src/main/java/tachyon/master/file/meta/MountTable.java +++ b/servers/src/main/java/tachyon/master/file/meta/MountTable.java @@ -23,7 +23,7 @@ import tachyon.Constants; import tachyon.TachyonURI; -import tachyon.thrift.InvalidPathException; +import tachyon.exception.InvalidPathException; import tachyon.util.io.PathUtils; /** This class is used for keeping track of Tachyon mount points. It is thread safe. */ diff --git a/servers/src/main/java/tachyon/master/lineage/LineageMaster.java b/servers/src/main/java/tachyon/master/lineage/LineageMaster.java index 975e7de27fd1..74bf21faea01 100644 --- a/servers/src/main/java/tachyon/master/lineage/LineageMaster.java +++ b/servers/src/main/java/tachyon/master/lineage/LineageMaster.java @@ -36,7 +36,13 @@ import tachyon.TachyonURI; import tachyon.client.file.TachyonFile; import tachyon.conf.TachyonConf; +import tachyon.exception.BlockInfoException; import tachyon.exception.ExceptionMessage; +import tachyon.exception.FileAlreadyExistsException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; +import tachyon.exception.LineageDeletionException; +import tachyon.exception.LineageDoesNotExistException; import tachyon.job.Job; import tachyon.master.MasterBase; import tachyon.master.MasterContext; @@ -60,17 +66,11 @@ import tachyon.master.lineage.meta.LineageStoreView; import tachyon.master.lineage.recompute.RecomputeExecutor; import tachyon.master.lineage.recompute.RecomputePlanner; -import tachyon.thrift.BlockInfoException; import tachyon.thrift.BlockLocation; import tachyon.thrift.CheckpointFile; import tachyon.thrift.CommandType; -import tachyon.thrift.FileAlreadyExistException; import tachyon.thrift.FileBlockInfo; -import tachyon.thrift.FileDoesNotExistException; -import tachyon.thrift.InvalidPathException; import tachyon.thrift.LineageCommand; -import tachyon.thrift.LineageDeletionException; -import tachyon.thrift.LineageDoesNotExistException; import tachyon.thrift.LineageInfo; import tachyon.thrift.LineageMasterService; import tachyon.util.ThreadFactoryUtils; @@ -200,11 +200,11 @@ public LineageStoreView getLineageStoreView() { * @param job the job * @return the id of the created lineage * @throws InvalidPathException if the path to the input file is invalid - * @throws FileAlreadyExistException if the output file already exists + * @throws FileAlreadyExistsException if the output file already exists * @throws BlockInfoException if fails to create the output file */ public synchronized long createLineage(List inputFiles, List outputFiles, - Job job) throws InvalidPathException, FileAlreadyExistException, BlockInfoException { + Job job) throws InvalidPathException, FileAlreadyExistsException, BlockInfoException { // TODO: validate input files exist List inputTachyonFiles = Lists.newArrayList(); for (TachyonURI inputFile : inputFiles) { diff --git a/servers/src/main/java/tachyon/master/lineage/LineageMasterServiceHandler.java b/servers/src/main/java/tachyon/master/lineage/LineageMasterServiceHandler.java index 0eec3489a526..51643a3bc5ae 100644 --- a/servers/src/main/java/tachyon/master/lineage/LineageMasterServiceHandler.java +++ b/servers/src/main/java/tachyon/master/lineage/LineageMasterServiceHandler.java @@ -17,23 +17,17 @@ import java.util.List; -import org.apache.thrift.TException; - import com.google.common.collect.Lists; import tachyon.TachyonURI; +import tachyon.exception.TachyonException; import tachyon.job.CommandLineJob; import tachyon.job.JobConf; -import tachyon.thrift.BlockInfoException; import tachyon.thrift.CommandLineJobInfo; -import tachyon.thrift.FileAlreadyExistException; -import tachyon.thrift.FileDoesNotExistException; -import tachyon.thrift.InvalidPathException; import tachyon.thrift.LineageCommand; -import tachyon.thrift.LineageDeletionException; -import tachyon.thrift.LineageDoesNotExistException; import tachyon.thrift.LineageInfo; import tachyon.thrift.LineageMasterService; +import tachyon.thrift.TachyonTException; public final class LineageMasterServiceHandler implements LineageMasterService.Iface { private final LineageMaster mLineageMaster; @@ -44,8 +38,7 @@ public LineageMasterServiceHandler(LineageMaster lineageMaster) { @Override public long createLineage(List inputFiles, List outputFiles, - CommandLineJobInfo jobInfo) - throws InvalidPathException, FileAlreadyExistException, BlockInfoException { + CommandLineJobInfo jobInfo) throws TachyonTException { // deserialization List inputFilesUri = Lists.newArrayList(); for (String inputFile : inputFiles) { @@ -58,35 +51,53 @@ public long createLineage(List inputFiles, List outputFiles, CommandLineJob job = new CommandLineJob(jobInfo.command, new JobConf(jobInfo.getConf().outputFile)); - return mLineageMaster.createLineage(inputFilesUri, outputFilesUri, job); + try { + return mLineageMaster.createLineage(inputFilesUri, outputFilesUri, job); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public boolean deleteLineage(long lineageId, boolean cascade) - throws LineageDoesNotExistException, LineageDeletionException { - return mLineageMaster.deleteLineage(lineageId, cascade); + public boolean deleteLineage(long lineageId, boolean cascade) throws TachyonTException { + try { + return mLineageMaster.deleteLineage(lineageId, cascade); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public void asyncCompleteFile(long fileId) - throws FileDoesNotExistException, BlockInfoException { - mLineageMaster.asyncCompleteFile(fileId); + public void asyncCompleteFile(long fileId) throws TachyonTException { + try { + mLineageMaster.asyncCompleteFile(fileId); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override public long reinitializeFile(String path, long blockSizeBytes, long ttl) - throws InvalidPathException, LineageDoesNotExistException { - return mLineageMaster.reinitializeFile(path, blockSizeBytes, ttl); + throws TachyonTException { + try { + return mLineageMaster.reinitializeFile(path, blockSizeBytes, ttl); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override public LineageCommand workerLineageHeartbeat(long workerId, List persistedFiles) - throws TException { - return mLineageMaster.lineageWorkerHeartbeat(workerId, persistedFiles); + throws TachyonTException { + try { + return mLineageMaster.lineageWorkerHeartbeat(workerId, persistedFiles); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public List getLineageInfoList() throws TException { + public List getLineageInfoList() { return mLineageMaster.getLineageInfoList(); } } diff --git a/servers/src/main/java/tachyon/master/lineage/meta/LineageStore.java b/servers/src/main/java/tachyon/master/lineage/meta/LineageStore.java index 6ca51714bfdd..8e873fbcecab 100644 --- a/servers/src/main/java/tachyon/master/lineage/meta/LineageStore.java +++ b/servers/src/main/java/tachyon/master/lineage/meta/LineageStore.java @@ -27,11 +27,11 @@ import tachyon.client.file.TachyonFile; import tachyon.collections.DirectedAcyclicGraph; +import tachyon.exception.LineageDoesNotExistException; import tachyon.job.Job; import tachyon.master.journal.JournalCheckpointStreamable; import tachyon.master.journal.JournalOutputStream; import tachyon.master.lineage.journal.LineageEntry; -import tachyon.thrift.LineageDoesNotExistException; /** * A store of lineages. This class is thread-safe. diff --git a/servers/src/main/java/tachyon/master/lineage/recompute/RecomputeExecutor.java b/servers/src/main/java/tachyon/master/lineage/recompute/RecomputeExecutor.java index d6cf32859437..66189e0f369c 100644 --- a/servers/src/main/java/tachyon/master/lineage/recompute/RecomputeExecutor.java +++ b/servers/src/main/java/tachyon/master/lineage/recompute/RecomputeExecutor.java @@ -25,9 +25,9 @@ import tachyon.Constants; import tachyon.HeartbeatExecutor; +import tachyon.exception.FileDoesNotExistException; import tachyon.master.file.FileSystemMaster; import tachyon.master.lineage.meta.Lineage; -import tachyon.thrift.FileDoesNotExistException; /** * A periodical executor that detects lost files and launches recompute jobs. diff --git a/servers/src/main/java/tachyon/master/rawtable/RawTableMaster.java b/servers/src/main/java/tachyon/master/rawtable/RawTableMaster.java index de732d21f9d4..87a03d307262 100644 --- a/servers/src/main/java/tachyon/master/rawtable/RawTableMaster.java +++ b/servers/src/main/java/tachyon/master/rawtable/RawTableMaster.java @@ -27,6 +27,13 @@ import tachyon.TachyonURI; import tachyon.conf.TachyonConf; import tachyon.exception.ExceptionMessage; +import tachyon.exception.FileAlreadyExistsException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; +import tachyon.exception.TableColumnException; +import tachyon.exception.TableDoesNotExistException; +import tachyon.exception.TableMetadataException; +import tachyon.exception.TachyonException; import tachyon.master.MasterBase; import tachyon.master.MasterContext; import tachyon.master.file.FileSystemMaster; @@ -36,15 +43,9 @@ import tachyon.master.rawtable.journal.RawTableEntry; import tachyon.master.rawtable.journal.UpdateMetadataEntry; import tachyon.master.rawtable.meta.RawTables; -import tachyon.thrift.FileAlreadyExistException; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; import tachyon.thrift.RawTableInfo; import tachyon.thrift.RawTableMasterService; -import tachyon.thrift.TableColumnException; -import tachyon.thrift.TableDoesNotExistException; -import tachyon.thrift.TachyonException; import tachyon.util.ThreadFactoryUtils; import tachyon.util.io.PathUtils; @@ -121,14 +122,14 @@ public void stop() throws IOException { * @param columns the number of columns in the table * @param metadata additional metadata about the table * @return the id of the table - * @throws tachyon.thrift.FileAlreadyExistException when the path already represents a file - * @throws tachyon.thrift.InvalidPathException when path is invalid - * @throws tachyon.thrift.TableColumnException when number of columns is out of range - * @throws TachyonException when metadata size is too large + * @throws FileAlreadyExistsException when the path already represents a file + * @throws InvalidPathException when path is invalid + * @throws TableColumnException when number of columns is out of range + * @throws IOException when metadata size is too large */ public long createRawTable(TachyonURI path, int columns, ByteBuffer metadata) - throws FileAlreadyExistException, InvalidPathException, TableColumnException, - TachyonException { + throws FileAlreadyExistsException, InvalidPathException, TableColumnException, + IOException, TableMetadataException { LOG.info("createRawTable with " + columns + " columns at " + path); validateColumnSize(columns); @@ -143,7 +144,7 @@ public long createRawTable(TachyonURI path, int columns, ByteBuffer metadata) // Should not enter this block in normal case, because id should not be duplicated, so the // table should not exist before, also it should be fine to create the new RawTable and add // it to internal collection. - throw new TachyonException("Failed to create raw table."); + throw new IOException("Failed to create raw table."); } // Create directories in the table directory as columns @@ -163,10 +164,10 @@ public long createRawTable(TachyonURI path, int columns, ByteBuffer metadata) * @param tableId The id of the table to update * @param metadata The new metadata to update the table with * @throws TableDoesNotExistException when no table has the specified id - * @throws TachyonException when metadata is too large + * @throws IOException when metadata is too large */ public void updateRawTableMetadata(long tableId, ByteBuffer metadata) - throws TableDoesNotExistException, TachyonException { + throws IOException, TachyonException { if (!mFileSystemMaster.isDirectory(tableId)) { throw new TableDoesNotExistException( ExceptionMessage.RAW_TABLE_ID_DOES_NOT_EXIST.getMessage(tableId)); @@ -273,12 +274,12 @@ private void validateColumnSize(int columns) throws TableColumnException { * called whenever a metadata wants to be set. * * @param metadata the metadata to be validated - * @throws TachyonException if the metadata is too large + * @throws IOException if the metadata is too large */ // TODO(cc): Have a more explicit TableMetaException? - private void validateMetadataSize(ByteBuffer metadata) throws TachyonException { + private void validateMetadataSize(ByteBuffer metadata) throws TableMetadataException { if (metadata.limit() - metadata.position() >= mMaxTableMetadataBytes) { - throw new TachyonException("Too big table metadata: " + metadata.toString()); + throw new TableMetadataException("Too big table metadata: " + metadata.toString()); } } } diff --git a/servers/src/main/java/tachyon/master/rawtable/RawTableMasterServiceHandler.java b/servers/src/main/java/tachyon/master/rawtable/RawTableMasterServiceHandler.java index 8ef972167cc3..c79ee2e376ac 100644 --- a/servers/src/main/java/tachyon/master/rawtable/RawTableMasterServiceHandler.java +++ b/servers/src/main/java/tachyon/master/rawtable/RawTableMasterServiceHandler.java @@ -15,18 +15,15 @@ package tachyon.master.rawtable; +import java.io.IOException; import java.nio.ByteBuffer; -import org.apache.thrift.TException; - import tachyon.TachyonURI; -import tachyon.thrift.FileAlreadyExistException; -import tachyon.thrift.InvalidPathException; +import tachyon.exception.TachyonException; import tachyon.thrift.RawTableInfo; import tachyon.thrift.RawTableMasterService; -import tachyon.thrift.TableColumnException; -import tachyon.thrift.TableDoesNotExistException; -import tachyon.thrift.TachyonException; +import tachyon.thrift.TachyonTException; +import tachyon.thrift.ThriftIOException; public class RawTableMasterServiceHandler implements RawTableMasterService.Iface { private final RawTableMaster mRawTableMaster; @@ -35,34 +32,55 @@ public RawTableMasterServiceHandler(RawTableMaster rawTableMaster) { mRawTableMaster = rawTableMaster; } + // TODO(jiri) Reduce exception handling boilerplate here @Override public long createRawTable(String path, int columns, ByteBuffer metadata) - throws FileAlreadyExistException, InvalidPathException, TableColumnException, - TachyonException, TException { - return mRawTableMaster.createRawTable(new TachyonURI(path), columns, metadata); + throws TachyonTException, ThriftIOException { + try { + return mRawTableMaster.createRawTable(new TachyonURI(path), columns, metadata); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } catch (IOException e) { + throw new ThriftIOException(e.getMessage()); + } } @Override - public long getRawTableId(String path) - throws InvalidPathException, TableDoesNotExistException, TException { - return mRawTableMaster.getRawTableId(new TachyonURI(path)); + public long getRawTableId(String path) throws TachyonTException { + try { + return mRawTableMaster.getRawTableId(new TachyonURI(path)); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public RawTableInfo getClientRawTableInfoById(long id) - throws TableDoesNotExistException, TException { - return mRawTableMaster.getClientRawTableInfo(id); + public RawTableInfo getClientRawTableInfoById(long id) throws TachyonTException { + try { + return mRawTableMaster.getClientRawTableInfo(id); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public RawTableInfo getClientRawTableInfoByPath(String path) - throws TableDoesNotExistException, InvalidPathException, TException { - return mRawTableMaster.getClientRawTableInfo(new TachyonURI(path)); + public RawTableInfo getClientRawTableInfoByPath(String path) throws TachyonTException { + try { + return mRawTableMaster.getClientRawTableInfo(new TachyonURI(path)); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } } @Override - public void updateRawTableMetadata(long tableId, ByteBuffer metadata) - throws TableDoesNotExistException, TachyonException, TException { - mRawTableMaster.updateRawTableMetadata(tableId, metadata); + public void updateRawTableMetadata(long tableId, ByteBuffer metadata) throws TachyonTException, + ThriftIOException { + try { + mRawTableMaster.updateRawTableMetadata(tableId, metadata); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } catch (IOException e) { + throw new ThriftIOException(e.getMessage()); + } } } diff --git a/servers/src/main/java/tachyon/master/rawtable/meta/RawTables.java b/servers/src/main/java/tachyon/master/rawtable/meta/RawTables.java index c8858cb977d2..0b6b88873df7 100644 --- a/servers/src/main/java/tachyon/master/rawtable/meta/RawTables.java +++ b/servers/src/main/java/tachyon/master/rawtable/meta/RawTables.java @@ -20,9 +20,9 @@ import tachyon.collections.IndexedSet; import tachyon.exception.ExceptionMessage; +import tachyon.exception.TableDoesNotExistException; import tachyon.master.journal.JournalCheckpointStreamable; import tachyon.master.journal.JournalOutputStream; -import tachyon.thrift.TableDoesNotExistException; import tachyon.util.io.BufferUtils; /** diff --git a/servers/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java b/servers/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java index 8e2abfc313d3..d09c92c8eec1 100644 --- a/servers/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java +++ b/servers/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java @@ -36,13 +36,13 @@ import tachyon.client.file.TachyonFileSystem.TachyonFileSystemFactory; import tachyon.client.file.options.InStreamOptions; import tachyon.conf.TachyonConf; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.exception.TachyonException; import tachyon.master.TachyonMaster; import tachyon.thrift.BlockLocation; import tachyon.thrift.FileBlockInfo; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; import tachyon.thrift.NetAddress; import tachyon.util.io.PathUtils; diff --git a/servers/src/main/java/tachyon/web/WebInterfaceDependencyServlet.java b/servers/src/main/java/tachyon/web/WebInterfaceDependencyServlet.java index f5cfe97a795b..5f7bdae58986 100644 --- a/servers/src/main/java/tachyon/web/WebInterfaceDependencyServlet.java +++ b/servers/src/main/java/tachyon/web/WebInterfaceDependencyServlet.java @@ -27,10 +27,10 @@ import com.google.common.base.Preconditions; +import tachyon.exception.DependencyDoesNotExistException; +import tachyon.exception.FileDoesNotExistException; import tachyon.master.TachyonMaster; -import tachyon.thrift.DependencyDoesNotExistException; import tachyon.thrift.DependencyInfo; -import tachyon.thrift.FileDoesNotExistException; public final class WebInterfaceDependencyServlet extends HttpServlet { private static final long serialVersionUID = 2071462168900313417L; diff --git a/servers/src/main/java/tachyon/web/WebInterfaceDownloadServlet.java b/servers/src/main/java/tachyon/web/WebInterfaceDownloadServlet.java index b7f0c57e94d2..0d569b855a99 100644 --- a/servers/src/main/java/tachyon/web/WebInterfaceDownloadServlet.java +++ b/servers/src/main/java/tachyon/web/WebInterfaceDownloadServlet.java @@ -38,11 +38,11 @@ import tachyon.client.file.TachyonFileSystem.TachyonFileSystemFactory; import tachyon.client.file.options.InStreamOptions; import tachyon.conf.TachyonConf; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.exception.TachyonException; import tachyon.master.file.FileSystemMaster; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; /** * Servlet for downloading a file diff --git a/servers/src/main/java/tachyon/web/WebInterfaceMemoryServlet.java b/servers/src/main/java/tachyon/web/WebInterfaceMemoryServlet.java index 0e1cd16726f5..a19c8c184063 100644 --- a/servers/src/main/java/tachyon/web/WebInterfaceMemoryServlet.java +++ b/servers/src/main/java/tachyon/web/WebInterfaceMemoryServlet.java @@ -28,10 +28,10 @@ import com.google.common.base.Preconditions; import tachyon.TachyonURI; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.master.TachyonMaster; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; /** * Servlet that provides data for displaying which files are currently in memory. diff --git a/servers/src/main/java/tachyon/web/WebInterfaceWorkerBlockInfoServlet.java b/servers/src/main/java/tachyon/web/WebInterfaceWorkerBlockInfoServlet.java index 8fef8d7874bf..d843b8e104de 100644 --- a/servers/src/main/java/tachyon/web/WebInterfaceWorkerBlockInfoServlet.java +++ b/servers/src/main/java/tachyon/web/WebInterfaceWorkerBlockInfoServlet.java @@ -36,10 +36,10 @@ import tachyon.client.file.TachyonFileSystem; import tachyon.client.file.TachyonFileSystem.TachyonFileSystemFactory; import tachyon.conf.TachyonConf; -import tachyon.exception.NotFoundException; +import tachyon.exception.BlockDoesNotExistException; +import tachyon.exception.FileDoesNotExistException; import tachyon.exception.TachyonException; import tachyon.master.block.BlockId; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; import tachyon.worker.block.BlockDataManager; import tachyon.worker.block.BlockStoreMeta; @@ -93,8 +93,8 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) getServletContext().getRequestDispatcher("/worker/blockInfo.jsp").forward(request, response); return; - } catch (NotFoundException nfe) { - request.setAttribute("fatalError", "Error: block not found. " + nfe.getMessage()); + } catch (BlockDoesNotExistException bnfe) { + request.setAttribute("fatalError", "Error: block not found. " + bnfe.getMessage()); getServletContext().getRequestDispatcher("/worker/blockInfo.jsp").forward(request, response); return; @@ -137,8 +137,8 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) request.setAttribute("fatalError", iae.getLocalizedMessage()); getServletContext().getRequestDispatcher("/worker/blockInfo.jsp").forward(request, response); return; - } catch (NotFoundException nfe) { - request.setAttribute("fatalError", nfe.getLocalizedMessage()); + } catch (BlockDoesNotExistException bnfe) { + request.setAttribute("fatalError", bnfe.getLocalizedMessage()); getServletContext().getRequestDispatcher("/worker/blockInfo.jsp").forward(request, response); return; } @@ -176,7 +176,7 @@ private List getSortedFileIds() { * @throws IOException */ private UiFileInfo getUiFileInfo(TachyonFileSystem tachyonFileSystem, long fileId) - throws FileDoesNotExistException, NotFoundException, IOException { + throws FileDoesNotExistException, BlockDoesNotExistException, IOException { return getUiFileInfo(tachyonFileSystem, fileId, TachyonURI.EMPTY_URI); } @@ -190,7 +190,7 @@ private UiFileInfo getUiFileInfo(TachyonFileSystem tachyonFileSystem, long fileI * @throws IOException */ private UiFileInfo getUiFileInfo(TachyonFileSystem tachyonFileSystem, TachyonURI filePath) - throws FileDoesNotExistException, NotFoundException, IOException { + throws FileDoesNotExistException, BlockDoesNotExistException, IOException { return getUiFileInfo(tachyonFileSystem, -1, filePath); } @@ -205,7 +205,8 @@ private UiFileInfo getUiFileInfo(TachyonFileSystem tachyonFileSystem, TachyonURI * @throws IOException */ private UiFileInfo getUiFileInfo(TachyonFileSystem tachyonFileSystem, long fileId, - TachyonURI filePath) throws FileDoesNotExistException, NotFoundException, IOException { + TachyonURI filePath) throws FileDoesNotExistException, IOException, + BlockDoesNotExistException { TachyonFile file = null; if (fileId == -1) { file = new TachyonFile(fileId); diff --git a/servers/src/main/java/tachyon/worker/block/BlockDataManager.java b/servers/src/main/java/tachyon/worker/block/BlockDataManager.java index 483142d68c83..3d2e7560b579 100644 --- a/servers/src/main/java/tachyon/worker/block/BlockDataManager.java +++ b/servers/src/main/java/tachyon/worker/block/BlockDataManager.java @@ -25,14 +25,15 @@ import tachyon.client.UnderStorageType; import tachyon.client.WorkerBlockMasterClient; import tachyon.client.WorkerFileSystemMasterClient; -import tachyon.exception.AlreadyExistsException; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; -import tachyon.exception.OutOfSpaceException; +import tachyon.conf.TachyonConf; +import tachyon.exception.BlockAlreadyExistsException; +import tachyon.exception.BlockDoesNotExistException; +import tachyon.exception.FailedToCheckpointException; +import tachyon.exception.InvalidWorkerStateException; +import tachyon.exception.TachyonException; +import tachyon.exception.WorkerOutOfSpaceException; import tachyon.test.Testable; import tachyon.test.Tester; -import tachyon.thrift.FailedToCheckpointException; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; import tachyon.underfs.UnderFileSystem; import tachyon.util.io.FileUtils; @@ -91,7 +92,7 @@ public void setMetricsReporter(BlockMetricsReporter reporter) { public BlockDataManager(WorkerSource workerSource, WorkerBlockMasterClient workerBlockMasterClient, WorkerFileSystemMasterClient workerFileSystemMasterClient, BlockStore blockStore) - throws IOException { + throws IOException { mHeartbeatReporter = new BlockHeartbeatReporter(); mBlockStore = blockStore; mWorkerSource = workerSource; @@ -116,13 +117,13 @@ public void grantAccess(Tester tester) { * * @param sessionId The id of the client * @param blockId The id of the block to be aborted - * @throws AlreadyExistsException if blockId already exists in committed blocks - * @throws NotFoundException if the temporary block cannot be found - * @throws InvalidStateException if blockId does not belong to sessionId + * @throws BlockAlreadyExistsException if blockId already exists in committed blocks + * @throws BlockDoesNotExistException if the temporary block cannot be found + * @throws InvalidWorkerStateException if blockId does not belong to sessionId * @throws IOException if temporary block cannot be deleted */ - public void abortBlock(long sessionId, long blockId) throws AlreadyExistsException, - NotFoundException, InvalidStateException, IOException { + public void abortBlock(long sessionId, long blockId) throws BlockAlreadyExistsException, + BlockDoesNotExistException, InvalidWorkerStateException, IOException { mBlockStore.abortBlock(sessionId, blockId); } @@ -132,9 +133,10 @@ public void abortBlock(long sessionId, long blockId) throws AlreadyExistsExcepti * * @param sessionId The id of the client * @param blockId The id of the block to access - * @throws NotFoundException this exception is not thrown in the tiered block store implementation + * @throws BlockDoesNotExistException this exception is not thrown in the tiered block store + * implementation */ - public void accessBlock(long sessionId, long blockId) throws NotFoundException { + public void accessBlock(long sessionId, long blockId) throws BlockDoesNotExistException { mBlockStore.accessBlock(sessionId, blockId); } @@ -149,10 +151,11 @@ public void accessBlock(long sessionId, long blockId) throws NotFoundException { * @param fileId a file id * @param nonce a nonce used for temporary file creation * @param ufsPath the UFS path of the file - * @throws TException if the file does not exist or cannot be renamed + * @throws TachyonTException if the file does not exist or cannot be renamed * @throws IOException if the update to the master fails */ - public void persistFile(long fileId, long nonce, String ufsPath) throws TException, IOException { + public void persistFile(long fileId, long nonce, String ufsPath) + throws TachyonException, IOException { String tmpPath = PathUtils.temporaryFileName(fileId, nonce, ufsPath); UnderFileSystem ufs = UnderFileSystem.get(tmpPath, WorkerContext.getConf()); try { @@ -166,8 +169,8 @@ public void persistFile(long fileId, long nonce, String ufsPath) throws TExcepti throw new FailedToCheckpointException("Failed to rename " + tmpPath + " to " + ufsPath); } } catch (IOException ioe) { - throw new FailedToCheckpointException("Failed to rename " + tmpPath + " to " + ufsPath + ": " - + ioe); + throw new FailedToCheckpointException( + "Failed to rename " + tmpPath + " to " + ufsPath + ": " + ioe); } long fileSize; try { @@ -196,14 +199,15 @@ public void cleanupSessions() { * * @param sessionId The id of the client * @param blockId The id of the block to commit - * @throws AlreadyExistsException if blockId already exists in committed blocks - * @throws NotFoundException if the temporary block cannot be found - * @throws InvalidStateException if blockId does not belong to sessionId + * @throws BlockAlreadyExistsException if blockId already exists in committed blocks + * @throws BlockDoesNotExistException if the temporary block cannot be found + * @throws InvalidWorkerStateException if blockId does not belong to sessionId * @throws IOException if the block cannot be moved from temporary path to committed path - * @throws OutOfSpaceException if there is no more space left to hold the block + * @throws WorkerOutOfSpaceException if there is no more space left to hold the block */ - public void commitBlock(long sessionId, long blockId) throws AlreadyExistsException, - NotFoundException, InvalidStateException, IOException, OutOfSpaceException { + public void commitBlock(long sessionId, long blockId) + throws BlockAlreadyExistsException, BlockDoesNotExistException, InvalidWorkerStateException, + IOException, WorkerOutOfSpaceException { mBlockStore.commitBlock(sessionId, blockId); // TODO)(calvin): Reconsider how to do this without heavy locking. @@ -233,20 +237,23 @@ public void commitBlock(long sessionId, long blockId) throws AlreadyExistsExcept * @param initialBytes The initial amount of bytes to be allocated * @return A string representing the path to the local file * @throws IllegalArgumentException if location does not belong to tiered storage - * @throws AlreadyExistsException if blockId already exists, either temporary or committed, or - * block in eviction plan already exists - * @throws OutOfSpaceException if this Store has no more space than the initialBlockSize - * @throws NotFoundException if blocks in eviction plan can not be found + * @throws BlockAlreadyExistsException if blockId already exists, either temporary or committed, + * or block in eviction plan already exists + * @throws WorkerOutOfSpaceException if this Store has no more space than the initialBlockSize + * @throws BlockDoesNotExistException if blocks in eviction plan can not be found * @throws IOException if blocks in eviction plan fail to be moved or deleted - * @throws InvalidStateException if blocks to be moved/deleted in eviction plan is uncommitted + * @throws InvalidWorkerStateException if blocks to be moved/deleted in eviction plan is + * uncommitted */ - // TODO(cc): Exceptions like NotFoundException, IOException and InvalidStateException here - // involves implementation details, also, AlreadyExistsException has two possible semantic now, + // TODO(cc): Exceptions like BlockDoesNotExistException, IOException and + // InvalidWorkerStateException here + // involves implementation details, also, BlockAlreadyExistsException has two possible semantic + // now, // these are because we propagate any exception in freeSpaceInternal, revisit this by throwing // more general exception. public String createBlock(long sessionId, long blockId, int tierAlias, long initialBytes) - throws AlreadyExistsException, OutOfSpaceException, NotFoundException, IOException, - InvalidStateException { + throws BlockAlreadyExistsException, WorkerOutOfSpaceException, BlockDoesNotExistException, + IOException, InvalidWorkerStateException { BlockStoreLocation loc = tierAlias == -1 ? BlockStoreLocation.anyTier() : BlockStoreLocation.anyDirInTier(tierAlias); TempBlockMeta createdBlock = mBlockStore.createBlockMeta(sessionId, blockId, loc, initialBytes); @@ -263,20 +270,23 @@ public String createBlock(long sessionId, long blockId, int tierAlias, long init * @param tierAlias The alias of the tier to place the new block in, -1 for any tier * @param initialBytes The initial amount of bytes to be allocated * @throws IllegalArgumentException if location does not belong to tiered storage - * @throws AlreadyExistsException if blockId already exists, either temporary or committed, or - * block in eviction plan already exists - * @throws OutOfSpaceException if this Store has no more space than the initialBlockSize - * @throws NotFoundException if blocks in eviction plan can not be found + * @throws BlockAlreadyExistsException if blockId already exists, either temporary or committed, + * or block in eviction plan already exists + * @throws WorkerOutOfSpaceException if this Store has no more space than the initialBlockSize + * @throws BlockDoesNotExistException if blocks in eviction plan can not be found * @throws IOException if blocks in eviction plan fail to be moved or deleted - * @throws InvalidStateException if blocks to be moved/deleted in eviction plan is uncommitted + * @throws InvalidWorkerStateException if blocks to be moved/deleted in eviction plan is + * uncommitted */ - // TODO(cc): Exceptions like NotFoundException, IOException and InvalidStateException here - // involves implementation details, also, AlreadyExistsException has two possible semantic now, + // TODO(cc): Exceptions like BlockDoesNotExistException, IOException and + // InvalidWorkerStateException here + // involves implementation details, also, BlockAlreadyExistsException has two possible semantic + // now, // these are because we propagate any exception in freeSpaceInternal, revisit this by throwing // more general exception. public void createBlockRemote(long sessionId, long blockId, int tierAlias, long initialBytes) - throws AlreadyExistsException, OutOfSpaceException, NotFoundException, IOException, - InvalidStateException { + throws BlockAlreadyExistsException, WorkerOutOfSpaceException, BlockDoesNotExistException, + IOException, InvalidWorkerStateException { BlockStoreLocation loc = BlockStoreLocation.anyDirInTier(tierAlias); TempBlockMeta createdBlock = mBlockStore.createBlockMeta(sessionId, blockId, loc, initialBytes); FileUtils.createBlockPath(createdBlock.getPath()); @@ -288,15 +298,15 @@ public void createBlockRemote(long sessionId, long blockId, int tierAlias, long * @param sessionId the session ID * @param availableBytes the amount of free space in bytes * @param tierAlias the alias of the tier to free space - * @throws OutOfSpaceException if there is not enough space - * @throws NotFoundException if blocks can not be found + * @throws WorkerOutOfSpaceException if there is not enough space + * @throws BlockDoesNotExistException if blocks can not be found * @throws IOException if blocks fail to be moved or deleted on file system - * @throws AlreadyExistsException if blocks to move already exists in destination location - * @throws InvalidStateException if blocks to move/evict is uncommitted + * @throws BlockAlreadyExistsException if blocks to move already exists in destination location + * @throws InvalidWorkerStateException if blocks to move/evict is uncommitted */ public void freeSpace(long sessionId, long availableBytes, int tierAlias) - throws OutOfSpaceException, NotFoundException, IOException, AlreadyExistsException, - InvalidStateException { + throws WorkerOutOfSpaceException, BlockDoesNotExistException, IOException, + BlockAlreadyExistsException, InvalidWorkerStateException { BlockStoreLocation location = BlockStoreLocation.anyDirInTier(tierAlias); mBlockStore.freeSpace(sessionId, availableBytes, location); } @@ -310,11 +320,11 @@ public void freeSpace(long sessionId, long availableBytes, int tierAlias) * @param sessionId The id of the client * @param blockId The id of the block to be opened for writing * @return the block writer for the local block file - * @throws NotFoundException if the block cannot be found + * @throws BlockDoesNotExistException if the block cannot be found * @throws IOException if block cannot be created */ public BlockWriter getTempBlockWriterRemote(long sessionId, long blockId) - throws NotFoundException, IOException { + throws BlockDoesNotExistException, IOException { return mBlockStore.getBlockWriter(sessionId, blockId); } @@ -344,9 +354,9 @@ public BlockStoreMeta getStoreMeta() { * * @param blockId the block ID * @return metadata of the block - * @throws NotFoundException if no BlockMeta for this blockId is found + * @throws BlockDoesNotExistException if no BlockMeta for this blockId is found */ - public BlockMeta getVolatileBlockMeta(long blockId) throws NotFoundException { + public BlockMeta getVolatileBlockMeta(long blockId) throws BlockDoesNotExistException { return mBlockStore.getVolatileBlockMeta(blockId); } @@ -366,9 +376,9 @@ public boolean hasBlockMeta(long blockId) { * @param sessionId The id of the client * @param blockId The id of the block to be locked * @return the lockId that uniquely identifies the lock obtained - * @throws NotFoundException if blockId cannot be found, for example, evicted already. + * @throws BlockDoesNotExistException if blockId cannot be found, for example, evicted already. */ - public long lockBlock(long sessionId, long blockId) throws NotFoundException { + public long lockBlock(long sessionId, long blockId) throws BlockDoesNotExistException { return mBlockStore.lockBlock(sessionId, blockId); } @@ -380,14 +390,17 @@ public long lockBlock(long sessionId, long blockId) throws NotFoundException { * @param blockId The id of the block to move * @param tierAlias The tier to move the block to * @throws IllegalArgumentException if tierAlias is out of range of tiered storage - * @throws NotFoundException if blockId cannot be found - * @throws AlreadyExistsException if blockId already exists in committed blocks of the newLocation - * @throws InvalidStateException if blockId has not been committed - * @throws OutOfSpaceException if newLocation does not have enough extra space to hold the block + * @throws BlockDoesNotExistException if blockId cannot be found + * @throws BlockAlreadyExistsException if blockId already exists in committed blocks of the + * newLocation + * @throws InvalidWorkerStateException if blockId has not been committed + * @throws WorkerOutOfSpaceException if newLocation does not have enough extra space to hold the + * block * @throws IOException if block cannot be moved from current location to newLocation */ - public void moveBlock(long sessionId, long blockId, int tierAlias) throws NotFoundException, - AlreadyExistsException, InvalidStateException, OutOfSpaceException, IOException { + public void moveBlock(long sessionId, long blockId, int tierAlias) + throws BlockDoesNotExistException, BlockAlreadyExistsException, InvalidWorkerStateException, + WorkerOutOfSpaceException, IOException { BlockStoreLocation dst = BlockStoreLocation.anyDirInTier(tierAlias); mBlockStore.moveBlock(sessionId, blockId, dst); } @@ -400,13 +413,13 @@ public void moveBlock(long sessionId, long blockId, int tierAlias) throws NotFou * @param blockId The id of the block to read * @param lockId The id of the lock on this block * @return a string representing the path to this block in local storage - * @throws NotFoundException if the blockId cannot be found in committed blocks or lockId cannot - * be found - * @throws InvalidStateException if sessionId or blockId is not the same as that in the LockRecord - * of lockId + * @throws BlockDoesNotExistException if the blockId cannot be found in committed blocks or lockId + * cannot be found + * @throws InvalidWorkerStateException if sessionId or blockId is not the same as that in the + * LockRecord of lockId */ - public String readBlock(long sessionId, long blockId, long lockId) throws NotFoundException, - InvalidStateException { + public String readBlock(long sessionId, long blockId, long lockId) + throws BlockDoesNotExistException, InvalidWorkerStateException { BlockMeta meta = mBlockStore.getBlockMeta(sessionId, blockId, lockId); return meta.getPath(); } @@ -418,13 +431,13 @@ public String readBlock(long sessionId, long blockId, long lockId) throws NotFou * @param blockId The id of the block to read * @param lockId The id of the lock on this block * @return the block reader for the block - * @throws NotFoundException if lockId is not found - * @throws InvalidStateException if sessionId or blockId is not the same as that in the LockRecord - * of lockId + * @throws BlockDoesNotExistException if lockId is not found + * @throws InvalidWorkerStateException if sessionId or blockId is not the same as that in the + * LockRecord of lockId * @throws IOException if block cannot be read */ public BlockReader readBlockRemote(long sessionId, long blockId, long lockId) - throws NotFoundException, InvalidStateException, IOException { + throws BlockDoesNotExistException, InvalidWorkerStateException, IOException { return mBlockStore.getBlockReader(sessionId, blockId, lockId); } @@ -433,12 +446,12 @@ public BlockReader readBlockRemote(long sessionId, long blockId, long lockId) * * @param sessionId The id of the client * @param blockId The id of the block to be freed - * @throws InvalidStateException if blockId has not been committed - * @throws NotFoundException if block cannot be found + * @throws InvalidWorkerStateException if blockId has not been committed + * @throws BlockDoesNotExistException if block cannot be found * @throws IOException if block cannot be removed from current path */ - public void removeBlock(long sessionId, long blockId) throws InvalidStateException, - NotFoundException, IOException { + public void removeBlock(long sessionId, long blockId) + throws InvalidWorkerStateException, BlockDoesNotExistException, IOException { mBlockStore.removeBlock(sessionId, blockId); } @@ -449,23 +462,25 @@ public void removeBlock(long sessionId, long blockId) throws InvalidStateExcepti * @param sessionId The id of the client * @param blockId The id of the block to allocate space to * @param additionalBytes The amount of bytes to allocate - * @throws NotFoundException if blockId can not be found, or some block in eviction plan cannot be - * found - * @throws OutOfSpaceException if requested space can not be satisfied + * @throws BlockDoesNotExistException if blockId can not be found, or some block in eviction plan + * cannot be found + * @throws WorkerOutOfSpaceException if requested space can not be satisfied * @throws IOException if blocks in {@link tachyon.worker.block.evictor.EvictionPlan} fail to be * moved or deleted on file system - * @throws AlreadyExistsException if blocks to move in + * @throws BlockAlreadyExistsException if blocks to move in * {@link tachyon.worker.block.evictor.EvictionPlan} already exists in destination * location - * @throws InvalidStateException if the space requested is less than current space or blocks to - * move/evict in {@link tachyon.worker.block.evictor.EvictionPlan} is uncommitted + * @throws InvalidWorkerStateException if the space requested is less than current space or blocks + * to move/evict in {@link tachyon.worker.block.evictor.EvictionPlan} is uncommitted */ - // TODO(cc): Exceptions like IOException AlreadyExistsException and InvalidStateException here - // involves implementation details, also, NotFoundException has two semantic now, revisit this + // TODO(cc): Exceptions like IOException BlockAlreadyExistsException and + // InvalidWorkerStateException here + // involves implementation details, also, BlockDoesNotExistException has two semantic now, revisit + // this // with a more general exception. public void requestSpace(long sessionId, long blockId, long additionalBytes) - throws NotFoundException, OutOfSpaceException, IOException, AlreadyExistsException, - InvalidStateException { + throws BlockDoesNotExistException, WorkerOutOfSpaceException, IOException, + BlockAlreadyExistsException, InvalidWorkerStateException { mBlockStore.requestSpace(sessionId, blockId, additionalBytes); } @@ -497,14 +512,14 @@ public void stop() {} * Relinquishes the lock with the specified lock id. * * @param lockId The id of the lock to relinquish - * @throws NotFoundException if lockId cannot be found + * @throws BlockDoesNotExistException if lockId cannot be found */ - public void unlockBlock(long lockId) throws NotFoundException { + public void unlockBlock(long lockId) throws BlockDoesNotExistException { mBlockStore.unlockBlock(lockId); } // TODO(calvin): Remove when lock and reads are separate operations. - public void unlockBlock(long sessionId, long blockId) throws NotFoundException { + public void unlockBlock(long sessionId, long blockId) throws BlockDoesNotExistException { mBlockStore.unlockBlock(sessionId, blockId); } @@ -533,10 +548,9 @@ public void updatePinList(Set pinnedInodes) { * * @param fileId the file id * @return the file info - * @throws FileDoesNotExistException if the file does not exist * @throws IOException if an I/O error occurs */ - public FileInfo getFileInfo(long fileId) throws FileDoesNotExistException, IOException { + public FileInfo getFileInfo(long fileId) throws IOException { return mFileSystemMasterClient.getFileInfo(fileId); } } diff --git a/servers/src/main/java/tachyon/worker/block/BlockLockManager.java b/servers/src/main/java/tachyon/worker/block/BlockLockManager.java index 1252b3013404..828467d3e274 100644 --- a/servers/src/main/java/tachyon/worker/block/BlockLockManager.java +++ b/servers/src/main/java/tachyon/worker/block/BlockLockManager.java @@ -30,9 +30,9 @@ import com.google.common.hash.Hashing; import tachyon.Constants; +import tachyon.exception.BlockDoesNotExistException; import tachyon.exception.ExceptionMessage; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; +import tachyon.exception.InvalidWorkerStateException; import tachyon.worker.WorkerContext; /** @@ -109,17 +109,18 @@ public long lockBlock(long sessionId, long blockId, BlockLockType blockLockType) } /** - * Releases a lock by its lockId or throws NotFoundException. + * Releases a lock by its lockId or throws BlockDoesNotExistException. * * @param lockId the ID of the lock - * @throws NotFoundException if no lock is associated with this lock id + * @throws BlockDoesNotExistException if no lock is associated with this lock id */ - public void unlockBlock(long lockId) throws NotFoundException { + public void unlockBlock(long lockId) throws BlockDoesNotExistException { Lock lock; synchronized (mSharedMapsLock) { LockRecord record = mLockIdToRecordMap.get(lockId); if (record == null) { - throw new NotFoundException(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_LOCK_ID, lockId); + throw new BlockDoesNotExistException(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_LOCK_ID, + lockId); } long sessionId = record.sessionId(); lock = record.lock(); @@ -134,13 +135,14 @@ public void unlockBlock(long lockId) throws NotFoundException { } // TODO(bin): Temporary, remove me later. - public void unlockBlock(long sessionId, long blockId) throws NotFoundException { + public void unlockBlock(long sessionId, long blockId) throws BlockDoesNotExistException { synchronized (mSharedMapsLock) { Set sessionLockIds = mSessionIdToLockIdsMap.get(sessionId); for (long lockId : sessionLockIds) { LockRecord record = mLockIdToRecordMap.get(lockId); if (record == null) { - throw new NotFoundException(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_LOCK_ID, lockId); + throw new BlockDoesNotExistException(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_LOCK_ID, + lockId); } if (blockId == record.blockId()) { mLockIdToRecordMap.remove(lockId); @@ -153,8 +155,8 @@ public void unlockBlock(long sessionId, long blockId) throws NotFoundException { return; } } - throw new NotFoundException(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_BLOCK_AND_SESSION, - blockId, sessionId); + throw new BlockDoesNotExistException( + ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_BLOCK_AND_SESSION, blockId, sessionId); } } @@ -164,23 +166,24 @@ public void unlockBlock(long sessionId, long blockId) throws NotFoundException { * @param sessionId The ID of the session * @param blockId The ID of the block * @param lockId The ID of the lock - * @throws NotFoundException when no lock record can be found for lockId - * @throws InvalidStateException when sessionId or blockId is not consistent with that in the lock - * record for lockId + * @throws BlockDoesNotExistException when no lock record can be found for lockId + * @throws InvalidWorkerStateException when sessionId or blockId is not consistent with that in + * the lock record for lockId */ public void validateLock(long sessionId, long blockId, long lockId) - throws NotFoundException, InvalidStateException { + throws BlockDoesNotExistException, InvalidWorkerStateException { synchronized (mSharedMapsLock) { LockRecord record = mLockIdToRecordMap.get(lockId); if (record == null) { - throw new NotFoundException(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_LOCK_ID, lockId); + throw new BlockDoesNotExistException(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_LOCK_ID, + lockId); } if (sessionId != record.sessionId()) { - throw new InvalidStateException(ExceptionMessage.LOCK_ID_FOR_DIFFERENT_SESSION, lockId, - record.sessionId(), sessionId); + throw new InvalidWorkerStateException(ExceptionMessage.LOCK_ID_FOR_DIFFERENT_SESSION, + lockId, record.sessionId(), sessionId); } if (blockId != record.blockId()) { - throw new InvalidStateException(ExceptionMessage.LOCK_ID_FOR_DIFFERENT_BLOCK, lockId, + throw new InvalidWorkerStateException(ExceptionMessage.LOCK_ID_FOR_DIFFERENT_BLOCK, lockId, record.blockId(), blockId); } } diff --git a/servers/src/main/java/tachyon/worker/block/BlockMasterSync.java b/servers/src/main/java/tachyon/worker/block/BlockMasterSync.java index 52c44f0e6c4d..7d4201fa12e1 100644 --- a/servers/src/main/java/tachyon/worker/block/BlockMasterSync.java +++ b/servers/src/main/java/tachyon/worker/block/BlockMasterSync.java @@ -26,8 +26,8 @@ import tachyon.Sessions; import tachyon.client.WorkerBlockMasterClient; import tachyon.conf.TachyonConf; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; +import tachyon.exception.BlockDoesNotExistException; +import tachyon.exception.InvalidWorkerStateException; import tachyon.thrift.Command; import tachyon.thrift.NetAddress; import tachyon.util.CommonUtils; @@ -247,9 +247,9 @@ public void run() { LOG.info("Block " + mBlockId + " removed at session " + mSessionId); } catch (IOException ioe) { LOG.warn("Failed master free block cmd for: " + mBlockId + " due to concurrent read."); - } catch (InvalidStateException e) { + } catch (InvalidWorkerStateException e) { LOG.warn("Failed master free block cmd for: " + mBlockId + " due to block uncommitted."); - } catch (NotFoundException e) { + } catch (BlockDoesNotExistException e) { LOG.warn("Failed master free block cmd for: " + mBlockId + " due to block not found."); } } diff --git a/servers/src/main/java/tachyon/worker/block/BlockMetadataManager.java b/servers/src/main/java/tachyon/worker/block/BlockMetadataManager.java index 973c2ed3fd06..a7db2ae83b13 100644 --- a/servers/src/main/java/tachyon/worker/block/BlockMetadataManager.java +++ b/servers/src/main/java/tachyon/worker/block/BlockMetadataManager.java @@ -27,11 +27,11 @@ import com.google.common.base.Preconditions; import tachyon.Constants; -import tachyon.exception.AlreadyExistsException; +import tachyon.exception.BlockAlreadyExistsException; +import tachyon.exception.BlockDoesNotExistException; import tachyon.exception.ExceptionMessage; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; -import tachyon.exception.OutOfSpaceException; +import tachyon.exception.InvalidWorkerStateException; +import tachyon.exception.WorkerOutOfSpaceException; import tachyon.worker.WorkerContext; import tachyon.worker.block.meta.BlockMeta; import tachyon.worker.block.meta.BlockMetaBase; @@ -69,18 +69,18 @@ public static BlockMetadataManager newBlockMetadataManager() { ret.initBlockMetadataManager(); // caller of newBlockMetadataManager should not be forced to catch and handle these exceptions // since it is the responsibility of BlockMetadataManager. - } catch (AlreadyExistsException aee) { + } catch (BlockAlreadyExistsException aee) { throw new RuntimeException(aee); } catch (IOException ioe) { throw new RuntimeException(ioe); - } catch (OutOfSpaceException ooe) { + } catch (WorkerOutOfSpaceException ooe) { throw new RuntimeException(ooe); } return ret; } - private void initBlockMetadataManager() throws AlreadyExistsException, IOException, - OutOfSpaceException { + private void initBlockMetadataManager() throws BlockAlreadyExistsException, IOException, + WorkerOutOfSpaceException { // Initialize storage tiers int totalTiers = WorkerContext.getConf().getInt(Constants.WORKER_MAX_TIERED_STORAGE_LEVEL); mAliasToTiers = new HashMap(totalTiers); @@ -96,9 +96,9 @@ private void initBlockMetadataManager() throws AlreadyExistsException, IOExcepti * Aborts a temp block. * * @param tempBlockMeta the meta data of the temp block to add - * @throws NotFoundException when block can not be found + * @throws BlockDoesNotExistException when block can not be found */ - public void abortTempBlockMeta(TempBlockMeta tempBlockMeta) throws NotFoundException { + public void abortTempBlockMeta(TempBlockMeta tempBlockMeta) throws BlockDoesNotExistException { StorageDir dir = tempBlockMeta.getParentDir(); dir.removeTempBlockMeta(tempBlockMeta); } @@ -107,11 +107,11 @@ public void abortTempBlockMeta(TempBlockMeta tempBlockMeta) throws NotFoundExcep * Adds a temp block. * * @param tempBlockMeta the meta data of the temp block to add - * @throws OutOfSpaceException when no more space left to hold the block - * @throws AlreadyExistsException when the block already exists + * @throws WorkerOutOfSpaceException when no more space left to hold the block + * @throws BlockAlreadyExistsException when the block already exists */ - public void addTempBlockMeta(TempBlockMeta tempBlockMeta) throws OutOfSpaceException, - AlreadyExistsException { + public void addTempBlockMeta(TempBlockMeta tempBlockMeta) throws WorkerOutOfSpaceException, + BlockAlreadyExistsException { StorageDir dir = tempBlockMeta.getParentDir(); dir.addTempBlockMeta(tempBlockMeta); } @@ -120,12 +120,12 @@ public void addTempBlockMeta(TempBlockMeta tempBlockMeta) throws OutOfSpaceExcep * Commits a temp block. * * @param tempBlockMeta the meta data of the temp block to commit - * @throws OutOfSpaceException when no more space left to hold the block - * @throws AlreadyExistsException when the block already exists in committed blocks - * @throws NotFoundException when temp block can not be found + * @throws WorkerOutOfSpaceException when no more space left to hold the block + * @throws BlockAlreadyExistsException when the block already exists in committed blocks + * @throws BlockDoesNotExistException when temp block can not be found */ - public void commitTempBlockMeta(TempBlockMeta tempBlockMeta) throws OutOfSpaceException, - AlreadyExistsException, NotFoundException { + public void commitTempBlockMeta(TempBlockMeta tempBlockMeta) throws WorkerOutOfSpaceException, + BlockAlreadyExistsException, BlockDoesNotExistException { BlockMeta block = new BlockMeta(Preconditions.checkNotNull(tempBlockMeta)); StorageDir dir = tempBlockMeta.getParentDir(); dir.removeTempBlockMeta(tempBlockMeta); @@ -184,9 +184,9 @@ public long getAvailableBytes(BlockStoreLocation location) { * * @param blockId the block ID * @return metadata of the block - * @throws NotFoundException if no BlockMeta for this blockId is found + * @throws BlockDoesNotExistException if no BlockMeta for this blockId is found */ - public BlockMeta getBlockMeta(long blockId) throws NotFoundException { + public BlockMeta getBlockMeta(long blockId) throws BlockDoesNotExistException { for (StorageTier tier : mTiers) { for (StorageDir dir : tier.getStorageDirs()) { if (dir.hasBlockMeta(blockId)) { @@ -194,7 +194,7 @@ public BlockMeta getBlockMeta(long blockId) throws NotFoundException { } } } - throw new NotFoundException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); + throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); } /** @@ -241,9 +241,9 @@ public StorageDir getDir(BlockStoreLocation location) { * * @param blockId the ID of the temp block * @return metadata of the block or null - * @throws NotFoundException when blockId can not be found + * @throws BlockDoesNotExistException when blockId can not be found */ - public TempBlockMeta getTempBlockMeta(long blockId) throws NotFoundException { + public TempBlockMeta getTempBlockMeta(long blockId) throws BlockDoesNotExistException { for (StorageTier tier : mTiers) { for (StorageDir dir : tier.getStorageDirs()) { if (dir.hasTempBlockMeta(blockId)) { @@ -251,7 +251,7 @@ public TempBlockMeta getTempBlockMeta(long blockId) throws NotFoundException { } } } - throw new NotFoundException(ExceptionMessage.TEMP_BLOCK_META_NOT_FOUND, blockId); + throw new BlockDoesNotExistException(ExceptionMessage.TEMP_BLOCK_META_NOT_FOUND, blockId); } /** @@ -348,12 +348,13 @@ public boolean hasTempBlockMeta(long blockId) { * @param blockMeta the meta data of the block to move * @param tempBlockMeta a placeholder in the destination directory * @return the new block metadata if success, absent otherwise - * @throws NotFoundException when the block to move is not found - * @throws AlreadyExistsException when the block to move already exists in the destination - * @throws OutOfSpaceException when destination have no extra space to hold the block to move + * @throws BlockDoesNotExistException when the block to move is not found + * @throws BlockAlreadyExistsException when the block to move already exists in the destination + * @throws WorkerOutOfSpaceException when destination have no extra space to hold the block to + * move */ public BlockMeta moveBlockMeta(BlockMeta blockMeta, TempBlockMeta tempBlockMeta) - throws NotFoundException, OutOfSpaceException, AlreadyExistsException { + throws BlockDoesNotExistException, WorkerOutOfSpaceException, BlockAlreadyExistsException { StorageDir srcDir = blockMeta.getParentDir(); StorageDir dstDir = tempBlockMeta.getParentDir(); srcDir.removeBlockMeta(blockMeta); @@ -371,13 +372,14 @@ public BlockMeta moveBlockMeta(BlockMeta blockMeta, TempBlockMeta tempBlockMeta) * @param newLocation new location of the block * @return the new block metadata if success, absent otherwise * @throws IllegalArgumentException when the newLocation is not in the tiered storage - * @throws NotFoundException when the block to move is not found - * @throws AlreadyExistsException when the block to move already exists in the destination - * @throws OutOfSpaceException when destination have no extra space to hold the block to move + * @throws BlockDoesNotExistException when the block to move is not found + * @throws BlockAlreadyExistsException when the block to move already exists in the destination + * @throws WorkerOutOfSpaceException when destination have no extra space to hold the block to + * move */ @Deprecated public BlockMeta moveBlockMeta(BlockMeta blockMeta, BlockStoreLocation newLocation) - throws NotFoundException, AlreadyExistsException, OutOfSpaceException { + throws BlockDoesNotExistException, BlockAlreadyExistsException, WorkerOutOfSpaceException { // If existing location belongs to the target location, simply return the current block meta. BlockStoreLocation oldLocation = blockMeta.getBlockLocation(); if (oldLocation.belongTo(newLocation)) { @@ -404,7 +406,7 @@ public BlockMeta moveBlockMeta(BlockMeta blockMeta, BlockStoreLocation newLocati } if (newDir == null) { - throw new OutOfSpaceException("Failed to move BlockMeta: newLocation " + newLocation + throw new WorkerOutOfSpaceException("Failed to move BlockMeta: newLocation " + newLocation + " does not have enough space for " + blockSize + " bytes"); } StorageDir oldDir = blockMeta.getParentDir(); @@ -418,9 +420,9 @@ public BlockMeta moveBlockMeta(BlockMeta blockMeta, BlockStoreLocation newLocati * Remove the metadata of a specific block. * * @param block the meta data of the block to remove - * @throws NotFoundException when block is not found + * @throws BlockDoesNotExistException when block is not found */ - public void removeBlockMeta(BlockMeta block) throws NotFoundException { + public void removeBlockMeta(BlockMeta block) throws BlockDoesNotExistException { StorageDir dir = block.getParentDir(); dir.removeBlockMeta(block); } @@ -430,10 +432,10 @@ public void removeBlockMeta(BlockMeta block) throws NotFoundException { * * @param tempBlockMeta the temp block to modify * @param newSize new size in bytes - * @throws InvalidStateException when newSize is smaller than current size + * @throws InvalidWorkerStateException when newSize is smaller than current size */ public void resizeTempBlockMeta(TempBlockMeta tempBlockMeta, long newSize) - throws InvalidStateException { + throws InvalidWorkerStateException { StorageDir dir = tempBlockMeta.getParentDir(); dir.resizeTempBlockMeta(tempBlockMeta, newSize); } diff --git a/servers/src/main/java/tachyon/worker/block/BlockMetadataManagerView.java b/servers/src/main/java/tachyon/worker/block/BlockMetadataManagerView.java index 441efb4532a0..08b6ba11a154 100644 --- a/servers/src/main/java/tachyon/worker/block/BlockMetadataManagerView.java +++ b/servers/src/main/java/tachyon/worker/block/BlockMetadataManagerView.java @@ -26,8 +26,8 @@ import com.google.common.base.Preconditions; +import tachyon.exception.BlockDoesNotExistException; import tachyon.exception.ExceptionMessage; -import tachyon.exception.NotFoundException; import tachyon.master.block.BlockId; import tachyon.worker.block.meta.BlockMeta; import tachyon.worker.block.meta.StorageDirView; @@ -214,9 +214,9 @@ public long getAvailableBytes(BlockStoreLocation location) { * * @param blockId the block ID * @return metadata of the block or null - * @throws NotFoundException if no BlockMeta for this blockId is found + * @throws BlockDoesNotExistException if no BlockMeta for this blockId is found */ - public BlockMeta getBlockMeta(long blockId) throws NotFoundException { + public BlockMeta getBlockMeta(long blockId) throws BlockDoesNotExistException { if (isBlockEvictable(blockId)) { return mMetadataManager.getBlockMeta(blockId); } else { diff --git a/servers/src/main/java/tachyon/worker/block/BlockServiceHandler.java b/servers/src/main/java/tachyon/worker/block/BlockServiceHandler.java index 64e9364af5d8..1e2e68e1714c 100644 --- a/servers/src/main/java/tachyon/worker/block/BlockServiceHandler.java +++ b/servers/src/main/java/tachyon/worker/block/BlockServiceHandler.java @@ -18,18 +18,17 @@ import java.io.IOException; import java.util.List; -import org.apache.thrift.TException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import tachyon.Constants; import tachyon.Sessions; import tachyon.StorageLevelAlias; -import tachyon.exception.AlreadyExistsException; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; -import tachyon.exception.OutOfSpaceException; -import tachyon.thrift.FileDoesNotExistException; +import tachyon.exception.BlockDoesNotExistException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.TachyonException; +import tachyon.thrift.TachyonTException; +import tachyon.thrift.ThriftIOException; import tachyon.thrift.WorkerService; /** @@ -52,38 +51,41 @@ public BlockServiceHandler(BlockDataManager worker) { * components that may care about the access times of the blocks (for example, Evictor, UI). * * @param blockId the id of the block to access - * @throws TException if the underlying worker RPC fails + * @throws TachyonTException if a tachyon error occurs */ @Override - public void accessBlock(long blockId) throws TException { + public void accessBlock(long blockId) throws TachyonTException { try { mWorker.accessBlock(Sessions.ACCESS_BLOCK_SESSION_ID, blockId); - } catch (NotFoundException nfe) { - throw new TException(nfe); + } catch (TachyonException e) { + throw e.toTachyonTException(); } } /** * This should be called in order to persist a file that was written directly to the under storage - * system via a THROUGH type write. This will update the master with the appropriate metadata - * for the new block. + * system via a THROUGH type write. This will update the master with the appropriate metadata for + * the new block. * * @param fileId the file id * @param nonce nonce a nonce used for temporary file creation * @param path the UFS path of the file */ @Override - public void persistFile(long fileId, long nonce, String path) throws TException { + public void persistFile(long fileId, long nonce, String path) + throws TachyonTException, ThriftIOException { try { mWorker.persistFile(fileId, nonce, path); - } catch (IOException ioe) { - throw new TException(ioe); + } catch (IOException e) { + throw new ThriftIOException(e.getMessage()); + } catch (TachyonException e) { + throw e.toTachyonTException(); } } // TODO(calvin): Make this supported again. @Override - public boolean asyncCheckpoint(long fileId) throws TException { + public boolean asyncCheckpoint(long fileId) throws TachyonTException { return false; } @@ -94,23 +96,18 @@ public boolean asyncCheckpoint(long fileId) throws TException { * * @param sessionId the id of the client requesting the commit * @param blockId the id of the block to commit - * @throws TException if the underlying worker RPC fails + * @throws TachyonTException if a tachyon error occurs + * @throws ThriftIOException if an I/O error occurs */ // TODO(calvin): Reconsider this exception handling. @Override - public void cacheBlock(long sessionId, long blockId) throws TException { + public void cacheBlock(long sessionId, long blockId) throws TachyonTException, ThriftIOException { try { mWorker.commitBlock(sessionId, blockId); - } catch (AlreadyExistsException aee) { - throw new TException(aee); - } catch (NotFoundException nfe) { - throw new TException(nfe); - } catch (InvalidStateException fpe) { - throw new TException(fpe); - } catch (IOException ioe) { - throw new TException(ioe); - } catch (OutOfSpaceException ooe) { - throw new TException(ooe); + } catch (IOException e) { + throw new ThriftIOException(e.getMessage()); + } catch (TachyonException e) { + throw e.toTachyonTException(); } } @@ -120,20 +117,18 @@ public void cacheBlock(long sessionId, long blockId) throws TException { * * @param sessionId the id of the client requesting the abort * @param blockId the id of the block to be aborted - * @throws TException if the underlying worker RPC fails + * @throws TachyonTException if a tachyon error occurs + * @throws ThriftIOException if an I/O error occurs */ @Override - public void cancelBlock(long sessionId, long blockId) throws TException { + public void cancelBlock(long sessionId, long blockId) + throws TachyonTException, ThriftIOException { try { mWorker.abortBlock(sessionId, blockId); - } catch (AlreadyExistsException aee) { - throw new TException(aee); - } catch (NotFoundException nfe) { - throw new TException(nfe); - } catch (InvalidStateException fpe) { - throw new TException(fpe); - } catch (IOException ioe) { - throw new TException(ioe); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } catch (IOException e) { + throw new ThriftIOException(e.getMessage()); } } @@ -144,20 +139,18 @@ public void cancelBlock(long sessionId, long blockId) throws TException { * * @param blockId the id of the block to be locked * @param sessionId the id of the session - * @throws FileDoesNotExistException if the underlying file is not found - * @throws TException if the underlying worker RPC fails + * @throws TachyonTException if a tachyon error occurs */ @Override - public String lockBlock(long blockId, long sessionId) - throws FileDoesNotExistException, TException { + public String lockBlock(long blockId, long sessionId) throws TachyonTException { try { long lockId = mWorker.lockBlock(sessionId, blockId); return mWorker.readBlock(sessionId, blockId, lockId); - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { // TODO(cc): Reconsider this, maybe it is because lockId can not be found. - throw new FileDoesNotExistException(nfe.getMessage()); - } catch (InvalidStateException fpe) { - throw new TException(fpe); + throw new FileDoesNotExistException(nfe.getMessage()).toTachyonTException(); + } catch (TachyonException e) { + throw e.toTachyonTException(); } } @@ -167,28 +160,21 @@ public String lockBlock(long blockId, long sessionId) * otherwise. * * @param blockId the id of the block to move to the top layer - * @throws TException if the underlying worker RPC fails + * @throws TachyonTException if a tachyon error occurs + * @throws ThriftIOException if an I/O error occurs */ // TODO(calvin): This may be better as void. @Override - public boolean promoteBlock(long blockId) throws TException { + public boolean promoteBlock(long blockId) throws TachyonTException, ThriftIOException { try { // TODO(calvin): Make the top level configurable. mWorker.moveBlock(Sessions.MIGRATE_DATA_SESSION_ID, blockId, StorageLevelAlias.MEM.getValue()); return true; - } catch (NotFoundException nfe) { - throw new TException(nfe); - } catch (AlreadyExistsException aee) { - throw new TException(aee); - } catch (InvalidStateException fpe) { - throw new TException(fpe); - } catch (IllegalArgumentException iae) { - throw new TException(iae); - } catch (tachyon.exception.OutOfSpaceException ooe) { - throw new TException(ooe); - } catch (IOException ioe) { - throw new TException(ioe); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } catch (IOException e) { + throw new ThriftIOException(e.getMessage()); } } @@ -196,34 +182,26 @@ public boolean promoteBlock(long blockId) throws TException { * Used to allocate location and space for a new coming block, worker will choose the appropriate * storage directory which fits the initial block size by some allocation strategy, and the * 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. + * storage WorkerOutOfSpaceException will be thrown, if the file is already being written by the + * session, FileAlreadyExistsException will be thrown. * * @param sessionId the id of the client requesting the create * @param blockId the id of the new block to create * @param initialBytes the initial number of bytes to allocate for this block - * @throws tachyon.thrift.OutOfSpaceException if there is no space available - * @throws TException if the underlying worker RPC fails + * @throws TachyonTException if a tachyon error occurs + * @throws ThriftIOException if an I/O error occurs */ @Override public String requestBlockLocation(long sessionId, long blockId, long initialBytes) - throws tachyon.thrift.OutOfSpaceException, TException { + throws TachyonTException, ThriftIOException { try { // NOTE: right now, we ask allocator to allocate new blocks in MEM tier return mWorker.createBlock(sessionId, blockId, StorageLevelAlias.MEM.getValue(), initialBytes); - } catch (AlreadyExistsException aee) { - throw new TException(aee); - } catch (IllegalArgumentException iae) { - throw new TException(iae); - } catch (OutOfSpaceException ooe) { - throw new tachyon.thrift.OutOfSpaceException(ooe.getMessage()); - } catch (NotFoundException nfe) { - throw new TException(nfe); - } catch (IOException ioe) { - throw new TException(ioe); - } catch (InvalidStateException ise) { - throw new TException(ise); + } catch (TachyonException e) { + throw e.toTachyonTException(); + } catch (IOException e) { + throw new ThriftIOException(e.getMessage()); } } @@ -253,15 +231,15 @@ public boolean requestSpace(long sessionId, long blockId, long requestBytes) { * * @param blockId the id of the block to unlock * @param sessionId the id of the client requesting the unlock - * @throws TException if the block does not exist + * @throws TachyonTException if a tachyon error occurs */ @Override - public boolean unlockBlock(long blockId, long sessionId) throws TException { + public boolean unlockBlock(long blockId, long sessionId) throws TachyonTException { try { mWorker.unlockBlock(sessionId, blockId); return true; - } catch (NotFoundException nfe) { - throw new TException(nfe); + } catch (TachyonException e) { + throw e.toTachyonTException(); } } @@ -269,9 +247,8 @@ public boolean unlockBlock(long blockId, long sessionId) throws TException { * Local session send heartbeat to local worker to keep its temporary folder. * * @param sessionId the id of the client heartbeating - * @param metrics a list of the client metrics that were collected between this heartbeat and - * the last. Each value in the list represents a specific metric based on the - * index. + * @param metrics a list of the client metrics that were collected between this heartbeat and the + * last. Each value in the list represents a specific metric based on the index. */ @Override public void sessionHeartbeat(long sessionId, List metrics) { diff --git a/servers/src/main/java/tachyon/worker/block/BlockStore.java b/servers/src/main/java/tachyon/worker/block/BlockStore.java index c24e07ef3556..d893d186051d 100644 --- a/servers/src/main/java/tachyon/worker/block/BlockStore.java +++ b/servers/src/main/java/tachyon/worker/block/BlockStore.java @@ -18,10 +18,10 @@ import java.io.IOException; import java.util.Set; -import tachyon.exception.AlreadyExistsException; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; -import tachyon.exception.OutOfSpaceException; +import tachyon.exception.BlockAlreadyExistsException; +import tachyon.exception.BlockDoesNotExistException; +import tachyon.exception.InvalidWorkerStateException; +import tachyon.exception.WorkerOutOfSpaceException; import tachyon.worker.block.io.BlockReader; import tachyon.worker.block.io.BlockWriter; import tachyon.worker.block.meta.BlockMeta; @@ -39,26 +39,26 @@ interface BlockStore { * @param sessionId the ID of the session to lock this block * @param blockId the ID of the block to lock * @return the lock ID if the lock is acquired successfully - * @throws NotFoundException if blockId can not be found, for example, evicted already. + * @throws BlockDoesNotExistException if blockId can not be found, for example, evicted already. */ - long lockBlock(long sessionId, long blockId) throws NotFoundException; + long lockBlock(long sessionId, long blockId) throws BlockDoesNotExistException; /** * Releases an acquired block lock based on a lockId (returned by {@link #lockBlock}). * * @param lockId the ID of the lock returned by {@link #lockBlock} - * @throws NotFoundException if lockId can not be found + * @throws BlockDoesNotExistException if lockId can not be found */ - void unlockBlock(long lockId) throws NotFoundException; + void unlockBlock(long lockId) throws BlockDoesNotExistException; /** * NOTE: temporary, will be removed after changing client side code. * * @param sessionId the ID of the session to lock this block * @param blockId the ID of the block to lock - * @throws NotFoundException if blockId can not be found, for example, evicted already. + * @throws BlockDoesNotExistException if blockId can not be found, for example, evicted already. */ - void unlockBlock(long sessionId, long blockId) throws NotFoundException; + void unlockBlock(long sessionId, long blockId) throws BlockDoesNotExistException; /** * Creates the meta data of a new block and assigns a temporary path (e.g., a subdir of the final @@ -76,30 +76,34 @@ interface BlockStore { * @param initialBlockSize initial size of this block in bytes * @return metadata of the temp block created * @throws IllegalArgumentException if location does not belong to tiered storage - * @throws AlreadyExistsException if blockId already exists, either temporary or committed, or - * block in eviction plan already exists - * @throws OutOfSpaceException if this Store has no more space than the initialBlockSize - * @throws NotFoundException if blocks in eviction plan can not be found + * @throws BlockAlreadyExistsException if blockId already exists, either temporary or committed, + * or block in eviction plan already exists + * @throws WorkerOutOfSpaceException if this Store has no more space than the initialBlockSize + * @throws BlockDoesNotExistException if blocks in eviction plan can not be found * @throws IOException if blocks in eviction plan fail to be moved or deleted - * @throws InvalidStateException if blocks to be moved/deleted in eviction plan is uncommitted + * @throws InvalidWorkerStateException if blocks to be moved/deleted in eviction plan is + * uncommitted */ - // TODO(cc): Exceptions like NotFoundException, IOException and InvalidStateException here - // involves implementation details, also, AlreadyExistsException has two possible semantic now, + // TODO(cc): Exceptions like BlockDoesNotExistException, IOException and + // InvalidWorkerStateException here + // involves implementation details, also, BlockAlreadyExistsException has two possible semantic + // now, // these are because we propagate any exception in freeSpaceInternal, revisit this by throwing // more general exception. TempBlockMeta createBlockMeta(long sessionId, long blockId, BlockStoreLocation location, - long initialBlockSize) throws AlreadyExistsException, OutOfSpaceException, NotFoundException, - IOException, InvalidStateException; + long initialBlockSize) throws BlockAlreadyExistsException, WorkerOutOfSpaceException, + BlockDoesNotExistException, IOException, InvalidWorkerStateException; /** - * Gets the metadata of a block given its blockId or throws NotFoundException. This method does - * not require a lock ID so the block is possible to be moved or removed after it returns. + * Gets the metadata of a block given its blockId or throws BlockDoesNotExistException. This + * method does not require a lock ID so the block is possible to be moved or removed after it + * returns. * * @param blockId the block ID * @return metadata of the block - * @throws NotFoundException if no BlockMeta for this blockId is found + * @throws BlockDoesNotExistException if no BlockMeta for this blockId is found */ - BlockMeta getVolatileBlockMeta(long blockId) throws NotFoundException; + BlockMeta getVolatileBlockMeta(long blockId) throws BlockDoesNotExistException; /** * Gets the meta data of a specific block from local storage. @@ -110,13 +114,13 @@ TempBlockMeta createBlockMeta(long sessionId, long blockId, BlockStoreLocation l * @param blockId the ID of the block * @param lockId the ID of the lock * @return metadata of the block - * @throws NotFoundException if the blockId can not be found in committed blocks or lockId can not - * be found - * @throws InvalidStateException if sessionId or blockId is not the same as that in the LockRecord - * of lockId + * @throws BlockDoesNotExistException if the blockId can not be found in committed blocks or + * lockId can not be found + * @throws InvalidWorkerStateException if sessionId or blockId is not the same as that in the + * LockRecord of lockId */ BlockMeta getBlockMeta(long sessionId, long blockId, long lockId) - throws NotFoundException, InvalidStateException; + throws BlockDoesNotExistException, InvalidWorkerStateException; /** * Commits a temporary block to the local store. After commit, the block will be available in this @@ -125,14 +129,15 @@ BlockMeta getBlockMeta(long sessionId, long blockId, long lockId) * * @param sessionId the ID of the session * @param blockId the ID of a temp block - * @throws AlreadyExistsException if blockId already exists in committed blocks - * @throws NotFoundException if the temporary block can not be found - * @throws InvalidStateException if blockId does not belong to sessionId + * @throws BlockAlreadyExistsException if blockId already exists in committed blocks + * @throws BlockDoesNotExistException if the temporary block can not be found + * @throws InvalidWorkerStateException if blockId does not belong to sessionId * @throws IOException if the block can not be moved from temporary path to committed path - * @throws OutOfSpaceException if there is no more space left to hold the block + * @throws WorkerOutOfSpaceException if there is no more space left to hold the block */ - void commitBlock(long sessionId, long blockId) throws AlreadyExistsException, NotFoundException, - InvalidStateException, IOException, OutOfSpaceException; + void commitBlock(long sessionId, long blockId) throws BlockAlreadyExistsException, + BlockDoesNotExistException, InvalidWorkerStateException, IOException, + WorkerOutOfSpaceException; /** * Aborts a temporary block. The meta data of this block will not be added, its data will be @@ -141,13 +146,13 @@ void commitBlock(long sessionId, long blockId) throws AlreadyExistsException, No * * @param sessionId the ID of the session * @param blockId the ID of a temp block - * @throws AlreadyExistsException if blockId already exists in committed blocks - * @throws NotFoundException if the temporary block can not be found - * @throws InvalidStateException if blockId does not belong to sessionId + * @throws BlockAlreadyExistsException if blockId already exists in committed blocks + * @throws BlockDoesNotExistException if the temporary block can not be found + * @throws InvalidWorkerStateException if blockId does not belong to sessionId * @throws IOException if temporary block can not be deleted */ - void abortBlock(long sessionId, long blockId) throws AlreadyExistsException, NotFoundException, - InvalidStateException, IOException; + void abortBlock(long sessionId, long blockId) throws BlockAlreadyExistsException, + BlockDoesNotExistException, InvalidWorkerStateException, IOException; /** * Requests to increase the size of a temp block. Since a temp block is "private" to the writer @@ -156,22 +161,25 @@ void abortBlock(long sessionId, long blockId) throws AlreadyExistsException, Not * @param sessionId the ID of the session to request space * @param blockId the ID of the temp block * @param additionalBytes the amount of more space to request in bytes, never be less than 0 - * @throws NotFoundException if blockId can not be found, or some block in eviction plan cannot be - * found - * @throws OutOfSpaceException if requested space can not be satisfied + * @throws BlockDoesNotExistException if blockId can not be found, or some block in eviction plan + * cannot be found + * @throws WorkerOutOfSpaceException if requested space can not be satisfied * @throws IOException if blocks in {@link tachyon.worker.block.evictor.EvictionPlan} fail to be * moved or deleted on file system - * @throws AlreadyExistsException if blocks to move in + * @throws BlockAlreadyExistsException if blocks to move in * {@link tachyon.worker.block.evictor.EvictionPlan} already exists in destination * location - * @throws InvalidStateException if the space requested is less than current space or blocks to - * move/evict in {@link tachyon.worker.block.evictor.EvictionPlan} is uncommitted + * @throws InvalidWorkerStateException if the space requested is less than current space or blocks + * to move/evict in {@link tachyon.worker.block.evictor.EvictionPlan} is uncommitted */ - // TODO(cc): Exceptions like IOException AlreadyExistsException and InvalidStateException here - // involves implementation details, also, NotFoundException has two semantic now, revisit this + // TODO(cc): Exceptions like IOException BlockAlreadyExistsException and + // InvalidWorkerStateException here + // involves implementation details, also, BlockDoesNotExistException has two semantic now, revisit + // this // with a more general exception. - void requestSpace(long sessionId, long blockId, long additionalBytes) throws NotFoundException, - OutOfSpaceException, IOException, AlreadyExistsException, InvalidStateException; + void requestSpace(long sessionId, long blockId, long additionalBytes) + throws BlockDoesNotExistException, WorkerOutOfSpaceException, IOException, + BlockAlreadyExistsException, InvalidWorkerStateException; /** * Creates a writer to write data to a temp block. Since the temp block is "private" to the @@ -180,10 +188,11 @@ void requestSpace(long sessionId, long blockId, long additionalBytes) throws Not * @param sessionId the ID of the session to get the writer * @param blockId the ID of the temp block * @return a {@link BlockWriter} instance on this block - * @throws NotFoundException if the block can not be found + * @throws BlockDoesNotExistException if the block can not be found * @throws IOException if block can not be created */ - BlockWriter getBlockWriter(long sessionId, long blockId) throws NotFoundException, IOException; + BlockWriter getBlockWriter(long sessionId, long blockId) throws BlockDoesNotExistException, + IOException; /** * Creates a reader of an existing block to read data from this block. @@ -194,13 +203,13 @@ void requestSpace(long sessionId, long blockId, long additionalBytes) throws Not * @param blockId the ID of an existing block * @param lockId the ID of the lock returned by {@link #lockBlock} * @return a {@link BlockReader} instance on this block - * @throws NotFoundException if lockId is not found - * @throws InvalidStateException if sessionId or blockId is not the same as that in the LockRecord - * of lockId + * @throws BlockDoesNotExistException if lockId is not found + * @throws InvalidWorkerStateException if sessionId or blockId is not the same as that in the + * LockRecord of lockId * @throws IOException if block can not be read */ BlockReader getBlockReader(long sessionId, long blockId, long lockId) - throws NotFoundException, InvalidStateException, IOException; + throws BlockDoesNotExistException, InvalidWorkerStateException, IOException; /** * Moves an existing block to a new location. @@ -209,15 +218,17 @@ BlockReader getBlockReader(long sessionId, long blockId, long lockId) * @param blockId the ID of an existing block * @param newLocation the location of the destination * @throws IllegalArgumentException if newLocation does not belong to the tiered storage - * @throws NotFoundException if blockId can not be found - * @throws AlreadyExistsException if blockId already exists in committed blocks of the newLocation - * @throws InvalidStateException if blockId has not been committed - * @throws OutOfSpaceException if newLocation does not have enough extra space to hold the block + * @throws BlockDoesNotExistException if blockId can not be found + * @throws BlockAlreadyExistsException if blockId already exists in committed blocks of the + * newLocation + * @throws InvalidWorkerStateException if blockId has not been committed + * @throws WorkerOutOfSpaceException if newLocation does not have enough extra space to hold the + * block * @throws IOException if block cannot be moved from current location to newLocation */ void moveBlock(long sessionId, long blockId, BlockStoreLocation newLocation) - throws NotFoundException, AlreadyExistsException, InvalidStateException, OutOfSpaceException, - IOException; + throws BlockDoesNotExistException, BlockAlreadyExistsException, InvalidWorkerStateException, + WorkerOutOfSpaceException, IOException; /** * Moves an existing block to a new location. @@ -227,27 +238,30 @@ void moveBlock(long sessionId, long blockId, BlockStoreLocation newLocation) * @param oldLocation the location of the source * @param newLocation the location of the destination * @throws IllegalArgumentException if newLocation does not belong to the tiered storage - * @throws NotFoundException if blockId can not be found - * @throws AlreadyExistsException if blockId already exists in committed blocks of the newLocation - * @throws InvalidStateException if blockId has not been committed - * @throws OutOfSpaceException if newLocation does not have enough extra space to hold the block + * @throws BlockDoesNotExistException if blockId can not be found + * @throws BlockAlreadyExistsException if blockId already exists in committed blocks of the + * newLocation + * @throws InvalidWorkerStateException if blockId has not been committed + * @throws WorkerOutOfSpaceException if newLocation does not have enough extra space to hold the + * block * @throws IOException if block cannot be moved from current location to newLocation */ void moveBlock(long sessionId, long blockId, BlockStoreLocation oldLocation, - BlockStoreLocation newLocation) throws NotFoundException, AlreadyExistsException, - InvalidStateException, OutOfSpaceException, IOException; + BlockStoreLocation newLocation) throws BlockDoesNotExistException, + BlockAlreadyExistsException, InvalidWorkerStateException, WorkerOutOfSpaceException, + IOException; /** * Removes an existing block. If the block can not be found in this store. * * @param sessionId the ID of the session to remove a block * @param blockId the ID of an existing block - * @throws InvalidStateException if blockId has not been committed - * @throws NotFoundException if block can not be found + * @throws InvalidWorkerStateException if blockId has not been committed + * @throws BlockDoesNotExistException if block can not be found * @throws IOException if block cannot be removed from current path */ - void removeBlock(long sessionId, long blockId) throws InvalidStateException, NotFoundException, - IOException; + void removeBlock(long sessionId, long blockId) throws InvalidWorkerStateException, + BlockDoesNotExistException, IOException; /** * Removes an existing block. If the block can not be found in this store. @@ -255,12 +269,12 @@ void removeBlock(long sessionId, long blockId) throws InvalidStateException, Not * @param sessionId the ID of the session to move a block * @param blockId the ID of an existing block * @param location the location of the block - * @throws InvalidStateException if blockId has not been committed - * @throws NotFoundException if block can not be found + * @throws InvalidWorkerStateException if blockId has not been committed + * @throws BlockDoesNotExistException if block can not be found * @throws IOException if block cannot be removed from current path */ - void removeBlock(long sessionId, long blockId, BlockStoreLocation location) throws - InvalidStateException, NotFoundException, IOException; + void removeBlock(long sessionId, long blockId, BlockStoreLocation location) + throws InvalidWorkerStateException, BlockDoesNotExistException, IOException; /** * Notifies the block store that a block was accessed so the block store could update accordingly @@ -268,9 +282,9 @@ void removeBlock(long sessionId, long blockId, BlockStoreLocation location) thro * * @param sessionId the ID of the session to access a block * @param blockId the ID of an accessed block - * @throws NotFoundException if the blockId is not found + * @throws BlockDoesNotExistException if the blockId is not found */ - void accessBlock(long sessionId, long blockId) throws NotFoundException; + void accessBlock(long sessionId, long blockId) throws BlockDoesNotExistException; /** * Gets the meta data of the entire store in a snapshot. There is no guarantee the state will be @@ -303,23 +317,25 @@ void removeBlock(long sessionId, long blockId, BlockStoreLocation location) thro * @param sessionId the session ID * @param availableBytes the amount of free space in bytes * @param location the location to free space - * @throws OutOfSpaceException if there is not enough space - * @throws NotFoundException if blocks in {@link tachyon.worker.block.evictor.EvictionPlan} can - * not be found + * @throws WorkerOutOfSpaceException if there is not enough space + * @throws BlockDoesNotExistException if blocks in + * {@link tachyon.worker.block.evictor.EvictionPlan} can not be found * @throws IOException if blocks in {@link tachyon.worker.block.evictor.EvictionPlan} fail to be * moved or deleted on file system - * @throws AlreadyExistsException if blocks to move in + * @throws BlockAlreadyExistsException if blocks to move in * {@link tachyon.worker.block.evictor.EvictionPlan} already exists in destination * location - * @throws InvalidStateException if blocks to move/evict in + * @throws InvalidWorkerStateException if blocks to move/evict in * {@link tachyon.worker.block.evictor.EvictionPlan} is uncommitted */ - // TODO(cc): Exceptions like NotFoundException, IOException AlreadyExistsException and - // InvalidStateException here involves implementation details, may be removed to a more general + // TODO(cc): Exceptions like BlockDoesNotExistException, IOException BlockAlreadyExistsException + // and + // InvalidWorkerStateException here involves implementation details, may be removed to a more + // general // exception. void freeSpace(long sessionId, long availableBytes, BlockStoreLocation location) - throws OutOfSpaceException, NotFoundException, IOException, AlreadyExistsException, - InvalidStateException; + throws WorkerOutOfSpaceException, BlockDoesNotExistException, IOException, + BlockAlreadyExistsException, InvalidWorkerStateException; /** * Registers a {@link BlockStoreEventListener} to this block store. diff --git a/servers/src/main/java/tachyon/worker/block/SpaceReserver.java b/servers/src/main/java/tachyon/worker/block/SpaceReserver.java index 70a9ffc5b570..d5db8409d9ff 100644 --- a/servers/src/main/java/tachyon/worker/block/SpaceReserver.java +++ b/servers/src/main/java/tachyon/worker/block/SpaceReserver.java @@ -25,10 +25,10 @@ import tachyon.Constants; import tachyon.collections.Pair; import tachyon.Sessions; -import tachyon.exception.AlreadyExistsException; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; -import tachyon.exception.OutOfSpaceException; +import tachyon.exception.BlockAlreadyExistsException; +import tachyon.exception.BlockDoesNotExistException; +import tachyon.exception.InvalidWorkerStateException; +import tachyon.exception.WorkerOutOfSpaceException; import tachyon.util.CommonUtils; import tachyon.worker.WorkerContext; @@ -87,13 +87,13 @@ public void run() { long bytesReserved = bytesReservedOnTier.getSecond(); try { mBlockManager.freeSpace(Sessions.MIGRATE_DATA_SESSION_ID, bytesReserved, tierAlias); - } catch (OutOfSpaceException e) { + } catch (WorkerOutOfSpaceException e) { LOG.warn(e.getMessage()); - } catch (NotFoundException e) { + } catch (BlockDoesNotExistException e) { LOG.warn(e.getMessage()); - } catch (AlreadyExistsException e) { + } catch (BlockAlreadyExistsException e) { LOG.warn(e.getMessage()); - } catch (InvalidStateException e) { + } catch (InvalidWorkerStateException e) { LOG.warn(e.getMessage()); } catch (IOException e) { LOG.warn(e.getMessage()); diff --git a/servers/src/main/java/tachyon/worker/block/TieredBlockStore.java b/servers/src/main/java/tachyon/worker/block/TieredBlockStore.java index f1d44b05c998..58db9288eea4 100644 --- a/servers/src/main/java/tachyon/worker/block/TieredBlockStore.java +++ b/servers/src/main/java/tachyon/worker/block/TieredBlockStore.java @@ -36,11 +36,11 @@ import tachyon.Constants; import tachyon.collections.Pair; import tachyon.conf.TachyonConf; -import tachyon.exception.AlreadyExistsException; +import tachyon.exception.BlockAlreadyExistsException; +import tachyon.exception.BlockDoesNotExistException; import tachyon.exception.ExceptionMessage; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; -import tachyon.exception.OutOfSpaceException; +import tachyon.exception.InvalidWorkerStateException; +import tachyon.exception.WorkerOutOfSpaceException; import tachyon.util.io.FileUtils; import tachyon.util.io.PathUtils; import tachyon.worker.WorkerContext; @@ -73,8 +73,8 @@ * coordinates different threads (clients) when accessing the same block concurrently. *
  • Any metadata operation (read or write) must go through {@link TieredBlockStore#mMetaManager} * and guarded by {@link TieredBlockStore#mMetadataLock}. This is also a read/write lock and - * coordinates different threads (clients) when accessing the shared data structure for metadata. - *
  • + * coordinates different threads (clients) when accessing the shared data structure for + * metadata. *
  • Method {@link #createBlockMeta} does not acquire the block lock, because it only creates a * temp block which is only visible to its writer before committed (thus no concurrent access).
  • *
  • Eviction is done in {@link #freeSpaceInternal} and it is on the basis of best effort. For @@ -107,15 +107,17 @@ public TieredBlockStore() { mMetaManager = BlockMetadataManager.newBlockMetadataManager(); mLockManager = new BlockLockManager(); - BlockMetadataManagerView initManagerView = new BlockMetadataManagerView(mMetaManager, - Collections.emptySet(), Collections.emptySet()); + BlockMetadataManagerView initManagerView = + new BlockMetadataManagerView(mMetaManager, Collections.emptySet(), + Collections.emptySet()); mAllocator = Allocator.Factory.createAllocator(mTachyonConf, initManagerView); if (mAllocator instanceof BlockStoreEventListener) { registerBlockStoreEventListener((BlockStoreEventListener) mAllocator); } - initManagerView = new BlockMetadataManagerView(mMetaManager, Collections.emptySet(), - Collections.emptySet()); + initManagerView = + new BlockMetadataManagerView(mMetaManager, Collections.emptySet(), + Collections.emptySet()); mEvictor = Evictor.Factory.createEvictor(mTachyonConf, initManagerView, mAllocator); if (mEvictor instanceof BlockStoreEventListener) { registerBlockStoreEventListener((BlockStoreEventListener) mEvictor); @@ -123,7 +125,7 @@ public TieredBlockStore() { } @Override - public long lockBlock(long sessionId, long blockId) throws NotFoundException { + public long lockBlock(long sessionId, long blockId) throws BlockDoesNotExistException { long lockId = mLockManager.lockBlock(sessionId, blockId, BlockLockType.READ); mMetadataReadLock.lock(); boolean hasBlock = mMetaManager.hasBlockMeta(blockId); @@ -132,23 +134,23 @@ public long lockBlock(long sessionId, long blockId) throws NotFoundException { return lockId; } mLockManager.unlockBlock(lockId); - throw new NotFoundException(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_BLOCK_AND_SESSION, - blockId, sessionId); + throw new BlockDoesNotExistException( + ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_BLOCK_AND_SESSION, blockId, sessionId); } @Override - public void unlockBlock(long lockId) throws NotFoundException { + public void unlockBlock(long lockId) throws BlockDoesNotExistException { mLockManager.unlockBlock(lockId); } @Override - public void unlockBlock(long sessionId, long blockId) throws NotFoundException { + public void unlockBlock(long sessionId, long blockId) throws BlockDoesNotExistException { mLockManager.unlockBlock(sessionId, blockId); } @Override - public BlockWriter getBlockWriter(long sessionId, long blockId) throws NotFoundException, - IOException { + public BlockWriter getBlockWriter(long sessionId, long blockId) + throws BlockDoesNotExistException, IOException { // NOTE: a temp block is supposed to only be visible by its own writer, unnecessary to acquire // block lock here since no sharing // TODO(bin): Handle the case where multiple writers compete for the same block. @@ -163,7 +165,7 @@ public BlockWriter getBlockWriter(long sessionId, long blockId) throws NotFoundE @Override public BlockReader getBlockReader(long sessionId, long blockId, long lockId) - throws NotFoundException, InvalidStateException, IOException { + throws BlockDoesNotExistException, InvalidWorkerStateException, IOException { mLockManager.validateLock(sessionId, blockId, lockId); mMetadataReadLock.lock(); try { @@ -176,8 +178,8 @@ public BlockReader getBlockReader(long sessionId, long blockId, long lockId) @Override public TempBlockMeta createBlockMeta(long sessionId, long blockId, BlockStoreLocation location, - long initialBlockSize) throws AlreadyExistsException, OutOfSpaceException, NotFoundException, - IOException { + long initialBlockSize) throws BlockAlreadyExistsException, WorkerOutOfSpaceException, + BlockDoesNotExistException, IOException { for (int i = 0; i < MAX_RETRIES + 1; i ++) { TempBlockMeta tempBlockMeta = createBlockMetaInternal(sessionId, blockId, location, initialBlockSize, true); @@ -193,13 +195,13 @@ public TempBlockMeta createBlockMeta(long sessionId, long blockId, BlockStoreLoc } // TODO(bin): We are probably seeing a rare transient failure, maybe define and throw some // other types of exception to indicate this case. - throw new OutOfSpaceException(ExceptionMessage.NO_SPACE_FOR_BLOCK_ALLOCATION, initialBlockSize, - MAX_RETRIES, blockId); + throw new WorkerOutOfSpaceException(ExceptionMessage.NO_SPACE_FOR_BLOCK_ALLOCATION, + initialBlockSize, MAX_RETRIES, blockId); } // TODO(bin): Make this method to return a snapshot. @Override - public BlockMeta getVolatileBlockMeta(long blockId) throws NotFoundException { + public BlockMeta getVolatileBlockMeta(long blockId) throws BlockDoesNotExistException { mMetadataReadLock.lock(); try { return mMetaManager.getBlockMeta(blockId); @@ -209,8 +211,8 @@ public BlockMeta getVolatileBlockMeta(long blockId) throws NotFoundException { } @Override - public BlockMeta getBlockMeta(long sessionId, long blockId, long lockId) throws NotFoundException, - InvalidStateException { + public BlockMeta getBlockMeta(long sessionId, long blockId, long lockId) + throws BlockDoesNotExistException, InvalidWorkerStateException { mLockManager.validateLock(sessionId, blockId, lockId); mMetadataReadLock.lock(); try { @@ -221,8 +223,8 @@ public BlockMeta getBlockMeta(long sessionId, long blockId, long lockId) throws } @Override - public void commitBlock(long sessionId, long blockId) throws AlreadyExistsException, - InvalidStateException, NotFoundException, IOException { + public void commitBlock(long sessionId, long blockId) throws BlockAlreadyExistsException, + InvalidWorkerStateException, BlockDoesNotExistException, IOException { BlockStoreLocation loc = commitBlockInternal(sessionId, blockId); synchronized (mBlockStoreEventListeners) { for (BlockStoreEventListener listener : mBlockStoreEventListeners) { @@ -232,8 +234,8 @@ public void commitBlock(long sessionId, long blockId) throws AlreadyExistsExcept } @Override - public void abortBlock(long sessionId, long blockId) throws AlreadyExistsException, - NotFoundException, InvalidStateException, IOException { + public void abortBlock(long sessionId, long blockId) throws BlockAlreadyExistsException, + BlockDoesNotExistException, InvalidWorkerStateException, IOException { abortBlockInternal(sessionId, blockId); synchronized (mBlockStoreEventListeners) { for (BlockStoreEventListener listener : mBlockStoreEventListeners) { @@ -244,7 +246,7 @@ public void abortBlock(long sessionId, long blockId) throws AlreadyExistsExcepti @Override public void requestSpace(long sessionId, long blockId, long additionalBytes) - throws NotFoundException, OutOfSpaceException, IOException { + throws BlockDoesNotExistException, WorkerOutOfSpaceException, IOException { for (int i = 0; i < MAX_RETRIES + 1; i ++) { Pair requestResult = requestSpaceInternal(blockId, additionalBytes); @@ -255,21 +257,22 @@ public void requestSpace(long sessionId, long blockId, long additionalBytes) freeSpaceInternal(sessionId, additionalBytes, requestResult.getSecond()); } } - throw new OutOfSpaceException(ExceptionMessage.NO_SPACE_FOR_BLOCK_ALLOCATION, additionalBytes, - MAX_RETRIES, blockId); + throw new WorkerOutOfSpaceException(ExceptionMessage.NO_SPACE_FOR_BLOCK_ALLOCATION, + additionalBytes, MAX_RETRIES, blockId); } @Override public void moveBlock(long sessionId, long blockId, BlockStoreLocation newLocation) - throws NotFoundException, AlreadyExistsException, InvalidStateException, OutOfSpaceException, - IOException { + throws BlockDoesNotExistException, BlockAlreadyExistsException, InvalidWorkerStateException, + WorkerOutOfSpaceException, IOException { moveBlock(sessionId, blockId, BlockStoreLocation.anyTier(), newLocation); } @Override public void moveBlock(long sessionId, long blockId, BlockStoreLocation oldLocation, - BlockStoreLocation newLocation) throws NotFoundException, AlreadyExistsException, - InvalidStateException, OutOfSpaceException, IOException { + BlockStoreLocation newLocation) throws BlockDoesNotExistException, + BlockAlreadyExistsException, InvalidWorkerStateException, WorkerOutOfSpaceException, + IOException { for (int i = 0; i < MAX_RETRIES + 1; i ++) { MoveBlockResult moveResult = moveBlockInternal(sessionId, blockId, oldLocation, newLocation); if (moveResult.success()) { @@ -285,19 +288,19 @@ public void moveBlock(long sessionId, long blockId, BlockStoreLocation oldLocati freeSpaceInternal(sessionId, moveResult.blockSize(), newLocation); } } - throw new OutOfSpaceException(ExceptionMessage.NO_SPACE_FOR_BLOCK_MOVE, newLocation, blockId, - MAX_RETRIES); + throw new WorkerOutOfSpaceException(ExceptionMessage.NO_SPACE_FOR_BLOCK_MOVE, newLocation, + blockId, MAX_RETRIES); } @Override - public void removeBlock(long sessionId, long blockId) throws InvalidStateException, - NotFoundException, IOException { + public void removeBlock(long sessionId, long blockId) throws InvalidWorkerStateException, + BlockDoesNotExistException, IOException { removeBlock(sessionId, blockId, BlockStoreLocation.anyTier()); } @Override public void removeBlock(long sessionId, long blockId, BlockStoreLocation location) - throws InvalidStateException, NotFoundException, IOException { + throws InvalidWorkerStateException, BlockDoesNotExistException, IOException { removeBlockInternal(sessionId, blockId, location); synchronized (mBlockStoreEventListeners) { for (BlockStoreEventListener listener : mBlockStoreEventListeners) { @@ -307,12 +310,12 @@ public void removeBlock(long sessionId, long blockId, BlockStoreLocation locatio } @Override - public void accessBlock(long sessionId, long blockId) throws NotFoundException { + public void accessBlock(long sessionId, long blockId) throws BlockDoesNotExistException { mMetadataReadLock.lock(); boolean hasBlock = mMetaManager.hasBlockMeta(blockId); mMetadataReadLock.unlock(); if (!hasBlock) { - throw new NotFoundException(ExceptionMessage.NO_BLOCK_ID_FOUND, blockId); + throw new BlockDoesNotExistException(ExceptionMessage.NO_BLOCK_ID_FOUND, blockId); } synchronized (mBlockStoreEventListeners) { for (BlockStoreEventListener listener : mBlockStoreEventListeners) { @@ -323,7 +326,8 @@ public void accessBlock(long sessionId, long blockId) throws NotFoundException { @Override public void freeSpace(long sessionId, long availableBytes, BlockStoreLocation location) - throws NotFoundException, OutOfSpaceException, IOException, AlreadyExistsException { + throws BlockDoesNotExistException, WorkerOutOfSpaceException, IOException, + BlockAlreadyExistsException { // TODO(bin): Consider whether to retry here. freeSpaceInternal(sessionId, availableBytes, location); } @@ -399,14 +403,14 @@ public void registerBlockStoreEventListener(BlockStoreEventListener listener) { * {@link #mMetadataLock}. * * @param blockId the ID of block - * @throws AlreadyExistsException if blockId already exists + * @throws BlockAlreadyExistsException if blockId already exists */ - private void checkTempBlockIdAvailable(long blockId) throws AlreadyExistsException { + private void checkTempBlockIdAvailable(long blockId) throws BlockAlreadyExistsException { if (mMetaManager.hasTempBlockMeta(blockId)) { - throw new AlreadyExistsException(ExceptionMessage.TEMP_BLOCK_ID_EXISTS, blockId); + throw new BlockAlreadyExistsException(ExceptionMessage.TEMP_BLOCK_ID_EXISTS, blockId); } if (mMetaManager.hasBlockMeta(blockId)) { - throw new AlreadyExistsException(ExceptionMessage.TEMP_BLOCK_ID_COMMITTED, blockId); + throw new BlockAlreadyExistsException(ExceptionMessage.TEMP_BLOCK_ID_COMMITTED, blockId); } } @@ -416,20 +420,20 @@ private void checkTempBlockIdAvailable(long blockId) throws AlreadyExistsExcepti * * @param sessionId the ID of session * @param blockId the ID of block - * @throws NotFoundException if blockId can not be found in temporary blocks - * @throws AlreadyExistsException if blockId already exists in committed blocks - * @throws InvalidStateException if blockId is not owned by sessionId + * @throws BlockDoesNotExistException if blockId can not be found in temporary blocks + * @throws BlockAlreadyExistsException if blockId already exists in committed blocks + * @throws InvalidWorkerStateException if blockId is not owned by sessionId */ - private void checkTempBlockOwnedBySession(long sessionId, long blockId) throws NotFoundException, - AlreadyExistsException, InvalidStateException { + private void checkTempBlockOwnedBySession(long sessionId, long blockId) + throws BlockDoesNotExistException, BlockAlreadyExistsException, InvalidWorkerStateException { if (mMetaManager.hasBlockMeta(blockId)) { - throw new AlreadyExistsException(ExceptionMessage.TEMP_BLOCK_ID_COMMITTED, blockId); + throw new BlockAlreadyExistsException(ExceptionMessage.TEMP_BLOCK_ID_COMMITTED, blockId); } TempBlockMeta tempBlockMeta = mMetaManager.getTempBlockMeta(blockId); long ownerSessionId = tempBlockMeta.getSessionId(); if (ownerSessionId != sessionId) { - throw new InvalidStateException(ExceptionMessage.BLOCK_ID_FOR_DIFFERENT_SESSION, blockId, - ownerSessionId, sessionId); + throw new InvalidWorkerStateException(ExceptionMessage.BLOCK_ID_FOR_DIFFERENT_SESSION, + blockId, ownerSessionId, sessionId); } } @@ -438,13 +442,13 @@ private void checkTempBlockOwnedBySession(long sessionId, long blockId) throws N * * @param sessionId the ID of session * @param blockId the ID of block - * @throws NotFoundException if blockId can not be found in temporary blocks - * @throws AlreadyExistsException if blockId already exists in committed blocks - * @throws InvalidStateException if blockId is not owned by sessionId + * @throws BlockDoesNotExistException if blockId can not be found in temporary blocks + * @throws BlockAlreadyExistsException if blockId already exists in committed blocks + * @throws InvalidWorkerStateException if blockId is not owned by sessionId * @throws IOException if I/O errors occur when deleting the block file */ - private void abortBlockInternal(long sessionId, long blockId) throws NotFoundException, - AlreadyExistsException, InvalidStateException, IOException { + private void abortBlockInternal(long sessionId, long blockId) throws BlockDoesNotExistException, + BlockAlreadyExistsException, InvalidWorkerStateException, IOException { long lockId = mLockManager.lockBlock(sessionId, blockId, BlockLockType.WRITE); try { String path; @@ -464,7 +468,7 @@ private void abortBlockInternal(long sessionId, long blockId) throws NotFoundExc mMetadataWriteLock.lock(); try { mMetaManager.abortTempBlockMeta(tempBlockMeta); - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { throw Throwables.propagate(nfe); // We shall never reach here } finally { mMetadataWriteLock.unlock(); @@ -479,14 +483,15 @@ private void abortBlockInternal(long sessionId, long blockId) throws NotFoundExc * * @param sessionId the ID of session * @param blockId the ID of block - * @throws NotFoundException if blockId can not be found in temporary blocks - * @throws AlreadyExistsException if blockId already exists in committed blocks - * @throws InvalidStateException if blockId is not owned by sessionId + * @throws BlockDoesNotExistException if blockId can not be found in temporary blocks + * @throws BlockAlreadyExistsException if blockId already exists in committed blocks + * @throws InvalidWorkerStateException if blockId is not owned by sessionId * @throws IOException if I/O errors occur when deleting the block file * @return destination location to move the block */ private BlockStoreLocation commitBlockInternal(long sessionId, long blockId) - throws AlreadyExistsException, InvalidStateException, NotFoundException, IOException { + throws BlockAlreadyExistsException, InvalidWorkerStateException, BlockDoesNotExistException, + IOException { long lockId = mLockManager.lockBlock(sessionId, blockId, BlockLockType.WRITE); try { // When committing TempBlockMeta, the final BlockMeta calculates the block size according to @@ -513,11 +518,11 @@ private BlockStoreLocation commitBlockInternal(long sessionId, long blockId) mMetadataWriteLock.lock(); try { mMetaManager.commitTempBlockMeta(tempBlockMeta); - } catch (AlreadyExistsException aee) { + } catch (BlockAlreadyExistsException aee) { throw Throwables.propagate(aee); // we shall never reach here - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { throw Throwables.propagate(nfe); // we shall never reach here - } catch (OutOfSpaceException ose) { + } catch (WorkerOutOfSpaceException ose) { throw Throwables.propagate(ose); // we shall never reach here } finally { mMetadataWriteLock.unlock(); @@ -538,12 +543,12 @@ private BlockStoreLocation commitBlockInternal(long sessionId, long blockId) * @param initialBlockSize initial block size in bytes * @param newBlock true if this temp block is created for a new block * @return a temp block created if successful, or null if allocation failed (instead of throwing - * OutOfSpaceException because allocation failure could be an expected case) - * @throws AlreadyExistsException if there is already a block with the same block id + * WorkerOutOfSpaceException because allocation failure could be an expected case) + * @throws BlockAlreadyExistsException if there is already a block with the same block id */ private TempBlockMeta createBlockMetaInternal(long sessionId, long blockId, BlockStoreLocation location, long initialBlockSize, boolean newBlock) - throws AlreadyExistsException { + throws BlockAlreadyExistsException { // NOTE: a temp block is supposed to be visible for its own writer, unnecessary to acquire // block lock here since no sharing mMetadataWriteLock.lock(); @@ -564,12 +569,12 @@ private TempBlockMeta createBlockMetaInternal(long sessionId, long blockId, // Add allocated temp block to metadata manager. This should never fail if allocator // correctly assigns a StorageDir. mMetaManager.addTempBlockMeta(tempBlock); - } catch (OutOfSpaceException ose) { + } catch (WorkerOutOfSpaceException ose) { // If we reach here, allocator is not working properly LOG.error("Unexpected failure: " + initialBlockSize + " bytes allocated at " + location + " by allocator, but addTempBlockMeta failed"); throw Throwables.propagate(ose); - } catch (AlreadyExistsException aee) { + } catch (BlockAlreadyExistsException aee) { // If we reach here, allocator is not working properly LOG.error("Unexpected failure: " + initialBlockSize + " bytes allocated at " + location + " by allocator, but addTempBlockMeta failed"); @@ -588,10 +593,10 @@ private TempBlockMeta createBlockMetaInternal(long sessionId, long blockId, * @param additionalBytes additional bytes to request for this block * @return a pair of boolean and BlockStoreLocation. The boolean indicates if the operation * succeeds and the BlockStoreLocation denotes where to free more space if it fails. - * @throws NotFoundException if this block is not found + * @throws BlockDoesNotExistException if this block is not found */ private Pair requestSpaceInternal(long blockId, long additionalBytes) - throws NotFoundException { + throws BlockDoesNotExistException { // NOTE: a temp block is supposed to be visible for its own writer, unnecessary to acquire // block lock here since no sharing mMetadataWriteLock.lock(); @@ -602,9 +607,9 @@ private Pair requestSpaceInternal(long blockId, lon } // Increase the size of this temp block try { - mMetaManager.resizeTempBlockMeta(tempBlockMeta, - tempBlockMeta.getBlockSize() + additionalBytes); - } catch (InvalidStateException ise) { + mMetaManager.resizeTempBlockMeta(tempBlockMeta, tempBlockMeta.getBlockSize() + + additionalBytes); + } catch (InvalidWorkerStateException ise) { throw Throwables.propagate(ise); // we shall never reach here } return new Pair(true, null); @@ -620,18 +625,18 @@ private Pair requestSpaceInternal(long blockId, lon * @param sessionId the session Id * @param availableBytes amount of space in bytes to free * @param location location of space - * @throws OutOfSpaceException if it is impossible to achieve the free requirement + * @throws WorkerOutOfSpaceException if it is impossible to achieve the free requirement * @throws IOException if I/O errors occur when removing or moving block files */ private void freeSpaceInternal(long sessionId, long availableBytes, BlockStoreLocation location) - throws OutOfSpaceException, IOException { + throws WorkerOutOfSpaceException, IOException { EvictionPlan plan; mMetadataReadLock.lock(); try { plan = mEvictor.freeSpaceWithView(availableBytes, location, getUpdatedView()); // Absent plan means failed to evict enough space. if (plan == null) { - throw new OutOfSpaceException(ExceptionMessage.NO_EVICTION_PLAN_TO_FREE_SPACE); + throw new WorkerOutOfSpaceException(ExceptionMessage.NO_EVICTION_PLAN_TO_FREE_SPACE); } } finally { mMetadataReadLock.unlock(); @@ -641,11 +646,11 @@ private void freeSpaceInternal(long sessionId, long availableBytes, BlockStoreLo for (Pair blockInfo : plan.toEvict()) { try { removeBlockInternal(sessionId, blockInfo.getFirst(), blockInfo.getSecond()); - } catch (InvalidStateException ise) { + } catch (InvalidWorkerStateException ise) { // Evictor is not working properly LOG.error("Failed to evict blockId " + blockInfo.getFirst() + ", this is temp block"); continue; - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { LOG.info("Failed to evict blockId " + blockInfo.getFirst() + "," + " it could be already deleted"); continue; @@ -680,13 +685,13 @@ private void freeSpaceInternal(long sessionId, long availableBytes, BlockStoreLo MoveBlockResult moveResult; try { moveResult = moveBlockInternal(sessionId, blockId, oldLocation, newLocation); - } catch (InvalidStateException ise) { + } catch (InvalidWorkerStateException ise) { // Evictor is not working properly LOG.error("Failed to evict blockId " + blockId + ", this is temp block"); continue; - } catch (AlreadyExistsException aee) { + } catch (BlockAlreadyExistsException aee) { continue; - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { LOG.info("Failed to move blockId " + blockId + ", it could be already deleted"); continue; } @@ -725,14 +730,15 @@ private BlockMetadataManagerView getUpdatedView() { * @param oldLocation the source location of the block * @param newLocation new location to move this block * @return the resulting information about the move operation - * @throws NotFoundException if block is not found - * @throws AlreadyExistsException if a block with same Id already exists in new location - * @throws InvalidStateException if the block to move is a temp block + * @throws BlockDoesNotExistException if block is not found + * @throws BlockAlreadyExistsException if a block with same Id already exists in new location + * @throws InvalidWorkerStateException if the block to move is a temp block * @throws IOException if I/O errors occur when moving block file */ private MoveBlockResult moveBlockInternal(long sessionId, long blockId, - BlockStoreLocation oldLocation, BlockStoreLocation newLocation) throws NotFoundException, - AlreadyExistsException, InvalidStateException, IOException { + BlockStoreLocation oldLocation, BlockStoreLocation newLocation) + throws BlockDoesNotExistException, BlockAlreadyExistsException, InvalidWorkerStateException, + IOException { long lockId = mLockManager.lockBlock(sessionId, blockId, BlockLockType.WRITE); try { long blockSize; @@ -745,7 +751,7 @@ private MoveBlockResult moveBlockInternal(long sessionId, long blockId, mMetadataReadLock.lock(); try { if (mMetaManager.hasTempBlockMeta(blockId)) { - throw new InvalidStateException(ExceptionMessage.MOVE_UNCOMMITTED_BLOCK, blockId); + throw new InvalidWorkerStateException(ExceptionMessage.MOVE_UNCOMMITTED_BLOCK, blockId); } srcBlockMeta = mMetaManager.getBlockMeta(blockId); srcLocation = srcBlockMeta.getBlockLocation(); @@ -756,11 +762,11 @@ private MoveBlockResult moveBlockInternal(long sessionId, long blockId, } if (!srcLocation.belongTo(oldLocation)) { - throw new NotFoundException(ExceptionMessage.BLOCK_NOT_FOUND_AT_LOCATION, blockId, + throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_NOT_FOUND_AT_LOCATION, blockId, oldLocation); } - TempBlockMeta dstTempBlock = createBlockMetaInternal(sessionId, blockId, newLocation, - blockSize, false); + TempBlockMeta dstTempBlock = + createBlockMetaInternal(sessionId, blockId, newLocation, blockSize, false); if (dstTempBlock == null) { return new MoveBlockResult(false, blockSize, null, null); } @@ -786,11 +792,11 @@ private MoveBlockResult moveBlockInternal(long sessionId, long blockId, // If this metadata update fails, we panic for now. // TODO(bin): Implement rollback scheme to recover from IO failures. mMetaManager.moveBlockMeta(srcBlockMeta, dstTempBlock); - } catch (AlreadyExistsException aee) { + } catch (BlockAlreadyExistsException aee) { throw Throwables.propagate(aee); // we shall never reach here - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { throw Throwables.propagate(nfe); // we shall never reach here - } catch (OutOfSpaceException ose) { + } catch (WorkerOutOfSpaceException ose) { // Only possible if sessionId gets cleaned between createBlockMetaInternal and // moveBlockMeta. throw Throwables.propagate(ose); @@ -810,12 +816,12 @@ private MoveBlockResult moveBlockInternal(long sessionId, long blockId, * @param sessionId session Id * @param blockId block Id * @param location the source location of the block - * @throws InvalidStateException if the block to remove is a temp block - * @throws NotFoundException if this block can not be found + * @throws InvalidWorkerStateException if the block to remove is a temp block + * @throws BlockDoesNotExistException if this block can not be found * @throws IOException if I/O errors occur when removing this block file */ private void removeBlockInternal(long sessionId, long blockId, BlockStoreLocation location) - throws InvalidStateException, NotFoundException, IOException { + throws InvalidWorkerStateException, BlockDoesNotExistException, IOException { long lockId = mLockManager.lockBlock(sessionId, blockId, BlockLockType.WRITE); try { String filePath; @@ -823,7 +829,7 @@ private void removeBlockInternal(long sessionId, long blockId, BlockStoreLocatio mMetadataReadLock.lock(); try { if (mMetaManager.hasTempBlockMeta(blockId)) { - throw new InvalidStateException(ExceptionMessage.REMOVE_UNCOMMITTED_BLOCK, blockId); + throw new InvalidWorkerStateException(ExceptionMessage.REMOVE_UNCOMMITTED_BLOCK, blockId); } blockMeta = mMetaManager.getBlockMeta(blockId); filePath = blockMeta.getPath(); @@ -832,7 +838,7 @@ private void removeBlockInternal(long sessionId, long blockId, BlockStoreLocatio } if (!blockMeta.getBlockLocation().belongTo(location)) { - throw new NotFoundException(ExceptionMessage.BLOCK_NOT_FOUND_AT_LOCATION, blockId, + throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_NOT_FOUND_AT_LOCATION, blockId, location); } // Heavy IO is guarded by block lock but not metadata lock. This may throw IOException. @@ -841,7 +847,7 @@ private void removeBlockInternal(long sessionId, long blockId, BlockStoreLocatio mMetadataWriteLock.lock(); try { mMetaManager.removeBlockMeta(blockMeta); - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { throw Throwables.propagate(nfe); // we shall never reach here } finally { mMetadataWriteLock.unlock(); diff --git a/servers/src/main/java/tachyon/worker/block/evictor/EvictorBase.java b/servers/src/main/java/tachyon/worker/block/evictor/EvictorBase.java index cb1fdaa10a41..0d8d774aa478 100644 --- a/servers/src/main/java/tachyon/worker/block/evictor/EvictorBase.java +++ b/servers/src/main/java/tachyon/worker/block/evictor/EvictorBase.java @@ -28,7 +28,7 @@ import tachyon.Constants; import tachyon.collections.Pair; import tachyon.Sessions; -import tachyon.exception.NotFoundException; +import tachyon.exception.BlockDoesNotExistException; import tachyon.worker.block.BlockMetadataManagerView; import tachyon.worker.block.BlockStoreEventListenerBase; import tachyon.worker.block.BlockStoreLocation; @@ -97,7 +97,7 @@ protected StorageDirView cascadingEvict(long bytesToBeAvailable, BlockStoreLocat block.getBlockSize()); } } - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { LOG.warn("Remove block {} from evictor cache because {}", blockId, nfe); it.remove(); onRemoveBlockFromIterator(blockId); @@ -125,7 +125,7 @@ protected StorageDirView cascadingEvict(long bytesToBeAvailable, BlockStoreLocat plan.toEvict().add(new Pair(blockId, candidateDirView.toBlockStoreLocation())); } - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { continue; } } @@ -155,7 +155,7 @@ protected StorageDirView cascadingEvict(long bytesToBeAvailable, BlockStoreLocat nextDirView.toBlockStoreLocation())); candidateDirView.markBlockMoveOut(blockId, block.getBlockSize()); nextDirView.markBlockMoveIn(blockId, block.getBlockSize()); - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { continue; } } diff --git a/servers/src/main/java/tachyon/worker/block/meta/StorageDir.java b/servers/src/main/java/tachyon/worker/block/meta/StorageDir.java index 6a99902436aa..22bb2471d8f2 100644 --- a/servers/src/main/java/tachyon/worker/block/meta/StorageDir.java +++ b/servers/src/main/java/tachyon/worker/block/meta/StorageDir.java @@ -34,11 +34,11 @@ import tachyon.Constants; import tachyon.StorageDirId; import tachyon.StorageLevelAlias; -import tachyon.exception.AlreadyExistsException; +import tachyon.exception.BlockAlreadyExistsException; +import tachyon.exception.BlockDoesNotExistException; import tachyon.exception.ExceptionMessage; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; -import tachyon.exception.OutOfSpaceException; +import tachyon.exception.InvalidWorkerStateException; +import tachyon.exception.WorkerOutOfSpaceException; import tachyon.util.io.FileUtils; import tachyon.worker.block.BlockStoreLocation; @@ -88,12 +88,12 @@ private StorageDir(StorageTier tier, int dirIndex, long capacityBytes, String di * @param capacityBytes the initial capacity of this dir, can not be modified later * @param dirPath filesystem path of this dir for actual storage * @return the new created StorageDir - * @throws AlreadyExistsException when meta data of existing committed blocks already exists + * @throws BlockAlreadyExistsException when meta data of existing committed blocks already exists * @throws IOException if the storage directory cannot be created with the appropriate permissions - * @throws OutOfSpaceException when meta data can not be added due to limited left space + * @throws WorkerOutOfSpaceException when meta data can not be added due to limited left space */ public static StorageDir newStorageDir(StorageTier tier, int dirIndex, long capacityBytes, - String dirPath) throws AlreadyExistsException, IOException, OutOfSpaceException { + String dirPath) throws BlockAlreadyExistsException, IOException, WorkerOutOfSpaceException { StorageDir dir = new StorageDir(tier, dirIndex, capacityBytes, dirPath); dir.initializeMeta(); return dir; @@ -105,11 +105,12 @@ public static StorageDir newStorageDir(StorageTier tier, int dirIndex, long capa * Only paths satisfying the contract defined in {@link BlockMetaBase#commitPath} are legal, * should be in format like {dir}/{blockId}. other paths will be deleted. * - * @throws AlreadyExistsException when meta data of existing committed blocks already exists + * @throws BlockAlreadyExistsException when meta data of existing committed blocks already exists * @throws IOException if the storage directory cannot be created with the appropriate permissions - * @throws OutOfSpaceException when meta data can not be added due to limited left space + * @throws WorkerOutOfSpaceException when meta data can not be added due to limited left space */ - private void initializeMeta() throws AlreadyExistsException, IOException, OutOfSpaceException { + private void initializeMeta() throws BlockAlreadyExistsException, IOException, + WorkerOutOfSpaceException { // Create the storage directory path FileUtils.createStorageDirPath(mDirPath); @@ -245,12 +246,12 @@ public boolean hasTempBlockMeta(long blockId) { * * @param blockId the block ID * @return BlockMeta of the given block or null - * @throws NotFoundException if no block is found + * @throws BlockDoesNotExistException if no block is found */ - public BlockMeta getBlockMeta(long blockId) throws NotFoundException { + public BlockMeta getBlockMeta(long blockId) throws BlockDoesNotExistException { BlockMeta blockMeta = mBlockIdToBlockMap.get(blockId); if (blockMeta == null) { - throw new NotFoundException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); + throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); } return blockMeta; } @@ -260,12 +261,12 @@ public BlockMeta getBlockMeta(long blockId) throws NotFoundException { * * @param blockId the block ID * @return TempBlockMeta of the given block or null - * @throws NotFoundException if no temp block is found + * @throws BlockDoesNotExistException if no temp block is found */ - public TempBlockMeta getTempBlockMeta(long blockId) throws NotFoundException { + public TempBlockMeta getTempBlockMeta(long blockId) throws BlockDoesNotExistException { TempBlockMeta tempBlockMeta = mBlockIdToTempBlockMap.get(blockId); if (tempBlockMeta == null) { - throw new NotFoundException(ExceptionMessage.TEMP_BLOCK_META_NOT_FOUND, blockId); + throw new BlockDoesNotExistException(ExceptionMessage.TEMP_BLOCK_META_NOT_FOUND, blockId); } return tempBlockMeta; } @@ -274,10 +275,11 @@ public TempBlockMeta getTempBlockMeta(long blockId) throws NotFoundException { * Adds the metadata of a new block into this storage dir. * * @param blockMeta the meta data of the block - * @throws AlreadyExistsException if blockId already exists - * @throws OutOfSpaceException when not enough space to hold block + * @throws BlockAlreadyExistsException if blockId already exists + * @throws WorkerOutOfSpaceException when not enough space to hold block */ - public void addBlockMeta(BlockMeta blockMeta) throws OutOfSpaceException, AlreadyExistsException { + public void addBlockMeta(BlockMeta blockMeta) throws WorkerOutOfSpaceException, + BlockAlreadyExistsException { Preconditions.checkNotNull(blockMeta); long blockId = blockMeta.getBlockId(); long blockSize = blockMeta.getBlockSize(); @@ -285,13 +287,13 @@ public void addBlockMeta(BlockMeta blockMeta) throws OutOfSpaceException, Alread if (getAvailableBytes() < blockSize) { StorageLevelAlias alias = StorageLevelAlias.getAlias(blockMeta.getBlockLocation().tierAlias()); - throw new OutOfSpaceException(ExceptionMessage.NO_SPACE_FOR_BLOCK_META, blockId, blockSize, - getAvailableBytes(), alias); + throw new WorkerOutOfSpaceException(ExceptionMessage.NO_SPACE_FOR_BLOCK_META, blockId, + blockSize, getAvailableBytes(), alias); } if (hasBlockMeta(blockId)) { StorageLevelAlias alias = StorageLevelAlias.getAlias(blockMeta.getBlockLocation().tierAlias()); - throw new AlreadyExistsException(ExceptionMessage.ADD_EXISTING_BLOCK, blockId, alias); + throw new BlockAlreadyExistsException(ExceptionMessage.ADD_EXISTING_BLOCK, blockId, alias); } mBlockIdToBlockMap.put(blockId, blockMeta); reserveSpace(blockSize, true); @@ -301,11 +303,11 @@ public void addBlockMeta(BlockMeta blockMeta) throws OutOfSpaceException, Alread * Adds the metadata of a new block into this storage dir. * * @param tempBlockMeta the meta data of a temp block to add - * @throws AlreadyExistsException if blockId already exists - * @throws OutOfSpaceException when not enough space to hold block + * @throws BlockAlreadyExistsException if blockId already exists + * @throws WorkerOutOfSpaceException when not enough space to hold block */ - public void addTempBlockMeta(TempBlockMeta tempBlockMeta) - throws OutOfSpaceException, AlreadyExistsException { + public void addTempBlockMeta(TempBlockMeta tempBlockMeta) throws WorkerOutOfSpaceException, + BlockAlreadyExistsException { Preconditions.checkNotNull(tempBlockMeta); long sessionId = tempBlockMeta.getSessionId(); long blockId = tempBlockMeta.getBlockId(); @@ -314,13 +316,13 @@ public void addTempBlockMeta(TempBlockMeta tempBlockMeta) if (getAvailableBytes() < blockSize) { StorageLevelAlias alias = StorageLevelAlias.getAlias(tempBlockMeta.getBlockLocation().tierAlias()); - throw new OutOfSpaceException(ExceptionMessage.NO_SPACE_FOR_BLOCK_META, blockId, blockSize, - getAvailableBytes(), alias); + throw new WorkerOutOfSpaceException(ExceptionMessage.NO_SPACE_FOR_BLOCK_META, blockId, + blockSize, getAvailableBytes(), alias); } if (hasTempBlockMeta(blockId)) { StorageLevelAlias alias = StorageLevelAlias.getAlias(tempBlockMeta.getBlockLocation().tierAlias()); - throw new AlreadyExistsException(ExceptionMessage.ADD_EXISTING_BLOCK, blockId, alias); + throw new BlockAlreadyExistsException(ExceptionMessage.ADD_EXISTING_BLOCK, blockId, alias); } mBlockIdToTempBlockMap.put(blockId, tempBlockMeta); @@ -337,14 +339,14 @@ public void addTempBlockMeta(TempBlockMeta tempBlockMeta) * Removes a block from this storage dir. * * @param blockMeta the meta data of the block - * @throws NotFoundException if no block is found + * @throws BlockDoesNotExistException if no block is found */ - public void removeBlockMeta(BlockMeta blockMeta) throws NotFoundException { + public void removeBlockMeta(BlockMeta blockMeta) throws BlockDoesNotExistException { Preconditions.checkNotNull(blockMeta); long blockId = blockMeta.getBlockId(); BlockMeta deletedBlockMeta = mBlockIdToBlockMap.remove(blockId); if (deletedBlockMeta == null) { - throw new NotFoundException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); + throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); } reclaimSpace(blockMeta.getBlockSize(), true); } @@ -353,21 +355,21 @@ public void removeBlockMeta(BlockMeta blockMeta) throws NotFoundException { * Removes a temp block from this storage dir. * * @param tempBlockMeta the meta data of the temp block to remove - * @throws NotFoundException if no temp block is found + * @throws BlockDoesNotExistException if no temp block is found */ - public void removeTempBlockMeta(TempBlockMeta tempBlockMeta) throws NotFoundException { + public void removeTempBlockMeta(TempBlockMeta tempBlockMeta) throws BlockDoesNotExistException { Preconditions.checkNotNull(tempBlockMeta); final long blockId = tempBlockMeta.getBlockId(); final long sessionId = tempBlockMeta.getSessionId(); TempBlockMeta deletedTempBlockMeta = mBlockIdToTempBlockMap.remove(blockId); if (deletedTempBlockMeta == null) { - throw new NotFoundException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); + throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); } Set sessionBlocks = mSessionIdToTempBlockIdsMap.get(sessionId); if (sessionBlocks == null || !sessionBlocks.contains(blockId)) { StorageLevelAlias alias = StorageLevelAlias.getAlias(this.getDirIndex()); - throw new NotFoundException(ExceptionMessage.BLOCK_NOT_FOUND_FOR_SESSION, blockId, alias, - sessionId); + throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_NOT_FOUND_FOR_SESSION, blockId, + alias, sessionId); } Preconditions.checkState(sessionBlocks.remove(blockId)); if (sessionBlocks.isEmpty()) { @@ -381,16 +383,16 @@ public void removeTempBlockMeta(TempBlockMeta tempBlockMeta) throws NotFoundExce * * @param tempBlockMeta the meta data of the temp block to resize * @param newSize the new size after change in bytes - * @throws InvalidStateException when newSize is smaller than oldSize + * @throws InvalidWorkerStateException when newSize is smaller than oldSize */ public void resizeTempBlockMeta(TempBlockMeta tempBlockMeta, long newSize) - throws InvalidStateException { + throws InvalidWorkerStateException { long oldSize = tempBlockMeta.getBlockSize(); if (newSize > oldSize) { reserveSpace(newSize - oldSize, false); tempBlockMeta.setBlockSize(newSize); } else if (newSize < oldSize) { - throw new InvalidStateException("Shrinking block, not supported!"); + throw new InvalidWorkerStateException("Shrinking block, not supported!"); } } diff --git a/servers/src/main/java/tachyon/worker/block/meta/StorageTier.java b/servers/src/main/java/tachyon/worker/block/meta/StorageTier.java index 0414ab359623..f19816046a9f 100644 --- a/servers/src/main/java/tachyon/worker/block/meta/StorageTier.java +++ b/servers/src/main/java/tachyon/worker/block/meta/StorageTier.java @@ -22,8 +22,8 @@ import tachyon.Constants; import tachyon.StorageLevelAlias; -import tachyon.exception.AlreadyExistsException; -import tachyon.exception.OutOfSpaceException; +import tachyon.exception.BlockAlreadyExistsException; +import tachyon.exception.WorkerOutOfSpaceException; import tachyon.util.FormatUtils; import tachyon.util.io.PathUtils; import tachyon.worker.WorkerContext; @@ -54,8 +54,8 @@ private StorageTier(int tierLevel) { mTierAlias = alias.getValue(); } - private void initStorageTier() throws AlreadyExistsException, IOException, - OutOfSpaceException { + private void initStorageTier() throws BlockAlreadyExistsException, IOException, + WorkerOutOfSpaceException { String workerDataFolder = WorkerContext.getConf().get(Constants.WORKER_DATA_FOLDER); String tierDirPathConf = String.format(Constants.WORKER_TIERED_STORAGE_LEVEL_DIRS_PATH_FORMAT, mTierLevel); @@ -88,12 +88,12 @@ private void initStorageTier() throws AlreadyExistsException, IOException, * * @param tierLevel the tier level * @return a new storage tier - * @throws AlreadyExistsException if the tier already exists + * @throws BlockAlreadyExistsException if the tier already exists * @throws IOException if an I/O error occurred - * @throws OutOfSpaceException if there is not enough space available + * @throws WorkerOutOfSpaceException if there is not enough space available */ public static StorageTier newStorageTier(int tierLevel) - throws AlreadyExistsException, IOException, OutOfSpaceException { + throws BlockAlreadyExistsException, IOException, WorkerOutOfSpaceException { StorageTier ret = new StorageTier(tierLevel); ret.initStorageTier(); return ret; diff --git a/servers/src/main/java/tachyon/worker/lineage/LineageDataManager.java b/servers/src/main/java/tachyon/worker/lineage/LineageDataManager.java index cfcd3a8520f0..dacb6d1e2474 100644 --- a/servers/src/main/java/tachyon/worker/lineage/LineageDataManager.java +++ b/servers/src/main/java/tachyon/worker/lineage/LineageDataManager.java @@ -32,9 +32,8 @@ import tachyon.Sessions; import tachyon.TachyonURI; import tachyon.conf.TachyonConf; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; -import tachyon.thrift.FileDoesNotExistException; +import tachyon.exception.BlockDoesNotExistException; +import tachyon.exception.InvalidWorkerStateException; import tachyon.thrift.FileInfo; import tachyon.underfs.UnderFileSystem; import tachyon.util.io.BufferUtils; @@ -74,12 +73,7 @@ public LineageDataManager(BlockDataManager blockDataManager) { public synchronized void persistFile(long fileId, List blockIds) throws IOException { String ufsDataFolder = mTachyonConf.get(Constants.UNDERFS_DATA_FOLDER); FileInfo fileInfo; - try { - fileInfo = mBlockDataManager.getFileInfo(fileId); - } catch (FileDoesNotExistException e) { - LOG.error("Fail to get file info for file " + fileId, e); - throw new IOException(e); - } + fileInfo = mBlockDataManager.getFileInfo(fileId); TachyonURI uri = new TachyonURI(fileInfo.getPath()); String dstPath = PathUtils.concatPath(ufsDataFolder, fileInfo.getPath()); LOG.info("persist file " + fileId + " at " + dstPath); @@ -94,8 +88,8 @@ public synchronized void persistFile(long fileId, List blockIds) throws IO long lockId; try { lockId = mBlockDataManager.lockBlock(Sessions.CHECKPOINT_SESSION_ID, blockId); - } catch (NotFoundException ioe) { - throw new IOException(ioe); + } catch (BlockDoesNotExistException e) { + throw new IOException(e); } // obtain block reader @@ -104,10 +98,10 @@ public synchronized void persistFile(long fileId, List blockIds) throws IO try { reader = mBlockDataManager.readBlockRemote(Sessions.CHECKPOINT_SESSION_ID, blockId, lockId); - } catch (NotFoundException nfe) { - throw new IOException(nfe); - } catch (InvalidStateException ise) { - throw new IOException(ise); + } catch (BlockDoesNotExistException e) { + throw new IOException(e); + } catch (InvalidWorkerStateException e) { + throw new IOException(e); } // write content out @@ -117,8 +111,8 @@ public synchronized void persistFile(long fileId, List blockIds) throws IO } finally { try { mBlockDataManager.unlockBlock(lockId); - } catch (NotFoundException nfe) { - throw new IOException(nfe); + } catch (BlockDoesNotExistException e) { + throw new IOException(e); } } } diff --git a/servers/src/main/java/tachyon/worker/netty/DataServerHandler.java b/servers/src/main/java/tachyon/worker/netty/DataServerHandler.java index bf5f5b0762dc..ec353cb5e221 100644 --- a/servers/src/main/java/tachyon/worker/netty/DataServerHandler.java +++ b/servers/src/main/java/tachyon/worker/netty/DataServerHandler.java @@ -34,8 +34,8 @@ import tachyon.Sessions; import tachyon.StorageLevelAlias; import tachyon.conf.TachyonConf; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; +import tachyon.exception.BlockDoesNotExistException; +import tachyon.exception.InvalidWorkerStateException; import tachyon.network.protocol.RPCBlockReadRequest; import tachyon.network.protocol.RPCBlockReadResponse; import tachyon.network.protocol.RPCBlockWriteRequest; @@ -102,7 +102,7 @@ private void handleBlockReadRequest(final ChannelHandlerContext ctx, long lockId; try { lockId = mDataManager.lockBlock(Sessions.DATASERVER_SESSION_ID, blockId); - } catch (NotFoundException ioe) { + } catch (BlockDoesNotExistException ioe) { LOG.error("Failed to lock block: " + blockId, ioe); RPCBlockReadResponse resp = RPCBlockReadResponse.createErrorResponse(req, RPCResponse.Status.BLOCK_LOCK_ERROR); @@ -114,9 +114,9 @@ private void handleBlockReadRequest(final ChannelHandlerContext ctx, BlockReader reader; try { reader = mDataManager.readBlockRemote(Sessions.DATASERVER_SESSION_ID, blockId, lockId); - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { throw new IOException(nfe); - } catch (InvalidStateException fpe) { + } catch (InvalidWorkerStateException fpe) { throw new IOException(fpe); } try { @@ -143,7 +143,7 @@ private void handleBlockReadRequest(final ChannelHandlerContext ctx, } finally { try { mDataManager.unlockBlock(lockId); - } catch (NotFoundException nfe) { + } catch (BlockDoesNotExistException nfe) { throw new IOException(nfe); } } diff --git a/servers/src/main/java/tachyon/worker/nio/NIODataServer.java b/servers/src/main/java/tachyon/worker/nio/NIODataServer.java index 8ffec1e32ee6..12340df67ed5 100644 --- a/servers/src/main/java/tachyon/worker/nio/NIODataServer.java +++ b/servers/src/main/java/tachyon/worker/nio/NIODataServer.java @@ -37,7 +37,7 @@ import tachyon.Constants; import tachyon.Sessions; import tachyon.conf.TachyonConf; -import tachyon.exception.NotFoundException; +import tachyon.exception.BlockDoesNotExistException; import tachyon.util.network.NetworkAddressUtils; import tachyon.worker.DataServer; import tachyon.worker.DataServerMessage; @@ -314,7 +314,7 @@ private void write(SelectionKey key) { // TODO(calvin): Reconsider how we handle this exception. try { mDataManager.unlockBlock(sendMessage.getLockId()); - } catch (NotFoundException ioe) { + } catch (BlockDoesNotExistException ioe) { LOG.error("Failed to unlock block: " + sendMessage.getBlockId(), ioe); } } diff --git a/servers/src/test/java/tachyon/master/block/BlockMasterTest.java b/servers/src/test/java/tachyon/master/block/BlockMasterTest.java index e45f56e27dbe..663fa4294f39 100644 --- a/servers/src/test/java/tachyon/master/block/BlockMasterTest.java +++ b/servers/src/test/java/tachyon/master/block/BlockMasterTest.java @@ -33,6 +33,7 @@ import com.google.common.collect.Sets; import tachyon.StorageLevelAlias; +import tachyon.exception.TachyonException; import tachyon.master.block.meta.MasterWorkerInfo; import tachyon.master.journal.Journal; import tachyon.master.journal.ReadWriteJournal; @@ -40,7 +41,6 @@ import tachyon.thrift.Command; import tachyon.thrift.CommandType; import tachyon.thrift.NetAddress; -import tachyon.thrift.TachyonException; /** * Unit tests for tachyon.master.block.BlockMaster. diff --git a/servers/src/test/java/tachyon/master/file/FileSystemMasterTest.java b/servers/src/test/java/tachyon/master/file/FileSystemMasterTest.java index 7d9b585b55f4..9285df6d243b 100644 --- a/servers/src/test/java/tachyon/master/file/FileSystemMasterTest.java +++ b/servers/src/test/java/tachyon/master/file/FileSystemMasterTest.java @@ -29,14 +29,13 @@ import tachyon.Constants; import tachyon.TachyonURI; -import tachyon.conf.TachyonConf; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.master.MasterContext; import tachyon.master.block.BlockMaster; import tachyon.master.journal.Journal; import tachyon.master.journal.ReadWriteJournal; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; import tachyon.thrift.NetAddress; import tachyon.util.CommonUtils; diff --git a/servers/src/test/java/tachyon/master/file/meta/InodeFileTest.java b/servers/src/test/java/tachyon/master/file/meta/InodeFileTest.java index d1e504cca6ca..8abffcbaf948 100644 --- a/servers/src/test/java/tachyon/master/file/meta/InodeFileTest.java +++ b/servers/src/test/java/tachyon/master/file/meta/InodeFileTest.java @@ -23,8 +23,8 @@ import com.google.common.collect.Lists; import tachyon.Constants; -import tachyon.thrift.BlockInfoException; -import tachyon.thrift.SuspectedFileSizeException; +import tachyon.exception.BlockInfoException; +import tachyon.exception.SuspectedFileSizeException; /** * Unit tests for tachyon.InodeFile diff --git a/servers/src/test/java/tachyon/master/file/meta/InodeTreeTest.java b/servers/src/test/java/tachyon/master/file/meta/InodeTreeTest.java index 35f4b0bdcba3..17c5fdb8884d 100644 --- a/servers/src/test/java/tachyon/master/file/meta/InodeTreeTest.java +++ b/servers/src/test/java/tachyon/master/file/meta/InodeTreeTest.java @@ -32,15 +32,15 @@ import tachyon.Constants; import tachyon.TachyonURI; +import tachyon.exception.BlockInfoException; +import tachyon.exception.FileAlreadyExistsException; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.master.block.BlockMaster; import tachyon.master.file.journal.InodeEntry; import tachyon.master.journal.Journal; import tachyon.master.journal.JournalOutputStream; import tachyon.master.journal.ReadWriteJournal; -import tachyon.thrift.BlockInfoException; -import tachyon.thrift.FileAlreadyExistException; -import tachyon.thrift.FileDoesNotExistException; -import tachyon.thrift.InvalidPathException; import tachyon.util.CommonUtils; /** @@ -171,7 +171,7 @@ public void createPathTest() throws Exception { @Test public void createRootPathTest() throws Exception { - mThrown.expect(FileAlreadyExistException.class); + mThrown.expect(FileAlreadyExistsException.class); mThrown.expectMessage("/"); mTree.createPath(new TachyonURI("/"), Constants.KB, false, true); @@ -203,7 +203,7 @@ public void createFileUnderNonexistingDirTest() throws Exception { @Test public void createFileTwiceTest() throws Exception { - mThrown.expect(FileAlreadyExistException.class); + mThrown.expect(FileAlreadyExistsException.class); mThrown.expectMessage("/nested/test"); mTree.createPath(NESTED_URI, Constants.KB, true, false); diff --git a/servers/src/test/java/tachyon/master/file/meta/MountTableTest.java b/servers/src/test/java/tachyon/master/file/meta/MountTableTest.java index b03eb8d10a4c..6196cb2292b1 100644 --- a/servers/src/test/java/tachyon/master/file/meta/MountTableTest.java +++ b/servers/src/test/java/tachyon/master/file/meta/MountTableTest.java @@ -15,15 +15,12 @@ package tachyon.master.file.meta; -import java.util.LinkedList; -import java.util.List; - import org.junit.Assert; import org.junit.Before; import org.junit.Test; import tachyon.TachyonURI; -import tachyon.thrift.InvalidPathException; +import tachyon.exception.TachyonException; public class MountTableTest { private MountTable mMountTable; @@ -34,7 +31,7 @@ public void before() { } @Test - public void pathTest() throws InvalidPathException { + public void pathTest() throws TachyonException { // Test add() Assert.assertTrue(mMountTable.add(new TachyonURI("/"), new TachyonURI("/"))); Assert.assertTrue(mMountTable.add(new TachyonURI("/mnt/foo"), new TachyonURI("/foo"))); @@ -85,7 +82,7 @@ public void pathTest() throws InvalidPathException { } @Test - public void uriTest() throws InvalidPathException { + public void uriTest() throws TachyonException { // Test add() Assert.assertTrue(mMountTable.add(new TachyonURI("tachyon://localhost:1234/"), new TachyonURI("hdfs://localhost:5678/"))); diff --git a/servers/src/test/java/tachyon/worker/block/BlockLockManagerTest.java b/servers/src/test/java/tachyon/worker/block/BlockLockManagerTest.java index 6ab8ba529b99..c7a11bc74003 100644 --- a/servers/src/test/java/tachyon/worker/block/BlockLockManagerTest.java +++ b/servers/src/test/java/tachyon/worker/block/BlockLockManagerTest.java @@ -23,9 +23,9 @@ import org.junit.rules.TemporaryFolder; import org.mockito.Mockito; +import tachyon.exception.BlockDoesNotExistException; import tachyon.exception.ExceptionMessage; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; +import tachyon.exception.InvalidWorkerStateException; public class BlockLockManagerTest { private static final long TEST_SESSION_ID = 2; @@ -57,7 +57,7 @@ public void lockBlockTest() throws Exception { @Test public void unlockNonExistingLockTest() throws Exception { long badLockId = 1; - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_LOCK_ID.getMessage(badLockId)); // Unlock a non-existing lockId, expect to see IOException mLockManager.unlockBlock(badLockId); @@ -66,7 +66,7 @@ public void unlockNonExistingLockTest() throws Exception { @Test public void validateLockIdWithNoRecordTest() throws Exception { long badLockId = 1; - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_LOCK_ID.getMessage(badLockId)); // Validate a non-existing lockId, expect to see IOException mLockManager.validateLock(TEST_SESSION_ID, TEST_BLOCK_ID, badLockId); @@ -76,7 +76,7 @@ public void validateLockIdWithNoRecordTest() throws Exception { public void validateLockIdWithWrongSessionIdTest() throws Exception { long lockId = mLockManager.lockBlock(TEST_SESSION_ID, TEST_BLOCK_ID, BlockLockType.READ); long wrongSessionId = TEST_SESSION_ID + 1; - mThrown.expect(InvalidStateException.class); + mThrown.expect(InvalidWorkerStateException.class); mThrown.expectMessage(ExceptionMessage.LOCK_ID_FOR_DIFFERENT_SESSION.getMessage(lockId, TEST_SESSION_ID, wrongSessionId)); // Validate an existing lockId with wrong sessionId, expect to see IOException @@ -87,7 +87,7 @@ public void validateLockIdWithWrongSessionIdTest() throws Exception { public void validateLockIdWithWrongBlockIdTest() throws Exception { long lockId = mLockManager.lockBlock(TEST_SESSION_ID, TEST_BLOCK_ID, BlockLockType.READ); long wrongBlockId = TEST_BLOCK_ID + 1; - mThrown.expect(InvalidStateException.class); + mThrown.expect(InvalidWorkerStateException.class); mThrown.expectMessage(ExceptionMessage.LOCK_ID_FOR_DIFFERENT_BLOCK.getMessage(lockId, TEST_BLOCK_ID, wrongBlockId)); // Validate an existing lockId with wrong blockId, expect to see IOException @@ -100,7 +100,7 @@ public void cleanupSessionTest() throws Exception { long sessionId2 = TEST_SESSION_ID + 1; long lockId1 = mLockManager.lockBlock(sessionId1, TEST_BLOCK_ID, BlockLockType.READ); long lockId2 = mLockManager.lockBlock(sessionId2, TEST_BLOCK_ID, BlockLockType.READ); - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_LOCK_ID.getMessage(lockId2)); mLockManager.cleanupSession(sessionId2); // Expect validating sessionId1 to get through diff --git a/servers/src/test/java/tachyon/worker/block/BlockMetadataManagerTest.java b/servers/src/test/java/tachyon/worker/block/BlockMetadataManagerTest.java index 481fe3711eed..d6672ad3ea58 100644 --- a/servers/src/test/java/tachyon/worker/block/BlockMetadataManagerTest.java +++ b/servers/src/test/java/tachyon/worker/block/BlockMetadataManagerTest.java @@ -30,9 +30,9 @@ import com.google.common.collect.Sets; import tachyon.StorageLevelAlias; +import tachyon.exception.BlockDoesNotExistException; import tachyon.exception.ExceptionMessage; -import tachyon.exception.NotFoundException; -import tachyon.exception.OutOfSpaceException; +import tachyon.exception.WorkerOutOfSpaceException; import tachyon.worker.block.meta.BlockMeta; import tachyon.worker.block.meta.StorageDir; import tachyon.worker.block.meta.StorageTier; @@ -172,14 +172,14 @@ public void blockMetaTest() throws Exception { @Test public void getBlockMetaNotExistingTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_META_NOT_FOUND.getMessage(TEST_BLOCK_ID)); mMetaManager.getBlockMeta(TEST_BLOCK_ID); } @Test public void getTempBlockMetaNotExistingTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown .expectMessage(ExceptionMessage.TEMP_BLOCK_META_NOT_FOUND.getMessage(TEST_TEMP_BLOCK_ID)); mMetaManager.getTempBlockMeta(TEST_TEMP_BLOCK_ID); @@ -206,7 +206,7 @@ public void moveBlockMetaSameDirTest() throws Exception { mMetaManager.moveBlockMeta(blockMeta, tempBlockMeta2); // test to make sure that the dst tempBlockMeta has been removed from the dir - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.TEMP_BLOCK_META_NOT_FOUND .getMessage(TEST_TEMP_BLOCK_ID2)); mMetaManager.getTempBlockMeta(TEST_TEMP_BLOCK_ID2); @@ -231,7 +231,7 @@ public void moveBlockMetaDiffDirTest() throws Exception { mMetaManager.moveBlockMeta(blockMeta, tempBlockMeta2); // make sure that the dst tempBlockMeta has been removed from the dir2 - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.TEMP_BLOCK_META_NOT_FOUND .getMessage(TEST_TEMP_BLOCK_ID2)); mMetaManager.getTempBlockMeta(TEST_TEMP_BLOCK_ID2); @@ -240,7 +240,7 @@ public void moveBlockMetaDiffDirTest() throws Exception { @Test public void moveBlockMetaOutOfSpaceExceptionTest() throws Exception { // Create a committed block under dir2 with larger size than the capacity of dir1, - // so that OutOfSpaceException should be thrown when move this block to dir1. + // so that WorkerOutOfSpaceException should be thrown when move this block to dir1. StorageDir dir1 = mMetaManager.getTier(3).getDir(0); StorageDir dir2 = mMetaManager.getTier(3).getDir(1); @@ -252,7 +252,7 @@ public void moveBlockMetaOutOfSpaceExceptionTest() throws Exception { mMetaManager.addTempBlockMeta(tempBlockMeta2); dir2.addBlockMeta(blockMeta); - mThrown.expect(OutOfSpaceException.class); + mThrown.expect(WorkerOutOfSpaceException.class); mThrown.expectMessage(ExceptionMessage.NO_SPACE_FOR_BLOCK_META.getMessage(TEST_BLOCK_ID, blockMetaSize, maxHddDir1Capacity, TIER_ALIAS[1])); mMetaManager.moveBlockMeta(blockMeta, tempBlockMeta2); @@ -286,7 +286,7 @@ public void moveBlockMetaDeprecatedExceedCapacityTest() throws Exception { BlockMeta blockMeta = new BlockMeta(TEST_BLOCK_ID, 2000, dir); dir.addBlockMeta(blockMeta); - mThrown.expect(OutOfSpaceException.class); + mThrown.expect(WorkerOutOfSpaceException.class); mThrown.expectMessage("does not have enough space"); mMetaManager.moveBlockMeta(blockMeta, new BlockStoreLocation(1, 0, 0)); } diff --git a/servers/src/test/java/tachyon/worker/block/BlockMetadataManagerViewTest.java b/servers/src/test/java/tachyon/worker/block/BlockMetadataManagerViewTest.java index ddca09b4a876..cae5ec967ba6 100644 --- a/servers/src/test/java/tachyon/worker/block/BlockMetadataManagerViewTest.java +++ b/servers/src/test/java/tachyon/worker/block/BlockMetadataManagerViewTest.java @@ -28,8 +28,8 @@ import com.google.common.collect.Sets; +import tachyon.exception.BlockDoesNotExistException; import tachyon.exception.ExceptionMessage; -import tachyon.exception.NotFoundException; import tachyon.master.block.BlockId; import tachyon.worker.block.meta.BlockMeta; import tachyon.worker.block.meta.StorageDir; @@ -107,8 +107,8 @@ public void getAvailableBytesTest() { } @Test - public void getBlockMetaNotExistingTest() throws NotFoundException { - mThrown.expect(NotFoundException.class); + public void getBlockMetaNotExistingTest() throws BlockDoesNotExistException { + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_META_NOT_FOUND.getMessage(TEST_BLOCK_ID)); mMetaManagerView.getBlockMeta(TEST_BLOCK_ID); } diff --git a/servers/src/test/java/tachyon/worker/block/TieredBlockStoreTests.java b/servers/src/test/java/tachyon/worker/block/TieredBlockStoreTests.java index 0683a05cda2f..8cc5b467d2be 100644 --- a/servers/src/test/java/tachyon/worker/block/TieredBlockStoreTests.java +++ b/servers/src/test/java/tachyon/worker/block/TieredBlockStoreTests.java @@ -29,11 +29,11 @@ import com.google.common.collect.Sets; import tachyon.StorageLevelAlias; -import tachyon.exception.AlreadyExistsException; +import tachyon.exception.BlockAlreadyExistsException; +import tachyon.exception.BlockDoesNotExistException; import tachyon.exception.ExceptionMessage; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; -import tachyon.exception.OutOfSpaceException; +import tachyon.exception.InvalidWorkerStateException; +import tachyon.exception.WorkerOutOfSpaceException; import tachyon.util.io.FileUtils; import tachyon.worker.block.evictor.Evictor; import tachyon.worker.block.meta.BlockMeta; @@ -130,7 +130,7 @@ public void sameSessionLockDifferentBlocksTest() throws Exception { @Test public void lockNonExistingBlockTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_BLOCK_AND_SESSION .getMessage(BLOCK_ID1, SESSION_ID1)); @@ -140,7 +140,7 @@ public void lockNonExistingBlockTest() throws Exception { @Test public void unlockNonExistingLockTest() throws Exception { long badLockId = 1003; - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_LOCK_ID.getMessage(badLockId)); mBlockStore.unlockBlock(badLockId); @@ -183,7 +183,7 @@ public void moveBlockTest() throws Exception { TieredBlockStoreTestUtils.cache(SESSION_ID2, BLOCK_ID2, BLOCK_SIZE, mTestDir1, mMetaManager, mEvictor); // Move block from wrong Dir - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_NOT_FOUND_AT_LOCATION.getMessage(BLOCK_ID2, mTestDir2.toBlockStoreLocation())); mBlockStore.moveBlock(SESSION_ID2, BLOCK_ID2, mTestDir2.toBlockStoreLocation(), @@ -238,7 +238,7 @@ public void removeBlockTest() throws Exception { TieredBlockStoreTestUtils.cache(SESSION_ID2, BLOCK_ID2, BLOCK_SIZE, mTestDir1, mMetaManager, mEvictor); // Remove block from wrong Dir - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_NOT_FOUND_AT_LOCATION.getMessage(BLOCK_ID2, mTestDir2.toBlockStoreLocation())); mBlockStore.removeBlock(SESSION_ID2, BLOCK_ID2, mTestDir2.toBlockStoreLocation()); @@ -311,7 +311,7 @@ public void createBlockMetaWithBlockLockedTest() throws Exception { long lockId = mBlockStore.lockBlock(SESSION_ID1, BLOCK_ID1); // Expect an exception because no eviction plan is feasible - mThrown.expect(OutOfSpaceException.class); + mThrown.expect(WorkerOutOfSpaceException.class); mThrown.expectMessage(ExceptionMessage.NO_EVICTION_PLAN_TO_FREE_SPACE.getMessage()); mBlockStore.createBlockMeta(SESSION_ID1, TEMP_BLOCK_ID, mTestDir1.toBlockStoreLocation(), mTestDir1.getCapacityBytes()); @@ -338,7 +338,7 @@ public void moveBlockMetaWithBlockLockedTest() throws Exception { long lockId = mBlockStore.lockBlock(SESSION_ID1, BLOCK_ID2); // Expect an exception because no eviction plan is feasible - mThrown.expect(OutOfSpaceException.class); + mThrown.expect(WorkerOutOfSpaceException.class); mThrown.expectMessage(ExceptionMessage.NO_EVICTION_PLAN_TO_FREE_SPACE.getMessage()); mBlockStore.moveBlock(SESSION_ID1, BLOCK_ID1, mTestDir2.toBlockStoreLocation()); @@ -361,7 +361,7 @@ public void freeSpaceWithBlockLockedTest() throws Exception { long lockId = mBlockStore.lockBlock(SESSION_ID1, BLOCK_ID1); // Expect an exception as no eviction plan is feasible - mThrown.expect(OutOfSpaceException.class); + mThrown.expect(WorkerOutOfSpaceException.class); mThrown.expectMessage(ExceptionMessage.NO_EVICTION_PLAN_TO_FREE_SPACE.getMessage()); mBlockStore.freeSpace(SESSION_ID1, mTestDir1.getCapacityBytes(), mTestDir1.toBlockStoreLocation()); @@ -375,7 +375,7 @@ public void freeSpaceWithBlockLockedTest() throws Exception { @Test public void getBlockWriterForNonExistingBlockTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.TEMP_BLOCK_META_NOT_FOUND.getMessage(BLOCK_ID1)); mBlockStore.getBlockWriter(SESSION_ID1, BLOCK_ID1); @@ -383,7 +383,7 @@ public void getBlockWriterForNonExistingBlockTest() throws Exception { @Test public void abortNonExistingBlockTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.TEMP_BLOCK_META_NOT_FOUND.getMessage(BLOCK_ID1)); mBlockStore.abortBlock(SESSION_ID1, BLOCK_ID1); @@ -391,7 +391,7 @@ public void abortNonExistingBlockTest() throws Exception { @Test public void abortBlockNotOwnedBySessionIdTest() throws Exception { - mThrown.expect(InvalidStateException.class); + mThrown.expect(InvalidWorkerStateException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_ID_FOR_DIFFERENT_SESSION.getMessage(TEMP_BLOCK_ID, SESSION_ID1, SESSION_ID2)); @@ -401,7 +401,7 @@ public void abortBlockNotOwnedBySessionIdTest() throws Exception { @Test public void abortCommitedBlockTest() throws Exception { - mThrown.expect(AlreadyExistsException.class); + mThrown.expect(BlockAlreadyExistsException.class); mThrown.expectMessage(ExceptionMessage.TEMP_BLOCK_ID_COMMITTED.getMessage(TEMP_BLOCK_ID)); TieredBlockStoreTestUtils.createTempBlock(SESSION_ID1, TEMP_BLOCK_ID, BLOCK_SIZE, mTestDir1); @@ -411,7 +411,7 @@ public void abortCommitedBlockTest() throws Exception { @Test public void moveNonExistingBlockTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_META_NOT_FOUND.getMessage(BLOCK_ID1)); mBlockStore.moveBlock(SESSION_ID1, BLOCK_ID1, mTestDir1.toBlockStoreLocation()); @@ -419,7 +419,7 @@ public void moveNonExistingBlockTest() throws Exception { @Test public void moveTempBlockTest() throws Exception { - mThrown.expect(InvalidStateException.class); + mThrown.expect(InvalidWorkerStateException.class); mThrown.expectMessage(ExceptionMessage.MOVE_UNCOMMITTED_BLOCK.getMessage(TEMP_BLOCK_ID)); TieredBlockStoreTestUtils.createTempBlock(SESSION_ID1, TEMP_BLOCK_ID, BLOCK_SIZE, mTestDir1); @@ -430,7 +430,7 @@ public void moveTempBlockTest() throws Exception { @Ignore @Test public void moveBlockToTheLocationWithExistingIdTest() throws Exception { - mThrown.expect(AlreadyExistsException.class); + mThrown.expect(BlockAlreadyExistsException.class); mThrown.expectMessage("Failed to add BlockMeta: blockId " + BLOCK_ID1 + " exists"); TieredBlockStoreTestUtils.cache(SESSION_ID1, BLOCK_ID1, BLOCK_SIZE, mTestDir1, mMetaManager, @@ -442,7 +442,7 @@ public void moveBlockToTheLocationWithExistingIdTest() throws Exception { @Test public void commitBlockTwiceTest() throws Exception { - mThrown.expect(AlreadyExistsException.class); + mThrown.expect(BlockAlreadyExistsException.class); mThrown.expectMessage(ExceptionMessage.TEMP_BLOCK_ID_COMMITTED.getMessage(TEMP_BLOCK_ID)); TieredBlockStoreTestUtils.createTempBlock(SESSION_ID1, TEMP_BLOCK_ID, BLOCK_SIZE, mTestDir1); @@ -452,7 +452,7 @@ public void commitBlockTwiceTest() throws Exception { @Test public void commitNonExistingBlockTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.TEMP_BLOCK_META_NOT_FOUND.getMessage(BLOCK_ID1)); mBlockStore.commitBlock(SESSION_ID1, BLOCK_ID1); @@ -460,7 +460,7 @@ public void commitNonExistingBlockTest() throws Exception { @Test public void commitBlockNotOwnedBySessionIdTest() throws Exception { - mThrown.expect(InvalidStateException.class); + mThrown.expect(InvalidWorkerStateException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_ID_FOR_DIFFERENT_SESSION.getMessage(TEMP_BLOCK_ID, SESSION_ID1, SESSION_ID2)); @@ -470,7 +470,7 @@ public void commitBlockNotOwnedBySessionIdTest() throws Exception { @Test public void removeTempBlockTest() throws Exception { - mThrown.expect(InvalidStateException.class); + mThrown.expect(InvalidWorkerStateException.class); mThrown.expectMessage(ExceptionMessage.REMOVE_UNCOMMITTED_BLOCK.getMessage(TEMP_BLOCK_ID)); TieredBlockStoreTestUtils.createTempBlock(SESSION_ID1, TEMP_BLOCK_ID, BLOCK_SIZE, mTestDir1); @@ -479,7 +479,7 @@ public void removeTempBlockTest() throws Exception { @Test public void removeNonExistingBlockTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_META_NOT_FOUND.getMessage(BLOCK_ID1)); mBlockStore.removeBlock(SESSION_ID1, BLOCK_ID1); diff --git a/servers/src/test/java/tachyon/worker/block/evictor/EvictorTestUtils.java b/servers/src/test/java/tachyon/worker/block/evictor/EvictorTestUtils.java index 2c732bf9101a..d67b8479b4ac 100644 --- a/servers/src/test/java/tachyon/worker/block/evictor/EvictorTestUtils.java +++ b/servers/src/test/java/tachyon/worker/block/evictor/EvictorTestUtils.java @@ -25,7 +25,7 @@ import com.google.common.base.Preconditions; import tachyon.collections.Pair; -import tachyon.exception.NotFoundException; +import tachyon.exception.BlockDoesNotExistException; import tachyon.worker.block.BlockMetadataManager; import tachyon.worker.block.BlockStoreLocation; import tachyon.worker.block.meta.BlockMeta; @@ -41,10 +41,10 @@ public class EvictorTestUtils { * @param plan the eviction plan * @param meta the meta data manager * @return true if blocks are in the same dir otherwise false - * @throws NotFoundException if fail to get meta data of a block + * @throws BlockDoesNotExistException if fail to get meta data of a block */ public static boolean blocksInTheSameDir(EvictionPlan plan, BlockMetadataManager meta) - throws NotFoundException { + throws BlockDoesNotExistException { Preconditions.checkNotNull(plan); StorageDir dir = null; @@ -77,10 +77,10 @@ public static boolean blocksInTheSameDir(EvictionPlan plan, BlockMetadataManager * @param metaManager the meta data manager * @return true if and only if the plan is not null and both {@link #blocksInTheSameDir} and * {@link #requestSpaceSatisfied} are true, otherwise false - * @throws tachyon.exception.NotFoundException when fail to get meta data of a block + * @throws tachyon.exception.BlockDoesNotExistException when fail to get meta data of a block */ public static boolean validNonCascadingPlan(long bytesToBeAvailable, EvictionPlan plan, - BlockMetadataManager metaManager) throws NotFoundException { + BlockMetadataManager metaManager) throws BlockDoesNotExistException { Preconditions.checkNotNull(plan); return blocksInTheSameDir(plan, metaManager) && requestSpaceSatisfied(bytesToBeAvailable, plan, metaManager); @@ -99,11 +99,11 @@ public static boolean validNonCascadingPlan(long bytesToBeAvailable, EvictionPla * @param plan the eviction plan, should not be empty * @param metaManager the meta data manager * @return true if the above requirements are satisfied, otherwise false - * @throws NotFoundException if a block for which metadata cannot be found is encountered + * @throws BlockDoesNotExistException if a block for which metadata cannot be found is encountered */ // TODO(bin): Add a unit test for this method. public static boolean validCascadingPlan(long bytesToBeAvailable, EvictionPlan plan, - BlockMetadataManager metaManager) throws NotFoundException { + BlockMetadataManager metaManager) throws BlockDoesNotExistException { // reassure the plan is feasible: enough free space to satisfy bytesToBeAvailable, and enough // space in lower tier to move blocks in upper tier there @@ -199,10 +199,10 @@ public static void assertEvictionPlanValid(long bytesToBeAvailable, EvictionPlan * @param plan the eviction plan, should not be null * @param meta the metadata manager * @return true if the request can be satisfied otherwise false - * @throws tachyon.exception.NotFoundException if can not get meta data of a block + * @throws tachyon.exception.BlockDoesNotExistException if can not get meta data of a block */ public static boolean requestSpaceSatisfied(long bytesToBeAvailable, EvictionPlan plan, - BlockMetadataManager meta) throws NotFoundException { + BlockMetadataManager meta) throws BlockDoesNotExistException { Preconditions.checkNotNull(plan); List blockIds = new ArrayList(); diff --git a/servers/src/test/java/tachyon/worker/block/meta/StorageDirTest.java b/servers/src/test/java/tachyon/worker/block/meta/StorageDirTest.java index 2af492c0e6d9..20cc1785f8b0 100644 --- a/servers/src/test/java/tachyon/worker/block/meta/StorageDirTest.java +++ b/servers/src/test/java/tachyon/worker/block/meta/StorageDirTest.java @@ -32,11 +32,11 @@ import com.google.common.primitives.Ints; import tachyon.StorageLevelAlias; -import tachyon.exception.AlreadyExistsException; +import tachyon.exception.BlockAlreadyExistsException; +import tachyon.exception.BlockDoesNotExistException; import tachyon.exception.ExceptionMessage; -import tachyon.exception.InvalidStateException; -import tachyon.exception.NotFoundException; -import tachyon.exception.OutOfSpaceException; +import tachyon.exception.InvalidWorkerStateException; +import tachyon.exception.WorkerOutOfSpaceException; import tachyon.util.io.BufferUtils; import tachyon.worker.block.BlockStoreLocation; import tachyon.worker.block.TieredBlockStoreTestUtils; @@ -152,7 +152,7 @@ public void initializeMetaBlockLargerThanCapacityTest() throws Exception { newBlockFile(testDir, String.valueOf(TEST_BLOCK_ID), Ints.checkedCast(TEST_DIR_CAPACITY + 1)); StorageLevelAlias alias = StorageLevelAlias.getAlias(TEST_DIR_INDEX); - mThrown.expect(OutOfSpaceException.class); + mThrown.expect(WorkerOutOfSpaceException.class); mThrown.expectMessage(ExceptionMessage.NO_SPACE_FOR_BLOCK_META.getMessage(TEST_BLOCK_ID, TEST_DIR_CAPACITY + 1, TEST_DIR_CAPACITY, alias)); mDir = newStorageDir(testDir); @@ -245,7 +245,7 @@ public void addBlockMetaTooBigTest() throws Exception { BlockMeta bigBlockMeta = new BlockMeta(TEST_BLOCK_ID, bigBlockSize, mDir); StorageLevelAlias alias = StorageLevelAlias.getAlias(bigBlockMeta.getBlockLocation().tierAlias()); - mThrown.expect(OutOfSpaceException.class); + mThrown.expect(WorkerOutOfSpaceException.class); mThrown.expectMessage(ExceptionMessage.NO_SPACE_FOR_BLOCK_META.getMessage(TEST_BLOCK_ID, bigBlockSize, TEST_DIR_CAPACITY, alias)); mDir.addBlockMeta(bigBlockMeta); @@ -253,7 +253,7 @@ public void addBlockMetaTooBigTest() throws Exception { @Test public void addBlockMetaExistingTest() throws Exception { - mThrown.expect(AlreadyExistsException.class); + mThrown.expect(BlockAlreadyExistsException.class); mThrown.expectMessage(ExceptionMessage.ADD_EXISTING_BLOCK.getMessage(TEST_BLOCK_ID, StorageLevelAlias.getAlias(TEST_DIR_INDEX))); mDir.addBlockMeta(mBlockMeta); @@ -263,14 +263,14 @@ public void addBlockMetaExistingTest() throws Exception { @Test public void removeBlockMetaNotExistingTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_META_NOT_FOUND.getMessage(TEST_BLOCK_ID)); mDir.removeBlockMeta(mBlockMeta); } @Test public void getBlockMetaNotExistingTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_META_NOT_FOUND.getMessage(TEST_BLOCK_ID)); mDir.getBlockMeta(TEST_BLOCK_ID); } @@ -282,7 +282,7 @@ public void addTempBlockMetaTooBigTest() throws Exception { new TempBlockMeta(TEST_SESSION_ID, TEST_TEMP_BLOCK_ID, bigBlockSize, mDir); StorageLevelAlias alias = StorageLevelAlias.getAlias(bigTempBlockMeta.getBlockLocation().tierAlias()); - mThrown.expect(OutOfSpaceException.class); + mThrown.expect(WorkerOutOfSpaceException.class); mThrown.expectMessage(ExceptionMessage.NO_SPACE_FOR_BLOCK_META.getMessage(TEST_TEMP_BLOCK_ID, bigBlockSize, TEST_DIR_CAPACITY, alias)); mDir.addTempBlockMeta(bigTempBlockMeta); @@ -290,7 +290,7 @@ public void addTempBlockMetaTooBigTest() throws Exception { @Test public void addTempBlockMetaExistingTest() throws Exception { - mThrown.expect(AlreadyExistsException.class); + mThrown.expect(BlockAlreadyExistsException.class); mThrown.expectMessage(ExceptionMessage.ADD_EXISTING_BLOCK.getMessage(TEST_TEMP_BLOCK_ID, StorageLevelAlias.getAlias(TEST_DIR_INDEX))); mDir.addTempBlockMeta(mTempBlockMeta); @@ -301,7 +301,7 @@ public void addTempBlockMetaExistingTest() throws Exception { @Test public void removeTempBlockMetaNotExistingTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_META_NOT_FOUND.getMessage(TEST_TEMP_BLOCK_ID)); mDir.removeTempBlockMeta(mTempBlockMeta); } @@ -310,7 +310,7 @@ public void removeTempBlockMetaNotExistingTest() throws Exception { public void removeTempBlockMetaNotOwnerTest() throws Exception { final long wrongSessionId = TEST_SESSION_ID + 1; StorageLevelAlias alias = StorageLevelAlias.getAlias(TEST_DIR_INDEX); - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_NOT_FOUND_FOR_SESSION .getMessage(TEST_TEMP_BLOCK_ID, alias, wrongSessionId)); mDir.addTempBlockMeta(mTempBlockMeta); @@ -321,7 +321,7 @@ public void removeTempBlockMetaNotOwnerTest() throws Exception { @Test public void getTempBlockMetaNotExistingTest() throws Exception { - mThrown.expect(NotFoundException.class); + mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_META_NOT_FOUND.getMessage(TEST_TEMP_BLOCK_ID)); mDir.getBlockMeta(TEST_TEMP_BLOCK_ID); } @@ -374,7 +374,7 @@ public void resizeTempBlockMetaInvalidStateExceptionTest() throws Exception { mDir.resizeTempBlockMeta(mTempBlockMeta, newSize); Assert.fail("Should throw an Exception when newSize is smaller than oldSize"); } catch (Exception e) { - Assert.assertTrue(e instanceof InvalidStateException); + Assert.assertTrue(e instanceof InvalidWorkerStateException); Assert.assertTrue(e.getMessage().equals("Shrinking block, not supported!")); Assert.assertEquals(TEST_TEMP_BLOCK_SIZE, mTempBlockMeta.getBlockSize()); } diff --git a/shell/src/main/java/tachyon/shell/TfsShell.java b/shell/src/main/java/tachyon/shell/TfsShell.java index f0641dfd715f..5feaa2a431bf 100644 --- a/shell/src/main/java/tachyon/shell/TfsShell.java +++ b/shell/src/main/java/tachyon/shell/TfsShell.java @@ -53,13 +53,13 @@ import tachyon.client.lineage.TachyonLineage; import tachyon.client.lineage.options.DeleteLineageOptions; import tachyon.conf.TachyonConf; +import tachyon.exception.FileDoesNotExistException; +import tachyon.exception.InvalidPathException; import tachyon.exception.TachyonException; import tachyon.job.CommandLineJob; import tachyon.job.JobConf; import tachyon.thrift.BlockLocation; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; import tachyon.thrift.LineageInfo; import tachyon.util.FormatUtils; import tachyon.util.io.PathUtils; @@ -1282,7 +1282,7 @@ private int createLineage(String[] argv) throws IOException { long lineageId; try { lineageId = tl.createLineage(inputFiles, outputFiles, job); - } catch (FileDoesNotExistException e) { + } catch (TachyonException e) { throw new IOException(e); } System.out.println("Lineage " + lineageId + " has been created."); diff --git a/shell/src/main/java/tachyon/shell/TfsShellUtils.java b/shell/src/main/java/tachyon/shell/TfsShellUtils.java index 1d1c77ff16dc..20fb436e0f5d 100644 --- a/shell/src/main/java/tachyon/shell/TfsShellUtils.java +++ b/shell/src/main/java/tachyon/shell/TfsShellUtils.java @@ -28,9 +28,7 @@ import tachyon.client.file.TachyonFileSystem; import tachyon.conf.TachyonConf; import tachyon.exception.TachyonException; -import tachyon.thrift.FileDoesNotExistException; import tachyon.thrift.FileInfo; -import tachyon.thrift.InvalidPathException; import tachyon.util.io.PathUtils; import tachyon.util.network.NetworkAddressUtils; import tachyon.util.network.NetworkAddressUtils.ServiceType; diff --git a/shell/src/test/java/tachyon/shell/TfsShellUtilsTest.java b/shell/src/test/java/tachyon/shell/TfsShellUtilsTest.java index f5aaab6eeae7..2daccf8eb8f3 100644 --- a/shell/src/test/java/tachyon/shell/TfsShellUtilsTest.java +++ b/shell/src/test/java/tachyon/shell/TfsShellUtilsTest.java @@ -38,7 +38,6 @@ import tachyon.conf.TachyonConf; import tachyon.exception.TachyonException; import tachyon.master.LocalTachyonCluster; -import tachyon.thrift.InvalidPathException; /** * Unit tests on tachyon.command.Utils.