【实例简介】
hadoop2 lzo 文件 ,编译好的64位 hadoop-lzo-0.4.20.jar 文件 ,在mac 系统下编译的,用法:解压后把hadoop-lzo-0.4.20.jar 放到你的hadoop 安装路径下的lib 下,把里面lib/Mac_OS_X-x86_64-64 下的所有文件 拷到 hadoop 安装路径下的lib/native ,再把core-site.xml 增加
io.compression.codecs
org.apache.hadoop.io.compress.GzipCodec,org.
【实例截图】
【核心代码】
hadoop-lzo-0.4.20.tar
└── hadoop-lzo-0.4.15
├── build.xml
├── docs
│ └── api
│ ├── allclasses-frame.html
│ ├── allclasses-noframe.html
│ ├── com
│ │ ├── hadoop
│ │ │ ├── compression
│ │ │ │ └── lzo
│ │ │ │ ├── CChecksum.html
│ │ │ │ ├── class-use
│ │ │ │ │ ├── CChecksum.html
│ │ │ │ │ ├── DChecksum.html
│ │ │ │ │ ├── DistributedLzoIndexer.html
│ │ │ │ │ ├── GPLNativeCodeLoader.html
│ │ │ │ │ ├── LzoCodec.html
│ │ │ │ │ ├── LzoIndexer.html
│ │ │ │ │ ├── LzoIndex.html
│ │ │ │ │ ├── LzoInputFormatCommon.html
│ │ │ │ │ ├── LzopCodec.html
│ │ │ │ │ ├── LzopDecompressor.html
│ │ │ │ │ ├── LzopInputStream.html
│ │ │ │ │ └── LzopOutputStream.html
│ │ │ │ ├── DChecksum.html
│ │ │ │ ├── DistributedLzoIndexer.html
│ │ │ │ ├── GPLNativeCodeLoader.html
│ │ │ │ ├── LzoCodec.html
│ │ │ │ ├── LzoIndexer.html
│ │ │ │ ├── LzoIndex.html
│ │ │ │ ├── LzoInputFormatCommon.html
│ │ │ │ ├── LzopCodec.html
│ │ │ │ ├── LzopDecompressor.html
│ │ │ │ ├── LzopInputStream.html
│ │ │ │ ├── LzopOutputStream.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── mapred
│ │ │ │ ├── class-use
│ │ │ │ │ ├── DeprecatedLzoLineRecordReader.html
│ │ │ │ │ └── DeprecatedLzoTextInputFormat.html
│ │ │ │ ├── DeprecatedLzoLineRecordReader.html
│ │ │ │ ├── DeprecatedLzoTextInputFormat.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ └── mapreduce
│ │ │ ├── class-use
│ │ │ │ ├── LzoIndexOutputFormat.html
│ │ │ │ ├── LzoIndexRecordWriter.html
│ │ │ │ ├── LzoLineRecordReader.html
│ │ │ │ ├── LzoSplitInputFormat.html
│ │ │ │ ├── LzoSplitRecordReader.html
│ │ │ │ └── LzoTextInputFormat.html
│ │ │ ├── LzoIndexOutputFormat.html
│ │ │ ├── LzoIndexRecordWriter.html
│ │ │ ├── LzoLineRecordReader.html
│ │ │ ├── LzoSplitInputFormat.html
│ │ │ ├── LzoSplitRecordReader.html
│ │ │ ├── LzoTextInputFormat.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ ├── package-tree.html
│ │ │ └── package-use.html
│ │ └── quicklz
│ │ ├── class-use
│ │ │ └── QuickLZ.html
│ │ ├── package-frame.html
│ │ ├── package-summary.html
│ │ ├── package-tree.html
│ │ ├── package-use.html
│ │ └── QuickLZ.html
│ ├── constant-values.html
│ ├── deprecated-list.html
│ ├── help-doc.html
│ ├── index-all.html
│ ├── index.html
│ ├── org
│ │ └── apache
│ │ └── hadoop
│ │ └── io
│ │ └── compress
│ │ ├── class-use
│ │ │ └── LzoCodec.html
│ │ ├── LzoCodec.html
│ │ ├── package-frame.html
│ │ ├── package-summary.html
│ │ ├── package-tree.html
│ │ └── package-use.html
│ ├── overview-frame.html
│ ├── overview-summary.html
│ ├── overview-tree.html
│ ├── package-list
│ ├── script.js
│ └── stylesheet.css
├── hadoop-lzo-0.4.20.jar
├── ivy
│ ├── ivy-2.0.0-rc2.jar
│ ├── ivy-2.2.0.jar
│ ├── ivysettings.xml
│ └── libraries.properties
├── ivy.xml
├── lib
│ ├── commons-logging-1.0.4.jar
│ ├── commons-logging-api-1.0.4.jar
│ ├── junit-3.8.1.jar
│ └── native
│ └── Mac_OS_X-x86_64-64
│ ├── libgplcompression.0.dylib
│ ├── libgplcompression.a
│ ├── libgplcompression.dylib
│ └── libgplcompression.la
└── src
├── get_build_revision.sh
├── java
│ ├── com
│ │ ├── hadoop
│ │ │ ├── compression
│ │ │ │ └── lzo
│ │ │ │ ├── CChecksum.java
│ │ │ │ ├── DChecksum.java
│ │ │ │ ├── DistributedLzoIndexer.java
│ │ │ │ ├── GPLNativeCodeLoader.java
│ │ │ │ ├── LzoCodec.java
│ │ │ │ ├── LzoCompressor.java
│ │ │ │ ├── LzoDecompressor.java
│ │ │ │ ├── LzoIndexer.java
│ │ │ │ ├── LzoIndex.java
│ │ │ │ ├── LzoInputFormatCommon.java
│ │ │ │ ├── LzopCodec.java
│ │ │ │ ├── LzopDecompressor.java
│ │ │ │ ├── LzopInputStream.java
│ │ │ │ └── LzopOutputStream.java
│ │ │ ├── mapred
│ │ │ │ ├── DeprecatedLzoLineRecordReader.java
│ │ │ │ └── DeprecatedLzoTextInputFormat.java
│ │ │ └── mapreduce
│ │ │ ├── LzoIndexOutputFormat.java
│ │ │ ├── LzoIndexRecordWriter.java
│ │ │ ├── LzoLineRecordReader.java
│ │ │ ├── LzoSplitInputFormat.java
│ │ │ ├── LzoSplitRecordReader.java
│ │ │ └── LzoTextInputFormat.java
│ │ └── quicklz
│ │ └── QuickLZ.java
│ └── org
│ └── apache
│ └── hadoop
│ └── io
│ └── compress
│ └── LzoCodec.java
├── native
│ ├── aclocal.m4
│ ├── bootstrap.sh
│ ├── config
│ │ ├── config.guess
│ │ ├── config.sub
│ │ ├── depcomp
│ │ ├── install-sh
│ │ ├── ltmain.sh
│ │ └── missing
│ ├── configure
│ ├── configure.ac
│ ├── impl
│ │ ├── config.h.in
│ │ ├── gpl-compression.h
│ │ └── lzo
│ │ ├── LzoCompressor.c
│ │ ├── LzoDecompressor.c
│ │ └── lzo.h
│ ├── m4
│ │ ├── compression_utils.m4
│ │ ├── libtool.m4
│ │ ├── lt~obsolete.m4
│ │ ├── ltoptions.m4
│ │ ├── ltsugar.m4
│ │ └── ltversion.m4
│ ├── Makefile.am
│ ├── Makefile.in
│ └── packageNativeHadoop.sh
└── test
├── com
│ └── hadoop
│ ├── compression
│ │ └── lzo
│ │ ├── TestLzoCodec.java
│ │ ├── TestLzopInputStream.java
│ │ ├── TestLzopOutputStream.java
│ │ └── TestLzoRandData.java
│ └── mapreduce
│ └── TestLzoTextInputFormat.java
└── data
├── 0.txt
├── 0.txt.lzo
├── 100000.txt
├── 100000.txt.lzo
├── 1000.txt
├── 1000.txt.lzo
├── 100.txt
├── 100.txt.lzo
└── issue20-lzop.txt
50 directories, 154 files