SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::FS Namespace Reference

The SWC-DB File-System C++ namespace 'SWC::FS'. More...

Namespaces

 Callback
 The SWC-DB Callback C++ namespace 'SWC::FS::Callback'.
 

Classes

struct  Configurables
 
struct  Dirent
 Directory entry. More...
 
class  FileSystem
 
class  FileSystemBroker
 
class  FileSystemCeph
 
class  FileSystemHadoop
 
class  FileSystemHadoopJVM
 
class  FileSystemLocal
 
struct  ImplOptions
 
class  Interface
 Interface to FileSystems. More...
 
class  SmartFd
 Smart FileDescriptor. More...
 
struct  Statistics
 

Typedefs

typedef Core::Vector< DirentDirentList
 
typedef Core::Vector< uint64_t > IdEntries_t
 

Enumerations

enum  Type : uint8_t {
  UNKNOWN = 0x00,
  LOCAL = 0x01,
  BROKER = 0x02,
  CUSTOM = 0x03,
  HADOOP = 0x04,
  HADOOP_JVM = 0x05,
  CEPH = 0x06
}
 
enum  OpenFlags {
  OPEN_FLAG_DIRECTIO = 0x00000001,
  OPEN_FLAG_OVERWRITE = 0x00000002,
  OPEN_FLAG_VERIFY_CHECKSUM = 0x00000004,
  WRITE_VALIDATE_LENGTH = 0x00000008
}
 
enum  Flags : uint8_t {
  NONE = 0x00,
  FLUSH = 0x01,
  SYNC = 0x02
}
 

Functions

Configurablesapply_broker (Configurables *config)
 
Configurablesapply_ceph (Configurables *config)
 
std::string normalize_pathname (std::string s)
 
Type fs_type (const std::string &fs_name)
 
const char *SWC_CONST_FUNC to_string (Type typ) noexcept
 
Configurablesapply_hadoop (Configurables *config)
 
Configurablesapply_hadoop_jvm (Configurables *config)
 
void set_structured_id (const std::string &number, std::string &s)
 
Configurablesapply_local ()
 
 ADD_OPTION (async_exists) ADD_OPTION(async_remove) ADD_OPTION(async_length) ADD_OPTION(async_mkdirs) ADD_OPTION(async_readdir) ADD_OPTION(async_rmdir) ADD_OPTION(async_rename) ADD_OPTION(async_write) ADD_OPTION(async_readall) ADD_OPTION(async_combi_pread) ADD_OPTION(async_create) ADD_OPTION(async_open) ADD_OPTION(async_read) ADD_OPTION(async_pread) ADD_OPTION(async_append) ADD_OPTION(async_seek) ADD_OPTION(async_flush) ADD_OPTION(async_sync) ADD_OPTION(async_close) FileSystem
 
Configurablesapply_local (Configurables *config)
 

Variables

const int ID_SPLIT_LEN = 3
 
const char ID_SPLIT_LAST = 'g'
 

Detailed Description

The SWC-DB File-System C++ namespace 'SWC::FS'.

Typedef Documentation

◆ DirentList

Definition at line 93 of file Dirent.h.

◆ IdEntries_t

Definition at line 39 of file Interface.h.

Enumeration Type Documentation

◆ Flags

enum SWC::FS::Flags : uint8_t
Enumerator
NONE 
FLUSH 
SYNC 

Definition at line 41 of file FileSystem.h.

◆ OpenFlags

Enumerator
OPEN_FLAG_DIRECTIO 
OPEN_FLAG_OVERWRITE 
OPEN_FLAG_VERIFY_CHECKSUM 
WRITE_VALIDATE_LENGTH 

Definition at line 33 of file FileSystem.h.

◆ Type

enum SWC::FS::Type : uint8_t
Enumerator
UNKNOWN 
LOCAL 
BROKER 
CUSTOM 
HADOOP 
HADOOP_JVM 
CEPH 

Definition at line 20 of file FileSystem.h.

Function Documentation

◆ ADD_OPTION()

SWC::FS::ADD_OPTION ( async_exists  )

Definition at line 80 of file FileSystem.cc.

◆ apply_broker()

Configurables * SWC::FS::apply_broker ( Configurables config)

◆ apply_ceph()

Configurables * SWC::FS::apply_ceph ( Configurables config)

Definition at line 17 of file FileSystem.cc.

References SWC::Config::boo(), SWC::FS::Configurables::cfg_fds_max, SWC::Config::g_i32(), SWC::Config::i32(), SWC::FS::Configurables::path_root, SWC::FS::Configurables::settings, SWC::FS::Configurables::stats_enabled, SWC::Config::str(), and SWC::Config::strs().

+ Here is the call graph for this function:

◆ apply_hadoop()

Configurables * SWC::FS::apply_hadoop ( Configurables config)

Definition at line 19 of file FileSystem.cc.

References SWC::Config::boo(), SWC::FS::Configurables::cfg_fds_max, SWC::Config::g_i32(), SWC::Config::i16(), SWC::Config::i32(), SWC::FS::Configurables::path_root, SWC::FS::Configurables::settings, SWC::FS::Configurables::stats_enabled, SWC::Config::str(), and SWC::Config::strs().

+ Here is the call graph for this function:

◆ apply_hadoop_jvm()

Configurables * SWC::FS::apply_hadoop_jvm ( Configurables config)

Definition at line 13 of file FileSystem.cc.

References SWC::Config::boo(), SWC::FS::Configurables::cfg_fds_max, SWC::Config::g_i32(), SWC::Config::i16(), SWC::FS::Configurables::path_root, SWC::FS::Configurables::settings, SWC::FS::Configurables::stats_enabled, SWC::Config::str(), and SWC::Config::strs().

+ Here is the call graph for this function:

◆ apply_local() [1/2]

Configurables* SWC::FS::apply_local ( )

◆ apply_local() [2/2]

Configurables* SWC::FS::apply_local ( Configurables config)

Definition at line 53 of file FileSystem.cc.

References SWC::Config::boo(), SWC::FS::Configurables::cfg_fds_max, SWC::Config::g_i32(), SWC::Config::i32(), SWC::FS::Configurables::path_root, SWC::FS::Configurables::settings, SWC::FS::Configurables::stats_enabled, SWC::Config::str(), and SWC::Config::strs().

+ Here is the call graph for this function:

◆ fs_type()

Type SWC::FS::fs_type ( const std::string &  fs_name)

Definition at line 19 of file FileSystem.cc.

References BROKER, CEPH, SWC::Error::CONFIG_BAD_VALUE, CUSTOM, HADOOP, HADOOP_JVM, LOCAL, SWC::Condition::str_case_eq(), SWC_THROWF, and SWC::DB::Cell::Serial::Value::UNKNOWN.

Referenced by SWC::FsBroker::AppContext::AppContext(), SWC::Manager::AppContext::AppContext(), SWC::Utils::shell::Fs::Fs(), and SWC::Ranger::AppContext::make().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalize_pathname()

std::string SWC::FS::normalize_pathname ( std::string  s)

Definition at line 13 of file FileSystem.cc.

◆ set_structured_id()

void SWC::FS::set_structured_id ( const std::string &  number,
std::string &  s 
)

Definition at line 494 of file Interface.cc.

References ID_SPLIT_LAST, and ID_SPLIT_LEN.

Referenced by SWC::DB::RangeBase::get_column_path(), and SWC::DB::RangeBase::get_path().

+ Here is the caller graph for this function:

◆ to_string()

const char * SWC::FS::to_string ( Type  typ)
noexcept

Variable Documentation

◆ ID_SPLIT_LAST

const char SWC::FS::ID_SPLIT_LAST = 'g'

Definition at line 41 of file Interface.h.

Referenced by SWC::FS::Interface::get_structured_ids(), and set_structured_id().

◆ ID_SPLIT_LEN

const int SWC::FS::ID_SPLIT_LEN = 3

Definition at line 40 of file Interface.h.

Referenced by set_structured_id().