Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-4037

avoid a key copy in TimeSettingIterator

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.7.1, 1.8.0
    • Component/s: core
    • Labels:

      Description

      In org.apache.accumulo.core.iterators.system.TimeSettingIterator we make a copy of the key before setting the time. Seems like this is a completely superfluous copy, and we should avoid it. In the current code we do the following:

        @Override
        public Key getTopKey() {
          Key key = new Key(source.getTopKey());
          key.setTimestamp(time);
          return key;
        }
      

      Instead we should do this:

        @Override
        public Key getTopKey() {
          Key key = source.getTopKey();
          key.setTimestamp(time);
          return key;
        }
      

        Attachments

          Activity

            People

            • Assignee:
              elserj Josh Elser
              Reporter:
              afuchs Adam Fuchs
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m