![SWC-DB logo](logo.svg) |
SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
|
Go to the documentation of this file.
6 #ifndef swcdb_fs_HadoopJVM_FileSystem_h
7 #define swcdb_fs_HadoopJVM_FileSystem_h
12 #include <condition_variable>
15 namespace SWC {
namespace FS {
25 typedef std::shared_ptr<Service>
Ptr;
63 bool exists(
int& err, const std::
string& name) override;
65 void remove(
int& err, const std::
string& name) override;
67 size_t length(
int& err, const std::
string& name) override;
69 void mkdirs(
int& err, const std::
string& name) override;
71 void readdir(
int& err, const std::
string& name,
74 void rmdir(
int& err, const std::
string& name) override;
77 const std::
string& to) override;
89 uint64_t offset, uint32_t amount,
99 void *dst,
size_t amount)
override;
107 uint64_t offset,
void *dst,
size_t amount)
override;
130 typedef std::shared_ptr<SmartFdHadoopJVM>
Ptr;
137 int32_t
fd=-1, uint64_t
pos=0);
141 hdfsFile
file() noexcept;
143 void file(const hdfsFile&
file) noexcept;
184 #ifdef SWC_IMPL_SOURCE
189 #endif // swcdb_fs_HadoopJVM_FileSystem_h
virtual ~SmartFdHadoopJVM() noexcept
FileSystemHadoopJVM & operator=(const FileSystemHadoopJVM &)=delete
void need_reconnect(int &err, Service::Ptr &fs)
Type SWC_CONST_FUNC get_type() const noexcept override
FileSystemHadoopJVM(Configurables *config)
Service & operator=(const Service &)=delete
std::shared_ptr< FileSystem > Ptr
size_t length(int &err, const std::string &name) override
virtual ~FileSystemHadoopJVM() noexcept
void default_read(int &err, const std::string &name, StaticBuffer *dst)
std::atomic< hdfsFile > m_hfile
void write(int &err, SmartFd::Ptr &smartfd, uint8_t replication, StaticBuffer &buffer) override
Core::Atomic< size_t > m_use_count
void sync(int &err, SmartFd::Ptr &smartfd) override
void combi_pread(int &err, SmartFd::Ptr &smartfd, uint64_t offset, uint32_t amount, StaticBuffer *dst) override
constexpr SWC_CAN_INLINE uint64_t pos() const noexcept
SmartFdHadoopJVM(const std::string &filepath, uint32_t flags, int32_t fd=-1, uint64_t pos=0)
const Config::Property::Value_int32_g::Ptr cfg_r_buffer_size
void close(int &err, SmartFd::Ptr &smartfd) override
void default_combi_pread(int &err, SmartFd::Ptr &smartfd, uint64_t offset, uint32_t amount, StaticBuffer *dst)
hdfsFile invalidate() noexcept
size_t pread(int &err, SmartFd::Ptr &smartfd, uint64_t offset, void *dst, size_t amount) override
void readdir(int &err, const std::string &name, DirentList &results) override
bool exists(int &err, const std::string &name) override
Service & operator=(Service &&)=delete
void use_release() noexcept
const Config::Property::Value_int32_g::Ptr cfg_w_buffer_size
std::shared_ptr< SmartFdHadoopJVM > Ptr
size_t read(int &err, SmartFd::Ptr &smartfd, StaticBuffer *dst, size_t amount) override
const Config::Property::Value_int32_g::Ptr cfg_block_size
void mkdirs(int &err, const std::string &name) override
void open(int &err, SmartFd::Ptr &smartfd) override
SWC::FS::FileSystem * fs_make_new_hadoop_jvm(SWC::FS::Configurables *config)
The SWC-DB C++ namespace 'SWC'.
const Config::Property::Value_int32_g::Ptr cfg_use_delay
Configurables * apply_hadoop_jvm(Configurables *config)
void remove(int &err, const std::string &name) override
Service(hdfsFS a_srv) noexcept
FileSystemHadoopJVM & operator=(FileSystemHadoopJVM &&)=delete
void rename(int &err, const std::string &from, const std::string &to) override
Service::Ptr setup_connection()
size_t append(int &err, SmartFd::Ptr &smartfd, StaticBuffer &buffer, Flags flags) override
void read(int &err, const std::string &name, StaticBuffer *dst) override
void create(int &err, SmartFd::Ptr &smartfd, uint8_t replication) override
constexpr SWC_CAN_INLINE uint32_t flags() const noexcept
size_t pread(int &err, SmartFd::Ptr &smartfd, uint64_t offset, StaticBuffer *dst, size_t amount) override
constexpr SWC_CAN_INLINE const std::string & filepath() const noexcept
void default_write(int &err, SmartFd::Ptr &smartfd, uint8_t replication, StaticBuffer &buffer)
Comp from(const char **buf, uint32_t *remainp, uint8_t extended=0x00) noexcept
std::shared_ptr< SmartFd > Ptr
std::shared_ptr< Service > Ptr
bool file_used() const noexcept
static Ptr make_ptr(const std::string &filepath, uint32_t flags)
Service(Service &&)=delete
std::condition_variable m_cv
void flush(int &err, SmartFd::Ptr &smartfd) override
std::string to_string() const override
FileSystemHadoopJVM(FileSystemHadoopJVM &&)=delete
constexpr SWC_CAN_INLINE int32_t fd() const noexcept
Service::Ptr get_fs(int &err)
FileSystemHadoopJVM(const FileSystemHadoopJVM &)=delete
void seek(int &err, SmartFd::Ptr &smartfd, size_t offset) override
SmartFdHadoopJVM::Ptr get_fd(SmartFd::Ptr &smartfd)
size_t default_pread(int &err, SmartFd::Ptr &smartfd, uint64_t offset, StaticBuffer *dst, size_t amount)
Core::Atomic< int32_t > m_nxt_fd
bool initialize(Service::Ptr &fs)
Service(const Service &)=delete
void rmdir(int &err, const std::string &name) override