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

If from Admin we try to unassign a region forcefully, though a valid region name is given the master is not able to identify the region to unassign.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.90.5
    • None
    • None
    • Linux

    • Reviewed

    Description

      The following is the problem
      Get the exact region name from UI and call
      HBaseAdmin.unassign(regionname, true).
      Here true is forceful option.
      As part of unassign api

        public void unassign(final byte [] regionName, final boolean force)
        throws IOException {
          Pair<HRegionInfo, HServerAddress> pair =
            MetaReader.getRegion(this.catalogTracker, regionName);
          if (pair == null) throw new UnknownRegionException(Bytes.toStringBinary(regionName));
          HRegionInfo hri = pair.getFirst();
          if (force) this.assignmentManager.clearRegionFromTransition(hri);
          this.assignmentManager.unassign(hri, force);
        }
      

      As part of clearRegionFromTransition()

          synchronized (this.regions) {
            this.regions.remove(hri);
            for (Set<HRegionInfo> regions : this.servers.values()) {
              regions.remove(hri);
            }
          }
      

      the region is also removed. Hence when the master tries to identify the region

            if (!regions.containsKey(region)) {
              debugLog(region, "Attempted to unassign region " +
                region.getRegionNameAsString() + " but it is not " +
                "currently assigned anywhere");
              return;
            }
      

      It is not able to identify the region. It exists in trunk and 0.90.x also.

      Attachments

        1. HBASE-4351.patch
          4 kB
          ramkrishna.s.vasudevan
        2. HBASE-4351_3.patch
          3 kB
          ramkrishna.s.vasudevan
        3. HBASE-4351_2.patch
          5 kB
          ramkrishna.s.vasudevan
        4. HBASE-4351_1.patch
          5 kB
          ramkrishna.s.vasudevan

        Activity

          People

            ram_krish ramkrishna.s.vasudevan
            ram_krish ramkrishna.s.vasudevan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: