Package org.apache.cassandra.io.compress

Examples of org.apache.cassandra.io.compress.CompressionParameters


    {
        for (KSMetaData ksm : schema)
        {
            for (CFMetaData cfm : ksm.cfMetaData().values())
            {
                cfm.compressionParameters(new CompressionParameters(SnappyCompressor.instance));
            }
        }
    }
View Full Code Here


        {
            throw new AssertionError(e);
        }
        compactionStrategyOptions = new HashMap<String, String>();

        compressionParameters = new CompressionParameters(null);
        updateCfDef(); // init cqlCfDef
    }
View Full Code Here

        {
            for (Map.Entry<CharSequence, CharSequence> e : cf.compaction_strategy_options.entrySet())
                newCFMD.compactionStrategyOptions.put(e.getKey().toString(), e.getValue().toString());
        }

        CompressionParameters cp;
        try
        {
            cp = CompressionParameters.create(cf.compression_options);
        }
        catch (ConfigurationException e)
View Full Code Here

        if (cf_def.isSetCaching())
            newCFMD.caching(Caching.fromString(cf_def.caching));
        if (cf_def.isSetDclocal_read_repair_chance())
            newCFMD.dclocalReadRepairChance(cf_def.dclocal_read_repair_chance);

        CompressionParameters cp = CompressionParameters.create(cf_def.compression_options);

        return newCFMD.comment(cf_def.comment)
                      .readRepairChance(cf_def.read_repair_chance)
                      .replicateOnWrite(cf_def.replicate_on_write)
                      .defaultValidator(TypeParser.parse(cf_def.default_validation_class))
View Full Code Here

                                       String columnFamily,
                                       AbstractType<?> comparator,
                                       AbstractType<?> subComparator,
                                       int bufferSizeInMB) throws IOException
    {
        this(directory, partitioner, keyspace, columnFamily, comparator, subComparator, bufferSizeInMB, new CompressionParameters(null));
    }
View Full Code Here

    }

    public static CompressionParameters getOutputCompressionParamaters(Configuration conf)
    {
        if (getOutputCompressionClass(conf) == null)
            return new CompressionParameters(null);

        Map<String, String> options = new HashMap<String, String>();
        options.put(CompressionParameters.SSTABLE_COMPRESSION, getOutputCompressionClass(conf));
        options.put(CompressionParameters.CHUNK_LENGTH_KB, getOutputCompressionChunkLength(conf));
View Full Code Here

    }

    public static CompressionParameters getOutputCompressionParamaters(Configuration conf)
    {
        if (getOutputCompressionClass(conf) == null)
            return new CompressionParameters(null);

        Map<String, String> options = new HashMap<String, String>();
        options.put(CompressionParameters.SSTABLE_COMPRESSION, getOutputCompressionClass(conf));
        options.put(CompressionParameters.CHUNK_LENGTH_KB, getOutputCompressionChunkLength(conf));
View Full Code Here

            if (cf_def.isSetRead_repair_chance())
                newCFMD.readRepairChance(cf_def.read_repair_chance);
            if (cf_def.isSetDclocal_read_repair_chance())
                newCFMD.dcLocalReadRepairChance(cf_def.dclocal_read_repair_chance);

            CompressionParameters cp = CompressionParameters.create(cf_def.compression_options);

            return newCFMD.comment(cf_def.comment)
                          .replicateOnWrite(cf_def.replicate_on_write)
                          .defaultValidator(TypeParser.parse(cf_def.default_validation_class))
                          .keyValidator(TypeParser.parse(cf_def.key_validation_class))
View Full Code Here

            if (cf_def.isSetDclocal_read_repair_chance())
                newCFMD.dcLocalReadRepairChance(cf_def.dclocal_read_repair_chance);
            if (cf_def.isSetPopulate_io_cache_on_flush())
                newCFMD.populateIoCacheOnFlush(cf_def.populate_io_cache_on_flush);

            CompressionParameters cp = CompressionParameters.create(cf_def.compression_options);

            return newCFMD.comment(cf_def.comment)
                          .replicateOnWrite(cf_def.replicate_on_write)
                          .defaultValidator(TypeParser.parse(cf_def.default_validation_class))
                          .keyValidator(TypeParser.parse(cf_def.key_validation_class))
View Full Code Here

        {
            throw new AssertionError(e);
        }
        compactionStrategyOptions = new HashMap<String, String>();

        compressionParameters = new CompressionParameters(null);
        updateCfDef(); // init cqlCfDef
    }
View Full Code Here

TOP

Related Classes of org.apache.cassandra.io.compress.CompressionParameters

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.