Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11410

Use the cached instance when edit logging SetAclOp, SetXAttrOp and RemoveXAttrOp

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.9.0, 3.0.0-alpha4
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      Andrew Wang recently had a comment on HDFS-10899:

      Looks like we aren't using the op cache in FSEditLog SetXAttrOp / RemoveXAttrOp. I think this is accidental, could you do some research? Particularly since we'll be doing a lot of SetXAttrOps, avoiding all that object allocation would be nice. This could be a separate JIRA.

      i.e.

          static SetXAttrOp getInstance() {
            return new SetXAttrOp();
          }
      

      v.s.

          static AddOp getInstance(OpInstanceCache cache) {
            return (AddOp) cache.get(OP_ADD);
          }
      

      Seems we should fix these non-caching usages.

        Attachments

        1. HDFS-11410.01.patch
          4 kB
          Xiao Chen

          Issue Links

            Activity

              People

              • Assignee:
                xiaochen Xiao Chen
                Reporter:
                xiaochen Xiao Chen
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: