コード例 #1
0
ファイル: Statistics.cs プロジェクト: sherryshare/Naiad
            public Reporting(
                ShardContext <T> c, Stream <string, T> inlineStats,
                Stream <Pair <string, ReportingRecord <Int64> >, T> aggInt, Stream <Pair <string, ReportingRecord <double> >, T> aggDouble)
            {
                context = c;

                if (c.parent.parent.manager.Reporting.HasDomain)
                {
                    rootShard = c.parent.parent.manager.Reporting.RootDomainShard(c.Shard.VertexId);
                }
                else
                {
                    rootShard = null;
                }

                if (inlineStats == null)
                {
                    inlineStatistics = null;
                }
                else
                {
                    inlineStatistics = new Frameworks.VertexOutputBuffer <string, T>(c.Shard);
                    inlineStats.StageOutput.Register(inlineStatistics);
                }

                if (aggInt == null)
                {
                    aggregateInt    = null;
                    aggregateDouble = null;
                }
                else
                {
                    aggregateInt = new Frameworks.VertexOutputBuffer <Pair <string, ReportingRecord <long> >, T>(c.Shard);
                    aggInt.StageOutput.Register(aggregateInt);
                    aggregateDouble = new Frameworks.VertexOutputBuffer <Pair <string, ReportingRecord <double> >, T>(c.Shard);
                    aggDouble.StageOutput.Register(aggregateDouble);
                }
            }
コード例 #2
0
ファイル: Statistics.cs プロジェクト: sherryshare/Naiad
 public AggregateStatisticsShard(int index, Stage <T> parent)
     : base(index, parent)
 {
     output = new Frameworks.VertexOutputBuffer <Pair <string, ReportingRecord <R> >, T>(this);
 }