---
title: "install snappy compression in hadoop and hbase"
author: "leibnitz"
date: "2014-03-08T00:36:23Z"
tags: []
categories: ["开源软件"]
slug: "install-snappy-compression-in-hadoop-and-hbase"
draft: false
lastmod: "2014-04-28T17:53:05Z"
id: 2028165
url: "https://leibnitz.iteye.com/blog/2028165"
---

1.what is snappy

 

 

 

2.why to use it

 

 

3.how it to work

 

 

4.compare to similar compressions

 

 

5.install it on hadoop

 

 

6.intall it on hbase

 

 

6.2 verify

a.

b.

c.use tool 'HFile' 

hbase org.apache.hadoop.hbase.io.hfile.HFile -f /hbase/#tablename#/f7cd3ee8cd7c72f1789b018f6803e837/f1/3197441493d14fc791f49f80c07fe656 -v -m -p

 

summary like below:

```
Trailer:
    fileinfoOffset=91187,
    loadOnOpenDataOffset=90953,
    dataIndexCount=3,
    metaIndexCount=0,
    totalUncomressedBytes=288046,
    entryCount=3391,
    compressionCodec=SNAPPY,
    uncompressedDataIndexSize=184,
    numDataIndexLevels=1,
    firstDataBlockOffset=0,
    lastDataBlockOffset=82295,
    comparatorClassName=org.apache.hadoop.hbase.KeyValue$KeyComparator,
    majorVersion=2,
    minorVersion=0
```

 

 

7.conclusion