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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.9.0, 3.0.0-alpha4
    • namenode
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: