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


Fix it, then Ship it!




LGTM, left issues to give the async ship.


api/src/main/thrift/org/apache/aurora/gen/api.thrift (line 272)
<https://reviews.apache.org/r/46716/#comment194711>

    Can you document this, and call out which fields will be set/expected by 
which version(s) of Aurora?
    
    Presumably some of this information should go in the release notes as well.



src/main/resources/org/apache/aurora/scheduler/storage/db/QuotaMapper.xml (line 
39)
<https://reviews.apache.org/r/46716/#comment194717>

    I recently discovered that you can iterate over a `Map`, avoiding the 
`List<Pair<>>` trick.
    
    The syntax is something like:
    ```
    <foreach item="value" index="type" collection="values.entrySet" 
separator="),(">
      #{quotaId},
      #{type},
      #{value}
    </foreach>
    ```
    
    http://www.mybatis.org/mybatis-3/dynamic-sql.html#foreach
    > You can pass any Iterable object (for example List, Set, etc.), as well 
as any Map or Array object to foreach as collection parameter. When using an 
Iterable or Array, index will be the number of current iteration and value item 
will be the element retrieved in this iteration. When using a Map (or 
Collection of Map.Entry objects), index will be the key object and item will be 
the value object.


- Bill Farner


On April 26, 2016, 5:31 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46716/
> -----------------------------------------------------------
> 
> (Updated April 26, 2016, 5:31 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen, Bill Farner, and Zameer Manji.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Updating `ResourceAggregate` thrift schema to use the new `Resource` object. 
> This patch contains changes necessary to support schema migration. Changing 
> scheduler logic to take advantage of the new model will come separately.
> 
> 
> Diffs
> -----
> 
>   api/src/main/thrift/org/apache/aurora/gen/api.thrift 
> b1b2f1dc5e865347a4bb7f6d3ad7c53f566e7a22 
>   src/main/java/org/apache/aurora/scheduler/resources/ResourceAggregates.java 
> 302eb8713a3aa67953e5beef42d506309f0f1542 
>   src/main/java/org/apache/aurora/scheduler/storage/db/DbQuotaStore.java 
> ac63e67fa9770cc0de6f075e513f089a291f32f0 
>   src/main/java/org/apache/aurora/scheduler/storage/db/QuotaMapper.java 
> 3e5c4342a3a56f4a19d824d9219ec9f2a8142f75 
>   src/main/java/org/apache/aurora/scheduler/storage/db/TaskConfigManager.java 
> 17b249010f07865e50b49ecaf4b33f5118da231d 
>   
> src/main/java/org/apache/aurora/scheduler/storage/db/migration/V005_CreateQuotaResourceTable.java
>  PRE-CREATION 
>   
> src/main/java/org/apache/aurora/scheduler/storage/db/views/DBResourceAggregate.java
>  PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DBSaveQuota.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java 
> 39b6567e7e1e9c9aa37bb4027291a9732799791e 
>   src/main/java/org/apache/aurora/scheduler/storage/log/ThriftBackfill.java 
> 9c86aa061e3e9bf6b2268581a99831a9ed35f93d 
>   
> src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
>  14abebbd358b00ef956f759a2393ea338899bd57 
>   src/main/python/apache/aurora/client/api/__init__.py 
> bbbe67ba13c712aad96cd4c60249ca860cedb8b1 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/QuotaMapper.xml 
> 0283ec1d8fbb81f25439852a6a417f7d8ae01809 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql 
> 45ec1bff8f12d2991633f6227195869b8a9bc6b8 
>   src/test/java/org/apache/aurora/scheduler/quota/QuotaManagerImplTest.java 
> fc01821cbd5a273ee58133ec8873be48bfa81095 
>   src/test/java/org/apache/aurora/scheduler/resources/ResourceTestUtil.java 
> PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/stats/AsyncStatsModuleTest.java 
> fdd42b7f801923b798a2d532fcdac4c4e4abc160 
>   src/test/java/org/apache/aurora/scheduler/stats/ResourceCounterTest.java 
> 845de41c2dc332d3f1a25f37f3c7d25c3bf1014d 
>   src/test/java/org/apache/aurora/scheduler/stats/SlotSizeCounterTest.java 
> bbf10970d5c1a5011ae9b647e32efe3303395149 
>   
> src/test/java/org/apache/aurora/scheduler/storage/backup/StorageBackupTest.java
>  7b3f18563594d62265adeffac8fdd83c562ccb24 
>   src/test/java/org/apache/aurora/scheduler/storage/db/DbQuotaStoreTest.java 
> e0ec99583044b557b67312f442efdd6bf43e2c1a 
>   src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java 
> 7ac0b5873ac4730f4f220e0e7f37c5e66ee63d3a 
>   
> src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplIT.java
>  05168ba8587e87c4f9b5bfd932865b2dc4afad18 
>   
> src/test/java/org/apache/aurora/scheduler/storage/log/ThriftBackfillTest.java 
> cc039fbd4d6422fe7eab32f6092b57b268881c95 
>   
> src/test/java/org/apache/aurora/scheduler/storage/mem/StorageTransactionTest.java
>  ba5969a9128f5aff93c06ddc258f32a215d71f46 
>   src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java 
> 54585a9b4eb2d60eec4871cff23d82f404287882 
>   
> src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
>  acc68ae86b8edf306e21c6bbeda1a8bcefac4cb2 
>   src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
> d5648c91a13f63c13e2a6a9f105873e48b36b2cc 
>   src/test/python/apache/aurora/client/api/test_api.py 
> 9e2e2fa643785305960b6f7f3c99ea3eb7bfc19c 
> 
> Diff: https://reviews.apache.org/r/46716/diff/
> 
> 
> Testing
> -------
> 
> Tested in vagrant by upgrading and downgrading scheduler.
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>

Reply via email to