[ 
https://issues.apache.org/jira/browse/AURORA-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bill Farner resolved AURORA-1118.
---------------------------------
    Resolution: Won't Fix

A quick analysis confirmed [~maximk]'s hunch that this would not yield much:

I ran a benchmark before and after doing a quick-and-dirty conversion to use 
List rather than Set throughout:

Set result:
{noformat}
Result: 59948988.447 ±(99.9%) 489527.887 ns/op [Average]
  Statistics: (min, avg, max) = (57612694.800, 59948988.447, 65466900.294), 
stdev = 1443384.122
  Confidence interval (99.9%): [59459460.560, 60438516.333]


# Run complete. Total time: 00:07:03

Benchmark                                                                       
       Mode  Samples         Score        Error  Units
o.a.a.b.SchedulingBenchmarks.ConstraintMismatchsSchedulingBenchmark.runBenchmark
       avgt      100   5926822.585 ±  58390.192  ns/op
o.a.a.b.SchedulingBenchmarks.InsufficientResourcesSchedulingBenchmark.runBenchmark
     avgt      100   5094918.444 ±  40591.958  ns/op
o.a.a.b.SchedulingBenchmarks.PreemptorFallbackForLargeClusterBenchmark.runBenchmark
    avgt      100  59948988.447 ± 489527.887  ns/op
{noformat}

List result:
{noformat}
Result: 57654212.383 ±(99.9%) 710674.694 ns/op [Average]
  Statistics: (min, avg, max) = (55722676.350, 57654212.383, 73258144.875), 
stdev = 2095440.520
  Confidence interval (99.9%): [56943537.689, 58364887.077]


# Run complete. Total time: 00:07:02

Benchmark                                                                       
       Mode  Samples         Score        Error  Units
o.a.a.b.SchedulingBenchmarks.ConstraintMismatchsSchedulingBenchmark.runBenchmark
       avgt      100   6095883.706 ±  56989.227  ns/op
o.a.a.b.SchedulingBenchmarks.InsufficientResourcesSchedulingBenchmark.runBenchmark
     avgt      100   5160305.479 ±  49398.474  ns/op
o.a.a.b.SchedulingBenchmarks.PreemptorFallbackForLargeClusterBenchmark.runBenchmark
    avgt      100  57654212.383 ± 710674.694  ns/op
{noformat}

The improvement appears to be negligible.

> Consider changing TaskStore interfaces to return Iterables instead of Sets
> --------------------------------------------------------------------------
>
>                 Key: AURORA-1118
>                 URL: https://issues.apache.org/jira/browse/AURORA-1118
>             Project: Aurora
>          Issue Type: Story
>          Components: Scheduler
>            Reporter: Bill Farner
>              Labels: newbie
>
> TaskStore.Mutable currently has two APIs that return Sets:
> {code}
> ImmutableSet<IScheduledTask> fetchTasks(Query.Builder query);
> ImmutableSet<IScheduledTask> mutateTasks(
>     Query.Builder query,
>     Function<IScheduledTask, IScheduledTask> mutator);
> {code}
> If the store provides an expectation of unique values, we should be able to 
> save a decent amount of overhead by avoiding the Set computation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to