SnapshotDescription snapshotDesc = SnapshotDescriptionUtils.readSnapshotInfo(inputFs, snapshotDir) .toBuilder() .setName(targetName) .build();
LOG.debug("Creation time not specified, setting to:" + time + " (current time:" + EnvironmentEdgeManager.currentTime() + ")."); SnapshotDescription.Builder builder = snapshot.toBuilder(); builder.setCreationTime(time); snapshot = builder.build();
ProtobufUtil.createSnapshotDesc(snapshot)); SnapshotDescription.Builder builder = snapshot.toBuilder();
SnapshotDescription snapshotDesc = SnapshotDescriptionUtils.readSnapshotInfo(inputFs, snapshotDir) .toBuilder() .setName(targetName) .build();
SnapshotDescription snapshotDesc = SnapshotDescriptionUtils.readSnapshotInfo(inputFs, snapshotDir) .toBuilder() .setName(targetName) .build();
public static Builder newBuilder(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription prototype) {
public Path[] addRegionV2() throws IOException { return addRegion(desc.toBuilder() .setVersion(SnapshotManifestV2.DESCRIPTOR_VERSION) .build()); }
public Path[] addRegionV1() throws IOException { return addRegion(desc.toBuilder() .setVersion(SnapshotManifestV1.DESCRIPTOR_VERSION) .build()); }
/** * Take a snapshot of a disabled table. * @param snapshot description of the snapshot to take. Modified to be {@link Type#DISABLED}. * @throws IOException if the snapshot could not be started or filesystem for snapshot * temporary directory could not be determined */ private synchronized void snapshotDisabledTable(SnapshotDescription snapshot) throws IOException { // setup the snapshot prepareToTakeSnapshot(snapshot); // set the snapshot to be a disabled snapshot, since the client doesn't know about that snapshot = snapshot.toBuilder().setType(Type.DISABLED).build(); // Take the snapshot of the disabled table DisabledTableSnapshotHandler handler = new DisabledTableSnapshotHandler(snapshot, master, this); snapshotTable(snapshot, handler); }
public static Builder newBuilder(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
public Path[] addRegionV2() throws IOException { return addRegion(desc.toBuilder() .setVersion(SnapshotManifestV2.DESCRIPTOR_VERSION) .build()); }
public Path[] addRegionV1() throws IOException { return addRegion(desc.toBuilder() .setVersion(SnapshotManifestV1.DESCRIPTOR_VERSION) .build()); }
private static SnapshotDescription writeAclToSnapshotDescription(SnapshotDescription snapshot, Configuration conf) throws IOException { ListMultimap<String, UserPermission> perms = User.runAsLoginUser(new PrivilegedExceptionAction<ListMultimap<String, UserPermission>>() { @Override public ListMultimap<String, UserPermission> run() throws Exception { return AccessControlLists.getTablePermissions(conf, TableName.valueOf(snapshot.getTable())); } }); return snapshot.toBuilder() .setUsersAndPermissions(ShadedAccessControlUtil.toUserTablePermissions(perms)).build(); } }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription prototype) {