/** * @return compression type being used for the column family for major compaction * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 * (<a href="https://issues.apache.org/jira/browse/HBASE-13655">HBASE-13655</a>). * Use {@link #getCompactionCompressionType()}. */ @Deprecated public Compression.Algorithm getCompactionCompression() { return getCompactionCompressionType(); }
/** * @return compression type being used for the column family for major compaction * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 * (<a href="https://issues.apache.org/jira/browse/HBASE-13655">HBASE-13655</a>). * Use {@link #getCompactionCompressionType()}. */ @Deprecated public Compression.Algorithm getCompactionCompression() { return getCompactionCompressionType(); }
Assert.assertEquals(Algorithm.valueOf("GZ"), columnDescriptor.getCompactionCompressionType()); Assert.assertEquals(Integer.parseInt("12345678"), columnDescriptor.getTimeToLive()); Assert.assertEquals(Algorithm.valueOf("GZ"), columnDescriptor.getCompressionType());
Assert.assertEquals(Algorithm.valueOf("GZ"), columnDescriptor.getCompactionCompressionType()); Assert.assertEquals(Integer.parseInt("12345678"), columnDescriptor.getTimeToLive()); Assert.assertEquals(Algorithm.valueOf("GZ"), columnDescriptor.getCompressionType());
/** * @return compression type being used for the column family for major compaction * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 * (<a href="https://issues.apache.org/jira/browse/HBASE-13655">HBASE-13655</a>). * Use {@link #getCompactionCompressionType()}. */ @Deprecated public Compression.Algorithm getCompactionCompression() { return getCompactionCompressionType(); }
private void init(Configuration conf, HColumnDescriptor hcd) throws IOException { Path basedir = FSUtils.getRootDir(conf); fs = FileSystem.get(conf); Path homePath = new Path(basedir, Bytes.toString(family) + Path.SEPARATOR + Bytes.toString(family)); fs.mkdirs(homePath); KeyValue key1 = new KeyValue(row, family, qf1, 1, value); KeyValue key2 = new KeyValue(row, family, qf2, 1, value); KeyValue key3 = new KeyValue(row2, family, qf3, 1, value2); KeyValue[] keys = new KeyValue[] { key1, key2, key3 }; int maxKeyCount = keys.length; StoreFileWriter mobWriter = store.createWriterInTmp(currentDate, maxKeyCount, hcd.getCompactionCompressionType(), region.getRegionInfo().getStartKey(), false); mobFilePath = mobWriter.getPath(); mobWriter.append(key1); mobWriter.append(key2); mobWriter.append(key3); mobWriter.close(); String targetPathName = MobUtils.formatDate(currentDate); byte[] referenceValue = Bytes.toBytes(targetPathName + Path.SEPARATOR + mobFilePath.getName()); Tag tableNameTag = new ArrayBackedTag(TagType.MOB_TABLE_NAME_TAG_TYPE, store.getTableName().getName()); KeyValue kv1 = new KeyValue(row, family, qf1, Long.MAX_VALUE, referenceValue); KeyValue kv2 = new KeyValue(row, family, qf2, Long.MAX_VALUE, referenceValue); KeyValue kv3 = new KeyValue(row2, family, qf3, Long.MAX_VALUE, referenceValue); seekKey1 = MobUtils.createMobRefCell(kv1, referenceValue, tableNameTag); seekKey2 = MobUtils.createMobRefCell(kv2, referenceValue, tableNameTag); seekKey3 = MobUtils.createMobRefCell(kv3, referenceValue, tableNameTag); }
columnFamily.setAttribute(ATTR_CF_CACHED_DATA_ON_WRITE, hColumnDescriptor.isCacheDataOnWrite()); columnFamily.setAttribute(ATTR_CF_CACHED_INDEXES_ON_WRITE, hColumnDescriptor.isCacheIndexesOnWrite()); columnFamily.setAttribute(ATTR_CF_COMPACTION_COMPRESSION_TYPE, (hColumnDescriptor.getCompactionCompressionType() != null ? hColumnDescriptor.getCompactionCompressionType().name():null)); columnFamily.setAttribute(ATTR_CF_COMPRESSION_TYPE, (hColumnDescriptor.getCompressionType() != null ? hColumnDescriptor.getCompressionType().name():null)); columnFamily.setAttribute(ATTR_CF_DATA_BLOCK_ENCODING, (hColumnDescriptor.getDataBlockEncoding() != null ? hColumnDescriptor.getDataBlockEncoding().name():null));
columnFamily.setAttribute(ATTR_CF_CACHED_DATA_ON_WRITE, hColumnDescriptor.isCacheDataOnWrite()); columnFamily.setAttribute(ATTR_CF_CACHED_INDEXES_ON_WRITE, hColumnDescriptor.isCacheIndexesOnWrite()); columnFamily.setAttribute(ATTR_CF_COMPACTION_COMPRESSION_TYPE, (hColumnDescriptor.getCompactionCompressionType() != null ? hColumnDescriptor.getCompactionCompressionType().name():null)); columnFamily.setAttribute(ATTR_CF_COMPRESSION_TYPE, (hColumnDescriptor.getCompressionType() != null ? hColumnDescriptor.getCompressionType().name():null)); columnFamily.setAttribute(ATTR_CF_DATA_BLOCK_ENCODING, (hColumnDescriptor.getDataBlockEncoding() != null ? hColumnDescriptor.getDataBlockEncoding().name():null));
ret.setAttribute(ATTR_CF_CACHED_DATA_ON_WRITE, hcdt.isCacheDataOnWrite()); ret.setAttribute(ATTR_CF_CACHED_INDEXES_ON_WRITE, hcdt.isCacheIndexesOnWrite()); ret.setAttribute(ATTR_CF_COMPACTION_COMPRESSION_TYPE, (hcdt.getCompactionCompressionType() != null ? hcdt.getCompactionCompressionType().name():null)); ret.setAttribute(ATTR_CF_COMPRESSION_TYPE, (hcdt.getCompressionType() != null ? hcdt.getCompressionType().name():null)); ret.setAttribute(ATTR_CF_DATA_BLOCK_ENCODING, (hcdt.getDataBlockEncoding() != null ? hcdt.getDataBlockEncoding().name():null));
ret.setAttribute(ATTR_CF_CACHED_DATA_ON_WRITE, hcdt.isCacheDataOnWrite()); ret.setAttribute(ATTR_CF_CACHED_INDEXES_ON_WRITE, hcdt.isCacheIndexesOnWrite()); ret.setAttribute(ATTR_CF_COMPACTION_COMPRESSION_TYPE, (hcdt.getCompactionCompressionType() != null ? hcdt.getCompactionCompressionType().name():null)); ret.setAttribute(ATTR_CF_COMPRESSION_TYPE, (hcdt.getCompressionType() != null ? hcdt.getCompressionType().name():null)); ret.setAttribute(ATTR_CF_DATA_BLOCK_ENCODING, (hcdt.getDataBlockEncoding() != null ? hcdt.getDataBlockEncoding().name():null));