Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4974

Gets all regions uses get requests is extremely slows for big table

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • 4.14.0, 5.0.0
    • None
    • None
    • None

    Description

      When executes the first query after started the client(SQLline or initializing JDBC client ), needs to load region locations to the client cache. Now the following is key implement :

      List<HRegionLocation> locations = Lists.newArrayList();
                      byte[] currentKey = HConstants.EMPTY_START_ROW;
                      do {
                          HRegionLocation regionLocation = connection.getRegionLocation(
                                  TableName.valueOf(tableName), currentKey, reload);
                          locations.add(regionLocation);
                          currentKey = regionLocation.getRegionInfo().getEndKey();
                      } while (!Bytes.equals(currentKey, HConstants.EMPTY_END_ROW));
      

      For some big tables which have more than ten thousand regions, this procedure is extremely slow.

      Runs a look points query on the table that has 10000 regions after starting the client, it needs 25+ seconds.

      Attachments

        1. performance.png
          54 kB
          Jaanai Zhang
        2. PHOENIX-4974-master.patch
          4 kB
          Jaanai Zhang

        Activity

          People

            jaanai Jaanai Zhang
            jaanai Jaanai Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: