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



src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
<https://reviews.apache.org/r/17562/#comment65681>

    The cluster name string is bound, annotated with @ClusterName, so you can 
avoid the plumbing and just:
    
      @Inject
      @ClusterName
      private String clusterName;
    
    In the target classes.



src/main/java/org/apache/aurora/scheduler/thrift/aop/APIVersionInterceptor.java
<https://reviews.apache.org/r/17562/#comment65682>

    Please inject this.



src/main/java/org/apache/aurora/scheduler/thrift/aop/APIVersionInterceptor.java
<https://reviews.apache.org/r/17562/#comment65683>

    I'm not sure why we did the null check in the first place, but i can't 
think of a good reason for upstream code to be setting this to anything other 
than these values.  I say blindly overwrite anything already set for both.



src/main/thrift/org/apache/aurora/gen/api.thrift
<https://reviews.apache.org/r/17562/#comment65689>

    This was previously intentionally i32, why the change?



src/test/java/org/apache/aurora/scheduler/thrift/aop/APIVersionInterceptorTest.java
<https://reviews.apache.org/r/17562/#comment65688>

    This helper looks like it would get some mileage in here:
    
      private static Response okResponse(Result result) {
        return new Response()
            .setResponseCode(OK)
            .setResult(result);
      }



src/test/java/org/apache/aurora/scheduler/thrift/aop/APIVersionInterceptorTest.java
<https://reviews.apache.org/r/17562/#comment65684>

    s/final //



src/test/java/org/apache/aurora/scheduler/thrift/aop/APIVersionInterceptorTest.java
<https://reviews.apache.org/r/17562/#comment65685>

    This line is redundant with the line below.



src/test/java/org/apache/aurora/scheduler/thrift/aop/APIVersionInterceptorTest.java
<https://reviews.apache.org/r/17562/#comment65686>

    Rather than piecemeal equality checks, check the whole message.  This is 
more future-proof as fields are added:
    
      assertEquals(expectedServerInfo, decoratedRsponse.serverInfo);



src/test/java/org/apache/aurora/scheduler/thrift/aop/APIVersionInterceptorTest.java
<https://reviews.apache.org/r/17562/#comment65687>

    The line break style here is rather arbitrary.  Consider this instead:
    
      Response response = new Response()
        .setResponseCode(OK)
        .setResult(Result.getJobsResult(
            new GetJobsResult()
                .setConfigs(ImmutableSet.<JobConfiguration>of())))
                .setServerInfo(
                    new ServerInfo()
                        .setClusterName(CLUSTER_NAME)
                        .setThriftAPIVersion(thriftVersion));
    
    Here, the wrap level directly reflects the nesting depth, and future 
addition of chained or nested method calls does not trigger a ripple.


- Bill Farner


On Feb. 20, 2014, 9:53 p.m., Suman Karumuri wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17562/
> -----------------------------------------------------------
> 
> (Updated Feb. 20, 2014, 9:53 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-120
>     https://issues.apache.org/jira/browse/AURORA-120
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Added getInfo API that returns page title and thrift API version.
> 
> Added a TitleController to UI to set the page title. The controller queries 
> the getInfo API to get the clusterName which is now included in the page 
> title.
> 
> Deprecated getVersion API in favor of getInfo to obtain the thrift API 
> version. 
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
> ec56c649116c03ef148bac916bd6691a94685bc3 
>   src/main/java/org/apache/aurora/scheduler/thrift/ThriftModule.java 
> 12113532eb062308af3c43458661c7b43b23237f 
>   
> src/main/java/org/apache/aurora/scheduler/thrift/aop/APIVersionInterceptor.java
>  e3e050e493e4a69e1d424d3382cb37f7ce6b7a4c 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/AopModule.java 
> c68977a7cef99a31baca2043618df304298b407e 
>   src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js 
> 1916ff9c02216da906af4e6164212faeff37995e 
>   src/main/resources/org/apache/aurora/scheduler/http/ui/js/services.js 
> a0385e95c8c1fc950f507511377dcebe35f258a7 
>   src/main/thrift/org/apache/aurora/gen/api.thrift 
> 43a24969887b891339c97d4a0a055488c9188a5d 
>   
> src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
>  656e44eb51508c7ab05af8b91e9dcec216d48984 
>   src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
> 2254574a91c5a7bf2ddc7d8a7d31c3e4e360486d 
>   
> src/test/java/org/apache/aurora/scheduler/thrift/aop/APIVersionInterceptorTest.java
>  2f0b6716fe2999c34c0351f03b6b4c1532eafee0 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/AopModuleTest.java 
> d93ac53ec15863f2ee0e0ebc4737d8f4f8e4be9d 
>   src/test/resources/org/apache/aurora/gen/api.thrift.md5 
> 10f5cdab16230e66ac7c9fab199e2dd2564248da 
> 
> Diff: https://reviews.apache.org/r/17562/diff/
> 
> 
> Testing
> -------
> 
> gradle clean build.
> gradle run.
> 
> 
> Thanks,
> 
> Suman Karumuri
> 
>

Reply via email to