Exemplo n.º 1
0
 /// <summary>Load the fsimage from a temp file</summary>
 /// <exception cref="System.IO.IOException"/>
 private void LoadFSImageFromTempFile(FilePath imageFile)
 {
     FSImageFormat.LoaderDelegator loader = FSImageFormat.NewLoader(conf, fsn);
     fsn.WriteLock();
     fsn.GetFSDirectory().WriteLock();
     try
     {
         loader.Load(imageFile, false);
         FSImage.UpdateCountForQuota(fsn.GetBlockManager().GetStoragePolicySuite(), INodeDirectory
                                     .ValueOf(fsn.GetFSDirectory().GetINode("/"), "/"));
     }
     finally
     {
         fsn.GetFSDirectory().WriteUnlock();
         fsn.WriteUnlock();
     }
 }