Package org.apache.hadoop.hbase.protobuf.generated.WALProtos

Examples of org.apache.hadoop.hbase.protobuf.generated.WALProtos.CompactionDescriptor


      // add a compaction from an older (non-existing) region to see whether we successfully skip
      // those entries
      HRegionInfo oldHri = new HRegionInfo(table.getName(),
        HConstants.EMPTY_START_ROW, HConstants.EMPTY_END_ROW);
      CompactionDescriptor compactionDescriptor = ProtobufUtil.toCompactionDescriptor(oldHri,
        FAMILY, Lists.newArrayList(new Path("/a")), Lists.newArrayList(new Path("/b")),
        new Path("store_dir"));
      HLogUtil.writeCompactionMarker(compactingRegion.getLog(), table.getTableDescriptor(),
        oldHri, compactionDescriptor, new AtomicLong(Long.MAX_VALUE-100));
View Full Code Here


      assertEquals(errorMsg, 1, files.length);
      // move the file inside region dir
      Path newFile = region.getRegionFileSystem().commitStoreFile(Bytes.toString(family),
          files[0].getPath());

      CompactionDescriptor compactionDescriptor = ProtobufUtil.toCompactionDescriptor(this.region
          .getRegionInfo(), family, storeFiles, Lists.newArrayList(newFile), region
          .getRegionFileSystem().getStoreDir(Bytes.toString(family)));

      HLogUtil.writeCompactionMarker(region.getLog(), this.region.getTableDesc(),
          this.region.getRegionInfo(), compactionDescriptor, new AtomicLong(1));
View Full Code Here

      // add a compaction from an older (non-existing) region to see whether we successfully skip
      // those entries
      HRegionInfo oldHri = new HRegionInfo(table.getName(),
        HConstants.EMPTY_START_ROW, HConstants.EMPTY_END_ROW);
      CompactionDescriptor compactionDescriptor = ProtobufUtil.toCompactionDescriptor(oldHri,
        FAMILY, Lists.newArrayList(new Path("/a")), Lists.newArrayList(new Path("/b")),
        new Path("store_dir"));
      HLogUtil.writeCompactionMarker(compactingRegion.getLog(), table.getTableDescriptor(),
        oldHri, compactionDescriptor, new AtomicLong(Long.MAX_VALUE-100));
View Full Code Here

    List<Path> outputPaths = new ArrayList<Path>(newFiles.size());
    for (StoreFile f : newFiles) {
      outputPaths.add(f.getPath());
    }
    HRegionInfo info = this.region.getRegionInfo();
    CompactionDescriptor compactionDescriptor = ProtobufUtil.toCompactionDescriptor(info,
        family.getName(), inputPaths, outputPaths, fs.getStoreDir(getFamily().getNameAsString()));
    HLogUtil.writeCompactionMarker(region.getLog(), this.region.getTableDesc(),
        this.region.getRegionInfo(), compactionDescriptor, this.region.getSequenceId());
  }
View Full Code Here

        for (Cell cell : cells) {
          byte[] row = cell.getRow();
          byte[] family = cell.getFamily();
          boolean isCompactionEntry = false;
          if (CellUtil.matchingFamily(cell, WALEdit.METAFAMILY)) {
            CompactionDescriptor compaction = WALEdit.getCompaction(cell);
            if (compaction != null && compaction.hasRegionName()) {
              try {
                byte[][] regionName = HRegionInfo.parseRegionName(compaction.getRegionName()
                  .toByteArray());
                row = regionName[1]; // startKey of the region
                family = compaction.getFamilyName().toByteArray();
                isCompactionEntry = true;
              } catch (Exception ex) {
                LOG.warn("Unexpected exception received, ignoring " + ex);
                skippedCells.add(cell);
                continue;
View Full Code Here

        NavigableMap<byte[], List<Cell>> map = m.mutation.getFamilyCellMap();
        List<Cell> metaCells = map.get(WALEdit.METAFAMILY);
        if (metaCells != null && !metaCells.isEmpty()) {
          for (Cell metaCell : metaCells) {
            CompactionDescriptor compactionDesc = WALEdit.getCompaction(metaCell);
            if (compactionDesc != null) {
              region.completeCompactionMarker(compactionDesc);
            }
          }
          it.remove();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.protobuf.generated.WALProtos.CompactionDescriptor

Copyright © 2018 www.massapicom. 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.