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

new comparator twice in checkAndPut, just reuse the first one

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.94.1
    • 0.94.2
    • None
    • None

    Description

      public boolean checkAndPut(final byte[] regionName, final byte[] row,
      final byte[] family, final byte[] qualifier, final byte[] value,
      final Put put) throws IOException

      { WritableByteArrayComparable comparator = new BinaryComparator(value); boolean result = checkAndMutate(regionName, row, family, qualifier, CompareOp.EQUAL, new BinaryComparator(value), put,lock); }

      The comparator creates twice, because the comparator is not changed, so we can reuse the comparator, the second is useless.

      Attachments

        1. HBASE-6458-0.94.patch
          4 kB
          Lijin Bin
        2. HBASE-6458-0.94-2.patch
          0.7 kB
          Lijin Bin

        Activity

          People

            Unassigned Unassigned
            binlijin Lijin Bin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: