Search in sources :

Example 1 with ManagedCursorContainer

use of org.apache.bookkeeper.mledger.impl.ManagedCursorContainer in project pulsar by apache.

the class PersistentTopic method checkTimeBacklogExceeded.

/**
 * @return determine if backlog quota enforcement needs to be done for topic based on time limit
 */
public CompletableFuture<Boolean> checkTimeBacklogExceeded() {
    TopicName topicName = TopicName.get(getName());
    int backlogQuotaLimitInSecond = getBacklogQuota(BacklogQuotaType.message_age).getLimitTime();
    // If backlog quota by time is not set and we have no durable cursor.
    if (backlogQuotaLimitInSecond <= 0 || ((ManagedCursorContainer) ledger.getCursors()).getSlowestReaderPosition() == null) {
        return CompletableFuture.completedFuture(false);
    }
    if (brokerService.pulsar().getConfiguration().isPreciseTimeBasedBacklogQuotaCheck()) {
        CompletableFuture<Boolean> future = new CompletableFuture<>();
        // Check if first unconsumed message(first message after mark delete position)
        // for slowest cursor's has expired.
        PositionImpl position = ((ManagedLedgerImpl) ledger).getNextValidPosition(((ManagedCursorContainer) ledger.getCursors()).getSlowestReaderPosition());
        ((ManagedLedgerImpl) ledger).asyncReadEntry(position, new AsyncCallbacks.ReadEntryCallback() {

            @Override
            public void readEntryComplete(Entry entry, Object ctx) {
                try {
                    long entryTimestamp = Commands.getEntryTimestamp(entry.getDataBuffer());
                    boolean expired = MessageImpl.isEntryExpired(backlogQuotaLimitInSecond, entryTimestamp);
                    if (expired && log.isDebugEnabled()) {
                        log.debug("Time based backlog quota exceeded, oldest entry in cursor {}'s backlog" + "exceeded quota {}", ((ManagedLedgerImpl) ledger).getSlowestConsumer().getName(), backlogQuotaLimitInSecond);
                    }
                    future.complete(expired);
                } catch (Exception e) {
                    log.error("[{}][{}] Error deserializing message for backlog check", topicName, e);
                    future.complete(false);
                } finally {
                    entry.release();
                }
            }

            @Override
            public void readEntryFailed(ManagedLedgerException exception, Object ctx) {
                log.error("[{}][{}] Error reading entry for precise time based  backlog check", topicName, exception);
                future.complete(false);
            }
        }, null);
        return future;
    } else {
        Long ledgerId = ((ManagedCursorContainer) ledger.getCursors()).getSlowestReaderPosition().getLedgerId();
        try {
            org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedLedgerInfo.LedgerInfo ledgerInfo = ledger.getLedgerInfo(ledgerId).get();
            if (ledgerInfo != null && ledgerInfo.hasTimestamp() && ledgerInfo.getTimestamp() > 0 && ((ManagedLedgerImpl) ledger).getClock().millis() - ledgerInfo.getTimestamp() > backlogQuotaLimitInSecond * 1000) {
                if (log.isDebugEnabled()) {
                    log.debug("Time based backlog quota exceeded, quota {}, age of ledger " + "slowest cursor currently on {}", backlogQuotaLimitInSecond * 1000, ((ManagedLedgerImpl) ledger).getClock().millis() - ledgerInfo.getTimestamp());
                }
                return CompletableFuture.completedFuture(true);
            } else {
                return CompletableFuture.completedFuture(false);
            }
        } catch (Exception e) {
            log.error("[{}][{}] Error reading entry for precise time based backlog check", topicName, e);
            return CompletableFuture.completedFuture(false);
        }
    }
}
Also used : PositionImpl(org.apache.bookkeeper.mledger.impl.PositionImpl) NamingException(org.apache.pulsar.broker.service.BrokerServiceException.NamingException) NotAllowedException(org.apache.pulsar.broker.service.BrokerServiceException.NotAllowedException) MetadataNotFoundException(org.apache.bookkeeper.mledger.ManagedLedgerException.MetadataNotFoundException) AlreadyRunningException(org.apache.pulsar.broker.service.BrokerServiceException.AlreadyRunningException) MetadataStoreException(org.apache.pulsar.metadata.api.MetadataStoreException) ManagedLedgerAlreadyClosedException(org.apache.bookkeeper.mledger.ManagedLedgerException.ManagedLedgerAlreadyClosedException) CancellationException(java.util.concurrent.CancellationException) SubscriptionBusyException(org.apache.pulsar.broker.service.BrokerServiceException.SubscriptionBusyException) ManagedLedgerFencedException(org.apache.bookkeeper.mledger.ManagedLedgerException.ManagedLedgerFencedException) TopicTerminatedException(org.apache.pulsar.broker.service.BrokerServiceException.TopicTerminatedException) ManagedLedgerTerminatedException(org.apache.bookkeeper.mledger.ManagedLedgerException.ManagedLedgerTerminatedException) TopicClosedException(org.apache.pulsar.broker.service.BrokerServiceException.TopicClosedException) TopicBacklogQuotaExceededException(org.apache.pulsar.broker.service.BrokerServiceException.TopicBacklogQuotaExceededException) BrokerServiceException(org.apache.pulsar.broker.service.BrokerServiceException) TopicFencedException(org.apache.pulsar.broker.service.BrokerServiceException.TopicFencedException) ExecutionException(java.util.concurrent.ExecutionException) PulsarServerException(org.apache.pulsar.broker.PulsarServerException) UnsupportedVersionException(org.apache.pulsar.broker.service.BrokerServiceException.UnsupportedVersionException) CompletionException(java.util.concurrent.CompletionException) SubscriptionNotFoundException(org.apache.pulsar.broker.service.BrokerServiceException.SubscriptionNotFoundException) ManagedLedgerException(org.apache.bookkeeper.mledger.ManagedLedgerException) PersistenceException(org.apache.pulsar.broker.service.BrokerServiceException.PersistenceException) TopicBusyException(org.apache.pulsar.broker.service.BrokerServiceException.TopicBusyException) ConsumerBusyException(org.apache.pulsar.broker.service.BrokerServiceException.ConsumerBusyException) TopicName(org.apache.pulsar.common.naming.TopicName) ManagedLedgerImpl(org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl) CompletableFuture(java.util.concurrent.CompletableFuture) Entry(org.apache.bookkeeper.mledger.Entry) ManagedLedgerException(org.apache.bookkeeper.mledger.ManagedLedgerException) ManagedCursorContainer(org.apache.bookkeeper.mledger.impl.ManagedCursorContainer) AtomicLong(java.util.concurrent.atomic.AtomicLong) AsyncCallbacks(org.apache.bookkeeper.mledger.AsyncCallbacks) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean)

Example 2 with ManagedCursorContainer

use of org.apache.bookkeeper.mledger.impl.ManagedCursorContainer in project pulsar by apache.

the class ManagedCursorMetrics method aggregate.

/**
 * Aggregation by namespace, ledger, cursor.
 *
 * @return List<Metrics>
 */
private List<Metrics> aggregate() {
    metricsCollection.clear();
    for (Map.Entry<String, ManagedLedgerImpl> e : getManagedLedgers().entrySet()) {
        String ledgerName = e.getKey();
        ManagedLedgerImpl ledger = e.getValue();
        String namespace = parseNamespaceFromLedgerName(ledgerName);
        ManagedCursorContainer cursorContainer = ledger.getCursors();
        Iterator<ManagedCursor> cursorIterator = cursorContainer.iterator();
        while (cursorIterator.hasNext()) {
            ManagedCursorImpl cursor = (ManagedCursorImpl) cursorIterator.next();
            ManagedCursorMXBean cStats = cursor.getStats();
            dimensionMap.clear();
            dimensionMap.put("namespace", namespace);
            dimensionMap.put("ledger_name", ledgerName);
            dimensionMap.put("cursor_name", cursor.getName());
            Metrics metrics = createMetrics(dimensionMap);
            metrics.put("brk_ml_cursor_nonContiguousDeletedMessagesRange", (long) cursor.getTotalNonContiguousDeletedMessagesRange());
            metrics.put("brk_ml_cursor_persistLedgerSucceed", cStats.getPersistLedgerSucceed());
            metrics.put("brk_ml_cursor_persistLedgerErrors", cStats.getPersistLedgerErrors());
            metrics.put("brk_ml_cursor_persistZookeeperSucceed", cStats.getPersistZookeeperSucceed());
            metrics.put("brk_ml_cursor_persistZookeeperErrors", cStats.getPersistZookeeperErrors());
            metrics.put("brk_ml_cursor_writeLedgerSize", cStats.getWriteCursorLedgerSize());
            metrics.put("brk_ml_cursor_writeLedgerLogicalSize", cStats.getWriteCursorLedgerLogicalSize());
            metrics.put("brk_ml_cursor_readLedgerSize", cStats.getReadCursorLedgerSize());
            metricsCollection.add(metrics);
        }
    }
    return metricsCollection;
}
Also used : ManagedLedgerImpl(org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl) Metrics(org.apache.pulsar.common.stats.Metrics) ManagedCursorImpl(org.apache.bookkeeper.mledger.impl.ManagedCursorImpl) ManagedCursorContainer(org.apache.bookkeeper.mledger.impl.ManagedCursorContainer) ManagedCursorMXBean(org.apache.bookkeeper.mledger.ManagedCursorMXBean) Map(java.util.Map) ManagedCursor(org.apache.bookkeeper.mledger.ManagedCursor)

Example 3 with ManagedCursorContainer

use of org.apache.bookkeeper.mledger.impl.ManagedCursorContainer in project pulsar by yahoo.

the class TransactionTest method testEndTBRecoveringWhenManagerLedgerDisReadable.

@Test
public void testEndTBRecoveringWhenManagerLedgerDisReadable() throws Exception {
    String topic = NAMESPACE1 + "/testEndTBRecoveringWhenManagerLedgerDisReadable";
    admin.topics().createNonPartitionedTopic(topic);
    @Cleanup Producer<String> producer = pulsarClient.newProducer(Schema.STRING).producerName("test").enableBatching(false).sendTimeout(0, TimeUnit.SECONDS).topic(topic).create();
    Transaction txn = pulsarClient.newTransaction().withTransactionTimeout(10, TimeUnit.SECONDS).build().get();
    producer.newMessage(txn).value("test").send();
    PersistentTopic persistentTopic = (PersistentTopic) getPulsarServiceList().get(0).getBrokerService().getTopic("persistent://" + topic, false).get().get();
    persistentTopic.getManagedLedger().getConfig().setAutoSkipNonRecoverableData(true);
    ManagedCursorImpl managedCursor = mock(ManagedCursorImpl.class);
    doReturn("transaction-buffer-sub").when(managedCursor).getName();
    doReturn(true).when(managedCursor).hasMoreEntries();
    doAnswer(invocation -> {
        AsyncCallbacks.ReadEntriesCallback callback = invocation.getArgument(1);
        callback.readEntriesFailed(new ManagedLedgerException.NonRecoverableLedgerException("No ledger exist"), null);
        return null;
    }).when(managedCursor).asyncReadEntries(anyInt(), any(), any(), any());
    Class<ManagedLedgerImpl> managedLedgerClass = ManagedLedgerImpl.class;
    Field field = managedLedgerClass.getDeclaredField("cursors");
    field.setAccessible(true);
    ManagedCursorContainer managedCursors = (ManagedCursorContainer) field.get(persistentTopic.getManagedLedger());
    managedCursors.removeCursor("transaction-buffer-sub");
    managedCursors.add(managedCursor);
    doAnswer(invocation -> {
        AsyncCallbacks.ReadEntriesCallback callback = invocation.getArgument(1);
        callback.readEntriesFailed(new ManagedLedgerException.ManagedLedgerFencedException(), null);
        return null;
    }).when(managedCursor).asyncReadEntries(anyInt(), any(), any(), any());
    TransactionBuffer buffer2 = new TopicTransactionBuffer(persistentTopic);
    Awaitility.await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> assertEquals(buffer2.getStats().state, "Ready"));
    managedCursors.removeCursor("transaction-buffer-sub");
    doAnswer(invocation -> {
        AsyncCallbacks.ReadEntriesCallback callback = invocation.getArgument(1);
        callback.readEntriesFailed(new ManagedLedgerException.CursorAlreadyClosedException("test"), null);
        return null;
    }).when(managedCursor).asyncReadEntries(anyInt(), any(), any(), any());
    managedCursors.add(managedCursor);
    TransactionBuffer buffer3 = new TopicTransactionBuffer(persistentTopic);
    Awaitility.await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> assertEquals(buffer3.getStats().state, "Ready"));
    persistentTopic.getInternalStats(false).thenAccept(internalStats -> {
        assertTrue(internalStats.cursors.isEmpty());
    });
    managedCursors.removeCursor("transaction-buffer-sub");
}
Also used : ManagedCursorImpl(org.apache.bookkeeper.mledger.impl.ManagedCursorImpl) Cleanup(lombok.Cleanup) ManagedLedgerImpl(org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl) Field(java.lang.reflect.Field) ManagedLedgerException(org.apache.bookkeeper.mledger.ManagedLedgerException) Transaction(org.apache.pulsar.client.api.transaction.Transaction) ManagedCursorContainer(org.apache.bookkeeper.mledger.impl.ManagedCursorContainer) PersistentTopic(org.apache.pulsar.broker.service.persistent.PersistentTopic) TopicTransactionBuffer(org.apache.pulsar.broker.transaction.buffer.impl.TopicTransactionBuffer) TransactionBuffer(org.apache.pulsar.broker.transaction.buffer.TransactionBuffer) AsyncCallbacks(org.apache.bookkeeper.mledger.AsyncCallbacks) TopicTransactionBuffer(org.apache.pulsar.broker.transaction.buffer.impl.TopicTransactionBuffer) Test(org.testng.annotations.Test)

Example 4 with ManagedCursorContainer

use of org.apache.bookkeeper.mledger.impl.ManagedCursorContainer in project incubator-pulsar by apache.

the class TransactionTest method testEndTBRecoveringWhenManagerLedgerDisReadable.

@Test
public void testEndTBRecoveringWhenManagerLedgerDisReadable() throws Exception {
    String topic = NAMESPACE1 + "/testEndTBRecoveringWhenManagerLedgerDisReadable";
    admin.topics().createNonPartitionedTopic(topic);
    @Cleanup Producer<String> producer = pulsarClient.newProducer(Schema.STRING).producerName("test").enableBatching(false).sendTimeout(0, TimeUnit.SECONDS).topic(topic).create();
    Transaction txn = pulsarClient.newTransaction().withTransactionTimeout(10, TimeUnit.SECONDS).build().get();
    producer.newMessage(txn).value("test").send();
    PersistentTopic persistentTopic = (PersistentTopic) getPulsarServiceList().get(0).getBrokerService().getTopic("persistent://" + topic, false).get().get();
    persistentTopic.getManagedLedger().getConfig().setAutoSkipNonRecoverableData(true);
    ManagedCursorImpl managedCursor = mock(ManagedCursorImpl.class);
    doReturn("transaction-buffer-sub").when(managedCursor).getName();
    doReturn(true).when(managedCursor).hasMoreEntries();
    doAnswer(invocation -> {
        AsyncCallbacks.ReadEntriesCallback callback = invocation.getArgument(1);
        callback.readEntriesFailed(new ManagedLedgerException.NonRecoverableLedgerException("No ledger exist"), null);
        return null;
    }).when(managedCursor).asyncReadEntries(anyInt(), any(), any(), any());
    Class<ManagedLedgerImpl> managedLedgerClass = ManagedLedgerImpl.class;
    Field field = managedLedgerClass.getDeclaredField("cursors");
    field.setAccessible(true);
    ManagedCursorContainer managedCursors = (ManagedCursorContainer) field.get(persistentTopic.getManagedLedger());
    managedCursors.removeCursor("transaction-buffer-sub");
    managedCursors.add(managedCursor);
    doAnswer(invocation -> {
        AsyncCallbacks.ReadEntriesCallback callback = invocation.getArgument(1);
        callback.readEntriesFailed(new ManagedLedgerException.ManagedLedgerFencedException(), null);
        return null;
    }).when(managedCursor).asyncReadEntries(anyInt(), any(), any(), any());
    TransactionBuffer buffer2 = new TopicTransactionBuffer(persistentTopic);
    Awaitility.await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> assertEquals(buffer2.getStats().state, "Ready"));
    managedCursors.removeCursor("transaction-buffer-sub");
    doAnswer(invocation -> {
        AsyncCallbacks.ReadEntriesCallback callback = invocation.getArgument(1);
        callback.readEntriesFailed(new ManagedLedgerException.CursorAlreadyClosedException("test"), null);
        return null;
    }).when(managedCursor).asyncReadEntries(anyInt(), any(), any(), any());
    managedCursors.add(managedCursor);
    TransactionBuffer buffer3 = new TopicTransactionBuffer(persistentTopic);
    Awaitility.await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> assertEquals(buffer3.getStats().state, "Ready"));
    persistentTopic.getInternalStats(false).thenAccept(internalStats -> {
        assertTrue(internalStats.cursors.isEmpty());
    });
    managedCursors.removeCursor("transaction-buffer-sub");
}
Also used : ManagedCursorImpl(org.apache.bookkeeper.mledger.impl.ManagedCursorImpl) Cleanup(lombok.Cleanup) ManagedLedgerImpl(org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl) Field(java.lang.reflect.Field) ManagedLedgerException(org.apache.bookkeeper.mledger.ManagedLedgerException) Transaction(org.apache.pulsar.client.api.transaction.Transaction) ManagedCursorContainer(org.apache.bookkeeper.mledger.impl.ManagedCursorContainer) PersistentTopic(org.apache.pulsar.broker.service.persistent.PersistentTopic) TopicTransactionBuffer(org.apache.pulsar.broker.transaction.buffer.impl.TopicTransactionBuffer) TransactionBuffer(org.apache.pulsar.broker.transaction.buffer.TransactionBuffer) AsyncCallbacks(org.apache.bookkeeper.mledger.AsyncCallbacks) TopicTransactionBuffer(org.apache.pulsar.broker.transaction.buffer.impl.TopicTransactionBuffer) Test(org.testng.annotations.Test)

Example 5 with ManagedCursorContainer

use of org.apache.bookkeeper.mledger.impl.ManagedCursorContainer in project incubator-pulsar by apache.

the class PersistentTopic method checkTimeBacklogExceeded.

/**
 * @return determine if backlog quota enforcement needs to be done for topic based on time limit
 */
public CompletableFuture<Boolean> checkTimeBacklogExceeded() {
    TopicName topicName = TopicName.get(getName());
    int backlogQuotaLimitInSecond = getBacklogQuota(BacklogQuotaType.message_age).getLimitTime();
    // If backlog quota by time is not set and we have no durable cursor.
    if (backlogQuotaLimitInSecond <= 0 || ((ManagedCursorContainer) ledger.getCursors()).getSlowestReaderPosition() == null) {
        return CompletableFuture.completedFuture(false);
    }
    if (brokerService.pulsar().getConfiguration().isPreciseTimeBasedBacklogQuotaCheck()) {
        CompletableFuture<Boolean> future = new CompletableFuture<>();
        // Check if first unconsumed message(first message after mark delete position)
        // for slowest cursor's has expired.
        PositionImpl position = ((ManagedLedgerImpl) ledger).getNextValidPosition(((ManagedCursorContainer) ledger.getCursors()).getSlowestReaderPosition());
        ((ManagedLedgerImpl) ledger).asyncReadEntry(position, new AsyncCallbacks.ReadEntryCallback() {

            @Override
            public void readEntryComplete(Entry entry, Object ctx) {
                try {
                    long entryTimestamp = Commands.getEntryTimestamp(entry.getDataBuffer());
                    boolean expired = MessageImpl.isEntryExpired(backlogQuotaLimitInSecond, entryTimestamp);
                    if (expired && log.isDebugEnabled()) {
                        log.debug("Time based backlog quota exceeded, oldest entry in cursor {}'s backlog" + "exceeded quota {}", ((ManagedLedgerImpl) ledger).getSlowestConsumer().getName(), backlogQuotaLimitInSecond);
                    }
                    future.complete(expired);
                } catch (Exception e) {
                    log.error("[{}][{}] Error deserializing message for backlog check", topicName, e);
                    future.complete(false);
                } finally {
                    entry.release();
                }
            }

            @Override
            public void readEntryFailed(ManagedLedgerException exception, Object ctx) {
                log.error("[{}][{}] Error reading entry for precise time based  backlog check", topicName, exception);
                future.complete(false);
            }
        }, null);
        return future;
    } else {
        PositionImpl slowestPosition = ((ManagedCursorContainer) ledger.getCursors()).getSlowestReaderPosition();
        try {
            return slowestReaderTimeBasedBacklogQuotaCheck(slowestPosition);
        } catch (Exception e) {
            log.error("[{}][{}] Error reading entry for precise time based backlog check", topicName, e);
            return CompletableFuture.completedFuture(false);
        }
    }
}
Also used : PositionImpl(org.apache.bookkeeper.mledger.impl.PositionImpl) NamingException(org.apache.pulsar.broker.service.BrokerServiceException.NamingException) NotAllowedException(org.apache.pulsar.broker.service.BrokerServiceException.NotAllowedException) MetadataNotFoundException(org.apache.bookkeeper.mledger.ManagedLedgerException.MetadataNotFoundException) AlreadyRunningException(org.apache.pulsar.broker.service.BrokerServiceException.AlreadyRunningException) MetadataStoreException(org.apache.pulsar.metadata.api.MetadataStoreException) ManagedLedgerAlreadyClosedException(org.apache.bookkeeper.mledger.ManagedLedgerException.ManagedLedgerAlreadyClosedException) CancellationException(java.util.concurrent.CancellationException) SubscriptionBusyException(org.apache.pulsar.broker.service.BrokerServiceException.SubscriptionBusyException) ManagedLedgerFencedException(org.apache.bookkeeper.mledger.ManagedLedgerException.ManagedLedgerFencedException) TopicTerminatedException(org.apache.pulsar.broker.service.BrokerServiceException.TopicTerminatedException) ManagedLedgerTerminatedException(org.apache.bookkeeper.mledger.ManagedLedgerException.ManagedLedgerTerminatedException) TopicClosedException(org.apache.pulsar.broker.service.BrokerServiceException.TopicClosedException) TopicBacklogQuotaExceededException(org.apache.pulsar.broker.service.BrokerServiceException.TopicBacklogQuotaExceededException) BrokerServiceException(org.apache.pulsar.broker.service.BrokerServiceException) TopicFencedException(org.apache.pulsar.broker.service.BrokerServiceException.TopicFencedException) ExecutionException(java.util.concurrent.ExecutionException) PulsarServerException(org.apache.pulsar.broker.PulsarServerException) UnsupportedVersionException(org.apache.pulsar.broker.service.BrokerServiceException.UnsupportedVersionException) CompletionException(java.util.concurrent.CompletionException) SubscriptionNotFoundException(org.apache.pulsar.broker.service.BrokerServiceException.SubscriptionNotFoundException) ManagedLedgerException(org.apache.bookkeeper.mledger.ManagedLedgerException) PersistenceException(org.apache.pulsar.broker.service.BrokerServiceException.PersistenceException) TopicBusyException(org.apache.pulsar.broker.service.BrokerServiceException.TopicBusyException) ConsumerBusyException(org.apache.pulsar.broker.service.BrokerServiceException.ConsumerBusyException) TopicName(org.apache.pulsar.common.naming.TopicName) ManagedLedgerImpl(org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl) CompletableFuture(java.util.concurrent.CompletableFuture) Entry(org.apache.bookkeeper.mledger.Entry) ManagedLedgerException(org.apache.bookkeeper.mledger.ManagedLedgerException) ManagedCursorContainer(org.apache.bookkeeper.mledger.impl.ManagedCursorContainer) AsyncCallbacks(org.apache.bookkeeper.mledger.AsyncCallbacks) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean)

Aggregations

ManagedCursorContainer (org.apache.bookkeeper.mledger.impl.ManagedCursorContainer)14 ManagedLedgerImpl (org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl)13 ManagedCursorImpl (org.apache.bookkeeper.mledger.impl.ManagedCursorImpl)8 CompletableFuture (java.util.concurrent.CompletableFuture)7 Field (java.lang.reflect.Field)6 AsyncCallbacks (org.apache.bookkeeper.mledger.AsyncCallbacks)6 ManagedLedgerException (org.apache.bookkeeper.mledger.ManagedLedgerException)6 PositionImpl (org.apache.bookkeeper.mledger.impl.PositionImpl)6 PersistentTopic (org.apache.pulsar.broker.service.persistent.PersistentTopic)5 TopicName (org.apache.pulsar.common.naming.TopicName)4 NioEventLoopGroup (io.netty.channel.nio.NioEventLoopGroup)3 ArrayList (java.util.ArrayList)3 List (java.util.List)3 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)3 ManagedCursor (org.apache.bookkeeper.mledger.ManagedCursor)3 ManagedLedgerConfig (org.apache.bookkeeper.mledger.ManagedLedgerConfig)3 ManagedLedgerFactory (org.apache.bookkeeper.mledger.ManagedLedgerFactory)3 PulsarService (org.apache.pulsar.broker.PulsarService)3 ServiceConfiguration (org.apache.pulsar.broker.ServiceConfiguration)3 MockedPulsarServiceBaseTest.createMockZooKeeper (org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest.createMockZooKeeper)3