2015年5月26日 星期二

Elasticsearch Class Diagram for Shard Routing and Preference


RotationShardShuffler is initialized with a random seed, then the seed will be increased by one (round-robin) on every certain action.

2015年5月5日 星期二

Interview with LZ4 (Extremely Fast Compression algorithm)

Why is LZ4 so fast?
  1. Fast scan strategy
    • xxHash (Extremely fast non-cryptographic hash algorithm)
  2. Multi-threading
  3. Reduced memory usage fits into Intel x86 L1 cache
    • #define LZ4_MEMORY_USAGE 14 (default 16 KB, see lz4.h)
Reference:
  1. LZ4 - Extremely fast compression
  2. LZ4 Java
    1. JNI (fastest)
    2. Pure Java
    3. Java uses sun.misc.Unsafe API