/** * Copy constructor. * @param from where to copy from */ ReplicaInfo(ReplicaInfo from) { this(from, from.getVolume(), from.getDir()); }
/** * Get the full path of this replica's data file * @return the full path of this replica's data file */ public File getBlockFile() { return new File(getDir(), getBlockName()); }
/** * Copy constructor. * @param from where to copy from */ ReplicaInfo(ReplicaInfo from) { this(from, from.getVolume(), from.getDir()); }
/** * Get the full path of this replica's data file * @return the full path of this replica's data file */ public File getBlockFile() { return new File(getDir(), getBlockName()); }
/** * Get the full path of this replica's meta file * @return the full path of this replica's meta file */ public File getMetaFile() { return new File(getDir(), DatanodeUtil.getMetaName(getBlockName(), getGenerationStamp())); }
/** * Get the full path of this replica's meta file * @return the full path of this replica's meta file */ public File getMetaFile() { return new File(getDir(), DatanodeUtil.getMetaName(getBlockName(), getGenerationStamp())); }
public ReplicaUnderRecovery(ReplicaInfo replica, long recoveryId) { super(replica, replica.getVolume(), replica.getDir()); if ( replica.getState() != ReplicaState.FINALIZED && replica.getState() != ReplicaState.RBW && replica.getState() != ReplicaState.RWR ) { throw new IllegalArgumentException("Cannot recover replica: " + replica); } this.original = replica; this.recoveryId = recoveryId; }
public ReplicaUnderRecovery(ReplicaInfo replica, long recoveryId) { super(replica, replica.getVolume(), replica.getDir()); if ( replica.getState() != ReplicaState.FINALIZED && replica.getState() != ReplicaState.RBW && replica.getState() != ReplicaState.RWR ) { throw new IllegalArgumentException("Cannot recover replica: " + replica); } this.original = replica; this.recoveryId = recoveryId; }