/// <summary>Process the Delegation Token related section in fsimage.</summary> /// <param name="in">DataInputStream to process</param> /// <param name="v">Visitor to walk over records</param> /// <exception cref="System.IO.IOException"/> private void ProcessDelegationTokens(DataInputStream @in, ImageVisitor v) { v.Visit(ImageVisitor.ImageElement.CurrentDelegationKeyId, @in.ReadInt()); int numDKeys = @in.ReadInt(); v.VisitEnclosingElement(ImageVisitor.ImageElement.DelegationKeys, ImageVisitor.ImageElement .NumDelegationKeys, numDKeys); for (int i = 0; i < numDKeys; i++) { DelegationKey key = new DelegationKey(); key.ReadFields(@in); v.Visit(ImageVisitor.ImageElement.DelegationKey, key.ToString()); } v.LeaveEnclosingElement(); v.Visit(ImageVisitor.ImageElement.DelegationTokenSequenceNumber, @in.ReadInt()); int numDTokens = @in.ReadInt(); v.VisitEnclosingElement(ImageVisitor.ImageElement.DelegationTokens, ImageVisitor.ImageElement .NumDelegationTokens, numDTokens); for (int i_1 = 0; i_1 < numDTokens; i_1++) { DelegationTokenIdentifier id = new DelegationTokenIdentifier(); id.ReadFields(@in); long expiryTime = @in.ReadLong(); v.VisitEnclosingElement(ImageVisitor.ImageElement.DelegationTokenIdentifier); v.Visit(ImageVisitor.ImageElement.DelegationTokenIdentifierKind, id.GetKind().ToString ()); v.Visit(ImageVisitor.ImageElement.DelegationTokenIdentifierSeqno, id.GetSequenceNumber ()); v.Visit(ImageVisitor.ImageElement.DelegationTokenIdentifierOwner, id.GetOwner().ToString ()); v.Visit(ImageVisitor.ImageElement.DelegationTokenIdentifierRenewer, id.GetRenewer ().ToString()); v.Visit(ImageVisitor.ImageElement.DelegationTokenIdentifierRealuser, id.GetRealUser ().ToString()); v.Visit(ImageVisitor.ImageElement.DelegationTokenIdentifierIssueDate, id.GetIssueDate ()); v.Visit(ImageVisitor.ImageElement.DelegationTokenIdentifierMaxDate, id.GetMaxDate ()); v.Visit(ImageVisitor.ImageElement.DelegationTokenIdentifierExpiryTime, expiryTime ); v.Visit(ImageVisitor.ImageElement.DelegationTokenIdentifierMasterKeyId, id.GetMasterKeyId ()); v.LeaveEnclosingElement(); } // DELEGATION_TOKEN_IDENTIFIER v.LeaveEnclosingElement(); }