+ EnvironmentEdgeManager.currentTime() + ")."); SnapshotDescription.Builder builder = snapshot.toBuilder(); builder.setCreationTime(time); snapshot = builder.build();
setCreationTime(other.getCreationTime());
/** * Convert from {@link SnapshotDescription} to * {@link org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription} * @param snapshotDesc the POJO SnapshotDescription * @return the protobuf SnapshotDescription */ public static SnapshotProtos.SnapshotDescription createHBaseProtosSnapshotDesc(SnapshotDescription snapshotDesc) { SnapshotProtos.SnapshotDescription.Builder builder = SnapshotProtos.SnapshotDescription.newBuilder(); if (snapshotDesc.getTableName() != null) { builder.setTable(snapshotDesc.getTableNameAsString()); } if (snapshotDesc.getName() != null) { builder.setName(snapshotDesc.getName()); } if (snapshotDesc.getOwner() != null) { builder.setOwner(snapshotDesc.getOwner()); } if (snapshotDesc.getCreationTime() != -1L) { builder.setCreationTime(snapshotDesc.getCreationTime()); } if (snapshotDesc.getVersion() != -1) { builder.setVersion(snapshotDesc.getVersion()); } builder.setType(ProtobufUtil.createProtosSnapShotDescType(snapshotDesc.getType())); SnapshotProtos.SnapshotDescription snapshot = builder.build(); return snapshot; }
/** * Convert from {@link SnapshotDescription} to * {@link org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription} * @param snapshotDesc the POJO SnapshotDescription * @return the protobuf SnapshotDescription */ public static SnapshotProtos.SnapshotDescription createHBaseProtosSnapshotDesc(SnapshotDescription snapshotDesc) { SnapshotProtos.SnapshotDescription.Builder builder = SnapshotProtos.SnapshotDescription.newBuilder(); if (snapshotDesc.getTableName() != null) { builder.setTable(snapshotDesc.getTableNameAsString()); } if (snapshotDesc.getName() != null) { builder.setName(snapshotDesc.getName()); } if (snapshotDesc.getOwner() != null) { builder.setOwner(snapshotDesc.getOwner()); } if (snapshotDesc.getCreationTime() != -1L) { builder.setCreationTime(snapshotDesc.getCreationTime()); } if (snapshotDesc.getVersion() != -1) { builder.setVersion(snapshotDesc.getVersion()); } builder.setType(ProtobufUtil.createProtosSnapShotDescType(snapshotDesc.getType())); SnapshotProtos.SnapshotDescription snapshot = builder.build(); return snapshot; }
/** * Convert from {@link SnapshotDescription} to * {@link org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription} * @param snapshotDesc the POJO SnapshotDescription * @return the protobuf SnapshotDescription */ public static SnapshotProtos.SnapshotDescription createHBaseProtosSnapshotDesc(SnapshotDescription snapshotDesc) { SnapshotProtos.SnapshotDescription.Builder builder = SnapshotProtos.SnapshotDescription.newBuilder(); if (snapshotDesc.getTableName() != null) { builder.setTable(snapshotDesc.getTableNameAsString()); } if (snapshotDesc.getName() != null) { builder.setName(snapshotDesc.getName()); } if (snapshotDesc.getOwner() != null) { builder.setOwner(snapshotDesc.getOwner()); } if (snapshotDesc.getCreationTime() != -1L) { builder.setCreationTime(snapshotDesc.getCreationTime()); } if (snapshotDesc.getVersion() != -1) { builder.setVersion(snapshotDesc.getVersion()); } builder.setType(ProtobufUtil.createProtosSnapShotDescType(snapshotDesc.getType())); SnapshotProtos.SnapshotDescription snapshot = builder.build(); return snapshot; }
setCreationTime(other.getCreationTime());