Ejemplo n.º 1
0
        private IList <IList <int> > GetNumBlocksReport(int namesystemIdx)
        {
            IList <IList <int> > results = new AList <IList <int> >();
            string bpid = cluster.GetNamesystem(namesystemIdx).GetBlockPoolId();
            IList <IDictionary <DatanodeStorage, BlockListAsLongs> > blockReports = cluster.GetAllBlockReports
                                                                                        (bpid);

            foreach (IDictionary <DatanodeStorage, BlockListAsLongs> datanodeReport in blockReports)
            {
                IList <int> numBlocksPerDN = new AList <int>();
                foreach (BlockListAsLongs blocks in datanodeReport.Values)
                {
                    numBlocksPerDN.AddItem(blocks.GetNumberOfBlocks());
                }
                results.AddItem(numBlocksPerDN);
            }
            return(results);
        }