ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower" <tbeerbo...@hortonworks.com>
Subject Re: Review Request 21795: Add filter by regex and sort capabilities to API
Date Thu, 22 May 2014 13:10:56 GMT

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



ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java
<https://reviews.apache.org/r/21795/#comment78000>

    The patch looks really good.
    
    Do you think that for the API function name that 'matches' would be a better choice than
'filter'?  I think that it reads better (i.e. get all the hosts where hostname matches regex),
and it would be in line with Java String.matches(regex).
    
    I'm not suggesting renaming any of the classes (operator or predicate), just change the
function name for the API if you agree.
    
    Otherwise, the patch looks great. 


- Tom Beerbower


On May 22, 2014, 1:11 a.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21795/
> -----------------------------------------------------------
> 
> (Updated May 22, 2014, 1:11 a.m.)
> 
> 
> Review request for Ambari, Mahadev Konar, Nate Cole, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-5799
>     https://issues.apache.org/jira/browse/AMBARI-5799
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Use cases:
> 
>     Ability to filter by hostname and IP address, CPU, RAM, Load Avg. Regex would be
ideal as that's what the UI supports today.
>     Ability to sort asc/desc by hostname and IP address, CPU, RAM, Disk Usage, Load Avg
> 
> Proposed changes:
> 
>     New operator: <propertyId>.filter(expression)
>     New query parameter: &sortBy=<propertyId>.<ASC/DESC>,<propertyId>.<ASC/DESC>
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/handlers/ReadHandler.java
d5717a6 
>   ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java
4ab75aa 
>   ambari-server/src/main/java/org/apache/ambari/server/api/predicate/operators/FilterOperator.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/predicate/operators/Operator.java
b3ced7a 
>   ambari-server/src/main/java/org/apache/ambari/server/api/predicate/operators/RelationalOperatorFactory.java
4004ec3 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/Query.java b1dfa3d 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java 0dda747

>   ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseRequest.java
71c6f68 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/Request.java bb53cf6

>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java
f49c890 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PageRequestImpl.java
693d746 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/SortRequestImpl.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/ComparisonPredicate.java
345b906 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/FilterPredicate.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ClusterController.java
f6f94ff 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/PageRequest.java
dd97829 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/SortRequest.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/SortRequestProperty.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/handlers/ReadHandlerTest.java
782e128 
>   ambari-server/src/test/java/org/apache/ambari/server/api/predicate/QueryParserTest.java
a37114e 
>   ambari-server/src/test/java/org/apache/ambari/server/api/predicate/operators/FilterOperatorTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java
335f101 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PageRequestImplTest.java
95f0866 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/FilterPredicateTest.java
PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/21795/diff/
> 
> 
> Testing
> -------
> 
> 
> Tests run: 1616, Failures: 0, Errors: 0, Skipped: 12
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


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