> On March 7, 2014, 4:56 p.m., Bill Farner wrote:
> > src/main/thrift/org/apache/aurora/gen/api.thrift, line 182
> > <https://reviews.apache.org/r/18935/diff/1/?file=513979#file513979line182>
> >
> >     Does a map make sense instead?
> 
> Maxim Khutornenko wrote:
>     Thought about that but decided in favor of set as a more extensible 
> approach (i.e. in case we decide to add a timestamp or any other attribute).
> 
> Maxim Khutornenko wrote:
>     I am fine either way. Kevin, what's your take on it?

A map implies more constraints than a set of 2-tuples (i.e. uniqueness of keys 
and 1-value-per-key). So the question is whether this should be a multimap. 
Given that elsewhere in the mesos and aurora APIs multimaps have proven useful 
I'm inclined to go with maxim's approach (and with the explicit understanding 
that these are multimaps). Then the package example becomes:

metadata = set([
  Metadata('package', 'app-0.1'),
  Metadata('package', 'stats-collector-2.0'),
  Metadata('approved_by', 'wfarner'),
])


- Kevin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18935/#review36589
-----------------------------------------------------------


On March 7, 2014, 6:10 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18935/
> -----------------------------------------------------------
> 
> (Updated March 7, 2014, 6:10 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney, Suman Karumuri, and Bill Farner.
> 
> 
> Bugs: AURORA-158
>     https://issues.apache.org/jira/browse/AURORA-158
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Part 1 of converting from Packages to Metadata.
> 
> Dual read from packages and metadata during the migration period.
> Client side changes will be addressed in Part 2.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/http/SchedulerzJob.java 
> c14e19513f6b1cd16d40c81d6c027ef495a16ee9 
>   src/main/java/org/apache/aurora/scheduler/http/SchedulerzRole.java 
> 60b2259f21b598fa38bec5a590516cba2c07e1ac 
>   src/main/java/org/apache/aurora/scheduler/http/TransformationUtils.java 
> b6ee04ed8dc98f0fe47fabfd607d884ee1053bc5 
>   
> src/main/java/org/apache/aurora/scheduler/local/IsolatedSchedulerModule.java 
> fe2965d674c6282d936b3f1b02949aab35978134 
>   src/main/resources/org/apache/aurora/scheduler/http/schedulerzrole.st 
> d568a7e1bc836520bb21f28a329701ae37d59165 
>   src/main/thrift/org/apache/aurora/gen/api.thrift 
> d72b28c3378a651a8cff49216c1435ce7aee5977 
>   
> src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
>  4beb2cf2bcf8b902486b802ab0123541085a95e5 
>   src/test/resources/org/apache/aurora/gen/api.thrift.md5 
> 2308ba8da96197d41040ba772ea871003615698a 
> 
> Diff: https://reviews.apache.org/r/18935/diff/
> 
> 
> Testing
> -------
> 
> gradle build
> gradle run
> 
> 
> File Attachments
> ----------------
> 
> Role
>   
> https://reviews.apache.org/media/uploaded/files/2014/03/08/790daac1-89ac-436f-8c92-5e5dc7483154__Metadata_Role.png
> Job
>   
> https://reviews.apache.org/media/uploaded/files/2014/03/08/7ca45940-666f-439b-867f-b89f42b11a38__Metadata_Job.png
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>

Reply via email to