예제 #1
0
 /// <exception cref="System.IO.IOException"/>
 private void DumpNameSection(InputStream @in)
 {
     FsImageProto.NameSystemSection s = FsImageProto.NameSystemSection.ParseDelimitedFrom
                                            (@in);
     @out.Write("<NameSection>\n");
     O("genstampV1", s.GetGenstampV1()).O("genstampV2", s.GetGenstampV2()).O("genstampV1Limit"
                                                                             , s.GetGenstampV1Limit()).O("lastAllocatedBlockId", s.GetLastAllocatedBlockId())
     .O("txid", s.GetTransactionId());
     @out.Write("</NameSection>\n");
 }
예제 #2
0
            /// <exception cref="System.IO.IOException"/>
            private void LoadNameSystemSection(InputStream @in)
            {
                FsImageProto.NameSystemSection s = FsImageProto.NameSystemSection.ParseDelimitedFrom
                                                       (@in);
                BlockIdManager blockIdManager = fsn.GetBlockIdManager();

                blockIdManager.SetGenerationStampV1(s.GetGenstampV1());
                blockIdManager.SetGenerationStampV2(s.GetGenstampV2());
                blockIdManager.SetGenerationStampV1Limit(s.GetGenstampV1Limit());
                blockIdManager.SetLastAllocatedBlockId(s.GetLastAllocatedBlockId());
                imgTxId = s.GetTransactionId();
                if (s.HasRollingUpgradeStartTime() && fsn.GetFSImage().HasRollbackFSImage())
                {
                    // we set the rollingUpgradeInfo only when we make sure we have the
                    // rollback image
                    fsn.SetRollingUpgradeInfo(true, s.GetRollingUpgradeStartTime());
                }
            }