Class ReadEntryProcessorV3

    • Constructor Summary

      Constructors 
      Constructor Description
      ReadEntryProcessorV3​(org.apache.bookkeeper.proto.BookkeeperProtocol.Request request, io.netty.channel.Channel channel, BookieRequestProcessor requestProcessor, java.util.concurrent.ExecutorService fenceThreadPool)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse buildResponse​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder readResponseBuilder, org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode statusCode, com.google.common.base.Stopwatch startTimeSw)  
      protected void executeOp()  
      protected java.lang.Long getPreviousLAC()  
      protected org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse getReadResponse()  
      protected void handleReadResultForFenceRead​(io.netty.buffer.ByteBuf entryBody, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder readResponseBuilder, long entryId, com.google.common.base.Stopwatch startTimeSw)
      Handle read result for fence read.
      protected org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse readEntry​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder readResponseBuilder, long entryId, boolean readLACPiggyBack, com.google.common.base.Stopwatch startTimeSw)
      Read a specific entry.
      protected org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse readEntry​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder readResponseBuilder, long entryId, com.google.common.base.Stopwatch startTimeSw)
      Read a specific entry.
      protected void registerEvent​(boolean failed, OpStatsLogger statsLogger, com.google.common.base.Stopwatch startTime)  
      protected void registerFailedEvent​(OpStatsLogger statsLogger, com.google.common.base.Stopwatch startTime)  
      protected void registerSuccessfulEvent​(OpStatsLogger statsLogger, com.google.common.base.Stopwatch startTime)  
      void safeRun()  
      protected void sendResponse​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse readResponse)  
      java.lang.String toString()
      this toString method filters out masterKey from the output.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.bookkeeper.common.util.SafeRunnable

        run
    • Field Detail

      • lastPhaseStartTime

        protected com.google.common.base.Stopwatch lastPhaseStartTime
      • readRequest

        protected final org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest
      • ledgerId

        protected final long ledgerId
      • entryId

        protected final long entryId
    • Constructor Detail

      • ReadEntryProcessorV3

        public ReadEntryProcessorV3​(org.apache.bookkeeper.proto.BookkeeperProtocol.Request request,
                                    io.netty.channel.Channel channel,
                                    BookieRequestProcessor requestProcessor,
                                    java.util.concurrent.ExecutorService fenceThreadPool)
    • Method Detail

      • getPreviousLAC

        protected java.lang.Long getPreviousLAC()
      • handleReadResultForFenceRead

        protected void handleReadResultForFenceRead​(io.netty.buffer.ByteBuf entryBody,
                                                    org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder readResponseBuilder,
                                                    long entryId,
                                                    com.google.common.base.Stopwatch startTimeSw)
        Handle read result for fence read.
        Parameters:
        entryBody - read result
        readResponseBuilder - read response builder
        entryId - entry id
        startTimeSw - timer for the read request
      • readEntry

        protected org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse readEntry​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder readResponseBuilder,
                                                                                        long entryId,
                                                                                        com.google.common.base.Stopwatch startTimeSw)
                                                                                 throws java.io.IOException,
                                                                                        BookieException
        Read a specific entry.
        Parameters:
        readResponseBuilder - read response builder.
        entryId - entry to read
        startTimeSw - stop watch to measure the read operation.
        Returns:
        read response or null if it is a fence read operation.
        Throws:
        java.io.IOException
        BookieException
      • readEntry

        protected org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse readEntry​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder readResponseBuilder,
                                                                                        long entryId,
                                                                                        boolean readLACPiggyBack,
                                                                                        com.google.common.base.Stopwatch startTimeSw)
                                                                                 throws java.io.IOException,
                                                                                        BookieException
        Read a specific entry.
        Parameters:
        readResponseBuilder - read response builder.
        entryId - entry to read
        startTimeSw - stop watch to measure the read operation.
        Returns:
        read response or null if it is a fence read operation.
        Throws:
        java.io.IOException
        BookieException
      • getReadResponse

        protected org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse getReadResponse()
      • safeRun

        public void safeRun()
      • executeOp

        protected void executeOp()
      • buildResponse

        protected org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse buildResponse​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder readResponseBuilder,
                                                                                            org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode statusCode,
                                                                                            com.google.common.base.Stopwatch startTimeSw)
      • sendResponse

        protected void sendResponse​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse readResponse)
      • registerSuccessfulEvent

        protected void registerSuccessfulEvent​(OpStatsLogger statsLogger,
                                               com.google.common.base.Stopwatch startTime)
      • registerFailedEvent

        protected void registerFailedEvent​(OpStatsLogger statsLogger,
                                           com.google.common.base.Stopwatch startTime)
      • registerEvent

        protected void registerEvent​(boolean failed,
                                     OpStatsLogger statsLogger,
                                     com.google.common.base.Stopwatch startTime)
      • toString

        public java.lang.String toString()
        this toString method filters out masterKey from the output. masterKey contains the password of the ledger.
        Overrides:
        toString in class PacketProcessorBaseV3