aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Sirois" <john.sir...@gmail.com>
Subject Re: Review Request 40786: Replace manual Forwarding* with `@Forward`.
Date Mon, 07 Dec 2015 21:55:57 GMT

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

(Updated Dec. 7, 2015, 2:55 p.m.)


Review request for Aurora, Bill Farner and Zameer Manji.


Changes
-------

Update to forward-1.0.0 on maven central.

 build.gradle | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)


Repository: aurora


Description
-------

This is a bit of a straw man.  While working on
https://issues.apache.org/jira/browse/AURORA-987 I found the need for
`javapoet` and this project spun off the side.

See the `@Forward` README here for more info: https://github.com/perkuno/forward

Although I think the end result is desirable, this change does add a
dependency on a personal project.  I fancied up the presentation with a
custom org, but its still a personal project. I'd be happy enough to
move the `@Forward` code over to aurora, but it would require a seperate
gradle module to ensure the annotation processor is compiled ahead of
the main module that would use it.

So kick the tires and let me know what you think.

 build.gradle                                                                  |   6 +-
 src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java        | 185 ------------------------------
 src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java  |  13 ++-
 src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java    | 309 --------------------------------------------------
 src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java |   5 +-
 5 files changed, 20 insertions(+), 498 deletions(-)


Diffs (updated)
-----

  build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6 
  src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e

  src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503

  src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java 2de178302d3c9aa9a7b23a9eb7ecb6e2f3b40819

  src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2


Diff: https://reviews.apache.org/r/40786/diff/


Testing
-------

Green locally `./build-support/jenkins/build.sh`.

An example of the generated code:
```java
@Generated("uno.perk.forward.apt.Processor")
class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin {
  protected final AnnotatedAuroraAdmin annotatedAuroraAdmin;

  MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) {
    this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin);
  }

  @Override
  public Response getRoleSummary() throws TException {
    return this.annotatedAuroraAdmin.getRoleSummary();
  }
...
```


Thanks,

John Sirois


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message