Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-12117 Constructors that use Configuration may be harmful
  3. HBASE-12128

Cache configuration and RpcController selection for Table in Connection

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0, 2.0.0
    • 0.99.2
    • None
    • None
    • Reviewed

    Description

      Creating Table instances should be lightweight. Apps that manage their own Connections are expected to create Tables on demand for each interaction. However we look up values from Hadoop Configuration when constructing Table objects for storing to some of its fields. Configuration is a heavyweight registry that does a lot of string operations and regex matching. Method calls into Configuration account for 48.25% of CPU time when creating the HTable object in 0.98. Another ~48% of CPU is spent constructing the desired RpcController object via reflection in 0.98. Together this can account for ~20% of total on-CPU time of the client. See parent issue for more detail.

      We are using Connection like a factory for Table. We should cache configuration for Table in Connection. We should also create by reflection once and cache the desired RpcController object, and clone it for new Tables.

      Attachments

        1. HBASE-12128.v1-1.0.patch
          14 kB
          Stephen Yuan Jiang
        2. HBASE-12128.v2-2.0.patch
          14 kB
          Stephen Yuan Jiang
        3. HBASE-12128.v1-2.0.patch
          14 kB
          Stephen Yuan Jiang

        Issue Links

          Activity

            People

              syuanjiang Stephen Yuan Jiang
              apurtell Andrew Kyle Purtell
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 120h
                  120h
                  Remaining:
                  Time Spent - 72h Remaining Estimate - 48h
                  48h
                  Logged:
                  Time Spent - 72h Remaining Estimate - 48h
                  72h