Examples of HRegionInfo090x


Examples of org.apache.hadoop.hbase.migration.HRegionInfo090x

    List<HRegionInfo090x> newRegions
        = new ArrayList<HRegionInfo090x>(startKeys.length);
    int count = 0;
    for (int i = 0; i < startKeys.length; i++) {
      int j = (i + 1) % startKeys.length;
      HRegionInfo090x hri = new HRegionInfo090x(htd,
        startKeys[i], startKeys[j]);
      Put put = new Put(hri.getRegionName());
      put.setWriteToWAL(false);
      put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
        Writables.getBytes(hri));
      meta.put(put);
      LOG.info("createMultiRegions: PUT inserted " + hri.toString());

      newRegions.add(hri);
      count++;
    }
    meta.close();
View Full Code Here

Examples of org.apache.hadoop.hbase.migration.HRegionInfo090x

    List<HRegionInfo090x> newRegions
        = new ArrayList<HRegionInfo090x>(startKeys.length);
    int count = 0;
    for (int i = 0; i < startKeys.length; i++) {
      int j = (i + 1) % startKeys.length;
      HRegionInfo090x hri = new HRegionInfo090x(htd,
        startKeys[i], startKeys[j]);
      Put put = new Put(hri.getRegionName());
      put.setWriteToWAL(false);
      put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
        Writables.getBytes(hri));
      meta.put(put);
      LOG.info("createMultiRegions: PUT inserted " + hri.toString());

      newRegions.add(hri);
      count++;
    }
    return count;
View Full Code Here

Examples of org.apache.hadoop.hbase.migration.HRegionInfo090x

   * @param bytes serialized bytes
   * @return An instance of a 090 HRI or null if we failed deserialize
   */
  public static HRegionInfo090x getHRegionInfo090x(final byte [] bytes) {
    if (bytes == null || bytes.length == 0) return null;
    HRegionInfo090x hri = null;
    try {
      hri = (HRegionInfo090x)Writables.getWritable(bytes, new HRegionInfo090x());
    } catch (IOException ioe) {
      LOG.warn("Failed deserialize as a 090 HRegionInfo); bytes=" +
        Bytes.toStringBinary(bytes), ioe);
    }
    return hri;
View Full Code Here

Examples of org.apache.hadoop.hbase.migration.HRegionInfo090x

      // Presumes that an edit updating all three cells either succeeds or
      // doesn't -- that we don't have case of info:regioninfo migrated but not
      // info:splitA.
      if (isMigrated(hriBytes)) return true;
      // OK. Need to migrate this row in meta.
      HRegionInfo090x hri090 = getHRegionInfo090x(hriBytes);
      HTableDescriptor htd = hri090.getTableDesc();
      if (htd == null) {
        LOG.warn("A 090 HRI has null HTD? Continuing; " + hri090.toString());
        return true;
      }
      if (!this.htds.contains(htd)) {
        // If first time we are adding a table, then write it out to fs.
        // Presumes that first region in table has THE table's schema which
View Full Code Here

Examples of org.apache.hadoop.hbase.migration.HRegionInfo090x

    List<HRegionInfo090x> newRegions
        = new ArrayList<HRegionInfo090x>(startKeys.length);
    int count = 0;
    for (int i = 0; i < startKeys.length; i++) {
      int j = (i + 1) % startKeys.length;
      HRegionInfo090x hri = new HRegionInfo090x(htd,
        startKeys[i], startKeys[j]);
      Put put = new Put(hri.getRegionName());
      put.setWriteToWAL(false);
      put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
        Writables.getBytes(hri));
      meta.put(put);
      LOG.info("createMultiRegions: PUT inserted " + hri.toString());

      newRegions.add(hri);
      count++;
    }
    meta.close();
View Full Code Here

Examples of org.apache.hadoop.hbase.migration.HRegionInfo090x

    List<HRegionInfo090x> newRegions
        = new ArrayList<HRegionInfo090x>(startKeys.length);
    int count = 0;
    for (int i = 0; i < startKeys.length; i++) {
      int j = (i + 1) % startKeys.length;
      HRegionInfo090x hri = new HRegionInfo090x(htd,
        startKeys[i], startKeys[j]);
      Put put = new Put(hri.getRegionName());
      put.setWriteToWAL(false);
      put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
        Writables.getBytes(hri));
      meta.put(put);
      LOG.info("createMultiRegions: PUT inserted " + hri.toString());

      newRegions.add(hri);
      count++;
    }
    meta.close();
View Full Code Here

Examples of org.apache.hadoop.hbase.migration.HRegionInfo090x

    List<HRegionInfo090x> newRegions
        = new ArrayList<HRegionInfo090x>(startKeys.length);
    int count = 0;
    for (int i = 0; i < startKeys.length; i++) {
      int j = (i + 1) % startKeys.length;
      HRegionInfo090x hri = new HRegionInfo090x(htd,
        startKeys[i], startKeys[j]);
      Put put = new Put(hri.getRegionName());
      put.setWriteToWAL(false);
      put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
        Writables.getBytes(hri));
      meta.put(put);
      LOG.info("createMultiRegions: PUT inserted " + hri.toString());

      newRegions.add(hri);
      count++;
    }
    return count;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.