Re: Review Request 52514: Add data completeness checker

2016-11-10 Thread Narayan Periwal

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

(Updated Nov. 10, 2016, 12:06 p.m.)


Review request for lens.


Bugs: LENS-1333
https://issues.apache.org/jira/browse/LENS-1333


Repository: lens


Description
---

Though lens has partition registration being done whenever data is available, 
there is no guarantee the partition registered is complete. There can be 
different ways to know if the data is complete for partition. One option could 
be to have a partition property saying whether it is complete or not. Other 
could be to do a http call to another hosted service and more.

Proposal here is to add an interface for DataCompletenessChecker and do the 
check while resolving partitions.

Here are some of the capabilities we would like to add in Lens :
# Lens will check partition existence first, if it exists, then check the 
completeness percentage. If the completeness percentage is less than a 
configured threshold (default should be 98, 99 or even 100), Lens will fail the 
query.
# Lens's accept query on partial data will accept on incomplete data as well.
# Lens will also option to override the completeness percentage threshold value 
at query level
# Lens will still have look ahead capability of daily being incomplete, then it 
will union with hourly. 
# If same measure is there in two different facts , Lens will we pick the one 
with higher availability.
# In case of completeness percentage threshold missed, Lens will respond back 
with available percentage.


Diffs (updated)
-

  lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
fb958c3 
  
lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java 
e14c43f 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
4585ef7 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 5dc9dc9 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
 78fb21d 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
408086f 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/DataCompletenessChecker.java 
6a0230d 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java 
13f1aa4 
  lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
db26718 
  lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
  lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 0c43cb5 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
 7afa32e 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java 
PRE-CREATION 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
f6cec1b 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
b90d4d3 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
0aa31f4 
  
lens-server-api/src/main/java/org/apache/lens/server/api/LensConfConstants.java 
cf1c233 
  
lens-server-api/src/main/java/org/apache/lens/server/api/metastore/DataCompletenessChecker.java
 PRE-CREATION 
  
lens-server-api/src/main/java/org/apache/lens/server/api/metastore/DefaultChecker.java
 PRE-CREATION 
  lens-server/src/main/resources/lensserver-default.xml 0ac722d 
  lens-server/src/main/resources/lenssession-default.xml 8d9f097 
  src/site/apt/admin/config.apt 21b23f9 
  src/site/apt/admin/session-config.apt 663a605 
  src/site/apt/user/olap-query-conf.apt ce35ec4 

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


Testing
---


Thanks,

Narayan Periwal



Re: Review Request 52514: Add data completeness checker

2016-11-10 Thread Narayan Periwal


> On Nov. 10, 2016, 12:02 p.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/resources/olap-query-conf.xml, line 111
> > 
> >
> > Please leave default value as blank.

Ok.


- Narayan


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


On Nov. 10, 2016, 12:06 p.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Nov. 10, 2016, 12:06 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  e14c43f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 5dc9dc9 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> 408086f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/DataCompletenessChecker.java
>  6a0230d 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> 0c43cb5 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java
>  PRE-CREATION 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
> f6cec1b 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
> b90d4d3 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
> 0aa31f4 
>   
> lens-server-api/src/main/java/org/apache/lens/server/api/LensConfConstants.java
>  cf1c233 
>   
> lens-server-api/src/main/java/org/apache/lens/server/api/metastore/DataCompletenessChecker.java
>  PRE-CREATION 
>   
> lens-server-api/src/main/java/org/apache/lens/server/api/metastore/DefaultChecker.java
>  PRE-CREATION 
>   lens-server/src/main/resources/lensserver-default.xml 0ac722d 
>   lens-server/src/main/resources/lenssession-default.xml 8d9f097 
>   src/site/apt/admin/config.apt 21b23f9 
>   src/site/apt/admin/session-config.apt 663a605 
>   src/site/apt/user/olap-query-conf.apt ce35ec4 
> 
> Diff: https://reviews.apache.org/r/52514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Narayan Periwal
> 
>



Re: Review Request 52514: Add data completeness checker

2016-11-10 Thread Amareshwari Sriramadasu

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


Fix it, then Ship it!





lens-cube/src/main/resources/olap-query-conf.xml (line 111)


Please leave default value as blank.


- Amareshwari Sriramadasu


On Nov. 10, 2016, 10:39 a.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Nov. 10, 2016, 10:39 a.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  e14c43f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 5dc9dc9 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> 408086f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/DataCompletenessChecker.java
>  6a0230d 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> 0c43cb5 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java
>  PRE-CREATION 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
> f6cec1b 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
> b90d4d3 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
> 0aa31f4 
>   
> lens-server-api/src/main/java/org/apache/lens/server/api/LensConfConstants.java
>  cf1c233 
>   
> lens-server-api/src/main/java/org/apache/lens/server/api/metastore/DataCompletenessChecker.java
>  PRE-CREATION 
>   
> lens-server-api/src/main/java/org/apache/lens/server/api/metastore/DefaultChecker.java
>  PRE-CREATION 
>   lens-server/src/main/resources/lensserver-default.xml 0ac722d 
>   lens-server/src/main/resources/lenssession-default.xml 8d9f097 
>   src/site/apt/admin/config.apt 21b23f9 
>   src/site/apt/admin/session-config.apt 663a605 
>   src/site/apt/user/olap-query-conf.apt ce35ec4 
> 
> Diff: https://reviews.apache.org/r/52514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Narayan Periwal
> 
>



Re: Review Request 52514: Add data completeness checker

2016-11-10 Thread Narayan Periwal

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

(Updated Nov. 10, 2016, 10:39 a.m.)


Review request for lens.


Bugs: LENS-1333
https://issues.apache.org/jira/browse/LENS-1333


Repository: lens


Description
---

Though lens has partition registration being done whenever data is available, 
there is no guarantee the partition registered is complete. There can be 
different ways to know if the data is complete for partition. One option could 
be to have a partition property saying whether it is complete or not. Other 
could be to do a http call to another hosted service and more.

Proposal here is to add an interface for DataCompletenessChecker and do the 
check while resolving partitions.

Here are some of the capabilities we would like to add in Lens :
# Lens will check partition existence first, if it exists, then check the 
completeness percentage. If the completeness percentage is less than a 
configured threshold (default should be 98, 99 or even 100), Lens will fail the 
query.
# Lens's accept query on partial data will accept on incomplete data as well.
# Lens will also option to override the completeness percentage threshold value 
at query level
# Lens will still have look ahead capability of daily being incomplete, then it 
will union with hourly. 
# If same measure is there in two different facts , Lens will we pick the one 
with higher availability.
# In case of completeness percentage threshold missed, Lens will respond back 
with available percentage.


Diffs (updated)
-

  lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
fb958c3 
  
lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java 
e14c43f 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
4585ef7 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 5dc9dc9 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
 78fb21d 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
408086f 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/DataCompletenessChecker.java 
6a0230d 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java 
13f1aa4 
  lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
db26718 
  lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
  lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 0c43cb5 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
 7afa32e 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java 
PRE-CREATION 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
f6cec1b 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
b90d4d3 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
0aa31f4 
  
lens-server-api/src/main/java/org/apache/lens/server/api/LensConfConstants.java 
cf1c233 
  
lens-server-api/src/main/java/org/apache/lens/server/api/metastore/DataCompletenessChecker.java
 PRE-CREATION 
  
lens-server-api/src/main/java/org/apache/lens/server/api/metastore/DefaultChecker.java
 PRE-CREATION 
  lens-server/src/main/resources/lensserver-default.xml 0ac722d 
  lens-server/src/main/resources/lenssession-default.xml 8d9f097 
  src/site/apt/admin/config.apt 21b23f9 
  src/site/apt/admin/session-config.apt 663a605 
  src/site/apt/user/olap-query-conf.apt ce35ec4 

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


Testing
---


Thanks,

Narayan Periwal



Re: Review Request 52514: Add data completeness checker

2016-11-10 Thread Narayan Periwal


> On Nov. 10, 2016, 7:26 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java,
> >  line 99
> > 
> >
> > call it isDataCompletenessCheckEnabled or dataCompletenessChecksEnabled 
> > ? 
> > 
> > is and checks in the does not look good.

Sure..Will correct it.


> On Nov. 10, 2016, 7:26 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java, 
> > line 49
> > 
> >
> > Add entry in olap-query-conf.xml with description.

Agreed.


- Narayan


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


On Nov. 10, 2016, 7:09 a.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Nov. 10, 2016, 7:09 a.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  e14c43f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 5dc9dc9 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> 408086f 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> 0c43cb5 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java
>  PRE-CREATION 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
> f6cec1b 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
> b90d4d3 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
> 0aa31f4 
>   lens-server/src/main/resources/lenssession-default.xml 8d9f097 
>   src/site/apt/admin/session-config.apt 663a605 
>   src/site/apt/user/olap-query-conf.apt ce35ec4 
> 
> Diff: https://reviews.apache.org/r/52514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Narayan Periwal
> 
>



Re: Review Request 52514: Add data completeness checker

2016-11-09 Thread Amareshwari Sriramadasu

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




lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java 
(line 99)


call it isDataCompletenessCheckEnabled or dataCompletenessChecksEnabled ? 

is and checks in the does not look good.



lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java (line 
48)


Add entry in olap-query-conf.xml with description.



lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java (line 
128)


Lets make the config lens.cube.metastore.completeness.checker.class instead 
of lens.cube.query.xxx, as it is at server level.

Also, move the config to LensConfConstants and add entry in 
lensserver-default.xml



lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
(lines 131 - 132)


Move these to LensConfConstants and add entry in lensserver-default.xml 
with description.



lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java 
(line 100)


Can we skip this also if completeness check is disabled ?



lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(line 148)


Should not be under the check.



src/site/apt/admin/session-config.apt (line 105)


Seems there is merge issue. Regenerate the files.


- Amareshwari Sriramadasu


On Nov. 10, 2016, 7:09 a.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Nov. 10, 2016, 7:09 a.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  e14c43f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 5dc9dc9 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> 408086f 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> 0c43cb5 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java
>  PRE-CREATION 
>   

Re: Review Request 52514: Add data completeness checker

2016-11-09 Thread Narayan Periwal

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

(Updated Nov. 10, 2016, 7:09 a.m.)


Review request for lens.


Bugs: LENS-1333
https://issues.apache.org/jira/browse/LENS-1333


Repository: lens


Description
---

Though lens has partition registration being done whenever data is available, 
there is no guarantee the partition registered is complete. There can be 
different ways to know if the data is complete for partition. One option could 
be to have a partition property saying whether it is complete or not. Other 
could be to do a http call to another hosted service and more.

Proposal here is to add an interface for DataCompletenessChecker and do the 
check while resolving partitions.

Here are some of the capabilities we would like to add in Lens :
# Lens will check partition existence first, if it exists, then check the 
completeness percentage. If the completeness percentage is less than a 
configured threshold (default should be 98, 99 or even 100), Lens will fail the 
query.
# Lens's accept query on partial data will accept on incomplete data as well.
# Lens will also option to override the completeness percentage threshold value 
at query level
# Lens will still have look ahead capability of daily being incomplete, then it 
will union with hourly. 
# If same measure is there in two different facts , Lens will we pick the one 
with higher availability.
# In case of completeness percentage threshold missed, Lens will respond back 
with available percentage.


Diffs (updated)
-

  lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
fb958c3 
  
lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java 
e14c43f 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
4585ef7 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 5dc9dc9 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
 78fb21d 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
408086f 
  lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
PRE-CREATION 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java 
13f1aa4 
  lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
db26718 
  lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
  lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 0c43cb5 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
 7afa32e 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java 
PRE-CREATION 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
f6cec1b 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
b90d4d3 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
0aa31f4 
  lens-server/src/main/resources/lenssession-default.xml 8d9f097 
  src/site/apt/admin/session-config.apt 663a605 
  src/site/apt/user/olap-query-conf.apt ce35ec4 

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


Testing
---


Thanks,

Narayan Periwal



Re: Review Request 52514: Add data completeness checker

2016-11-09 Thread Narayan Periwal


> On Nov. 10, 2016, 6:01 a.m., Amareshwari Sriramadasu wrote:
> > Overall changes look fine. But I'm just wondering it would be good if we 
> > can have a configuration to enable/disable the feature fully - 
> > lens.cube.metastore.enable.datacompleteness.checks - if it is set to false, 
> > it can fall back to the old code, and not otherwise.

Agreed. It makes sense to add this to enable/disable the feature from this 
config.


- Narayan


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


On Nov. 9, 2016, 1:39 p.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Nov. 9, 2016, 1:39 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  e14c43f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 5dc9dc9 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> f20f105 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> 0c43cb5 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java
>  PRE-CREATION 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
> f6cec1b 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
> b90d4d3 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
> 0aa31f4 
>   lens-server/src/main/resources/lenssession-default.xml 9a8f9da 
>   src/site/apt/admin/session-config.apt d480f88 
>   src/site/apt/user/olap-query-conf.apt ce35ec4 
> 
> Diff: https://reviews.apache.org/r/52514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Narayan Periwal
> 
>



Re: Review Request 52514: Add data completeness checker

2016-11-09 Thread Amareshwari Sriramadasu

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



Overall changes look fine. But I'm just wondering it would be good if we can 
have a configuration to enable/disable the feature fully - 
lens.cube.metastore.enable.datacompleteness.checks - if it is set to false, it 
can fall back to the old code, and not otherwise.

- Amareshwari Sriramadasu


On Nov. 9, 2016, 1:39 p.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Nov. 9, 2016, 1:39 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  e14c43f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 5dc9dc9 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> f20f105 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> 0c43cb5 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java
>  PRE-CREATION 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
> f6cec1b 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
> b90d4d3 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
> 0aa31f4 
>   lens-server/src/main/resources/lenssession-default.xml 9a8f9da 
>   src/site/apt/admin/session-config.apt d480f88 
>   src/site/apt/user/olap-query-conf.apt ce35ec4 
> 
> Diff: https://reviews.apache.org/r/52514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Narayan Periwal
> 
>



Re: Review Request 52514: Add data completeness checker

2016-11-09 Thread Amareshwari Sriramadasu

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




lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
 (line 155)


should we add null check for cause.getIncompletePartitions() ?



lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(line 29)


this would result in checkstyle error.



lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(line 547)


Why are we breaking after processing one measure? Shouldnt we process all 
measures in the expression?


- Amareshwari Sriramadasu


On Nov. 8, 2016, 1:11 p.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Nov. 8, 2016, 1:11 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  e14c43f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 5dc9dc9 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> f20f105 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> 0c43cb5 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java
>  PRE-CREATION 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
> f6cec1b 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
> b90d4d3 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
> 0aa31f4 
>   lens-server/src/main/resources/lenssession-default.xml 9a8f9da 
>   src/site/apt/admin/session-config.apt d480f88 
>   src/site/apt/user/olap-query-conf.apt ce35ec4 
> 
> Diff: https://reviews.apache.org/r/52514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Narayan Periwal
> 
>



Re: Review Request 52514: Add data completeness checker

2016-11-08 Thread Narayan Periwal


> On Oct. 21, 2016, 9:12 a.m., Rajat Khandelwal wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java,
> >  lines 118-121
> > 
> >
> > StorageTableResolver is invoked in each rewrite step, which happens 
> > #drivers times for each query. Using reflection to create an instance this 
> > often will be harmful for performance.

Agreed. Added this in Hive Conf.


- Narayan


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


On Nov. 8, 2016, 1:11 p.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Nov. 8, 2016, 1:11 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  e14c43f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 5dc9dc9 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> f20f105 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> 0c43cb5 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java
>  PRE-CREATION 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
> f6cec1b 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
> b90d4d3 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
> 0aa31f4 
>   lens-server/src/main/resources/lenssession-default.xml 9a8f9da 
>   src/site/apt/admin/session-config.apt d480f88 
>   src/site/apt/user/olap-query-conf.apt ce35ec4 
> 
> Diff: https://reviews.apache.org/r/52514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Narayan Periwal
> 
>



Re: Review Request 52514: Add data completeness checker

2016-11-08 Thread Narayan Periwal

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

(Updated Nov. 8, 2016, 1:11 p.m.)


Review request for lens.


Bugs: LENS-1333
https://issues.apache.org/jira/browse/LENS-1333


Repository: lens


Description
---

Though lens has partition registration being done whenever data is available, 
there is no guarantee the partition registered is complete. There can be 
different ways to know if the data is complete for partition. One option could 
be to have a partition property saying whether it is complete or not. Other 
could be to do a http call to another hosted service and more.

Proposal here is to add an interface for DataCompletenessChecker and do the 
check while resolving partitions.

Here are some of the capabilities we would like to add in Lens :
# Lens will check partition existence first, if it exists, then check the 
completeness percentage. If the completeness percentage is less than a 
configured threshold (default should be 98, 99 or even 100), Lens will fail the 
query.
# Lens's accept query on partial data will accept on incomplete data as well.
# Lens will also option to override the completeness percentage threshold value 
at query level
# Lens will still have look ahead capability of daily being incomplete, then it 
will union with hourly. 
# If same measure is there in two different facts , Lens will we pick the one 
with higher availability.
# In case of completeness percentage threshold missed, Lens will respond back 
with available percentage.


Diffs (updated)
-

  lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
fb958c3 
  
lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java 
e14c43f 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
4585ef7 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 5dc9dc9 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
 78fb21d 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
f20f105 
  lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
PRE-CREATION 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java 
13f1aa4 
  lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
db26718 
  lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
  lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 0c43cb5 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
 7afa32e 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java 
PRE-CREATION 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
f6cec1b 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
b90d4d3 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
0aa31f4 
  lens-server/src/main/resources/lenssession-default.xml 9a8f9da 
  src/site/apt/admin/session-config.apt d480f88 
  src/site/apt/user/olap-query-conf.apt ce35ec4 

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


Testing
---


Thanks,

Narayan Periwal



Re: Review Request 52514: Add data completeness checker

2016-11-08 Thread Narayan Periwal


> On Nov. 4, 2016, 5:45 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java,
> >  line 538
> > 
> >
> > Can you cross check context.getQueriedMsrs() is actually resolving 
> > expression fields as well ? I'm not fully sure.

We will have to use cubeql.getQueriedExprsWithMeasures and parse measures from 
here.


> On Nov. 4, 2016, 5:45 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java,
> >  line 599
> > 
> >
> > Instead of measureFromTag should be we put actual queried phrase column 
> > here ?

The measures from phrases already gets included in the 
cubeql.queriedMeasures(). For the expressions, we will put the expression name 
here instead of the measures that make up the expressions.


> On Nov. 4, 2016, 5:45 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java,
> >  lines 603-605
> > 
> >
> > Should be moved to outer while loop and should be moved inside the 
> > check for isFactDataIncomplete flag for removing there.

Agreed, Will fix it.


- Narayan


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


On Nov. 3, 2016, 11:13 a.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Nov. 3, 2016, 11:13 a.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  e14c43f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 5dc9dc9 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> f20f105 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> 0c43cb5 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java
>  PRE-CREATION 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
> f6cec1b 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
> b90d4d3 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
> 0aa31f4 
>   

Re: Review Request 52514: Add data completeness checker

2016-11-05 Thread Narayan Periwal


> On Nov. 4, 2016, 5:45 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java,
> >  line 529
> > 
> >
> > Measures are getting added, by iterating over queried phrases below. 
> > But empty check is happening here. Populating measures should be moved up.

With the empty check for the measures, there is also the empty check of the 
queriedPhrases with the AND clause. Hence, this check seems to be alright.


> On Nov. 4, 2016, 5:45 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java, 
> > line 939
> > 
> >
> > Why didn't the query fail here ? If the test is to check no failure on 
> > partial data, can you update testname and comment above.

Yes, The test is to check no failure on partial data as the flag 
FAIL_QUERY_ON_PARTIAL_DATA is not set. Will update the test name and add 
appropriate comment.


> On Nov. 4, 2016, 5:45 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java, 
> > line 973
> > 
> >
> > Can you share the reason being shown up, as a comment?

Sure...will add the comment.


> On Nov. 4, 2016, 5:45 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java,
> >  line 596
> > 
> >
> > Shall we rename variable to incompletePartition, instead of 
> > partitionCompleteness ?

Will rename it.


> On Nov. 4, 2016, 5:45 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java,
> >  lines 565-566
> > 
> >
> > Why do you need this formatter? And why is formatting done upto hours?

Actually we can use the Date as well. Agreed, If we use formattter, we should 
give formatting upto seconds.


- Narayan


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


On Nov. 3, 2016, 11:13 a.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Nov. 3, 2016, 11:13 a.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  e14c43f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 5dc9dc9 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> f20f105 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> 

Re: Review Request 52514: Add data completeness checker

2016-11-03 Thread Amareshwari Sriramadasu

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




lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(line 523)


Measures are getting added, by iterating over queried phrases below. But 
empty check is happening here. Populating measures should be moved up.



lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(line 532)


Can you cross check context.getQueriedMsrs() is actually resolving 
expression fields as well ? I'm not fully sure.



lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(lines 559 - 560)


Why do you need this formatter? And why is formatting done upto hours?



lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(line 590)


Shall we rename variable to incompletePartition, instead of 
partitionCompleteness ?



lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(line 593)


Instead of measureFromTag should be we put actual queried phrase column 
here ?



lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(lines 597 - 599)


Should be moved to outer while loop and should be moved inside the check 
for isFactDataIncomplete flag for removing there.



lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java (line 
939)


Why didn't the query fail here ? If the test is to check no failure on 
partial data, can you update testname and comment above.



lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java (line 
973)


Can you share the reason being shown up, as a comment?


- Amareshwari Sriramadasu


On Nov. 3, 2016, 11:13 a.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Nov. 3, 2016, 11:13 a.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  e14c43f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 5dc9dc9 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> f20f105 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   

Re: Review Request 52514: Add data completeness checker

2016-11-03 Thread Narayan Periwal

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

(Updated Nov. 3, 2016, 11:13 a.m.)


Review request for lens.


Bugs: LENS-1333
https://issues.apache.org/jira/browse/LENS-1333


Repository: lens


Description
---

Though lens has partition registration being done whenever data is available, 
there is no guarantee the partition registered is complete. There can be 
different ways to know if the data is complete for partition. One option could 
be to have a partition property saying whether it is complete or not. Other 
could be to do a http call to another hosted service and more.

Proposal here is to add an interface for DataCompletenessChecker and do the 
check while resolving partitions.

Here are some of the capabilities we would like to add in Lens :
# Lens will check partition existence first, if it exists, then check the 
completeness percentage. If the completeness percentage is less than a 
configured threshold (default should be 98, 99 or even 100), Lens will fail the 
query.
# Lens's accept query on partial data will accept on incomplete data as well.
# Lens will also option to override the completeness percentage threshold value 
at query level
# Lens will still have look ahead capability of daily being incomplete, then it 
will union with hourly. 
# If same measure is there in two different facts , Lens will we pick the one 
with higher availability.
# In case of completeness percentage threshold missed, Lens will respond back 
with available percentage.


Diffs (updated)
-

  lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
fb958c3 
  
lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java 
e14c43f 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
4585ef7 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 5dc9dc9 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
 78fb21d 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
f20f105 
  lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
PRE-CREATION 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java 
13f1aa4 
  lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
db26718 
  lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
  lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 0c43cb5 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
 7afa32e 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/MockCompletenessChecker.java 
PRE-CREATION 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
f6cec1b 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
b90d4d3 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java 
0aa31f4 
  lens-server/src/main/resources/lenssession-default.xml 9a8f9da 
  src/site/apt/admin/session-config.apt d480f88 
  src/site/apt/user/olap-query-conf.apt ce35ec4 

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


Testing
---


Thanks,

Narayan Periwal



Re: Review Request 52514: Add data completeness checker

2016-11-02 Thread Narayan Periwal


> On Oct. 21, 2016, 9:06 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/test/java/org/apache/lens/cube/parse/DefaultCompletenessChecker.java,
> >  line 25
> > 
> >
> > Instead of calling it DefaultCompletenessChecker,please call Mock or 
> > something else.

Will rename it as MockCompletenessChecker


> On Oct. 21, 2016, 9:06 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java, 
> > line 939
> > 
> >
> > Please add appropriate asserts for the test.

Will add the asserts for the hql query and the expected query.


> On Oct. 21, 2016, 9:06 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java, 
> > line 950
> > 
> >
> > Please add appropriate asserts for the test.

Will add the asserts for the hql query and the expected query.


> On Oct. 21, 2016, 9:06 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java, 
> > line 969
> > 
> >
> > Not clear whats the expected and actual value here.

Here we are expecting the prune cause to be the Incomplete Data. Hence to 
assert this, we do a substring of INCOMPLETE_PARTITION.errorFormat


> On Oct. 21, 2016, 9:06 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/resources/olap-query-conf.xml, line 111
> > 
> >
> > Should we make default to 100% ?

Agreed. We can give default value as 100%.


> On Oct. 21, 2016, 9:06 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java,
> >  line 526
> > 
> >
> > This might skip expressions containing measures. We might have to 
> > iterate over queriedPhrases and look for measures in them.

Will add the measures after iterating over the queriedPhrases


> On Oct. 21, 2016, 9:06 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java,
> >  line 118
> > 
> >
> > Should we make default to 100% ? Also move the default value also as a 
> > constant to CubeQueryConfUtil .

Agreed. Will move this to CubeQueryConfUtil.


> On Oct. 21, 2016, 9:06 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java, 
> > line 49
> > 
> >
> > Minor :
> > 
> > Can we avoid the string concat with " + " ?

Agreed.


- Narayan


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


On Oct. 10, 2016, 7:45 a.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Oct. 10, 2016, 7:45 a.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of 

Re: Review Request 52514: Add data completeness checker

2016-10-21 Thread Rajat Khandelwal

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




lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(lines 112 - 115)


StorageTableResolver is invoked in each rewrite step, which happens 
#drivers times for each query. Using reflection to create an instance this 
often will be harmful for performance.


- Rajat Khandelwal


On Oct. 10, 2016, 1:15 p.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Oct. 10, 2016, 1:15 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 01265a5 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> 49ed5ef 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> f7f8af2 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/DefaultCompletenessChecker.java
>  PRE-CREATION 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
> 6fb027a 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
> b90d4d3 
>   lens-server/src/main/resources/lenssession-default.xml b6bfa2e 
>   src/site/apt/admin/session-config.apt c4b3c04 
>   src/site/apt/user/olap-query-conf.apt ce35ec4 
> 
> Diff: https://reviews.apache.org/r/52514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Narayan Periwal
> 
>



Re: Review Request 52514: Add data completeness checker

2016-10-21 Thread Amareshwari Sriramadasu

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




lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java (line 
48)


Minor :

Can we avoid the string concat with " + " ?



lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java 
(line 123)


Should pruning cause be added here?



lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java 
(line 125)


incomplete partition's in prune cause is null?



lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(line 112)


Should we make default to 100% ? Also move the default value also as a 
constant to CubeQueryConfUtil .



lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
(line 520)


This might skip expressions containing measures. We might have to iterate 
over queriedPhrases and look for measures in them.



lens-cube/src/main/resources/olap-query-conf.xml (line 111)


Should we make default to 100% ?



lens-cube/src/test/java/org/apache/lens/cube/parse/DefaultCompletenessChecker.java
 (line 25)


Instead of calling it DefaultCompletenessChecker,please call Mock or 
something else.



lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java (line 
939)


Please add appropriate asserts for the test.



lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java (line 
950)


Please add appropriate asserts for the test.



lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java (line 
969)


Not clear whats the expected and actual value here.


- Amareshwari Sriramadasu


On Oct. 10, 2016, 7:45 a.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Oct. 10, 2016, 7:45 a.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 01265a5 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> 49ed5ef 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 

Re: Review Request 52514: Add data completeness checker

2016-10-10 Thread Narayan Periwal

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

(Updated Oct. 10, 2016, 7:45 a.m.)


Review request for lens.


Bugs: LENS-1333
https://issues.apache.org/jira/browse/LENS-1333


Repository: lens


Description
---

Though lens has partition registration being done whenever data is available, 
there is no guarantee the partition registered is complete. There can be 
different ways to know if the data is complete for partition. One option could 
be to have a partition property saying whether it is complete or not. Other 
could be to do a http call to another hosted service and more.

Proposal here is to add an interface for DataCompletenessChecker and do the 
check while resolving partitions.

Here are some of the capabilities we would like to add in Lens :
# Lens will check partition existence first, if it exists, then check the 
completeness percentage. If the completeness percentage is less than a 
configured threshold (default should be 98, 99 or even 100), Lens will fail the 
query.
# Lens's accept query on partial data will accept on incomplete data as well.
# Lens will also option to override the completeness percentage threshold value 
at query level
# Lens will still have look ahead capability of daily being incomplete, then it 
will union with hourly. 
# If same measure is there in two different facts , Lens will we pick the one 
with higher availability.
# In case of completeness percentage threshold missed, Lens will respond back 
with available percentage.


Diffs (updated)
-

  lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
fb958c3 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
4585ef7 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 01265a5 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
 78fb21d 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
49ed5ef 
  lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
PRE-CREATION 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java 
13f1aa4 
  lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
db26718 
  lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
  lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java f7f8af2 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/DefaultCompletenessChecker.java
 PRE-CREATION 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
 7afa32e 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
6fb027a 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
b90d4d3 
  lens-server/src/main/resources/lenssession-default.xml b6bfa2e 
  src/site/apt/admin/session-config.apt c4b3c04 
  src/site/apt/user/olap-query-conf.apt ce35ec4 

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


Testing
---


Thanks,

Narayan Periwal



Re: Review Request 52514: Add data completeness checker

2016-10-06 Thread Narayan Periwal

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

(Updated Oct. 6, 2016, 10:45 a.m.)


Review request for lens.


Bugs: LENS-1333
https://issues.apache.org/jira/browse/LENS-1333


Repository: lens


Description
---

Though lens has partition registration being done whenever data is available, 
there is no guarantee the partition registered is complete. There can be 
different ways to know if the data is complete for partition. One option could 
be to have a partition property saying whether it is complete or not. Other 
could be to do a http call to another hosted service and more.

Proposal here is to add an interface for DataCompletenessChecker and do the 
check while resolving partitions.

Here are some of the capabilities we would like to add in Lens :
# Lens will check partition existence first, if it exists, then check the 
completeness percentage. If the completeness percentage is less than a 
configured threshold (default should be 98, 99 or even 100), Lens will fail the 
query.
# Lens's accept query on partial data will accept on incomplete data as well.
# Lens will also option to override the completeness percentage threshold value 
at query level
# Lens will still have look ahead capability of daily being incomplete, then it 
will union with hourly. 
# If same measure is there in two different facts , Lens will we pick the one 
with higher availability.
# In case of completeness percentage threshold missed, Lens will respond back 
with available percentage.


Diffs (updated)
-

  lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
fb958c3 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
4585ef7 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 01265a5 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
 78fb21d 
  lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
49ed5ef 
  lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
PRE-CREATION 
  
lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java 
13f1aa4 
  lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
db26718 
  lens-cube/src/main/resources/olap-query-conf.xml 0c888ca 
  lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java f7f8af2 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/DefaultCompletenessChecker.java
 PRE-CREATION 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
 7afa32e 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
b90d4d3 
  lens-server/src/main/resources/lenssession-default.xml b6bfa2e 

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


Testing
---


Thanks,

Narayan Periwal



Re: Review Request 52514: Add data completeness checker

2016-10-06 Thread Narayan Periwal


> On Oct. 5, 2016, 6:49 a.m., Amareshwari Sriramadasu wrote:
> > .gitignore, line 40
> > 
> >
> > Can you avoid this change?

I will revert this change.


> On Oct. 5, 2016, 6:49 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java,
> >  line 120
> > 
> >
> > Should be added after MISSING_PARTITIONS.
> > 
> > Also lets change the text to "Data is incomplete. Details : %s"

Done.


On Oct. 5, 2016, 6:49 a.m., Narayan Periwal wrote:
> > Can you add testcases for all capabilities listed in description?

Adding test cases for all the capabilities listed.


- Narayan


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


On Oct. 4, 2016, 2:10 p.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Oct. 4, 2016, 2:10 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   .gitignore aca87dc 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 01265a5 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> 49ed5ef 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> f7f8af2 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/DefaultCompletenessChecker.java
>  PRE-CREATION 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
> 
> Diff: https://reviews.apache.org/r/52514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Narayan Periwal
> 
>



Re: Review Request 52514: Add data completeness checker

2016-10-05 Thread Amareshwari Sriramadasu

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




.gitignore (line 40)


Can you avoid this change?



lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
 (line 120)


Should be added after MISSING_PARTITIONS.

Also lets change the text to "Data is incomplete. Details : %s"


Can you add testcases for all capabilities listed in description?

- Amareshwari Sriramadasu


On Oct. 4, 2016, 2:10 p.m., Narayan Periwal wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52514/
> ---
> 
> (Updated Oct. 4, 2016, 2:10 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1333
> https://issues.apache.org/jira/browse/LENS-1333
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> Though lens has partition registration being done whenever data is available, 
> there is no guarantee the partition registered is complete. There can be 
> different ways to know if the data is complete for partition. One option 
> could be to have a partition property saying whether it is complete or not. 
> Other could be to do a http call to another hosted service and more.
> 
> Proposal here is to add an interface for DataCompletenessChecker and do the 
> check while resolving partitions.
> 
> Here are some of the capabilities we would like to add in Lens :
> # Lens will check partition existence first, if it exists, then check the 
> completeness percentage. If the completeness percentage is less than a 
> configured threshold (default should be 98, 99 or even 100), Lens will fail 
> the query.
> # Lens's accept query on partial data will accept on incomplete data as well.
> # Lens will also option to override the completeness percentage threshold 
> value at query level
> # Lens will still have look ahead capability of daily being incomplete, then 
> it will union with hourly. 
> # If same measure is there in two different facts , Lens will we pick the one 
> with higher availability.
> # In case of completeness percentage threshold missed, Lens will respond back 
> with available percentage.
> 
> 
> Diffs
> -
> 
>   .gitignore aca87dc 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java 
> fb958c3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 4585ef7 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> 01265a5 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  78fb21d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java 
> 49ed5ef 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultChecker.java 
> PRE-CREATION 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  13f1aa4 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> db26718 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> f7f8af2 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/DefaultCompletenessChecker.java
>  PRE-CREATION 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java
>  7afa32e 
> 
> Diff: https://reviews.apache.org/r/52514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Narayan Periwal
> 
>