def start_cell_with_prepared_txs(self,
                                     version,
                                     cell_id,
                                     discovery_spi,
                                     modules,
                                     col_cnt=0,
                                     noncol_cnt=0,
                                     multi_cnt=0):
        """
        Starts cell with prepared transactions.
        """
        nodes = self.start_cell(
            version, ['-D' + CellularAffinity.ATTRIBUTE + '=' + cell_id],
            discovery_spi, modules, CellularAffinity.NODES_PER_CELL - 1)

        prepared_tx_streamer = IgniteApplicationService(  # last server node at the cell.
            self.test_context,
            IgniteConfiguration(version=IgniteVersion(version), properties=self.properties(),
                                failure_detection_timeout=self.FAILURE_DETECTION_TIMEOUT,
                                discovery_spi=from_ignite_cluster(nodes) if discovery_spi is None else discovery_spi),
            java_class_name="org.apache.ignite.internal.ducktest.tests.cellular_affinity_test."
                            "CellularPreparedTxStreamer",
            params={"cacheName": CellularAffinity.CACHE_NAME,
                    "attr": CellularAffinity.ATTRIBUTE,
                    "cell": cell_id,
                    "colocatedTxCnt": col_cnt,
                    "multiTxCnt": multi_cnt,
                    "noncolocatedTxCnt": noncol_cnt},
            jvm_opts=['-D' + CellularAffinity.ATTRIBUTE + '=' + cell_id], modules=modules, startup_timeout_sec=180)

        prepared_tx_streamer.start_async(
        )  # starts last server node and creates prepared txs on it.

        return nodes, prepared_tx_streamer
示例#2
0
    def start_app(_from, _to):
        app = IgniteApplicationService(
            context,
            config=config,
            java_class_name="org.apache.ignite.internal.ducktest.tests.rebalance.DataGenerationApplication",
            params={
                "backups": rebalance_params.backups,
                "cacheCount": rebalance_params.cache_count,
                "entrySize": rebalance_params.entry_size,
                "from": _from,
                "to": _to
            },
            shutdown_timeout_sec=timeout)
        app.start_async()

        apps.append(app)