lens git commit: LENS-1391 : Fix pending review comments on MaxCoveringFactResolver and LeastPartitionResolver
Repository: lens Updated Branches: refs/heads/master f8a387917 -> c4cd6d84e LENS-1391 : Fix pending review comments on MaxCoveringFactResolver and LeastPartitionResolver Project: http://git-wip-us.apache.org/repos/asf/lens/repo Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/c4cd6d84 Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/c4cd6d84 Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/c4cd6d84 Branch: refs/heads/master Commit: c4cd6d84ec533d84c24717591c890972f5d858cb Parents: f8a3879 Author: Lavkesh Lahngir Authored: Wed Apr 19 11:05:57 2017 +0530 Committer: Amareshwari Sriramadasu Committed: Wed Apr 19 11:05:57 2017 +0530 -- .../lens/cli/commands/LensSchemaCommands.java | 12 +- .../cube/parse/CandidateTablePruneCause.java| 7 ++ .../lens/cube/parse/LeastPartitionResolver.java | 15 +++-- .../cube/parse/MaxCoveringFactResolver.java | 23 ++-- .../lens/cube/parse/StorageCandidate.java | 5 +++-- .../server/query/QueryAPIErrorResponseTest.java | 2 +- 6 files changed, 22 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/lens/blob/c4cd6d84/lens-cli/src/main/java/org/apache/lens/cli/commands/LensSchemaCommands.java -- diff --git a/lens-cli/src/main/java/org/apache/lens/cli/commands/LensSchemaCommands.java b/lens-cli/src/main/java/org/apache/lens/cli/commands/LensSchemaCommands.java index befe4e6..d3f9142 100644 --- a/lens-cli/src/main/java/org/apache/lens/cli/commands/LensSchemaCommands.java +++ b/lens-cli/src/main/java/org/apache/lens/cli/commands/LensSchemaCommands.java @@ -20,19 +20,11 @@ package org.apache.lens.cli.commands; import java.io.File; import java.io.FilenameFilter; -import java.util.List; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; -import org.apache.lens.api.metastore.SchemaTraverser; -import org.apache.lens.api.metastore.XBaseCube; -import org.apache.lens.api.metastore.XDerivedCube; -import org.apache.lens.api.metastore.XDimension; -import org.apache.lens.api.metastore.XDimensionTable; -import org.apache.lens.api.metastore.XFactTable; -import org.apache.lens.api.metastore.XSegmentation; -import org.apache.lens.api.metastore.XStorage; +import org.apache.lens.api.metastore.*; import org.apache.lens.cli.commands.annotations.UserDocumentation; import org.springframework.beans.factory.annotation.Autowired; @@ -42,9 +34,7 @@ import org.springframework.shell.core.annotation.CliCommand; import org.springframework.shell.core.annotation.CliOption; import org.springframework.shell.support.logging.HandlerUtils; import org.springframework.stereotype.Component; -import org.springframework.util.Assert; -import com.google.common.collect.Lists; import com.google.common.collect.Maps; @Component http://git-wip-us.apache.org/repos/asf/lens/blob/c4cd6d84/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java -- diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java index 1c0d356..29af419 100644 --- a/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java +++ b/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java @@ -235,6 +235,7 @@ public class CandidateTablePruneCause { // if a time dim is not supported by the fact. Would be set if and only if // the fact is not partitioned by part col of the time dim and time dim is not a dim attribute private Set unsupportedTimeDims; + private MaxCoveringFactResolver.TimeCovered maxTimeCovered; // time covered // ranges in which fact is invalid private List invalidRanges; @@ -295,6 +296,12 @@ public class CandidateTablePruneCause { return cause; } + public static CandidateTablePruneCause lessData(MaxCoveringFactResolver.TimeCovered timeCovered) { +CandidateTablePruneCause cause = new CandidateTablePruneCause(LESS_DATA); +cause.setMaxTimeCovered(timeCovered); +return cause; + } + public static CandidateTablePruneCause noColumnPartOfAJoinPath(final Collection colSet) { CandidateTablePruneCause cause = new CandidateTablePruneCause(NO_COLUMN_PART_OF_A_JOIN_PATH); http://git-wip-us.apache.org/repos/asf/lens/blob/c4cd6d84/lens-cube/src/main/java/org/apache/lens/cube/parse/LeastPartitionResolver.java -- diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/LeastPartitionResolver.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/LeastPartitionResolver.java index a9bd164..5adbc23 10
[33/51] [abbrv] lens git commit: LENS-1391 : Fix pending review comments on MaxCoveringFactResolver and LeastPartitionResolver
LENS-1391 : Fix pending review comments on MaxCoveringFactResolver and LeastPartitionResolver Project: http://git-wip-us.apache.org/repos/asf/lens/repo Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/c4cd6d84 Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/c4cd6d84 Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/c4cd6d84 Branch: refs/heads/current-release-line Commit: c4cd6d84ec533d84c24717591c890972f5d858cb Parents: f8a3879 Author: Lavkesh Lahngir Authored: Wed Apr 19 11:05:57 2017 +0530 Committer: Amareshwari Sriramadasu Committed: Wed Apr 19 11:05:57 2017 +0530 -- .../lens/cli/commands/LensSchemaCommands.java | 12 +- .../cube/parse/CandidateTablePruneCause.java| 7 ++ .../lens/cube/parse/LeastPartitionResolver.java | 15 +++-- .../cube/parse/MaxCoveringFactResolver.java | 23 ++-- .../lens/cube/parse/StorageCandidate.java | 5 +++-- .../server/query/QueryAPIErrorResponseTest.java | 2 +- 6 files changed, 22 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/lens/blob/c4cd6d84/lens-cli/src/main/java/org/apache/lens/cli/commands/LensSchemaCommands.java -- diff --git a/lens-cli/src/main/java/org/apache/lens/cli/commands/LensSchemaCommands.java b/lens-cli/src/main/java/org/apache/lens/cli/commands/LensSchemaCommands.java index befe4e6..d3f9142 100644 --- a/lens-cli/src/main/java/org/apache/lens/cli/commands/LensSchemaCommands.java +++ b/lens-cli/src/main/java/org/apache/lens/cli/commands/LensSchemaCommands.java @@ -20,19 +20,11 @@ package org.apache.lens.cli.commands; import java.io.File; import java.io.FilenameFilter; -import java.util.List; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; -import org.apache.lens.api.metastore.SchemaTraverser; -import org.apache.lens.api.metastore.XBaseCube; -import org.apache.lens.api.metastore.XDerivedCube; -import org.apache.lens.api.metastore.XDimension; -import org.apache.lens.api.metastore.XDimensionTable; -import org.apache.lens.api.metastore.XFactTable; -import org.apache.lens.api.metastore.XSegmentation; -import org.apache.lens.api.metastore.XStorage; +import org.apache.lens.api.metastore.*; import org.apache.lens.cli.commands.annotations.UserDocumentation; import org.springframework.beans.factory.annotation.Autowired; @@ -42,9 +34,7 @@ import org.springframework.shell.core.annotation.CliCommand; import org.springframework.shell.core.annotation.CliOption; import org.springframework.shell.support.logging.HandlerUtils; import org.springframework.stereotype.Component; -import org.springframework.util.Assert; -import com.google.common.collect.Lists; import com.google.common.collect.Maps; @Component http://git-wip-us.apache.org/repos/asf/lens/blob/c4cd6d84/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java -- diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java index 1c0d356..29af419 100644 --- a/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java +++ b/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java @@ -235,6 +235,7 @@ public class CandidateTablePruneCause { // if a time dim is not supported by the fact. Would be set if and only if // the fact is not partitioned by part col of the time dim and time dim is not a dim attribute private Set unsupportedTimeDims; + private MaxCoveringFactResolver.TimeCovered maxTimeCovered; // time covered // ranges in which fact is invalid private List invalidRanges; @@ -295,6 +296,12 @@ public class CandidateTablePruneCause { return cause; } + public static CandidateTablePruneCause lessData(MaxCoveringFactResolver.TimeCovered timeCovered) { +CandidateTablePruneCause cause = new CandidateTablePruneCause(LESS_DATA); +cause.setMaxTimeCovered(timeCovered); +return cause; + } + public static CandidateTablePruneCause noColumnPartOfAJoinPath(final Collection colSet) { CandidateTablePruneCause cause = new CandidateTablePruneCause(NO_COLUMN_PART_OF_A_JOIN_PATH); http://git-wip-us.apache.org/repos/asf/lens/blob/c4cd6d84/lens-cube/src/main/java/org/apache/lens/cube/parse/LeastPartitionResolver.java -- diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/LeastPartitionResolver.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/LeastPartitionResolver.java index a9bd164..5adbc23 100644 --- a/lens-cube/src/main/java/org/apache/lens/cube/parse/Lea