private void addPartition(final ServiceName<Partition> sericeName, final Partition partition) { actor.submit(() -> leaderPartitions.put(partition.getInfo().getPartitionId(), partition)); }
private void removePartition(final Partition partition) { actor.submit(() -> leaderForPartitions.remove(partition.getInfo().getPartitionId())); }
public void removePartition(final Partition partition) { cmdQueue.add(() -> leaderPartitions.remove(partition.getInfo().getPartitionId())); }
private void addPartition(final Partition partition) { actor.submit(() -> leaderForPartitions.put(partition.getInfo().getPartitionId(), partition)); }
private void removePartition(final Partition partition) { actor.submit(() -> leaderForPartitions.remove(partition.getInfo().getPartitionId())); }
public void addPartition(final Partition partition) { cmdQueue.add(() -> leaderPartitions.put(partition.getInfo().getPartitionId(), partition)); }
private void addPartition(final ServiceName<Partition> sericeName, final Partition partition) { actor.submit(() -> leaderPartitions.put(partition.getInfo().getPartitionId(), partition)); }
public void removePartition(final Partition partition) { cmdQueue.add(() -> leaderPartitions.remove(partition.getInfo().getPartitionId())); }
private void removePartition(final ServiceName<Partition> sericeName, final Partition partition) { actor.submit(() -> leaderPartitions.remove(partition.getInfo().getPartitionId())); }
public void addPartition(final Partition partition) { cmdQueue.add(() -> leaderPartitions.put(partition.getInfo().getPartitionId(), partition)); }
private void addPartition(final Partition partition) { actor.submit(() -> leaderForPartitions.put(partition.getInfo().getPartitionId(), partition)); }
private void removePartition(final ServiceName<Partition> sericeName, final Partition partition) { actor.submit(() -> leaderPartitions.remove(partition.getInfo().getPartitionId())); }
public void setPartitionLeader(final Partition partition, final NodeInfo leaderInfo) { final PartitionInfo partitionInfo = partition.getInfo(); topology.updatePartition( partitionInfo.getPartitionId(), partitionInfo.getReplicationFactor(), leaderInfo, RaftState.LEADER); }
public void setPartitionLeader(final Partition partition, final NodeInfo leaderInfo) { final PartitionInfo partitionInfo = partition.getInfo(); topology.updatePartition( partitionInfo.getPartitionId(), partitionInfo.getReplicationFactor(), leaderInfo, RaftState.LEADER); }
private void startExporter(ServiceName<Partition> partitionName, Partition partition) { final StateStorage stateStorage = partition.getStateStorageFactory().create(EXPORTER_PROCESSOR_ID, PROCESSOR_NAME); final SnapshotController snapshotController = new StateSnapshotController( DefaultZeebeDbFactory.defaultFactory(ExporterColumnFamilies.class), stateStorage); streamProcessorServiceFactory .createService(partition, partitionName) .processorId(EXPORTER_PROCESSOR_ID) .processorName(PROCESSOR_NAME) .snapshotController(snapshotController) .streamProcessorFactory( (zeebeDb) -> new ExporterStreamProcessor( zeebeDb, partition.getInfo().getPartitionId(), exporterRepository.getExporters().values())) .build(); }
private void startExporter(ServiceName<Partition> partitionName, Partition partition) { final StateStorage stateStorage = partition.getStateStorageFactory().create(EXPORTER_PROCESSOR_ID, PROCESSOR_NAME); final SnapshotController snapshotController = new StateSnapshotController( DefaultZeebeDbFactory.defaultFactory(ExporterColumnFamilies.class), stateStorage); streamProcessorServiceFactory .createService(partition, partitionName) .processorId(EXPORTER_PROCESSOR_ID) .processorName(PROCESSOR_NAME) .snapshotController(snapshotController) .streamProcessorFactory( (zeebeDb) -> new ExporterStreamProcessor( zeebeDb, partition.getInfo().getPartitionId(), exporterRepository.getExporters().values())) .build(); }
public void startStreamProcessors( final ServiceName<Partition> partitionServiceName, final Partition partition) { final int partitionId = partition.getInfo().getPartitionId(); final Builder streamProcessorServiceBuilder = streamProcessorServiceFactory .createService(partition, partitionServiceName) .processorId(partitionId) .processorName(PROCESSOR_NAME); final StateStorage stateStorage = partition.getStateStorageFactory().create(partitionId, PROCESSOR_NAME); final StateSnapshotController stateSnapshotController = new StateSnapshotController(DefaultZeebeDbFactory.DEFAULT_DB_FACTORY, stateStorage); streamProcessorServiceBuilder .snapshotController(stateSnapshotController) .streamProcessorFactory( (zeebeDb) -> { final ZeebeState zeebeState = new ZeebeState(partitionId, zeebeDb); final TypedStreamEnvironment streamEnvironment = new TypedStreamEnvironment( partition.getLogStream(), clientApiTransport.getOutput()); return createTypedStreamProcessor( partitionServiceName, partitionId, streamEnvironment, zeebeState); }) .build(); }
public void startStreamProcessors( final ServiceName<Partition> partitionServiceName, final Partition partition) { final int partitionId = partition.getInfo().getPartitionId(); final Builder streamProcessorServiceBuilder = streamProcessorServiceFactory .createService(partition, partitionServiceName) .processorId(partitionId) .processorName(PROCESSOR_NAME); final StateStorage stateStorage = partition.getStateStorageFactory().create(partitionId, PROCESSOR_NAME); final StateSnapshotController stateSnapshotController = new StateSnapshotController(DefaultZeebeDbFactory.DEFAULT_DB_FACTORY, stateStorage); streamProcessorServiceBuilder .snapshotController(stateSnapshotController) .streamProcessorFactory( (zeebeDb) -> { final ZeebeState zeebeState = new ZeebeState(partitionId, zeebeDb); final TypedStreamEnvironment streamEnvironment = new TypedStreamEnvironment( partition.getLogStream(), clientApiTransport.getOutput()); return createTypedStreamProcessor( partitionServiceName, partitionId, streamEnvironment, zeebeState); }) .build(); }