How to use the datasketch.storage.CassandraClient.split_sequence function in datasketch

To help you get started, we’ve selected a few datasketch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ekzhu / datasketch / datasketch / storage.py View on Github external
def _execute(self, statements_and_parameters):
            """
            Execute a list of statements and parameters NOT returning data.

            :param iterable[tuple] statements_and_parameters: list of statements and parameters
            """
            size = self.CONCURRENCY
            for sub_sequence in CassandraClient.split_sequence(statements_and_parameters, size):
                c_concurrent.execute_concurrent(
                    self._session,
                    sub_sequence,
                    concurrency=size,
                )