use of com.navercorp.pinpoint.hbase.schema.reader.core.ColumnFamilyConfiguration in project pinpoint by naver.
the class TableCommand method newColumnDescriptor.
private HColumnDescriptor newColumnDescriptor(ColumnFamilyChange columnFamilyChange) {
HColumnDescriptor hcd = new HColumnDescriptor(columnFamilyChange.getName());
ColumnFamilyConfiguration columnFamilyConfiguration = columnFamilyChange.getColumnFamilyConfiguration();
Boolean blockCacheEnabled = columnFamilyConfiguration.getBlockCacheEnabled();
if (blockCacheEnabled != null) {
hcd.setBlockCacheEnabled(blockCacheEnabled);
}
Integer replicationScope = columnFamilyConfiguration.getReplicationScope();
if (replicationScope != null) {
hcd.setScope(replicationScope);
}
Boolean inMemory = columnFamilyConfiguration.getInMemory();
if (inMemory != null) {
hcd.setInMemory(inMemory);
}
Integer timeToLive = columnFamilyConfiguration.getTimeToLive();
if (timeToLive != null) {
hcd.setTimeToLive(timeToLive);
}
ColumnFamilyConfiguration.DataBlockEncoding dataBlockEncoding = columnFamilyConfiguration.getDataBlockEncoding();
if (dataBlockEncoding != null) {
hcd.setDataBlockEncoding(DataBlockEncoding.valueOf(dataBlockEncoding.name()));
}
Integer blockSize = columnFamilyConfiguration.getBlockSize();
if (blockSize != null) {
hcd.setBlocksize(blockSize);
}
Integer maxVersions = columnFamilyConfiguration.getMaxVersions();
if (maxVersions != null) {
hcd.setMaxVersions(maxVersions);
}
Integer minVersions = columnFamilyConfiguration.getMinVersions();
if (minVersions != null) {
hcd.setMinVersions(minVersions);
}
ColumnFamilyConfiguration.BloomFilter bloomFilter = columnFamilyConfiguration.getBloomFilter();
if (bloomFilter != null) {
hcd.setBloomFilterType(BloomType.valueOf(bloomFilter.name()));
}
if (compressionAlgorithm != Compression.Algorithm.NONE) {
hcd.setCompressionType(compressionAlgorithm);
}
return hcd;
}
use of com.navercorp.pinpoint.hbase.schema.reader.core.ColumnFamilyConfiguration in project pinpoint by naver.
the class ColumnFamilyChangeMapper method mapCreate.
public ColumnFamilyChange mapCreate(Table.CreateColumnFamily createColumnFamily) {
String name = createColumnFamily.getName();
if (StringUtils.isEmpty(name)) {
throw new InvalidHbaseSchemaException("ColumnFamily name must not be empty");
}
ColumnFamilyConfiguration columnFamilyConfiguration = columnFamilyConfigurationMapper.mapConfiguration(createColumnFamily.getConfiguration());
return new CreateColumnFamilyChange(name, columnFamilyConfiguration);
}
Aggregations