Пример #1
0
 /**
  * Deletes the specified regions from META.
  *
  * @param catalogTracker
  * @param regionsInfo list of regions to be deleted from META
  * @throws IOException
  */
 public static void deleteRegions(CatalogTracker catalogTracker, List<HRegionInfo> regionsInfo)
     throws IOException {
   List<Delete> deletes = new ArrayList<Delete>(regionsInfo.size());
   for (HRegionInfo hri : regionsInfo) {
     deletes.add(new Delete(hri.getRegionName()));
   }
   deleteFromMetaTable(catalogTracker, deletes);
   LOG.info("Deleted from META, regions: " + regionsInfo);
 }
Пример #2
0
 /**
  * Deletes daughters references in offlined split parent.
  *
  * @param catalogTracker
  * @param parent Parent row we're to remove daughter reference from
  * @throws NotAllMetaRegionsOnlineException
  * @throws IOException
  */
 public static void deleteDaughtersReferencesInParent(
     CatalogTracker catalogTracker, final HRegionInfo parent)
     throws NotAllMetaRegionsOnlineException, IOException {
   Delete delete = new Delete(parent.getRegionName());
   delete.deleteColumns(HConstants.CATALOG_FAMILY, HConstants.SPLITA_QUALIFIER);
   delete.deleteColumns(HConstants.CATALOG_FAMILY, HConstants.SPLITB_QUALIFIER);
   deleteFromMetaTable(catalogTracker, delete);
   LOG.info(
       "Deleted daughters references, qualifier="
           + Bytes.toStringBinary(HConstants.SPLITA_QUALIFIER)
           + " and qualifier="
           + Bytes.toStringBinary(HConstants.SPLITB_QUALIFIER)
           + ", from parent "
           + parent.getRegionNameAsString());
 }
Пример #3
0
 /**
  * Deletes the specified region from META.
  *
  * @param catalogTracker
  * @param regionInfo region to be deleted from META
  * @throws IOException
  */
 public static void deleteRegion(CatalogTracker catalogTracker, HRegionInfo regionInfo)
     throws IOException {
   Delete delete = new Delete(regionInfo.getRegionName());
   deleteFromMetaTable(catalogTracker, delete);
   LOG.info("Deleted region " + regionInfo.getRegionNameAsString() + " from META");
 }
Пример #4
0
 /**
  * Delete the passed <code>d</code> from the <code>.META.</code> table.
  *
  * @param ct CatalogTracker on whose back we will ride the edit.
  * @param d Delete to add to .META.
  * @throws IOException
  */
 static void deleteFromMetaTable(final CatalogTracker ct, final Delete d) throws IOException {
   List<Delete> dels = new ArrayList<Delete>(1);
   dels.add(d);
   deleteFromMetaTable(ct, dels);
 }