You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lens.apache.org by am...@apache.org on 2016/11/10 05:42:01 UTC

lens git commit: LENS-1374 : Add more logs in FieldValidator

Repository: lens
Updated Branches:
  refs/heads/master 08d79631b -> 666fc776a


LENS-1374 : Add more logs in FieldValidator


Project: http://git-wip-us.apache.org/repos/asf/lens/repo
Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/666fc776
Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/666fc776
Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/666fc776

Branch: refs/heads/master
Commit: 666fc776a1f22c5b308b6eb1ea054a52d6ec141d
Parents: 08d7963
Author: Rajat Khandelwal <pr...@apache.org>
Authored: Thu Nov 10 11:11:51 2016 +0530
Committer: Amareshwari Sriramadasu <am...@apache.org>
Committed: Thu Nov 10 11:11:51 2016 +0530

----------------------------------------------------------------------
 .../main/java/org/apache/lens/cube/parse/FieldValidator.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lens/blob/666fc776/lens-cube/src/main/java/org/apache/lens/cube/parse/FieldValidator.java
----------------------------------------------------------------------
diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/FieldValidator.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/FieldValidator.java
index 7f4aa93..48af0c9 100644
--- a/lens-cube/src/main/java/org/apache/lens/cube/parse/FieldValidator.java
+++ b/lens-cube/src/main/java/org/apache/lens/cube/parse/FieldValidator.java
@@ -33,10 +33,12 @@ import org.apache.hadoop.hive.ql.parse.ASTNode;
 import org.apache.hadoop.hive.ql.parse.HiveParser;
 
 import com.google.common.collect.ImmutableSet;
+import lombok.extern.slf4j.Slf4j;
 
 /**
  * Validate fields based on cube queryability
  */
+@Slf4j
 public class FieldValidator implements ContextRewriter {
 
   @Override
@@ -73,12 +75,13 @@ public class FieldValidator implements ContextRewriter {
       // do validation
       // Find atleast one derived cube which contains all the dimensions
       // queried.
-
+      log.info("Chained columns: {}, Queried dim attributes: {}", chainedSrcColumns, queriedDimAttrs);
       boolean derivedCubeFound = false;
       for (DerivedCube dcube : dcubes) {
 
         if (dcube.getDimAttributeNames().containsAll(chainedSrcColumns)
           && dcube.getDimAttributeNames().containsAll(queriedDimAttrs)) {
+          log.info("Derived cube found: {}", dcube.getName());
           // remove all the measures that are covered
           queriedMsrs.removeAll(dcube.getMeasureNames());
           derivedCubeFound = true;
@@ -93,9 +96,10 @@ public class FieldValidator implements ContextRewriter {
       }
 
       if (!queriedMsrs.isEmpty()) {
+        log.info("Uncovered queried Measures: {}", queriedMsrs);
         // Add appropriate message to know which fields are not queryable together
         if (!nonQueryableFields.isEmpty()) {
-
+          log.info("Non queryable fields: {}", nonQueryableFields);
           conflictingFields.addAll(nonQueryableFields);
           conflictingFields.addAll(queriedMsrs);
           throw new FieldsCannotBeQueriedTogetherException(new ConflictingFields(conflictingFields));