Ejemplo n.º 1
0
        /// <exception cref="System.IO.IOException"/>
        internal EditLogBackupOutputStream(NamenodeRegistration bnReg, JournalInfo journalInfo
                                           )
            : base()
        {
            // RPC proxy to backup node
            // backup node registration
            // active node registration
            // serialized output sent to backup node
            // backup node
            // active name-node
            this.bnRegistration = bnReg;
            this.journalInfo    = journalInfo;
            IPEndPoint bnAddress = NetUtils.CreateSocketAddr(bnRegistration.GetAddress());

            try
            {
                this.backupNode = NameNodeProxies.CreateNonHAProxy <JournalProtocol>(new HdfsConfiguration
                                                                                         (), bnAddress, UserGroupInformation.GetCurrentUser(), true).GetProxy();
            }
            catch (IOException e)
            {
                Storage.Log.Error("Error connecting to: " + bnAddress, e);
                throw;
            }
            this.doubleBuf = new EditsDoubleBuffer(DefaultBufferSize);
            this.@out      = new DataOutputBuffer(DefaultBufferSize);
        }
Ejemplo n.º 2
0
 public JournalProtocolServerSideTranslatorPB(JournalProtocol impl)
 {
     this.impl = impl;
 }