/** * Tests instantiating a ReplicaInPipelineInterface subclass. */ @Test public void testInstantiateReplicaInPipeline() throws Throwable { ReplicaInPipelineInterface inst = new ExternalReplicaInPipeline(); }
/** * Covert a temporary replica to a RBW. * @param temporary the temporary replica being converted * @return the result RBW */ public ReplicaInPipelineInterface convertTemporaryToRbw( ExtendedBlock temporary) throws IOException;
/** * Covert a temporary replica to a RBW. * @param temporary the temporary replica being converted * @return the result RBW */ ReplicaInPipelineInterface convertTemporaryToRbw( ExtendedBlock temporary) throws IOException;
/** * Creates a temporary replica and returns the meta information of the replica * * @param b block * @return the meta info of the replica which is being written to * @throws IOException if an error occurs */ public ReplicaInPipelineInterface createTemporary(ExtendedBlock b ) throws IOException;
/** * Creates a RBW replica and returns the meta info of the replica * * @param b block * @return the meta info of the replica which is being written to * @throws IOException if an error occurs */ public ReplicaInPipelineInterface createRbw(ExtendedBlock b ) throws IOException;
/** * Recovers a RBW replica and returns the meta info of the replica * * @param b block * @param newGS the new generation stamp for the replica * @param minBytesRcvd the minimum number of bytes that the replica could have * @param maxBytesRcvd the maximum number of bytes that the replica could have * @return the meta info of the replica which is being written to * @throws IOException if an error occurs */ public ReplicaInPipelineInterface recoverRbw(ExtendedBlock b, long newGS, long minBytesRcvd, long maxBytesRcvd) throws IOException;
/** * Append to a finalized replica and returns the meta info of the replica * * @param b block * @param newGS the new generation stamp for the replica * @param expectedBlockLen the number of bytes the replica is expected to have * @return the meata info of the replica which is being written to * @throws IOException */ public ReplicaInPipelineInterface append(ExtendedBlock b, long newGS, long expectedBlockLen) throws IOException;
/** * Recover a failed append to a finalized replica * and returns the meta info of the replica * * @param b block * @param newGS the new generation stamp for the replica * @param expectedBlockLen the number of bytes the replica is expected to have * @return the meta info of the replica which is being written to * @throws IOException */ public ReplicaInPipelineInterface recoverAppend(ExtendedBlock b, long newGS, long expectedBlockLen) throws IOException;
/** * Creates a temporary replica and returns the meta information of the replica * * @param b block * @return the meta info of the replica which is being written to * @throws IOException if an error occurs */ public ReplicaInPipelineInterface createTemporary(StorageType storageType, ExtendedBlock b) throws IOException;
/** * Creates a RBW replica and returns the meta info of the replica * * @param b block * @return the meta info of the replica which is being written to * @throws IOException if an error occurs */ public ReplicaInPipelineInterface createRbw(StorageType storageType, ExtendedBlock b, boolean allowLazyPersist) throws IOException;
/** * Creates a temporary replica and returns the meta information of the * replica * * @param b * block * @return the meta info of the replica which is being written to * @throws IOException * if an error occurs */ public ReplicaInPipelineInterface createTemporary(ExtendedBlock b) throws IOException;
/** * Creates a RBW replica and returns the meta info of the replica * * @param b * block * @return the meta info of the replica which is being written to * @throws IOException * if an error occurs */ public ReplicaInPipelineInterface createRbw(ExtendedBlock b) throws IOException;
/** * Recovers a RBW replica and returns the meta info of the replica * * @param b * block * @param newGS * the new generation stamp for the replica * @param minBytesRcvd * the minimum number of bytes that the replica could have * @param maxBytesRcvd * the maximum number of bytes that the replica could have * @return the meta info of the replica which is being written to * @throws IOException * if an error occurs */ public ReplicaInPipelineInterface recoverRbw(ExtendedBlock b, long newGS, long minBytesRcvd, long maxBytesRcvd) throws IOException;
/** * Covert a temporary replica to a RBW. * * @param temporary * the temporary replica being converted * @return the result RBW */ public ReplicaInPipelineInterface convertTemporaryToRbw( ExtendedBlock temporary) throws IOException;
/** * Append to a finalized replica and returns the meta info of the replica * * @param b * block * @param newGS * the new generation stamp for the replica * @param expectedBlockLen * the number of bytes the replica is expected to have * @return the meata info of the replica which is being written to * @throws IOException */ public ReplicaInPipelineInterface append(ExtendedBlock b, long newGS, long expectedBlockLen) throws IOException;
/** * Recover a failed append to a finalized replica * and returns the meta info of the replica * * @param b * block * @param newGS * the new generation stamp for the replica * @param expectedBlockLen * the number of bytes the replica is expected to have * @return the meta info of the replica which is being written to * @throws IOException */ public ReplicaInPipelineInterface recoverAppend(ExtendedBlock b, long newGS, long expectedBlockLen) throws IOException;