hash = (53 * hash) + hashLong(getCreationTime());
result = result && (getCreationTime() == other.getCreationTime());
/** * Dump the {@link SnapshotDescription} */ private void printInfo() { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); System.out.println("Snapshot Info"); System.out.println("----------------------------------------"); System.out.println(" Name: " + snapshotDesc.getName()); System.out.println(" Type: " + snapshotDesc.getType()); System.out.println(" Table: " + snapshotDesc.getTable()); System.out.println(" Format: " + snapshotDesc.getVersion()); System.out.println("Created: " + df.format(new Date(snapshotDesc.getCreationTime()))); System.out.println(); }
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter);
result = result && (getCreationTime() == other.getCreationTime());
result = result && (getCreationTime() == other.getCreationTime());
result = result && (getCreationTime() == other.getCreationTime());
hash = (53 * hash) + hashLong(getCreationTime());
hash = (53 * hash) + hashLong(getCreationTime());
/** * Convert the passed snapshot description into a 'full' snapshot description based on default * parameters, if none have been supplied. This resolves any 'optional' parameters that aren't * supplied to their default values. * @param snapshot general snapshot descriptor * @param conf Configuration to read configured snapshot defaults if snapshot is not complete * @return a valid snapshot description * @throws IllegalArgumentException if the {@link SnapshotDescription} is not a complete * {@link SnapshotDescription}. */ public static SnapshotDescription validate(SnapshotDescription snapshot, Configuration conf) throws IllegalArgumentException { if (!snapshot.hasTable()) { throw new IllegalArgumentException( "Descriptor doesn't apply to a table, so we can't build it."); } // set the creation time, if one hasn't been set long time = snapshot.getCreationTime(); if (time == SnapshotDescriptionUtils.NO_SNAPSHOT_START_TIME_SPECIFIED) { time = EnvironmentEdgeManager.currentTime(); LOG.debug("Creation time not specified, setting to:" + time + " (current time:" + EnvironmentEdgeManager.currentTime() + ")."); SnapshotDescription.Builder builder = snapshot.toBuilder(); builder.setCreationTime(time); snapshot = builder.build(); } return snapshot; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription other) { if (other == org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasTable()) { bitField0_ |= 0x00000002; table_ = other.table_; onChanged(); } if (other.hasCreationTime()) { setCreationTime(other.getCreationTime()); } if (other.hasType()) { setType(other.getType()); } if (other.hasVersion()) { setVersion(other.getVersion()); } if (other.hasOwner()) { bitField0_ |= 0x00000020; owner_ = other.owner_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
hash = (53 * hash) + hashLong(getCreationTime());
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription other) { if (other == org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasTable()) { bitField0_ |= 0x00000002; table_ = other.table_; onChanged(); } if (other.hasCreationTime()) { setCreationTime(other.getCreationTime()); } if (other.hasType()) { setType(other.getType()); } if (other.hasVersion()) { setVersion(other.getVersion()); } if (other.hasOwner()) { bitField0_ |= 0x00000020; owner_ = other.owner_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription other) { if (other == org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasTable()) { bitField0_ |= 0x00000002; table_ = other.table_; onChanged(); } if (other.hasCreationTime()) { setCreationTime(other.getCreationTime()); } if (other.hasType()) { setType(other.getType()); } if (other.hasVersion()) { setVersion(other.getVersion()); } if (other.hasOwner()) { bitField0_ |= 0x00000020; owner_ = other.owner_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * Convert the passed snapshot description into a 'full' snapshot description based on default * parameters, if none have been supplied. This resolves any 'optional' parameters that aren't * supplied to their default values. * @param snapshot general snapshot descriptor * @param conf Configuration to read configured snapshot defaults if snapshot is not complete * @return a valid snapshot description * @throws IllegalArgumentException if the {@link SnapshotDescription} is not a complete * {@link SnapshotDescription}. */ public static SnapshotDescription validate(SnapshotDescription snapshot, Configuration conf) throws IllegalArgumentException { if (!snapshot.hasTable()) { throw new IllegalArgumentException( "Descriptor doesn't apply to a table, so we can't build it."); } // set the creation time, if one hasn't been set long time = snapshot.getCreationTime(); if (time == SnapshotDescriptionUtils.NO_SNAPSHOT_START_TIME_SPECIFIED) { time = EnvironmentEdgeManager.currentTimeMillis(); LOG.debug("Creation time not specified, setting to:" + time + " (current time:" + EnvironmentEdgeManager.currentTimeMillis() + ")."); SnapshotDescription.Builder builder = snapshot.toBuilder(); builder.setCreationTime(time); snapshot = builder.build(); } return snapshot; }
@java.lang.Override public int hashCode() { int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasTable()) { hash = (37 * hash) + TABLE_FIELD_NUMBER; hash = (53 * hash) + getTable().hashCode(); } if (hasCreationTime()) { hash = (37 * hash) + CREATIONTIME_FIELD_NUMBER; hash = (53 * hash) + hashLong(getCreationTime()); } if (hasType()) { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + hashEnum(getType()); } if (hasVersion()) { hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion(); } hash = (29 * hash) + getUnknownFields().hashCode(); return hash; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription other) { if (other == org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.getDefaultInstance()) return this; if (other.hasName()) { setName(other.getName()); } if (other.hasTable()) { setTable(other.getTable()); } if (other.hasCreationTime()) { setCreationTime(other.getCreationTime()); } if (other.hasType()) { setType(other.getType()); } if (other.hasVersion()) { setVersion(other.getVersion()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * Dump the {@link SnapshotDescription} */ private void printInfo() { SnapshotDescription snapshotDesc = snapshotManifest.getSnapshotDescription(); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); System.out.println("Snapshot Info"); System.out.println("----------------------------------------"); System.out.println(" Name: " + snapshotDesc.getName()); System.out.println(" Type: " + snapshotDesc.getType()); System.out.println(" Table: " + snapshotDesc.getTable()); System.out.println(" Format: " + snapshotDesc.getVersion()); System.out.println("Created: " + df.format(new Date(snapshotDesc.getCreationTime()))); System.out.println(); }
public long getCreationTime() { return this.proto.getCreationTime(); }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription other) { if (other == org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasTable()) { bitField0_ |= 0x00000002; table_ = other.table_; onChanged(); } if (other.hasCreationTime()) { setCreationTime(other.getCreationTime()); } if (other.hasType()) { setType(other.getType()); } if (other.hasVersion()) { setVersion(other.getVersion()); } if (other.hasOwner()) { bitField0_ |= 0x00000020; owner_ = other.owner_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }