curvefs/client: now we support hadoop sdk#2807
Conversation
|
cicheck |
e3b73c8 to
f7f55e2
Compare
|
cicheck |
60c01b6 to
13ba40f
Compare
| << ", size = " << size | ||
| << ", strvalue: " << strvalue; | ||
|
|
||
| if (option_.fileSystemOption.disableXAttr && !IsSpecialXAttr(name)) { |
There was a problem hiding this comment.
The speciacl xattrs should not allowed to set by general user.
|
cicheck |
1 similar comment
|
cicheck |
|
cicheck |
1 similar comment
|
cicheck |
|
cicheck |
2 similar comments
|
cicheck |
|
cicheck |
b31fb56 to
1f8b2f6
Compare
|
cicheck |
|
|
||
| import org.apache.hadoop.fs.CommonConfigurationKeys; | ||
|
|
||
| public class CurveFSConfigKeys extends CommonConfigurationKeys {} |
There was a problem hiding this comment.
where the class CurveFSConfigKeys used?
There was a problem hiding this comment.
where the class
CurveFSConfigKeysused?
Fixed, i had delete it.
| fileHandle = fh; | ||
| closed = false; | ||
| curve = curvefs; | ||
| buffer = new byte[1<<21]; |
There was a problem hiding this comment.
How to determine buffer size?
There was a problem hiding this comment.
How to determine buffer size?
It's a const tradeoff :)
| *realSize += strlen(XATTRRSUBDIRS) + 1; | ||
| *realSize += strlen(XATTRRENTRIES) + 1; | ||
| *realSize += strlen(XATTRRFBYTES) + 1; | ||
| *realSize += strlen(XATTR_DIR_RFILES) + 1; |
There was a problem hiding this comment.
listxattr also need check option_.fileSystemOption.disableXAttr
| const std::string& name, | ||
| uint16_t mode, | ||
| EntryOut* entryOut) { | ||
| auto ctx = NewFuseContext(); |
There was a problem hiding this comment.
Is it possible to use FuseContext as a variable instead of creating a new one every time?
There was a problem hiding this comment.
Is it possible to use FuseContext as a variable instead of creating a new one every time?
No, because we should get the latest uid and gid which can modified on fly.
|
cicheck |
|
cicheck |
1 similar comment
|
cicheck |
|
cicheck |
2 similar comments
|
cicheck |
|
cicheck |
|
it's too hard to review such a huge pr with 4 commit. over 100,000 lines changed. |
| bool yes = lru_->Get(key, &value); | ||
| if (!yes) { | ||
| return false; | ||
| } else if (value.expire < Now()) { |
There was a problem hiding this comment.
expired item should be removed from lru cache.
seems no periodical task to clean up expired items in lru cache also.
There was a problem hiding this comment.
expired item should be removed from lru cache. seems no periodical task to clean up expired items in lru cache also.
Add todo for this.
| return s; | ||
| } | ||
|
|
||
| bool HasPrefix(const std::string& str, const std::string& prefix) { |
There was a problem hiding this comment.
#include "absl/strings/match.h"
absl::StartsWith()
There was a problem hiding this comment.
#include "absl/strings/match.h" absl::StartsWith()
Fixed.
| return str.rfind(prefix, 0) == 0; | ||
| } | ||
|
|
||
| std::vector<std::string> Split(const std::string& str, |
There was a problem hiding this comment.
why wrap it?
In order to:
- Form a unified namespace, like you can find all string related function in
stringsnamespace. - One header include all util functions: you can find all functions once you include the
utils.hheader file and if you useabsllibrary, you should find the function in which header and include it.
It is more easy to use.
|
|
||
| } // namespace strings | ||
|
|
||
| namespace filepath { |
There was a problem hiding this comment.
use butil::FilePath?
seems many utils can reuse util in butil or absl
There was a problem hiding this comment.
use butil::FilePath? seems many utils can reuse util in butil or absl
ditto
| return DoMkDir(path, mode); | ||
| } | ||
|
|
||
| CURVEFS_ERROR VFS::MkDirs(const std::string& path, uint16_t mode) { |
There was a problem hiding this comment.
logic is wrong, cannot handle case below
touch a
mkdir -p a
expect return: File Exist
actual return: OK
There was a problem hiding this comment.
logic is wrong, cannot handle case below
touch a mkdir -p a
expect return: File Exist actual return: OK
Fixed.
| return CURVEFS_ERROR::OK; | ||
| } | ||
|
|
||
| CURVEFS_ERROR VFS::Lookup(const std::string& path, |
There was a problem hiding this comment.
careful about stack overflow
There was a problem hiding this comment.
careful about stack overflow
Yep.
Agree! |
8aee77a to
8ffe333
Compare
|
cicheck |
Signed-off-by: Wine93 <wine93.info@gmail.com>
Signed-off-by: Wine93 <wine93.info@gmail.com>
Signed-off-by: Wine93 <wine93.info@gmail.com>
|
cicheck |
Signed-off-by: Wine93 <wine93.info@gmail.com>
|
cicheck |
4 similar comments
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
No description provided.