protected boolean includesTags() { return this.decodingCtx.getHFileContext().isIncludesTags(); }
/** * Retrieves the decompressed/decrypted view of this block. An encoded block remains in its * encoded structure. Internal structures are shared between instances where applicable. */ HFileBlock unpack(HFileContext fileContext, FSReader reader) throws IOException { if (!fileContext.isCompressedOrEncrypted()) { // TODO: cannot use our own fileContext here because HFileBlock(ByteBuffer, boolean), // which is used for block serialization to L2 cache, does not preserve encoding and // encryption details. return this; } HFileBlock unpacked = new HFileBlock(this); unpacked.allocateBuffer(); // allocates space for the decompressed block HFileBlockDecodingContext ctx = blockType == BlockType.ENCODED_DATA ? reader.getBlockDecodingContext() : reader.getDefaultBlockDecodingContext(); ByteBuff dup = this.buf.duplicate(); dup.position(this.headerSize()); dup = dup.slice(); ctx.prepareDecoding(unpacked.getOnDiskSizeWithoutHeader(), unpacked.getUncompressedSizeWithoutHeader(), unpacked.getBufferWithoutHeader(), dup); return unpacked; }
dup.position(this.headerSize()); dup = dup.slice(); ctx.prepareDecoding(unpacked.getOnDiskSizeWithoutHeader(), unpacked.getUncompressedSizeWithoutHeader(), unpacked.getBufferWithoutHeader(), dup);
protected boolean includesMvcc() { return this.decodingCtx.getHFileContext().isIncludesMvcc(); }
public BufferedEncodedSeeker(CellComparator comparator, HFileBlockDecodingContext decodingCtx) { super(comparator, decodingCtx); if (decodingCtx.getHFileContext().isCompressTags()) { try { tagCompressionContext = new TagCompressionContext(LRUDictionary.class, Byte.MAX_VALUE); } catch (Exception e) { throw new RuntimeException("Failed to initialize TagCompressionContext", e); } } current = createSeekerState(); // always valid previous = createSeekerState(); // may not be valid }
if (!decodingCtx.getHFileContext().isIncludesTags()) { sourceAsBuffer.position(sourceAsBuffer.limit() - Bytes.SIZEOF_INT); int onDiskSize = sourceAsBuffer.getInt(); kvs.add(seeker.getCell()); boolean includesMvcc = decodingCtx.getHFileContext().isIncludesMvcc(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(baos);
protected boolean includesTags() { return this.decodingCtx.getHFileContext().isIncludesTags(); }
protected boolean includesMvcc() { return this.decodingCtx.getHFileContext().isIncludesMvcc(); }
protected boolean includesMvcc() { return this.decodingCtx.getHFileContext().isIncludesMvcc(); }
protected boolean includesTags() { return this.decodingCtx.getHFileContext().isIncludesTags(); }
protected boolean includesMvcc() { return this.decodingCtx.getHFileContext().isIncludesMvcc(); }
protected boolean includesTags() { return this.decodingCtx.getHFileContext().isIncludesTags(); }
/** * Is this the correct handling of an illegal comparator? How to prevent that from getting all * the way to this point. */ @Override public EncodedSeeker createSeeker(KVComparator comparator, HFileBlockDecodingContext decodingCtx) { if (comparator instanceof RawBytesComparator){ throw new IllegalArgumentException("comparator must be KeyValue.KeyComparator"); } else if (comparator instanceof MetaComparator){ throw new IllegalArgumentException("DataBlockEncoding.PREFIX_TREE not compatible with hbase:meta " +"table"); } return new PrefixTreeSeeker(decodingCtx.getHFileContext().isIncludesMvcc()); }
/** * Is this the correct handling of an illegal comparator? How to prevent that from getting all * the way to this point. */ @Override public EncodedSeeker createSeeker(KVComparator comparator, HFileBlockDecodingContext decodingCtx) { if (comparator instanceof RawBytesComparator){ throw new IllegalArgumentException("comparator must be KeyValue.KeyComparator"); } else if (comparator instanceof MetaComparator){ throw new IllegalArgumentException("DataBlockEncoding.PREFIX_TREE not compatible with hbase:meta " +"table"); } return new PrefixTreeSeeker(decodingCtx.getHFileContext().isIncludesMvcc()); }
public BufferedEncodedSeeker(KVComparator comparator, HFileBlockDecodingContext decodingCtx) { this.comparator = comparator; this.samePrefixComparator = comparator; this.decodingCtx = decodingCtx; if (decodingCtx.getHFileContext().isCompressTags()) { try { tagCompressionContext = new TagCompressionContext(LRUDictionary.class, Byte.MAX_VALUE); } catch (Exception e) { throw new RuntimeException("Failed to initialize TagCompressionContext", e); } } }
public BufferedEncodedSeeker(CellComparator comparator, HFileBlockDecodingContext decodingCtx) { super(comparator, decodingCtx); if (decodingCtx.getHFileContext().isCompressTags()) { try { tagCompressionContext = new TagCompressionContext(LRUDictionary.class, Byte.MAX_VALUE); } catch (Exception e) { throw new RuntimeException("Failed to initialize TagCompressionContext", e); } } current = createSeekerState(); // always valid previous = createSeekerState(); // may not be valid }
public BufferedEncodedSeeker(CellComparator comparator, HFileBlockDecodingContext decodingCtx) { super(comparator, decodingCtx); if (decodingCtx.getHFileContext().isCompressTags()) { try { tagCompressionContext = new TagCompressionContext(LRUDictionary.class, Byte.MAX_VALUE); } catch (Exception e) { throw new RuntimeException("Failed to initialize TagCompressionContext", e); } } current = createSeekerState(); // always valid previous = createSeekerState(); // may not be valid }
if (!decodingCtx.getHFileContext().isIncludesTags()) { sourceAsBuffer.position(sourceAsBuffer.limit() - Bytes.SIZEOF_INT); int onDiskSize = sourceAsBuffer.getInt(); kvs.add(seeker.getCell()); boolean includesMvcc = decodingCtx.getHFileContext().isIncludesMvcc(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(baos);
if (!decodingCtx.getHFileContext().isIncludesTags()) { sourceAsBuffer.position(sourceAsBuffer.limit() - Bytes.SIZEOF_INT); int onDiskSize = sourceAsBuffer.getInt(); kvs.add(seeker.getCell()); boolean includesMvcc = decodingCtx.getHFileContext().isIncludesMvcc(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(baos);
CellSearcher searcher = null; try { boolean includesMvcc = decodingCtx.getHFileContext().isIncludesMvcc(); searcher = DecoderFactory.checkOut(sourceAsBuffer, includesMvcc); while (searcher.advance()) {