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

list_regions fails if table is under split

    XMLWordPrintableJSON

Details

    Description

      Shortly after executing split 'table' command from the shell the list_regions 'table' fails with "ERROR: undefined method `toString' for nil:NilClass"

       

      hbase(main):002:0> list_regions 'cluster_test'
                       SERVER_NAME |                                                           REGION_NAME |  START_KEY |    END_KEY |  SIZE |      REQ |   LOCALITY |
       --------------------------- | --------------------------------------------------------------------- | ---------- | ---------- | ----- | -------- | ---------- |
       nokedli,34665,1582736360668 |         cluster_test,,1582736408029.857a9b734a2f490e573ba20b1bbf99b3. |            |   33333333 |  3348 | 20408042 |        0.0 |
       nokedli,34665,1582736360668 | cluster_test,33333333,1582736408029.1749360028b3a5e76b5da1d1888e5b9d. |   33333333 |   66666666 |  3321 | 20242123 |        0.0 |
       nokedli,34665,1582736360668 | cluster_test,66666666,1582736408029.1f1366aa0ee621d496103ac5a50bca77. |   66666666 |   99999999 |  3316 | 20215774 |        0.0 |
       nokedli,34665,1582736360668 | cluster_test,99999999,1582736408029.ae95589c9498443a89aea4c42c199372. |   99999999 |   cccccccc |  3327 | 20285312 |        0.0 |
       nokedli,34665,1582736360668 | cluster_test,cccccccc,1582736408029.239647c37e27cbd3154180ce5004a1ea. |   cccccccc |            |  3355 | 20451469 |        0.0 |
       5 rows
      
      hbase(main):003:0> split 'cluster_test'
      0 row(s) in 0.2240 seconds
      
      hbase(main):004:0> list_regions 'cluster_test'
      
      ERROR: undefined method `toString' for nil:NilClass
      
      Here is some help for this command:
              List all regions for a particular table as an array and also filter them by server name (optional) as prefix
              and maximum locality (optional). By default, it will return all the regions for the table with any locality.
              The command displays server name, region name, start key, end key, size of the region in MB, number of requests
              and the locality. The information can be projected out via an array as third parameter. By default all these information
              is displayed. Possible array values are SERVER_NAME, REGION_NAME, START_KEY, END_KEY, SIZE, REQ and LOCALITY. Values
              are not case sensitive. If you don't want to filter by server name, pass an empty hash / string as shown below.
              Examples:
              hbase> list_regions 'table_name'
              hbase> list_regions 'table_name', 'server_name'
              hbase> list_regions 'table_name', {SERVER_NAME => 'server_name', LOCALITY_THRESHOLD => 0.8}
              hbase> list_regions 'table_name', {SERVER_NAME => 'server_name', LOCALITY_THRESHOLD => 0.8}, ['SERVER_NAME']
              hbase> list_regions 'table_name', {}, ['SERVER_NAME', 'start_key']
              hbase> list_regions 'table_name', '', ['SERVER_NAME', 'start_key']
      
      hbase(main):005:0> list_regions 'cluster_test'
                       SERVER_NAME |                                                                                          REGION_NAME |                               START_KEY |                                 END_KEY |  SIZE |      REQ |   LOCALITY |
       --------------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------- | --------------------------------------- | ----- | -------- | ---------- |
       nokedli,34665,1582736360668 |                                        cluster_test,,1582878981608.614acededc61f55a10816bb871d0421b. |                                         | 197f83f2390a2a0c4104f4630982c585-461828 |  3348 | 10204021 |        0.0 |
       nokedli,34665,1582736360668 | cluster_test,197f83f2390a2a0c4104f4630982c585-461828,1582878981608.5987f972793bd422564a0758e545caa5. | 197f83f2390a2a0c4104f4630982c585-461828 |                                33333333 |  3348 | 10204021 |        0.0 |
       nokedli,34665,1582736360668 |                                cluster_test,33333333,1582878982425.a306381f3ee03161dc832eaca066131b. |                                33333333 | 4cdfa653a3843d49a62004a6e4e71636-501997 |  3321 | 10121061 |        0.0 |
       nokedli,34665,1582736360668 | cluster_test,4cdfa653a3843d49a62004a6e4e71636-501997,1582878982425.ae87e47584e3dee98e524f961fa6906e. | 4cdfa653a3843d49a62004a6e4e71636-501997 |                                66666666 |  3321 | 10121061 |        0.0 |
       nokedli,34665,1582736360668 |                                cluster_test,66666666,1582878983449.d4015a18e47a9aeec89a1ead9a974186. |                                66666666 | 7ffd66580ac07b1ff7636f9b15609fa6-238805 |  3316 | 10107887 |        0.0 |
       nokedli,34665,1582736360668 | cluster_test,7ffd66580ac07b1ff7636f9b15609fa6-238805,1582878983449.c92f8a7b3a89fee59313bdb516720319. | 7ffd66580ac07b1ff7636f9b15609fa6-238805 |                                99999999 |  3316 | 10107887 |        0.0 |
       nokedli,34665,1582736360668 |                                cluster_test,99999999,1582878984099.36d0e3d56119f2bdcae280853c29321d. |                                99999999 | b36cb3f90c3019779ba5a3b00fb6da2f-320789 |  3327 | 10142656 |        0.0 |
       nokedli,34665,1582736360668 | cluster_test,b36cb3f90c3019779ba5a3b00fb6da2f-320789,1582878984099.9d76372540e628675a4aea5a8979107d. | b36cb3f90c3019779ba5a3b00fb6da2f-320789 |                                cccccccc |  3327 | 10142656 |        0.0 |
       nokedli,34665,1582736360668 |                                cluster_test,cccccccc,1582878984966.1292a5f5dbd5f454d5d3b3cf048c4a75. |                                cccccccc |  e66d48d7b227e7845b73d43eb1a06fcb-86032 |  3355 | 10225734 |        0.0 |
       nokedli,34665,1582736360668 |  cluster_test,e66d48d7b227e7845b73d43eb1a06fcb-86032,1582878984966.6765ff09c59899363ae9be115a9c3d78. |  e66d48d7b227e7845b73d43eb1a06fcb-86032 |                                         |  3355 | 10225734 |        0.0 |
       10 rowshbase(main):006:0>

      Attachments

        Issue Links

          Activity

            People

              vjasani Viraj Jasani
              psomogyi Peter Somogyi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: