if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode();
/** {@inheritDoc} */ @Override public List<HBaseProtos.SnapshotDescription> listSnapshots(Pattern pattern) throws IOException { List<HBaseProtos.SnapshotDescription> response = new ArrayList<>(); for (HBaseProtos.SnapshotDescription description : listSnapshots()) { if (pattern.matcher(description.getName()).matches()) { response.add(description); } } return response; }
/** * {@inheritDoc} * * The snapshots will be deleted serially and the first failure will prevent the deletion of the * remaining snapshots. */ @Override public void deleteTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern) throws IOException { for (SnapshotDescription snapshotDescription : listTableSnapshots(tableNamePattern, snapshotNamePattern)) { deleteSnapshot(snapshotDescription.getName()); } }
/** * {@inheritDoc} * * The snapshots will be deleted serially and the first failure will prevent the deletion of the * remaining snapshots. */ @Override public void deleteSnapshots(Pattern pattern) throws IOException { for (SnapshotDescription snapshotDescription : listSnapshots(pattern)) { deleteSnapshot(snapshotDescription.getName()); } }
/** {@inheritDoc} */ @Override public MasterProtos.SnapshotResponse takeSnapshotAsync( HBaseProtos.SnapshotDescription snapshot) throws IOException, SnapshotCreationException { snapshotTable(snapshot.getName(), TableName.valueOf(snapshot.getTable())); LOG.warn("isSnapshotFinished() is not currently supported by BigtableAdmin.\n" + "You may poll for existence of the snapshot with listSnapshots(snpashotName)"); return MasterProtos.SnapshotResponse.newBuilder() .setExpectedTimeout(TimeUnit.MINUTES.toMillis(5)).build(); }
/** * Get the directory to build a snapshot, before it is finalized * @param snapshot snapshot that will be built * @param rootDir root directory of the hbase installation * @return {@link Path} where one can build a snapshot */ public static Path getWorkingSnapshotDir(SnapshotDescription snapshot, final Path rootDir) { return getCompletedSnapshotDir(getWorkingSnapshotDir(rootDir), snapshot.getName()); }
/** * @param desc expected snapshot to find */ public SnapshotDoesNotExistException(SnapshotDescription desc) { super("Snapshot '" + desc.getName() +"' doesn't exist on the filesystem", desc); } }
/** * Get the directory to build a snapshot, before it is finalized * @param snapshot snapshot that will be built * @param rootDir root directory of the hbase installation * @return {@link Path} where one can build a snapshot */ public static Path getWorkingSnapshotDir(SnapshotDescription snapshot, final Path rootDir) { return getCompletedSnapshotDir(getWorkingSnapshotDir(rootDir), snapshot.getName()); }
/** * <code>required string name = 1;</code> */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
@Override protected void completed(final Throwable exception) { this.stopped = true; if (exception != null) { status.abort("Restore snapshot '" + snapshot.getName() + "' failed because " + exception.getMessage()); } else { status.markComplete("Restore snapshot '"+ snapshot.getName() +"'!"); } metricsSnapshot.addSnapshotRestore(status.getCompletionTimestamp() - status.getStartTime()); super.completed(exception); }
protected void deleteSnapshots(String tableName) throws Exception { for (HBaseProtos.SnapshotDescription snapshotDescription : admin.listSnapshots(".*" + tableName + ".*")) { if (snapshotDescription.getTable().equals(tableName) || snapshotDescription.getTable().equals(TEST_NAMESPACE + ":" + tableName)) { admin.deleteSnapshots(snapshotDescription.getName()); } } }
public FlushSnapshotSubprocedure(ProcedureMember member, ForeignExceptionDispatcher errorListener, long wakeFrequency, long timeout, List<HRegion> regions, SnapshotDescription snapshot, SnapshotSubprocedurePool taskManager) { super(member, snapshot.getName(), errorListener, wakeFrequency, timeout); this.snapshot = snapshot; this.regions = regions; this.taskManager = taskManager; }
/** * {@inheritDoc} * * The snapshots will be deleted serially and the first failure will prevent the deletion of the * remaining snapshots. */ @Override public void deleteTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern) throws IOException { for (SnapshotDescription snapshotDescription : listTableSnapshots(tableNamePattern, snapshotNamePattern)) { deleteSnapshot(snapshotDescription.getName()); } }
/** * <code>required string name = 1;</code> */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** * {@inheritDoc} * * The snapshots will be deleted serially and the first failure will prevent the deletion of the * remaining snapshots. */ @Override public void deleteSnapshots(Pattern pattern) throws IOException { for (SnapshotDescription snapshotDescription : listSnapshots(pattern)) { deleteSnapshot(snapshotDescription.getName()); } }
/** * Get the directory for a specified snapshot. This directory is a sub-directory of snapshot root * directory and all the data files for a snapshot are kept under this directory. * @param snapshot snapshot being taken * @param rootDir hbase root directory * @return the final directory for the completed snapshot */ public static Path getCompletedSnapshotDir(final SnapshotDescription snapshot, final Path rootDir) { return getCompletedSnapshotDir(snapshot.getName(), rootDir); }
public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } void setName(com.google.protobuf.ByteString value) {
/** * <code>required string name = 1;</code> */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** * <code>required string name = 1;</code> */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } /**