You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@falcon.apache.org by Ajay Yadava <aj...@gmail.com> on 2014/11/27 05:57:42 UTC

Review Request 28498: FALCON: 914 Add fuzzy search for entities

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

Review request for Falcon.


Bugs: https://issues.apache.org/jira/browse/FALCON-914
    https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/FALCON-914


Repository: falcon-git


Description
-------

A lot of times users end up doing a list of all entities of a given type and do grep -i on it. We should add ability for doing a case insensitive fuzzy search for users to search for entities when they don't remember the exact entity name. We can add this as another option to list
e.g. falcon entity -list -type process -pattern hourly
and this should match the following process name.
My-Hourly-Summary
For fuzzy search like functionality:
falcon entity -list -type process -pattern mhs
should also match the above process name


Diffs
-----

  client/src/main/java/org/apache/falcon/cli/FalconCLI.java c4fc20f 
  client/src/main/java/org/apache/falcon/client/FalconClient.java 9a286ed 
  docs/src/site/twiki/restapi/EntityList.twiki b569ade 
  prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java 8cf4701 
  prism/src/main/java/org/apache/falcon/resource/AbstractSchedulableEntityManager.java d994e25 
  prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java fb9d9f3 
  prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java e39947a 
  webapp/src/main/java/org/apache/falcon/resource/SchedulableEntityManager.java 5f4f495 
  webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java 0bcb525 

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


Testing
-------

Added detailed unit tests and integration tests for the changes.


Thanks,

Ajay Yadava


Re: Review Request 28498: FALCON: 914 Add fuzzy search for entities

Posted by Ajay Yadava <aj...@gmail.com>.

> On Dec. 26, 2014, 3:52 a.m., Srikanth Sundarrajan wrote:
> > prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java, line 643
> > <https://reviews.apache.org/r/28498/diff/3/?file=792177#file792177line643>
> >
> >     Why is this in package protected scope ?

So that it can be accessed in tests. There are tests to check the search functionality "EntityManagerTest::testSearch"


- Ajay


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


On Dec. 15, 2014, 3:52 p.m., Ajay Yadava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28498/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2014, 3:52 p.m.)
> 
> 
> Review request for Falcon.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/FALCON-914
>     https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/FALCON-914
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> A lot of times users end up doing a list of all entities of a given type and do grep -i on it. We should add ability for doing a case insensitive fuzzy search for users to search for entities when they don't remember the exact entity name. We can add this as another option to list
> e.g. falcon entity -list -type process -pattern hourly
> and this should match the following process name.
> My-Hourly-Summary
> For fuzzy search like functionality:
> falcon entity -list -type process -pattern mhs
> should also match the above process name
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/falcon/cli/FalconCLI.java 93776d3 
>   client/src/main/java/org/apache/falcon/client/FalconClient.java 23c8943 
>   docs/src/site/twiki/restapi/EntityList.twiki b569ade 
>   prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java b6e1cec 
>   prism/src/main/java/org/apache/falcon/resource/AbstractSchedulableEntityManager.java d994e25 
>   prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java fb9d9f3 
>   prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java 1862e39 
>   webapp/src/main/java/org/apache/falcon/resource/SchedulableEntityManager.java 5f4f495 
>   webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java a3acbdb 
> 
> Diff: https://reviews.apache.org/r/28498/diff/
> 
> 
> Testing
> -------
> 
> Added detailed unit tests and integration tests for the changes.
> 
> 
> Thanks,
> 
> Ajay Yadava
> 
>


Re: Review Request 28498: FALCON: 914 Add fuzzy search for entities

Posted by Srikanth Sundarrajan <sr...@hotmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28498/#review66119
-----------------------------------------------------------



prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
<https://reviews.apache.org/r/28498/#comment109476>

    Why is this in package protected scope ?


- Srikanth Sundarrajan


On Dec. 15, 2014, 3:52 p.m., Ajay Yadava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28498/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2014, 3:52 p.m.)
> 
> 
> Review request for Falcon.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/FALCON-914
>     https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/FALCON-914
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> A lot of times users end up doing a list of all entities of a given type and do grep -i on it. We should add ability for doing a case insensitive fuzzy search for users to search for entities when they don't remember the exact entity name. We can add this as another option to list
> e.g. falcon entity -list -type process -pattern hourly
> and this should match the following process name.
> My-Hourly-Summary
> For fuzzy search like functionality:
> falcon entity -list -type process -pattern mhs
> should also match the above process name
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/falcon/cli/FalconCLI.java 93776d3 
>   client/src/main/java/org/apache/falcon/client/FalconClient.java 23c8943 
>   docs/src/site/twiki/restapi/EntityList.twiki b569ade 
>   prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java b6e1cec 
>   prism/src/main/java/org/apache/falcon/resource/AbstractSchedulableEntityManager.java d994e25 
>   prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java fb9d9f3 
>   prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java 1862e39 
>   webapp/src/main/java/org/apache/falcon/resource/SchedulableEntityManager.java 5f4f495 
>   webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java a3acbdb 
> 
> Diff: https://reviews.apache.org/r/28498/diff/
> 
> 
> Testing
> -------
> 
> Added detailed unit tests and integration tests for the changes.
> 
> 
> Thanks,
> 
> Ajay Yadava
> 
>


Re: Review Request 28498: FALCON: 914 Add fuzzy search for entities

Posted by Srikanth Sundarrajan <sr...@hotmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28498/#review66129
-----------------------------------------------------------

Ship it!


- Srikanth Sundarrajan


On Dec. 15, 2014, 3:52 p.m., Ajay Yadava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28498/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2014, 3:52 p.m.)
> 
> 
> Review request for Falcon.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/FALCON-914
>     https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/FALCON-914
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> A lot of times users end up doing a list of all entities of a given type and do grep -i on it. We should add ability for doing a case insensitive fuzzy search for users to search for entities when they don't remember the exact entity name. We can add this as another option to list
> e.g. falcon entity -list -type process -pattern hourly
> and this should match the following process name.
> My-Hourly-Summary
> For fuzzy search like functionality:
> falcon entity -list -type process -pattern mhs
> should also match the above process name
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/falcon/cli/FalconCLI.java 93776d3 
>   client/src/main/java/org/apache/falcon/client/FalconClient.java 23c8943 
>   docs/src/site/twiki/restapi/EntityList.twiki b569ade 
>   prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java b6e1cec 
>   prism/src/main/java/org/apache/falcon/resource/AbstractSchedulableEntityManager.java d994e25 
>   prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java fb9d9f3 
>   prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java 1862e39 
>   webapp/src/main/java/org/apache/falcon/resource/SchedulableEntityManager.java 5f4f495 
>   webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java a3acbdb 
> 
> Diff: https://reviews.apache.org/r/28498/diff/
> 
> 
> Testing
> -------
> 
> Added detailed unit tests and integration tests for the changes.
> 
> 
> Thanks,
> 
> Ajay Yadava
> 
>


Re: Review Request 28498: FALCON: 914 Add fuzzy search for entities

Posted by Ajay Yadava <aj...@gmail.com>.

> On Dec. 15, 2014, 7:10 p.m., shaik idris wrote:
> > prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java, line 626
> > <https://reviews.apache.org/r/28498/diff/3/?file=792177#file792177line626>
> >
> >     prefer to check if (StringUtils.isNotEmpty(pattern) && !fuzzySearch(entity.getName()){ continue;}

If I understand your feedback correctly, it seems that you are suggesting me to move the empty checks from fuzzySearch to the call time. I think it is better to have it at the fuzzySearch level as that way the search function is more robust and different callers don't need to repeat same checks.


- Ajay


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


On Dec. 15, 2014, 3:52 p.m., Ajay Yadava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28498/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2014, 3:52 p.m.)
> 
> 
> Review request for Falcon.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/FALCON-914
>     https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/FALCON-914
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> A lot of times users end up doing a list of all entities of a given type and do grep -i on it. We should add ability for doing a case insensitive fuzzy search for users to search for entities when they don't remember the exact entity name. We can add this as another option to list
> e.g. falcon entity -list -type process -pattern hourly
> and this should match the following process name.
> My-Hourly-Summary
> For fuzzy search like functionality:
> falcon entity -list -type process -pattern mhs
> should also match the above process name
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/falcon/cli/FalconCLI.java 93776d3 
>   client/src/main/java/org/apache/falcon/client/FalconClient.java 23c8943 
>   docs/src/site/twiki/restapi/EntityList.twiki b569ade 
>   prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java b6e1cec 
>   prism/src/main/java/org/apache/falcon/resource/AbstractSchedulableEntityManager.java d994e25 
>   prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java fb9d9f3 
>   prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java 1862e39 
>   webapp/src/main/java/org/apache/falcon/resource/SchedulableEntityManager.java 5f4f495 
>   webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java a3acbdb 
> 
> Diff: https://reviews.apache.org/r/28498/diff/
> 
> 
> Testing
> -------
> 
> Added detailed unit tests and integration tests for the changes.
> 
> 
> Thanks,
> 
> Ajay Yadava
> 
>


Re: Review Request 28498: FALCON: 914 Add fuzzy search for entities

Posted by shaik idris <ps...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28498/#review65104
-----------------------------------------------------------



prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
<https://reviews.apache.org/r/28498/#comment108054>

    prefer to check if (StringUtils.isNotEmpty(pattern) && !fuzzySearch(entity.getName()){ continue;}



prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
<https://reviews.apache.org/r/28498/#comment108058>

    These checks can be removed.


- shaik idris


On Dec. 15, 2014, 3:52 p.m., Ajay Yadava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28498/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2014, 3:52 p.m.)
> 
> 
> Review request for Falcon.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/FALCON-914
>     https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/FALCON-914
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> A lot of times users end up doing a list of all entities of a given type and do grep -i on it. We should add ability for doing a case insensitive fuzzy search for users to search for entities when they don't remember the exact entity name. We can add this as another option to list
> e.g. falcon entity -list -type process -pattern hourly
> and this should match the following process name.
> My-Hourly-Summary
> For fuzzy search like functionality:
> falcon entity -list -type process -pattern mhs
> should also match the above process name
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/falcon/cli/FalconCLI.java 93776d3 
>   client/src/main/java/org/apache/falcon/client/FalconClient.java 23c8943 
>   docs/src/site/twiki/restapi/EntityList.twiki b569ade 
>   prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java b6e1cec 
>   prism/src/main/java/org/apache/falcon/resource/AbstractSchedulableEntityManager.java d994e25 
>   prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java fb9d9f3 
>   prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java 1862e39 
>   webapp/src/main/java/org/apache/falcon/resource/SchedulableEntityManager.java 5f4f495 
>   webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java a3acbdb 
> 
> Diff: https://reviews.apache.org/r/28498/diff/
> 
> 
> Testing
> -------
> 
> Added detailed unit tests and integration tests for the changes.
> 
> 
> Thanks,
> 
> Ajay Yadava
> 
>


Re: Review Request 28498: FALCON: 914 Add fuzzy search for entities

Posted by Ajay Yadava <aj...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28498/
-----------------------------------------------------------

(Updated Dec. 15, 2014, 3:52 p.m.)


Review request for Falcon.


Bugs: https://issues.apache.org/jira/browse/FALCON-914
    https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/FALCON-914


Repository: falcon-git


Description
-------

A lot of times users end up doing a list of all entities of a given type and do grep -i on it. We should add ability for doing a case insensitive fuzzy search for users to search for entities when they don't remember the exact entity name. We can add this as another option to list
e.g. falcon entity -list -type process -pattern hourly
and this should match the following process name.
My-Hourly-Summary
For fuzzy search like functionality:
falcon entity -list -type process -pattern mhs
should also match the above process name


Diffs (updated)
-----

  client/src/main/java/org/apache/falcon/cli/FalconCLI.java 93776d3 
  client/src/main/java/org/apache/falcon/client/FalconClient.java 23c8943 
  docs/src/site/twiki/restapi/EntityList.twiki b569ade 
  prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java b6e1cec 
  prism/src/main/java/org/apache/falcon/resource/AbstractSchedulableEntityManager.java d994e25 
  prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java fb9d9f3 
  prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java 1862e39 
  webapp/src/main/java/org/apache/falcon/resource/SchedulableEntityManager.java 5f4f495 
  webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java a3acbdb 

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


Testing
-------

Added detailed unit tests and integration tests for the changes.


Thanks,

Ajay Yadava


Re: Review Request 28498: FALCON: 914 Add fuzzy search for entities

Posted by Ajay Yadava <aj...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28498/
-----------------------------------------------------------

(Updated Dec. 2, 2014, 6:06 p.m.)


Review request for Falcon.


Changes
-------

Rebased the patch.


Bugs: https://issues.apache.org/jira/browse/FALCON-914
    https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/FALCON-914


Repository: falcon-git


Description
-------

A lot of times users end up doing a list of all entities of a given type and do grep -i on it. We should add ability for doing a case insensitive fuzzy search for users to search for entities when they don't remember the exact entity name. We can add this as another option to list
e.g. falcon entity -list -type process -pattern hourly
and this should match the following process name.
My-Hourly-Summary
For fuzzy search like functionality:
falcon entity -list -type process -pattern mhs
should also match the above process name


Diffs (updated)
-----

  client/src/main/java/org/apache/falcon/cli/FalconCLI.java c4fc20f 
  client/src/main/java/org/apache/falcon/client/FalconClient.java 9a286ed 
  docs/src/site/twiki/restapi/EntityList.twiki b569ade 
  prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java b6e1cec 
  prism/src/main/java/org/apache/falcon/resource/AbstractSchedulableEntityManager.java d994e25 
  prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java fb9d9f3 
  prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java 1862e39 
  webapp/src/main/java/org/apache/falcon/resource/SchedulableEntityManager.java 5f4f495 
  webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java a3acbdb 

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


Testing
-------

Added detailed unit tests and integration tests for the changes.


Thanks,

Ajay Yadava