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

Unit change for StoreFileSize and MemStoreSize

    XMLWordPrintableJSON

Details

    Description

      StoreFileSize and MemstoreSize usually returned in MBs (link1, link2)  but few jsp pages contain inaccurate unit. The reason is table.jsp (link3) use org.apache.hadoop.util.StringUtils.byteDesc(long len), this will perform longtostring conversion and returns its unit(B, KB, MB, GB, TB, PB) based on length. The concern here (link4) is computation (ByteVal/1024/1024) will output always lesser than 1 for store contains few bytes or few kbs.  Also, typecast will not round up to its nearest value.

      I think the best option is changing unit in table.jsp instead of changing code, otherwise we may end up doing many refactors from getMemStoreSizeMB, setMemStoreSizeMB, hasMemStoreSizeMB, getStorefileSizeMB, setStorefileSizeMB,..

       

      Please find the attachment, a simple example is posted.

      Attachments

        1. Units.pdf
          91 kB
          Karthik Palanisamy

        Activity

          People

            kpalanisamy Karthik Palanisamy
            kpalanisamy Karthik Palanisamy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: