Package org.lilyproject.util.hbase

Examples of org.lilyproject.util.hbase.ColumnFamilyConfig


            TableConfig config = new TableConfig(splitKeys);
            config.setMaxFileSize(maxFileSize);
            config.setMemStoreFlushSize(memStoreFlushSize);

            for (Conf familyConf : table.getChild("families").getChildren("family")) {
                ColumnFamilyConfig family = buildCfConfig(familyConf);
                String familyName = familyConf.getAttribute("name");
                config.getColumnFamilies().put(familyName, family);
            }

            result.add(new TableConfigEntry(tableNamePattern, config));
View Full Code Here


        return result;
    }

    public static ColumnFamilyConfig buildCfConfig(Conf conf) {
        ColumnFamilyConfig family = new ColumnFamilyConfig();

        String compression = conf.getChild("compression").getValue(null);
        if (compression != null) {
            family.setCompression(Compression.Algorithm.valueOf(compression.toUpperCase()));
        }

        String bloomFilter = conf.getChild("bloomFilter").getValue(null);
        if (bloomFilter != null) {
            family.setBoomFilter(StoreFile.BloomType.valueOf(bloomFilter.toUpperCase()));
        }

        Integer blockSize = conf.getChild("blockSize").getValueAsInteger(null);
        if (blockSize != null) {
            family.setBlockSize(blockSize);
        }

        return family;
    }
View Full Code Here

TOP

Related Classes of org.lilyproject.util.hbase.ColumnFamilyConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.