コード例 #1
0
 public ContainerTokenIdentifier(ContainerId containerID, string hostName, string
                                 appSubmitter, Resource r, long expiryTimeStamp, int masterKeyId, long rmIdentifier
                                 , Priority priority, long creationTime, LogAggregationContext logAggregationContext
                                 )
 {
     YarnSecurityTokenProtos.ContainerTokenIdentifierProto.Builder builder = YarnSecurityTokenProtos.ContainerTokenIdentifierProto
                                                                             .NewBuilder();
     if (containerID != null)
     {
         builder.SetContainerId(((ContainerIdPBImpl)containerID).GetProto());
     }
     builder.SetNmHostAddr(hostName);
     builder.SetAppSubmitter(appSubmitter);
     if (r != null)
     {
         builder.SetResource(((ResourcePBImpl)r).GetProto());
     }
     builder.SetExpiryTimeStamp(expiryTimeStamp);
     builder.SetMasterKeyId(masterKeyId);
     builder.SetRmIdentifier(rmIdentifier);
     if (priority != null)
     {
         builder.SetPriority(((PriorityPBImpl)priority).GetProto());
     }
     builder.SetCreationTime(creationTime);
     if (logAggregationContext != null)
     {
         builder.SetLogAggregationContext(((LogAggregationContextPBImpl)logAggregationContext
                                           ).GetProto());
     }
     proto = ((YarnSecurityTokenProtos.ContainerTokenIdentifierProto)builder.Build());
 }
コード例 #2
0
 /// <exception cref="System.IO.IOException"/>
 public override void ReadFields(DataInput @in)
 {
     proto = YarnSecurityTokenProtos.ContainerTokenIdentifierProto.ParseFrom((DataInputStream
                                                                              )@in);
 }