HBASE-10443-IndexOutOfBoundExceptions when processing compressed tags in HFile(Ramkrishna S Vasudevan)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1563584 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
11eace02ab
commit
d5a347591c
|
@ -18,9 +18,14 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.hbase;
|
package org.apache.hadoop.hbase;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import java.io.DataInput;
|
||||||
import com.google.protobuf.HBaseZeroCopyByteString;
|
import java.io.DataOutput;
|
||||||
import com.google.protobuf.InvalidProtocolBufferException;
|
import java.io.IOException;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
import org.apache.hadoop.classification.InterfaceStability;
|
import org.apache.hadoop.classification.InterfaceStability;
|
||||||
|
@ -37,14 +42,9 @@ import org.apache.hadoop.hbase.util.Bytes;
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
import org.apache.hadoop.io.WritableComparable;
|
import org.apache.hadoop.io.WritableComparable;
|
||||||
|
|
||||||
import java.io.DataInput;
|
import com.google.common.base.Preconditions;
|
||||||
import java.io.DataOutput;
|
import com.google.protobuf.HBaseZeroCopyByteString;
|
||||||
import java.io.IOException;
|
import com.google.protobuf.InvalidProtocolBufferException;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An HColumnDescriptor contains information about a column family such as the
|
* An HColumnDescriptor contains information about a column family such as the
|
||||||
|
@ -194,9 +194,10 @@ public class HColumnDescriptor implements WritableComparable<HColumnDescriptor>
|
||||||
public static final boolean DEFAULT_EVICT_BLOCKS_ON_CLOSE = false;
|
public static final boolean DEFAULT_EVICT_BLOCKS_ON_CLOSE = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default compress tags along with any type of DataBlockEncoding
|
* Default compress tags along with any type of DataBlockEncoding.
|
||||||
|
* Disabled to false by default in 0.98.0
|
||||||
*/
|
*/
|
||||||
public static final boolean DEFAULT_COMPRESS_TAGS = true;
|
public static final boolean DEFAULT_COMPRESS_TAGS = false;
|
||||||
|
|
||||||
private final static Map<String, String> DEFAULT_VALUES
|
private final static Map<String, String> DEFAULT_VALUES
|
||||||
= new HashMap<String, String>();
|
= new HashMap<String, String>();
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class HFileContextBuilder {
|
||||||
/** Compression algorithm used **/
|
/** Compression algorithm used **/
|
||||||
private Algorithm compression = Algorithm.NONE;
|
private Algorithm compression = Algorithm.NONE;
|
||||||
/** Whether tags to be compressed or not **/
|
/** Whether tags to be compressed or not **/
|
||||||
private boolean compressTags;
|
private boolean compressTags = false;
|
||||||
/** the checksum type **/
|
/** the checksum type **/
|
||||||
private ChecksumType checksumType = DEFAULT_CHECKSUM_TYPE;
|
private ChecksumType checksumType = DEFAULT_CHECKSUM_TYPE;
|
||||||
/** the number of bytes per checksum value **/
|
/** the number of bytes per checksum value **/
|
||||||
|
|
|
@ -891,11 +891,15 @@ public class HStore implements Store {
|
||||||
if (compression == null) {
|
if (compression == null) {
|
||||||
compression = HFile.DEFAULT_COMPRESSION_ALGORITHM;
|
compression = HFile.DEFAULT_COMPRESSION_ALGORITHM;
|
||||||
}
|
}
|
||||||
|
if(family.shouldCompressTags()) {
|
||||||
|
LOG.warn("HFile tag compression attribute ignored for '" + family.getNameAsString()
|
||||||
|
+ "', see HBASE-10443.");
|
||||||
|
}
|
||||||
HFileContext hFileContext = new HFileContextBuilder()
|
HFileContext hFileContext = new HFileContextBuilder()
|
||||||
.withIncludesMvcc(includeMVCCReadpoint)
|
.withIncludesMvcc(includeMVCCReadpoint)
|
||||||
.withIncludesTags(includesTag)
|
.withIncludesTags(includesTag)
|
||||||
.withCompression(compression)
|
.withCompression(compression)
|
||||||
.withCompressTags(family.shouldCompressTags())
|
.withCompressTags(false)
|
||||||
.withChecksumType(checksumType)
|
.withChecksumType(checksumType)
|
||||||
.withBytesPerCheckSum(bytesPerChecksum)
|
.withBytesPerCheckSum(bytesPerChecksum)
|
||||||
.withBlockSize(blocksize)
|
.withBlockSize(blocksize)
|
||||||
|
|
Loading…
Reference in New Issue