Summary: virtual NewRandomRWFile is not implemented on EnvHdfs, causing build failure. Test Plan: make clean; make all check Reviewers: dhruba, haobo, kailiu Reviewed By: kailiu CC: leveldb Differential Revision: https://reviews.facebook.net/D13383
@ -79,6 +79,10 @@ class HdfsEnv : public Env {
virtual Status NewWritableFile(const std::string& fname,
WritableFile** result);
virtual Status NewRandomRWFile(const std::string& fname,
unique_ptr<RandomRWFile>* result,
const EnvOptions& options);
virtual bool FileExists(const std::string& fname);
virtual Status GetChildren(const std::string& path,
@ -249,6 +253,12 @@ class HdfsEnv : public Env {
return notsup;
}
const EnvOptions& options) {
virtual bool FileExists(const std::string& fname){return false;}
@ -374,6 +374,12 @@ Status HdfsEnv::NewWritableFile(const std::string& fname,
return Status::OK();
Status HdfsEnv::NewRandomRWFile(const std::string& fname,
return Status::NotSupported("NewRandomRWFile not supported on HdfsEnv");
bool HdfsEnv::FileExists(const std::string& fname) {
int value = hdfsExists(fileSys_, fname.c_str());
if (value == 0) {