/**
  *
  *
  * <pre>
  * Region-unittest,\x82\xB4\x85\xC2\x7F\xFF\xFE\xB6\xC9jNG\xEE!\x5C3\xBB\xAE\xA1:\x05\xA5\xA9x\xB0\xA1"8\x05\xFB(\xD2VY\xDB\x9A\x06\x09\xA9\x98\xC2\xE3\x8D=,1413960230654.aaf2a6c9f2c87c196f43497243bb2424.
  * RegionID-unittest,1413960230654
  * </pre>
  */
 protected String getLogHeader() {
   HRegion region = this.getCurrentRegion();
   return LOG.isDebugEnabled()
       ? String.format("Region-%s", region.getRegionNameAsString())
       : String.format(
           "Region-%s,%d", region.getTableDesc().getNameAsString(), region.getRegionId());
 }
  @Override
  public void start(CoprocessorEnvironment e) throws IOException {
    region = (HRegion) ((RegionCoprocessorEnvironment) e).getRegion();
    String[] name = region.getTableDesc().getNameAsString().split(":");
    if (name.length == 2) {
      namespace = name[0];
      tableName = name[1];
    } else {
      tableName = name[0];
    }
    regionName = region.getRegionInfo().getEncodedName();

    path = HConfiguration.getConfiguration().getBackupPath() + "/" + tableName + "/" + regionName;
    conf = HConfiguration.unwrapDelegate();
    rootDir = FSUtils.getRootDir(conf);
    fs = FSUtils.getCurrentFileSystem(conf);
    backupDir =
        new Path(
            rootDir,
            BackupRestoreConstants.BACKUP_DIR + "/data/splice/" + tableName + "/" + regionName);
    preparing = false;
  }
Пример #3
0
 @Override
 public byte[] getName() {
   return region.getTableDesc().getName();
 }