Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20625

refactor some WALCellCodec related code

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 3.0.0-alpha-1, 2.1.0
    • wal
    • None

    Description

      Currently I'm working on export HLog to another FileSystem, then I found the code of WALCellCodec and its related classes is not that clean. And there are several TODOs. Thus I tried to refactor the code based one these TODOs. e.g.

        // TODO: it sucks that compression context is in WAL.Entry. It'd be nice if it was here.
        //       Dictionary could be gotten by enum; initially, based on enum, context would create
        //       an array of dictionaries.
        static class BaosAndCompressor extends ByteArrayOutputStream implements ByteStringCompressor {
          public ByteString toByteString() {
            // We need this copy to create the ByteString as the byte[] 'buf' is not immutable. We reuse
            // them.
            return ByteString.copyFrom(this.buf, 0, this.count);
          }
      

      Attachments

        1. HBASE-20625.master.001.patch
          22 kB
          Jingyun Tian
        2. HBASE-20625.master.002.patch
          23 kB
          Jingyun Tian
        3. HBASE-20625.master.002.patch
          23 kB
          Guanghao Zhang
        4. HBASE-20625.master.003.patch
          21 kB
          Jingyun Tian
        5. HBASE-20625.master.004.patch
          29 kB
          Jingyun Tian
        6. HBASE-20625.master.005.patch
          29 kB
          Jingyun Tian
        7. HBASE-20625.master.006.patch
          30 kB
          Jingyun Tian
        8. HBASE-20625.branch-2.001.patch
          30 kB
          Jingyun Tian
        9. HBASE-20625.master.007.patch
          30 kB
          Jingyun Tian
        10. HBASE-20625.master.008.patch
          31 kB
          Jingyun Tian

        Issue Links

          Activity

            People

              tianjingyun Jingyun Tian
              tianjingyun Jingyun Tian
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: