plutolove’s diary

I love three things in this world, the sun, the moon and you. The sun for the day, the moon for the night, and you forever。

Entries from 2017-01-01 to 1 year

LevelDB源码分析-SSTable

SSTable是LevelDB的核心,将数据文件组织存储在磁盘中。有关SSTable的结构设计参考下列博客: http://blog.csdn.net/u012658346/article/details/45644195 https://www.cnblogs.com/cobbliu/p/6194072.html http://blog.csdn.net/anderscloud/article/detail…

LevelDB源码分析-Put/Delete

在LevelDB中,Put和Delete操作本质上都是Writebatch,不同点在于key值有不同的标记。真正的Delete会在Compaction时删除标记为kTypeDeletion的数据。(在本文中mem和memtable等价,imm和Immutable等价) enum ValueType { kTypeDeletion = 0x0, kTypeValue = 0x1…

LevelDB源码分析-Prepare

LevelDB整体设计 Implementation notes Format of an immutable Table file Format of a log file

配置PostgreSQL调试环境

首先下载PostgreSQL源码,我用的是PostgreSQL9.4.2。 在/home/username/新建pg文件夹,然后在.bashrc文件内添加 #每次更改.bashrc之后,执行 source ~/.bashrc export PG=/home/username/pg 在源代码文件夹下执行 ./configure --prefix=$PG --enable-depend …

MIT 6.824 Lab1 MapReduce

MapReduce MapReduce是Google提出的一种分布式编程框架,具体介绍看MapReduce论文 MIT 6.824 Lab1要求使用Go语言实现一个简易版本的MapReduce框架,在实现之前先通过下图了解MapReduce的执行过程 以实验1的wordcount为例,首先将输入文件分成5份,用户规定Ma…