<commit_before>from feedly.storage.cassandra.connection import get_cassandra_connection
from pycassa.columnfamily import ColumnFamily


class CassandraBaseStorage(object):

    def __init__(self, keyspace_name, hosts, column_family_name, **kwargs):
        self.connection = get_cassandra_connection(keyspace_name, hosts)
        self.column_family_name = column_family_name

    @property
    def column_family(self):
        if not hasattr(self, '_column_family'):
            setattr(self, '_column_family', ColumnFamily(self.connection, self.column_family_name))
        return self._column_family

    def get_batch_interface(self):
        return self.column_family.batch(queue_size=200)

    def flush(self):
        self.column_family.truncate()<commit_msg>larger batches<commit_after>from feedly.storage.cassandra.connection import get_cassandra_connection
from pycassa.columnfamily import ColumnFamily


class CassandraBaseStorage(object):

    def __init__(self, keyspace_name, hosts, column_family_name, **kwargs):
        self.connection = get_cassandra_connection(keyspace_name, hosts)
        self.column_family_name = column_family_name

    @property
    def column_family(self):
        if not hasattr(self, '_column_family'):
            setattr(self, '_column_family', ColumnFamily(self.connection, self.column_family_name))
        return self._column_family

    def get_batch_interface(self):
        return self.column_family.batch(queue_size=500)

    def flush(self):
        self.column_family.truncate()
{'fraction_non_alphanumeric': 0.08229915088177661, 'fraction_numerical': 0.003919007184846506, 'mean_word_length': 4.394366197183099, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3003413', 'n_tokens_mistral': 454, 'n_tokens_neox': 434, 'n_words': 82}