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

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


            // METACOLUMN info such as HBASE::CACHEFLUSH entries
            if (kv.matchingFamily(WALEdit.METAFAMILY) ||
                !Bytes.equals(key.getEncodedRegionName(),
                  this.getRegionInfo().getEncodedNameAsBytes())) {
              //this is a special edit, we should handle it
              CompactionDescriptor compaction = WALEdit.getCompaction(kv);
              if (compaction != null) {
                //replay the compaction
                completeCompactionMarker(compaction);
              }
View Full Code Here


            // METACOLUMN info such as HBASE::CACHEFLUSH entries
            if (CellUtil.matchingFamily(cell, WALEdit.METAFAMILY) ||
                !Bytes.equals(key.getEncodedRegionName(),
                  this.getRegionInfo().getEncodedNameAsBytes())) {
              //this is a special edit, we should handle it
              CompactionDescriptor compaction = WALEdit.getCompaction(cell);
              if (compaction != null) {
                //replay the compaction
                completeCompactionMarker(compaction);
              }
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

    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

            // METACOLUMN info such as HBASE::CACHEFLUSH entries
            if (kv.matchingFamily(WALEdit.METAFAMILY) ||
                !Bytes.equals(key.getEncodedRegionName(),
                  this.getRegionInfo().getEncodedNameAsBytes())) {
              //this is a special edit, we should handle it
              CompactionDescriptor compaction = WALEdit.getCompaction(kv);
              if (compaction != null) {
                //replay the compaction
                completeCompactionMarker(compaction);
              }
View Full Code Here

            // METACOLUMN info such as HBASE::CACHEFLUSH entries
            if (kv.matchingFamily(WALEdit.METAFAMILY) ||
                !Bytes.equals(key.getEncodedRegionName(),
                  this.getRegionInfo().getEncodedNameAsBytes())) {
              //this is a special edit, we should handle it
              CompactionDescriptor compaction = WALEdit.getCompaction(kv);
              if (compaction != null) {
                //replay the compaction
                completeCompactionMarker(compaction);
              }
View Full Code Here

          byte[] row = kv.getRow();
          byte[] family = kv.getFamily();
          boolean isCompactionEntry = false;
 
          if (kv.matchingFamily(WALEdit.METAFAMILY)) {
            CompactionDescriptor compaction = WALEdit.getCompaction(kv);
            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);
                skippedKVs.add(kv);
                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

      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

            // METACOLUMN info such as HBASE::CACHEFLUSH entries
            if (kv.matchingFamily(WALEdit.METAFAMILY) ||
                !Bytes.equals(key.getEncodedRegionName(),
                  this.getRegionInfo().getEncodedNameAsBytes())) {
              //this is a special edit, we should handle it
              CompactionDescriptor compaction = WALEdit.getCompaction(kv);
              if (compaction != null) {
                //replay the compaction
                completeCompactionMarker(compaction);
              }
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.