RocksDB static build
Make file changes to download and build the dependencies
.Load the shared library when RocksDB is initialized
Reverting import change
Addressing review comments
Skip AllocateTest if fallocate() is not supported in the file system

Summary: To avoid false positive test failures when the file system doesn't support fallocate. In EnvTest.AllocateTest, we first make a simple fallocate call and check the error codes to rule out the possibility that it is not supported. Skip the test if the error code indicates it is not supported.

Test Plan: Run the test and make sure it passes on file systems supporting and not supporting fallocate

Reviewers: yhchiang, ljin, igor

Reviewed By: igor

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D23667
Print compression_size_percent as a signed int

Summary:
compression_size_percent is an int but was printed as
an unsigned int. So the default of -1 is displayed as a big number.

Test Plan: make check

Reviewers: sdong

Reviewed By: sdong

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D23679
Add rate limiter
Merge branch 'master' of https://github.com/facebook/rocksdb
Merge pull request #302 from ankgup87/master

[Java] Add rate limiter
fixed #303: replace %ld with % PRId64
remove unused variable
Merge pull request #305 from Liuchang0812/fix-logging

remove unused variable
Merge pull request #304 from Liuchang0812/fix-check

fixed #303: replace %ld with % PRId64
Update logging.cc

fix cast style to cpp static_cast
Update logging.cc
remove cast, replace %llu with % PRIu64
Merge pull request #306 from Liuchang0812/fix_cast

Update logging.cc
dont create backup_input if compaction filter v2 is not used

Summary:
Compaction creates backup_input iterator even though it only needed
when compaction filter v2 is enabled

Test Plan: make all check

Reviewers: sdong, yhchiang, igor

Reviewed By: igor

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D23769
change target_file_size_base to uint64_t

Summary: It contrains the file size to be 4G max with int

Test Plan:
tried to grep instance and made sure other related variables are also
uint64

Reviewers: sdong, yhchiang, igor

Reviewed By: igor

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D23697
WriteBatchWithIndex to allow different Comparators for different column families

Summary:
Previously, one single column family is given to WriteBatchWithIndex to index keys for all column families. An extra map from column family ID to comparator is maintained which can override the default comparator given in the constructor. A WriteBatchWithIndex::SetComparatorForCF() is added for user to add comparators per column family.

Also move more codes into anonymous namespace.

Test Plan: Add a unit test

Reviewers: ljin, igor

Reviewed By: igor

Subscribers: dhruba, leveldb, yhchiang

Differential Revision: https://reviews.facebook.net/D23355
Fix release compile