Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.HRegionInfo.readFields()


    Path regioninfo = new Path(regionDir, HRegion.REGIONINFO_FILE);
    FileSystem fs = FileSystem.get(conf);
    FSDataInputStream in = fs.open(regioninfo);
    byte[] tableName = Bytes.toBytes(hbi.hdfsTableName);
    HRegionInfo hri = new HRegionInfo(tableName);
    hri.readFields(in);
    in.close();
    LOG.debug("HRegionInfo read: " + hri.toString());
    hbi.metaEntry = new MetaEntry(hri, null,
        hbi.foundRegionDir.getModificationTime());
  }
View Full Code Here


    List<HRegionInfo> hris = new ArrayList<HRegionInfo>();
    try {
      in.reset(bytes, offset, length);
      while (in.available() > 0) {
        HRegionInfo hri = new HRegionInfo();
        hri.readFields(in);
        hris.add(hri);
      }
    } finally {
      in.close();
    }
View Full Code Here

    // the first integer is expected to be the size of records
    int regionsCount = in.readInt();
    for (int i = 0; i < regionsCount; ++i) {
      HRegionInfo hri = new HRegionInfo();
      hri.readFields(in);
      HServerAddress hsa = new HServerAddress();
      hsa.readFields(in);
      allRegions.put(hri, hsa);
    }
    return allRegions;
View Full Code Here

    // the first integer is expected to be the size of records
    int regionsCount = in.readInt();
    for (int i = 0; i < regionsCount; ++i) {
      HRegionInfo hri = new HRegionInfo();
      hri.readFields(in);
      HServerAddress hsa = new HServerAddress();
      hsa.readFields(in);
      allRegions.put(hri, hsa);
    }
    return allRegions;
View Full Code Here

            if (columnKey.equals(HConstants.COL_REGIONINFO)) {
              DataInputBuffer inbuf = new DataInputBuffer();
              HRegionInfo info = new HRegionInfo();
              inbuf.reset(value, value.length);
              info.readFields(inbuf);

              cellData = "ID : " + String.valueOf(info.getRegionId());
            }
            ConsoleTable.printLine(count, rowKey.toString(), columnKey.toString(),
                cellData);
View Full Code Here

          if (entry.getKey().equals(HConstants.COL_REGIONINFO)) {
            DataInputBuffer inbuf = new DataInputBuffer();
            HRegionInfo info = new HRegionInfo();
            inbuf.reset(value, value.length);
            info.readFields(inbuf);

            cellData = "ID : " + String.valueOf(info.getRegionId());
          }
          ConsoleTable.printLine(count, getRow().toString(), entry.getKey().toString(),
              cellData);
View Full Code Here

    // the first integer is expected to be the size of records
    int regionsCount = in.readInt();
    for (int i = 0; i < regionsCount; ++i) {
      HRegionInfo hri = new HRegionInfo();
      hri.readFields(in);
      HServerAddress hsa = new HServerAddress();
      hsa.readFields(in);
      allRegions.put(hri, hsa);
    }
    return allRegions;
View Full Code Here

    Path regioninfo = new Path(regionDir, HRegion.REGIONINFO_FILE);
    FileSystem fs = regioninfo.getFileSystem(conf);

    FSDataInputStream in = fs.open(regioninfo);
    HRegionInfo hri = new HRegionInfo();
    hri.readFields(in);
    in.close();
    LOG.debug("HRegionInfo read: " + hri.toString());
    hbi.hdfsEntry.hri = hri;
  }
View Full Code Here

    Path regioninfo = new Path(dir, HRegion.REGIONINFO_FILE);
    if (!fs.exists(regioninfo)) throw new FileNotFoundException(regioninfo.toString());
    FSDataInputStream in = fs.open(regioninfo);
    try {
      HRegionInfo hri = new HRegionInfo();
      hri.readFields(in);
      return hri;
    } finally {
      in.close();
    }
  }
View Full Code Here

    // the first integer is expected to be the size of records
    int regionsCount = in.readInt();
    for (int i = 0; i < regionsCount; ++i) {
      HRegionInfo hri = new HRegionInfo();
      hri.readFields(in);
      HServerAddress hsa = new HServerAddress();
      hsa.readFields(in);
      allRegions.put(hri, hsa);
    }
    return allRegions;
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.