From 1b79578b7e7c126c8920845e502e70e812d8956a Mon Sep 17 00:00:00 2001 From: Gaurav Khandelwal Date: Sat, 25 May 2019 05:25:44 -0700 Subject: [PATCH] BID-0000 Reviewed by: [Email ids of reviewers] Testing done: [Description of what testing was done. Eg: - Mongo/Cassandra Sanity test passed - Manual testing to trigger particular case] --- depends/libhdfs3/src/client/FileStatus.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/depends/libhdfs3/src/client/FileStatus.h b/depends/libhdfs3/src/client/FileStatus.h index 7dce555b00..6d0f24d2b7 100644 --- a/depends/libhdfs3/src/client/FileStatus.h +++ b/depends/libhdfs3/src/client/FileStatus.h @@ -96,14 +96,6 @@ class FileStatus { mtime = modificationTime; } - int64_t getFileid() const { - return fileid; - } - - void setFileid(int64_t fileid) { - this->fileid = fileid; - } - const char * getOwner() const { return owner.c_str(); } @@ -167,13 +159,24 @@ class FileStatus { return fileEncryption.getKey().length() > 0 && fileEncryption.getKeyName().length() > 0; } + /** + * Get FileID of hdfs file/directory + * @return fileid of file if present, else 0 + */ + int64_t getFileid() const { + return fileid; + } + + void setFileid(int64_t fileid) { + this->fileid = fileid; + } + private: bool isdir; int64_t atime; int64_t blocksize; int64_t length; int64_t mtime; - int64_t fileid; Permission permission; short replications; std::string group; @@ -181,6 +184,7 @@ class FileStatus { std::string path; std::string symlink; FileEncryptionInfo fileEncryption; + int64_t fileid; }; }