> On Nov. 2, 2012, 4:36 a.m., Alessandro Presta wrote: > > I'm not sure how I feel about using MasterCompute for something other than > > computation. I guess it gets the job done but I wonder if we should have a > > better place for this sort of code (like a MasterContext or whatever). It's > > just a matter of separating the roles. > > Other than that, the code looks good.
Actually I started it exactly that way but Maja said it's easiser / cleaner to just add the method to MasterCompute rather than create a separate MasterContext object. > On Nov. 2, 2012, 4:36 a.m., Alessandro Presta wrote: > > giraph/src/main/java/org/apache/giraph/counters/GiraphStats.java, line 178 > > <https://reviews.apache.org/r/7762/diff/3/?file=183499#file183499line178> > > > > Mmh, isn't there anything more compact than this? > > I guess you could keep the counters in an array/ArrayList, and have > > constants like SUPERSTEP = 0, VERTICES = 1. > > That way you don't even need the inner class, just build an Iterator > > from the array on the fly. Did same in GiraphTimers too. - Nitay ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7762/#review13024 ----------------------------------------------------------- On Oct. 31, 2012, 7:43 p.m., Nitay Joffe wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/7762/ > ----------------------------------------------------------- > > (Updated Oct. 31, 2012, 7:43 p.m.) > > > Review request for giraph. > > > Description > ------- > > GIRAPH-390: MasterCompute postApplication callback. > > > Diffs > ----- > > giraph/src/main/java/org/apache/giraph/counters/GiraphHadoopCounter.java > PRE-CREATION > giraph/src/main/java/org/apache/giraph/counters/GiraphStats.java > PRE-CREATION > giraph/src/main/java/org/apache/giraph/counters/GiraphTimers.java > PRE-CREATION > giraph/src/main/java/org/apache/giraph/counters/HadoopCountersBase.java > PRE-CREATION > giraph/src/main/java/org/apache/giraph/counters/package-info.java > PRE-CREATION > giraph/src/main/java/org/apache/giraph/graph/BspServiceMaster.java > 98a0bd2c6dc9602ea17612d4f68461d5fa43fb00 > giraph/src/main/java/org/apache/giraph/graph/MasterCompute.java > 9de23ad4a7781d6342339f26f44fb1c1d9bce2b0 > giraph/src/main/java/org/apache/giraph/graph/MasterThread.java > 85842d0ab59330d95b843c440f2d5705b41e0d1b > giraph/src/main/java/org/apache/giraph/metrics/EmptyMetricsRegistry.java > 262db29bbd4797e470f426999b85f2c1a7d1dee3 > giraph/src/main/java/org/apache/giraph/metrics/GiraphMetrics.java > ea1cc1ef69aaa2c786b99de51cd30e39ee9f1620 > giraph/src/main/java/org/apache/giraph/metrics/NoOpMetricsRegistry.java > PRE-CREATION > giraph/src/main/java/org/apache/giraph/metrics/package-info.java > f7529f52527e8e4253f579bd6d01865aa980926b > > Diff: https://reviews.apache.org/r/7762/diff/ > > > Testing > ------- > > > Thanks, > > Nitay Joffe > >
