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

[0.89-fb] Remove the timestamp from the annotation of Put

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • This was completed.

    Description

      David and I, recently found out, when discussing the C++ client with @csliu from the Search Team, that we have an extraneous timestamp field in the Put. Actually, that field is used when we create a Put object like:

      Put p = new Put(row, ts);
      And then, if you do:

      p.add(cf, qualifier, value);
      it would use ts as a timestamp for the KeyValue for the cf, qualifier. If you did not specify it, it will use HConstants.LATEST_TIMESTAMP.

      One can also do this, where you explicitly state the timestamp to be used:

      p.add(cf, qualifier, ts, value)
      In either case, when the add() method is called, the KeyValue is constructed, and it has the proper timestamp. Therefore, once you have created the family map with all these KeyValues, you don't need to send the ts field provided during the construction. All the KVs will have the correct timestamp embedded by the time it will be sent across.

      This diff removes the timestamp field from the Put object. This will save us some network bandwidth, hopefully

      Attachments

        Activity

          People

            gaurav.menghani Gaurav Menghani
            gaurav.menghani Gaurav Menghani
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: