jubatus_core
0.1.2
Jubatus: Online machine learning framework for distributed environment
|
#include <column_table.hpp>
Public Types | |
typedef std::pair< owner, uint64_t > | version_t |
Public Member Functions | |
template<typename T1 > | |
bool | add (const std::string &key, const owner &o, const T1 &v1) |
template<typename T1 , typename T2 > | |
bool | add (const std::string &key, const owner &o, const T1 &v1, const T2 &v2) |
void | clear () |
column_table () | |
bool | delete_row (const std::string &target) |
bool | delete_row (uint64_t index) |
std::string | dump_json () const |
std::pair< bool, uint64_t > | exact_match (const std::string &prefix) const |
bit_vector_column & | get_bit_vector_column (size_t column_id) |
const_bit_vector_column & | get_bit_vector_column (size_t column_id) const |
version_t | get_clock (const std::string &target) const |
version_t | get_clock (const uint64_t index) const |
double_column & | get_double_column (size_t column_id) |
const_double_column & | get_double_column (size_t column_id) const |
float_column & | get_float_column (size_t column_id) |
const_float_column & | get_float_column (size_t column_id) const |
int16_column & | get_int16_column (size_t column_id) |
const_int16_column & | get_int16_column (size_t column_id) const |
int32_column & | get_int32_column (size_t column_id) |
const_int32_column & | get_int32_column (size_t column_id) const |
int64_column & | get_int64_column (size_t column_id) |
const_int64_column & | get_int64_column (size_t column_id) const |
int8_column & | get_int8_column (size_t column_id) |
const_int8_column & | get_int8_column (size_t column_id) const |
std::string | get_key (uint64_t key_id) const |
std::string | get_key_nolock (uint64_t key_id) const |
util::concurrent::rw_mutex & | get_mutex () const |
void | get_row (const uint64_t id, framework::packer &pk) const |
string_column & | get_string_column (size_t column_id) |
const_string_column & | get_string_column (size_t column_id) const |
uint16_column & | get_uint16_column (size_t column_id) |
const_uint16_column & | get_uint16_column (size_t column_id) const |
uint32_column & | get_uint32_column (size_t column_id) |
const_uint32_column & | get_uint32_column (size_t column_id) const |
uint64_column & | get_uint64_column (size_t column_id) |
const_uint64_column & | get_uint64_column (size_t column_id) const |
uint8_column & | get_uint8_column (size_t column_id) |
const_uint8_column & | get_uint8_column (size_t column_id) const |
version_t | get_version (uint64_t index) const |
void | init (const std::vector< column_type > &schema) |
MSGPACK_DEFINE (keys_, tuples_, versions_, columns_, clock_, index_) | |
void | pack (framework::packer &packer) const |
void | scan_clock () |
version_t | set_row (const msgpack::object &o) |
uint64_t | size () const |
void | unpack (msgpack::object o) |
template<typename T > | |
bool | update (const std::string &key, const owner &o, size_t column_id, const T &v) |
bool | update_clock (const std::string &target, const owner &o) |
bool | update_clock (const uint64_t index, const owner &o) |
~column_table () | |
Private Types | |
typedef jubatus::util::data::unordered_map< std::string, uint64_t > | index_table |
Private Member Functions | |
void | delete_row_ (uint64_t index) |
Private Attributes | |
uint64_t | clock_ |
std::vector< detail::abstract_column > | columns_ |
index_table | index_ |
std::vector< std::string > | keys_ |
jubatus::util::concurrent::rw_mutex | table_lock_ |
uint64_t | tuples_ |
std::vector< version_t > | versions_ |
Friends | |
std::ostream & | operator<< (std::ostream &os, const column_table &tbl) |
Definition at line 55 of file column_table.hpp.
|
private |
Definition at line 56 of file column_table.hpp.
typedef std::pair<owner, uint64_t> jubatus::core::storage::column_table::version_t |
Definition at line 59 of file column_table.hpp.
|
inline |
Definition at line 61 of file column_table.hpp.
|
inline |
Definition at line 64 of file column_table.hpp.
|
inline |
Definition at line 71 of file column_table.hpp.
References clock_, columns_, index_, JUBATUS_ASSERT_EQ, keys_, table_lock_, tuples_, and versions_.
|
inline |
Definition at line 101 of file column_table.hpp.
References clock_, columns_, index_, JUBATUS_ASSERT_EQ, keys_, table_lock_, tuples_, and versions_.
void jubatus::core::storage::column_table::clear | ( | ) |
Definition at line 47 of file column_table.cpp.
References clock_, columns_, index_, keys_, table_lock_, tuples_, and versions_.
|
inline |
Definition at line 345 of file column_table.hpp.
References delete_row_(), index_, and table_lock_.
|
inline |
Definition at line 355 of file column_table.hpp.
References delete_row_(), size(), and table_lock_.
|
inlineprivate |
Definition at line 387 of file column_table.hpp.
References clock_, JUBATUS_ASSERT_EQ, JUBATUS_ASSERT_LT, size(), jubatus::core::clustering::swap(), and tuples_.
Referenced by delete_row().
|
inline |
Definition at line 210 of file column_table.hpp.
References table_lock_, and tuples_.
std::pair< bool, uint64_t > jubatus::core::storage::column_table::exact_match | ( | const std::string & | prefix | ) | const |
Definition at line 60 of file column_table.cpp.
References index_, and table_lock_.
bit_vector_column & jubatus::core::storage::column_table::get_bit_vector_column | ( | size_t | column_id | ) |
Definition at line 159 of file column_table.cpp.
References jubatus::core::storage::column_type::bit_vector_type, columns_, and JUBATUS_ASSERT.
const_bit_vector_column & jubatus::core::storage::column_table::get_bit_vector_column | ( | size_t | column_id | ) | const |
Definition at line 163 of file column_table.cpp.
References jubatus::core::storage::column_type::bit_vector_type, columns_, and JUBATUS_ASSERT.
|
inline |
Definition at line 328 of file column_table.hpp.
References index_, table_lock_, and versions_.
|
inline |
Definition at line 337 of file column_table.hpp.
References size(), table_lock_, and versions_.
double_column & jubatus::core::storage::column_table::get_double_column | ( | size_t | column_id | ) |
Definition at line 143 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::double_type, and JUBATUS_ASSERT.
const_double_column & jubatus::core::storage::column_table::get_double_column | ( | size_t | column_id | ) | const |
Definition at line 147 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::double_type, and JUBATUS_ASSERT.
float_column & jubatus::core::storage::column_table::get_float_column | ( | size_t | column_id | ) |
Definition at line 135 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::float_type, and JUBATUS_ASSERT.
const_float_column & jubatus::core::storage::column_table::get_float_column | ( | size_t | column_id | ) | const |
Definition at line 139 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::float_type, and JUBATUS_ASSERT.
int16_column & jubatus::core::storage::column_table::get_int16_column | ( | size_t | column_id | ) |
Definition at line 111 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::int16_type, and JUBATUS_ASSERT.
const_int16_column & jubatus::core::storage::column_table::get_int16_column | ( | size_t | column_id | ) | const |
Definition at line 115 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::int16_type, and JUBATUS_ASSERT.
int32_column & jubatus::core::storage::column_table::get_int32_column | ( | size_t | column_id | ) |
Definition at line 119 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::int32_type, and JUBATUS_ASSERT.
const_int32_column & jubatus::core::storage::column_table::get_int32_column | ( | size_t | column_id | ) | const |
Definition at line 123 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::int32_type, and JUBATUS_ASSERT.
int64_column & jubatus::core::storage::column_table::get_int64_column | ( | size_t | column_id | ) |
Definition at line 127 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::int64_type, and JUBATUS_ASSERT.
const_int64_column & jubatus::core::storage::column_table::get_int64_column | ( | size_t | column_id | ) | const |
Definition at line 131 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::int64_type, and JUBATUS_ASSERT.
int8_column & jubatus::core::storage::column_table::get_int8_column | ( | size_t | column_id | ) |
Definition at line 103 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::int8_type, and JUBATUS_ASSERT.
const_int8_column & jubatus::core::storage::column_table::get_int8_column | ( | size_t | column_id | ) | const |
Definition at line 107 of file column_table.cpp.
References columns_, jubatus::core::storage::column_type::int8_type, and JUBATUS_ASSERT.
|
inline |
Definition at line 152 of file column_table.hpp.
References get_key_nolock(), and table_lock_.
|
inline |
Definition at line 157 of file column_table.hpp.
References keys_, and tuples_.
Referenced by get_key().
|
inline |
Definition at line 364 of file column_table.hpp.
References table_lock_.
|
inline |
Definition at line 244 of file column_table.hpp.
References columns_, JUBATUS_ASSERT_GE, keys_, table_lock_, tuples_, and versions_.
string_column & jubatus::core::storage::column_table::get_string_column | ( | size_t | column_id | ) |
Definition at line 151 of file column_table.cpp.
References columns_, JUBATUS_ASSERT, and jubatus::core::storage::column_type::string_type.
const_string_column & jubatus::core::storage::column_table::get_string_column | ( | size_t | column_id | ) | const |
Definition at line 155 of file column_table.cpp.
References columns_, JUBATUS_ASSERT, and jubatus::core::storage::column_type::string_type.
uint16_column & jubatus::core::storage::column_table::get_uint16_column | ( | size_t | column_id | ) |
Definition at line 79 of file column_table.cpp.
References columns_, JUBATUS_ASSERT, and jubatus::core::storage::column_type::uint16_type.
const_uint16_column & jubatus::core::storage::column_table::get_uint16_column | ( | size_t | column_id | ) | const |
Definition at line 83 of file column_table.cpp.
References columns_, JUBATUS_ASSERT, and jubatus::core::storage::column_type::uint16_type.
uint32_column & jubatus::core::storage::column_table::get_uint32_column | ( | size_t | column_id | ) |
Definition at line 87 of file column_table.cpp.
References columns_, JUBATUS_ASSERT, and jubatus::core::storage::column_type::uint32_type.
const_uint32_column & jubatus::core::storage::column_table::get_uint32_column | ( | size_t | column_id | ) | const |
Definition at line 91 of file column_table.cpp.
References columns_, JUBATUS_ASSERT, and jubatus::core::storage::column_type::uint32_type.
uint64_column & jubatus::core::storage::column_table::get_uint64_column | ( | size_t | column_id | ) |
Definition at line 95 of file column_table.cpp.
References columns_, JUBATUS_ASSERT, and jubatus::core::storage::column_type::uint64_type.
const_uint64_column & jubatus::core::storage::column_table::get_uint64_column | ( | size_t | column_id | ) | const |
Definition at line 99 of file column_table.cpp.
References columns_, JUBATUS_ASSERT, and jubatus::core::storage::column_type::uint64_type.
uint8_column & jubatus::core::storage::column_table::get_uint8_column | ( | size_t | column_id | ) |
Definition at line 71 of file column_table.cpp.
References columns_, JUBATUS_ASSERT, and jubatus::core::storage::column_type::uint8_type.
const_uint8_column & jubatus::core::storage::column_table::get_uint8_column | ( | size_t | column_id | ) | const |
Definition at line 75 of file column_table.cpp.
References columns_, JUBATUS_ASSERT, and jubatus::core::storage::column_type::uint8_type.
|
inline |
Definition at line 239 of file column_table.hpp.
References table_lock_, and versions_.
void jubatus::core::storage::column_table::init | ( | const std::vector< column_type > & | schema | ) |
Definition at line 32 of file column_table.cpp.
References columns_, and table_lock_.
jubatus::core::storage::column_table::MSGPACK_DEFINE | ( | keys_ | , |
tuples_ | , | ||
versions_ | , | ||
columns_ | , | ||
clock_ | , | ||
index_ | |||
) |
|
inline |
Definition at line 370 of file column_table.hpp.
|
inline |
Definition at line 164 of file column_table.hpp.
References clock_, table_lock_, and versions_.
|
inline |
Definition at line 256 of file column_table.hpp.
References clock_, columns_, index_, JUBATUS_ASSERT_EQ, keys_, table_lock_, tuples_, and versions_.
|
inline |
Definition at line 205 of file column_table.hpp.
References table_lock_, and tuples_.
Referenced by delete_row(), delete_row_(), get_clock(), and update_clock().
|
inline |
Definition at line 374 of file column_table.hpp.
|
inline |
Definition at line 135 of file column_table.hpp.
References clock_, columns_, index_, table_lock_, tuples_, and versions_.
|
inline |
Definition at line 307 of file column_table.hpp.
References clock_, index_, table_lock_, and versions_.
|
inline |
Definition at line 318 of file column_table.hpp.
References clock_, size(), table_lock_, and versions_.
|
friend |
Definition at line 219 of file column_table.hpp.
|
private |
Definition at line 384 of file column_table.hpp.
Referenced by add(), clear(), delete_row_(), scan_clock(), set_row(), update(), and update_clock().
|
private |
Definition at line 381 of file column_table.hpp.
Referenced by add(), clear(), get_bit_vector_column(), get_double_column(), get_float_column(), get_int16_column(), get_int32_column(), get_int64_column(), get_int8_column(), get_row(), get_string_column(), get_uint16_column(), get_uint32_column(), get_uint64_column(), get_uint8_column(), init(), set_row(), and update().
|
private |
Definition at line 385 of file column_table.hpp.
Referenced by add(), clear(), delete_row(), exact_match(), get_clock(), set_row(), update(), and update_clock().
|
private |
Definition at line 379 of file column_table.hpp.
Referenced by add(), clear(), get_key_nolock(), get_row(), and set_row().
|
mutableprivate |
Definition at line 382 of file column_table.hpp.
Referenced by add(), clear(), delete_row(), dump_json(), exact_match(), get_clock(), get_key(), get_mutex(), get_row(), get_version(), init(), scan_clock(), set_row(), size(), update(), and update_clock().
|
private |
Definition at line 383 of file column_table.hpp.
Referenced by add(), clear(), delete_row_(), dump_json(), get_key_nolock(), get_row(), set_row(), size(), and update().
|
private |
Definition at line 380 of file column_table.hpp.
Referenced by add(), clear(), get_clock(), get_row(), get_version(), scan_clock(), set_row(), update(), and update_clock().