コード例 #1
0
            /// <summary>
            /// Verify whether the actual directory location of block file has the
            /// expected directory path computed using its block ID.
            /// </summary>
            private void VerifyFileLocation(FilePath actualBlockDir, FilePath bpFinalizedDir,
                                            long blockId)
            {
                FilePath blockDir = DatanodeUtil.IdToBlockDir(bpFinalizedDir, blockId);

                if (actualBlockDir.CompareTo(blockDir) != 0)
                {
                    Log.Warn("Block: " + blockId + " has to be upgraded to block ID-based layout");
                }
            }
コード例 #2
0
 /// <summary>Return the parent directory path where this replica is located</summary>
 /// <returns>the parent directory path where this replica is located</returns>
 internal virtual FilePath GetDir()
 {
     return(hasSubdirs ? DatanodeUtil.IdToBlockDir(baseDir, GetBlockId()) : baseDir);
 }