Exemplo n.º 1
0
        private void VerifyAddition(long blockId, long genStamp, long size)
        {
            ReplicaInfo replicainfo;

            replicainfo = FsDatasetTestUtil.FetchReplicaInfo(fds, bpid, blockId);
            NUnit.Framework.Assert.IsNotNull(replicainfo);
            // Added block has the same file as the one created by the test
            FilePath file = new FilePath(GetBlockFile(blockId));

            NUnit.Framework.Assert.AreEqual(file.GetName(), FsDatasetTestUtil.GetFile(fds, bpid
                                                                                      , blockId).GetName());
            // Generation stamp is same as that of created file
            NUnit.Framework.Assert.AreEqual(genStamp, replicainfo.GetGenerationStamp());
            // File size matches
            NUnit.Framework.Assert.AreEqual(size, replicainfo.GetNumBytes());
        }
Exemplo n.º 2
0
 public static FilePath GetFile(DataNode dn, string bpid, long bid)
 {
     return(FsDatasetTestUtil.GetFile(dn.GetFSDataset(), bpid, bid));
 }