summaryrefslogtreecommitdiff
path: root/util/env_hdfs.cc
diff options
context:
space:
mode:
authorShu Zhang <shu_zhang@alumni.brown.edu>2015-12-23 17:26:50 -0800
committerShu Zhang <shu_zhang@alumni.brown.edu>2015-12-23 17:26:50 -0800
commit4fd23fb130a9f4d340517fcb20e8b0b4bc3f6513 (patch)
treef8c764ddb95b7f6b6e2bf56234c1d9a37762fbef /util/env_hdfs.cc
parentb9f77ba12b35f9027bb17c5ad2c6876036ece6d5 (diff)
add a factory method for creating hdfs env
Diffstat (limited to 'util/env_hdfs.cc')
-rw-r--r--util/env_hdfs.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/env_hdfs.cc b/util/env_hdfs.cc
index e7844e8dc..21035e18f 100644
--- a/util/env_hdfs.cc
+++ b/util/env_hdfs.cc
@@ -594,6 +594,11 @@ Status HdfsEnv::NewLogger(const std::string& fname,
return Status::OK();
}
+ // The factory method for creating an HDFS Env
+Status NewHdfsEnv(Env** hdfs_env, const std::string& fsname) {
+ *hdfs_env = new HdfsEnv(fsname);
+ return Status::OK();
+}
} // namespace rocksdb
#endif // ROCKSDB_HDFS_FILE_C
@@ -607,6 +612,11 @@ namespace rocksdb {
const EnvOptions& options) {
return Status::NotSupported("Not compiled with hdfs support");
}
+
+ Status NewHdfsEnv(Env** hdfs_env, const std::string& fsname) {
+ return Status::NotSupported("Not compiled with hdfs support");
+ }
+
}
#endif