how the underlying data structure of BigTable is implemented?

78 Views Asked by At

I am learning about SSTABLE and MVCC and have decided to read the BigTable paper. However, the data model of BigTable seems quite abstract, so I have decided to implement a small prototype using C++. I designed some data structures, but there seems to be some redundancy. Is this design correct?

// A struct that represents a cell in the Bigtable
struct Cell {
    string value; // The value of the cell
    int64_t timestamp; // The timestamp of the cell
};

// A struct that represents a column family in the Bigtable
struct ColumnFamily {
    string name; // The name of the column family
    map<string, Cell> cells; // A map from column keys to cells
};

// A struct that represents a row in the Bigtable
struct Row {
    string RowKey; // The key of the row
    vector<ColumnFamily> column_families; // A vector of column families in the row
};

class table {
    string table_name;
    vector<Row> rows_;
};

0

There are 0 best solutions below