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 2014/11/26 05:22:39 UTC
incubator-lens git commit: LENS-60 : Checkstyle related changes/fixes
for lens-server-api ( Rajat Khandelwal via amareshwari)
Repository: incubator-lens
Updated Branches:
refs/heads/master 2c4b5798d -> 30d16a394
LENS-60 : Checkstyle related changes/fixes for lens-server-api ( Rajat Khandelwal via amareshwari)
Project: http://git-wip-us.apache.org/repos/asf/incubator-lens/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-lens/commit/30d16a39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-lens/tree/30d16a39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-lens/diff/30d16a39
Branch: refs/heads/master
Commit: 30d16a39447f0737f3ef5f74c15d7991232ef093
Parents: 2c4b579
Author: Amareshwari Sriramdasu <am...@inmobi.com>
Authored: Wed Nov 26 09:52:05 2014 +0530
Committer: Amareshwari Sriramdasu <am...@inmobi.com>
Committed: Wed Nov 26 09:52:05 2014 +0530
----------------------------------------------------------------------
lens-api/pom.xml | 53 ++---
.../java/org/apache/lens/api/APIResult.java | 38 ++--
.../main/java/org/apache/lens/api/DateTime.java | 13 +-
.../main/java/org/apache/lens/api/LensConf.java | 25 +--
.../java/org/apache/lens/api/LensException.java | 12 +-
.../org/apache/lens/api/LensSessionHandle.java | 31 +--
.../main/java/org/apache/lens/api/Priority.java | 20 +-
.../java/org/apache/lens/api/StringList.java | 12 +-
.../lens/api/query/InMemoryQueryResult.java | 17 +-
.../lens/api/query/LensPreparedQuery.java | 42 ++--
.../org/apache/lens/api/query/LensQuery.java | 82 +++++---
.../lens/api/query/PersistentQueryResult.java | 16 +-
.../org/apache/lens/api/query/QueryCost.java | 16 +-
.../org/apache/lens/api/query/QueryHandle.java | 22 +--
.../api/query/QueryHandleWithResultSet.java | 17 +-
.../org/apache/lens/api/query/QueryPlan.java | 117 +++++++----
.../lens/api/query/QueryPrepareHandle.java | 16 +-
.../org/apache/lens/api/query/QueryResult.java | 8 +-
.../lens/api/query/QueryResultSetMetadata.java | 15 +-
.../org/apache/lens/api/query/QueryStatus.java | 82 +++++---
.../lens/api/query/QuerySubmitResult.java | 4 +-
.../org/apache/lens/api/query/ResultColumn.java | 22 ++-
.../apache/lens/api/query/ResultColumnType.java | 80 ++++++--
.../org/apache/lens/api/query/ResultRow.java | 15 +-
.../org/apache/lens/api/query/SubmitOp.java | 20 +-
lens-api/src/main/resources/cube-0.1.xsd | 192 +++++++++----------
.../apache/lens/doc/TestGenerateConfigDoc.java | 155 ++++++++-------
.../lens/server/api/driver/DriverSelector.java | 11 +-
.../lens/server/api/driver/LensDriver.java | 134 +++++--------
.../server/api/driver/MinQueryCostSelector.java | 11 +-
30 files changed, 738 insertions(+), 560 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/pom.xml
----------------------------------------------------------------------
diff --git a/lens-api/pom.xml b/lens-api/pom.xml
index f685f1b..0e17893 100644
--- a/lens-api/pom.xml
+++ b/lens-api/pom.xml
@@ -19,33 +19,34 @@
under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <name>Lens API</name>
- <parent>
- <artifactId>lens-parent</artifactId>
- <groupId>org.apache.lens</groupId>
- <version>2.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>lens-api</artifactId>
- <packaging>jar</packaging>
- <description> The client api </description>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <name>Lens API</name>
+ <parent>
+ <artifactId>lens-parent</artifactId>
+ <groupId>org.apache.lens</groupId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
- <dependencies>
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- </dependency>
- </dependencies>
+ <artifactId>lens-api</artifactId>
+ <packaging>jar</packaging>
+ <description>The client api</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ </dependency>
+ </dependencies>
<build>
<plugins>
<plugin>
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/APIResult.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/APIResult.java b/lens-api/src/main/java/org/apache/lens/api/APIResult.java
index 9a383cd..fadfc94 100644
--- a/lens-api/src/main/java/org/apache/lens/api/APIResult.java
+++ b/lens-api/src/main/java/org/apache/lens/api/APIResult.java
@@ -18,6 +18,10 @@
*/
package org.apache.lens.api;
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
@@ -26,9 +30,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.StringWriter;
-import lombok.AccessLevel;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
/**
* APIResult is the output returned by all the APIs; status-SUCCEEDED or FAILED message- detailed message.
@@ -41,18 +42,25 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class APIResult {
- /** The status. */
+ /**
+ * The status.
+ */
@XmlElement
@Getter
private Status status;
- /** The message. */
+ /**
+ * The message.
+ */
@XmlElement
@Getter
private String message;
- /** The Constant JAXB_CONTEXT. */
+ /**
+ * The Constant JAXB_CONTEXT.
+ */
private static final JAXBContext JAXB_CONTEXT;
+
static {
try {
JAXB_CONTEXT = JAXBContext.newInstance(APIResult.class);
@@ -66,21 +74,25 @@ public class APIResult {
*/
public static enum Status {
- /** The succeeded. */
+ /**
+ * The succeeded.
+ */
SUCCEEDED,
- /** The partial. */
+ /**
+ * The partial.
+ */
PARTIAL,
- /** The failed. */
+ /**
+ * The failed.
+ */
FAILED
}
/**
* Instantiates a new API result.
*
- * @param status
- * the status
- * @param message
- * the message
+ * @param status the status
+ * @param message the message
*/
public APIResult(Status status, String message) {
super();
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/DateTime.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/DateTime.java b/lens-api/src/main/java/org/apache/lens/api/DateTime.java
index cca7763..d8f4365 100644
--- a/lens-api/src/main/java/org/apache/lens/api/DateTime.java
+++ b/lens-api/src/main/java/org/apache/lens/api/DateTime.java
@@ -21,15 +21,10 @@
*/
package org.apache.lens.api;
-import java.util.Date;
+import lombok.*;
import javax.xml.bind.annotation.XmlRootElement;
-
-import lombok.AccessLevel;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
+import java.util.Date;
/**
* The Class DateTime.
@@ -48,7 +43,9 @@ import lombok.Setter;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class DateTime {
- /** The Date. */
+ /**
+ * The Date.
+ */
@Getter
@Setter
private Date date;
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/LensConf.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/LensConf.java b/lens-api/src/main/java/org/apache/lens/api/LensConf.java
index 7352996..c2c0bf5 100644
--- a/lens-api/src/main/java/org/apache/lens/api/LensConf.java
+++ b/lens-api/src/main/java/org/apache/lens/api/LensConf.java
@@ -21,15 +21,14 @@
*/
package org.apache.lens.api;
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
-
-import lombok.Getter;
-import lombok.NoArgsConstructor;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
/**
* The Class LensConf.
@@ -41,10 +40,14 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
public class LensConf implements Serializable {
- /** The Constant serialVersionUID. */
+ /**
+ * The Constant serialVersionUID.
+ */
private static final long serialVersionUID = 1L;
- /** The properties. */
+ /**
+ * The properties.
+ */
@XmlElementWrapper
@Getter
private final Map<String, String> properties = new HashMap<String, String>();
@@ -52,10 +55,8 @@ public class LensConf implements Serializable {
/**
* Adds the property.
*
- * @param key
- * the key
- * @param value
- * the value
+ * @param key the key
+ * @param value the value
*/
public void addProperty(String key, String value) {
properties.put(key, value);
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/LensException.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/LensException.java b/lens-api/src/main/java/org/apache/lens/api/LensException.java
index 35f1c2e..9a4f173 100644
--- a/lens-api/src/main/java/org/apache/lens/api/LensException.java
+++ b/lens-api/src/main/java/org/apache/lens/api/LensException.java
@@ -30,8 +30,7 @@ public class LensException extends Exception {
/**
* Instantiates a new lens exception.
*
- * @param msg
- * the msg
+ * @param msg the msg
*/
public LensException(String msg) {
super(msg);
@@ -40,10 +39,8 @@ public class LensException extends Exception {
/**
* Instantiates a new lens exception.
*
- * @param msg
- * the msg
- * @param th
- * the th
+ * @param msg the msg
+ * @param th the th
*/
public LensException(String msg, Throwable th) {
super(msg, th);
@@ -59,8 +56,7 @@ public class LensException extends Exception {
/**
* Instantiates a new lens exception.
*
- * @param th
- * the th
+ * @param th the th
*/
public LensException(Throwable th) {
super(th);
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/LensSessionHandle.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/LensSessionHandle.java b/lens-api/src/main/java/org/apache/lens/api/LensSessionHandle.java
index de122a4..908284b 100644
--- a/lens-api/src/main/java/org/apache/lens/api/LensSessionHandle.java
+++ b/lens-api/src/main/java/org/apache/lens/api/LensSessionHandle.java
@@ -21,9 +21,10 @@
*/
package org.apache.lens.api;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.util.UUID;
+import lombok.AccessLevel;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
@@ -31,11 +32,9 @@ import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-
-import lombok.AccessLevel;
-import lombok.Getter;
-import lombok.AllArgsConstructor;
-import lombok.NoArgsConstructor;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.UUID;
/**
* The Class LensSessionHandle.
@@ -56,18 +55,25 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class LensSessionHandle {
- /** The public id. */
+ /**
+ * The public id.
+ */
@XmlElement
@Getter
private UUID publicId;
- /** The secret id. */
+ /**
+ * The secret id.
+ */
@XmlElement
@Getter
private UUID secretId;
- /** The Constant JAXB_CONTEXT. */
+ /**
+ * The Constant JAXB_CONTEXT.
+ */
private static final JAXBContext JAXB_CONTEXT;
+
static {
try {
JAXB_CONTEXT = JAXBContext.newInstance(LensSessionHandle.class);
@@ -79,8 +85,7 @@ public class LensSessionHandle {
/**
* Value of.
*
- * @param sessionStr
- * the session str
+ * @param sessionStr the session str
* @return the lens session handle
*/
public static LensSessionHandle valueOf(String sessionStr) {
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/Priority.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/Priority.java b/lens-api/src/main/java/org/apache/lens/api/Priority.java
index 47c2834..8d6390b 100644
--- a/lens-api/src/main/java/org/apache/lens/api/Priority.java
+++ b/lens-api/src/main/java/org/apache/lens/api/Priority.java
@@ -26,18 +26,28 @@ package org.apache.lens.api;
*/
public enum Priority {
- /** The very high. */
+ /**
+ * The very high.
+ */
VERY_HIGH,
- /** The high. */
+ /**
+ * The high.
+ */
HIGH,
- /** The normal. */
+ /**
+ * The normal.
+ */
NORMAL,
- /** The low. */
+ /**
+ * The low.
+ */
LOW,
- /** The very low. */
+ /**
+ * The very low.
+ */
VERY_LOW
}
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/StringList.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/StringList.java b/lens-api/src/main/java/org/apache/lens/api/StringList.java
index 8b33e7a..c037d5c 100644
--- a/lens-api/src/main/java/org/apache/lens/api/StringList.java
+++ b/lens-api/src/main/java/org/apache/lens/api/StringList.java
@@ -21,15 +21,11 @@
*/
package org.apache.lens.api;
+import lombok.*;
+
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;
-import lombok.AccessLevel;
-import lombok.Getter;
-import lombok.AllArgsConstructor;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
/**
* The Class StringList.
*/
@@ -47,7 +43,9 @@ import lombok.Setter;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class StringList {
- /** The elements. */
+ /**
+ * The elements.
+ */
@Getter
@Setter
private List<String> elements;
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/InMemoryQueryResult.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/InMemoryQueryResult.java b/lens-api/src/main/java/org/apache/lens/api/query/InMemoryQueryResult.java
index 432d9c3..e9cf60d 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/InMemoryQueryResult.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/InMemoryQueryResult.java
@@ -21,17 +21,16 @@
*/
package org.apache.lens.api.query;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-
import lombok.AccessLevel;
-import lombok.Getter;
import lombok.AllArgsConstructor;
+import lombok.Getter;
import lombok.NoArgsConstructor;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* The Class InMemoryQueryResult.
*/
@@ -49,7 +48,9 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class InMemoryQueryResult extends QueryResult {
- /** The rows. */
+ /**
+ * The rows.
+ */
@XmlElementWrapper
@Getter
private List<ResultRow> rows = new ArrayList<ResultRow>();
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/LensPreparedQuery.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/LensPreparedQuery.java b/lens-api/src/main/java/org/apache/lens/api/query/LensPreparedQuery.java
index 4848551..e301cc5 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/LensPreparedQuery.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/LensPreparedQuery.java
@@ -21,17 +21,15 @@
*/
package org.apache.lens.api.query;
-import java.util.Date;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.lens.api.LensConf;
-
import lombok.AccessLevel;
-import lombok.Getter;
import lombok.AllArgsConstructor;
+import lombok.Getter;
import lombok.NoArgsConstructor;
+import org.apache.lens.api.LensConf;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Date;
/**
* The Class LensPreparedQuery.
@@ -62,37 +60,51 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class LensPreparedQuery {
- /** The prepare handle. */
+ /**
+ * The prepare handle.
+ */
@XmlElement
@Getter
private QueryPrepareHandle prepareHandle;
- /** The user query. */
+ /**
+ * The user query.
+ */
@XmlElement
@Getter
private String userQuery;
- /** The prepared time. */
+ /**
+ * The prepared time.
+ */
@XmlElement
@Getter
private Date preparedTime;
- /** The prepared user. */
+ /**
+ * The prepared user.
+ */
@XmlElement
@Getter
private String preparedUser;
- /** The selected driver class name. */
+ /**
+ * The selected driver class name.
+ */
@XmlElement
@Getter
private String selectedDriverClassName;
- /** The driver query. */
+ /**
+ * The driver query.
+ */
@XmlElement
@Getter
private String driverQuery;
- /** The conf. */
+ /**
+ * The conf.
+ */
@XmlElement
@Getter
private LensConf conf;
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/LensQuery.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/LensQuery.java b/lens-api/src/main/java/org/apache/lens/api/query/LensQuery.java
index 8d15b38..9af0d06 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/LensQuery.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/LensQuery.java
@@ -21,13 +21,15 @@
*/
package org.apache.lens.api.query;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
+import lombok.AccessLevel;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
import org.apache.lens.api.LensConf;
import org.apache.lens.api.Priority;
-import lombok.*;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
/**
* The Class LensQuery.
@@ -80,92 +82,128 @@ import lombok.*;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class LensQuery {
- /** The query handle. */
+ /**
+ * The query handle.
+ */
@XmlElement
@Getter
private QueryHandle queryHandle;
- /** The user query. */
+ /**
+ * The user query.
+ */
@XmlElement
@Getter
private String userQuery;
- /** The submitted user. */
+ /**
+ * The submitted user.
+ */
@XmlElement
@Getter
private String submittedUser;
- /** The priority. */
+ /**
+ * The priority.
+ */
@XmlElement
@Getter
private Priority priority;
- /** The is persistent. */
+ /**
+ * The is persistent.
+ */
@XmlElement
@Getter
private boolean isPersistent;
- /** The selected driver class name. */
+ /**
+ * The selected driver class name.
+ */
@XmlElement
@Getter
private String selectedDriverClassName;
- /** The driver query. */
+ /**
+ * The driver query.
+ */
@XmlElement
@Getter
private String driverQuery;
- /** The status. */
+ /**
+ * The status.
+ */
@XmlElement
@Getter
private QueryStatus status;
- /** The result set path. */
+ /**
+ * The result set path.
+ */
@XmlElement
@Getter
private String resultSetPath;
- /** The driver op handle. */
+ /**
+ * The driver op handle.
+ */
@XmlElement
@Getter
private String driverOpHandle;
- /** The query conf. */
+ /**
+ * The query conf.
+ */
@XmlElement
@Getter
private LensConf queryConf;
- /** The submission time. */
+ /**
+ * The submission time.
+ */
@XmlElement
@Getter
private long submissionTime;
- /** The launch time. */
+ /**
+ * The launch time.
+ */
@XmlElement
@Getter
private long launchTime;
- /** The driver start time. */
+ /**
+ * The driver start time.
+ */
@XmlElement
@Getter
private long driverStartTime;
- /** The driver finish time. */
+ /**
+ * The driver finish time.
+ */
@XmlElement
@Getter
private long driverFinishTime;
- /** The finish time. */
+ /**
+ * The finish time.
+ */
@XmlElement
@Getter
private long finishTime;
- /** The closed time. */
+ /**
+ * The closed time.
+ */
@XmlElement
@Getter
private long closedTime;
- /** The query name. */
+ /**
+ * The query name.
+ */
@XmlElement
@Getter
private String queryName;
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/PersistentQueryResult.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/PersistentQueryResult.java b/lens-api/src/main/java/org/apache/lens/api/query/PersistentQueryResult.java
index 0af181d..6a58b4e 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/PersistentQueryResult.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/PersistentQueryResult.java
@@ -21,14 +21,14 @@
*/
package org.apache.lens.api.query;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
import lombok.AccessLevel;
-import lombok.Getter;
import lombok.AllArgsConstructor;
+import lombok.Getter;
import lombok.NoArgsConstructor;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
/**
* The Class PersistentQueryResult.
*/
@@ -48,12 +48,16 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class PersistentQueryResult extends QueryResult {
- /** The persisted uri. */
+ /**
+ * The persisted uri.
+ */
@XmlElement
@Getter
private String persistedURI;
- /** The num rows. */
+ /**
+ * The num rows.
+ */
@XmlElement
@Getter
private int numRows;
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/QueryCost.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/QueryCost.java b/lens-api/src/main/java/org/apache/lens/api/query/QueryCost.java
index b384b05..50d4672 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/QueryCost.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/QueryCost.java
@@ -21,14 +21,14 @@
*/
package org.apache.lens.api.query;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
import lombok.AccessLevel;
-import lombok.Getter;
import lombok.AllArgsConstructor;
+import lombok.Getter;
import lombok.NoArgsConstructor;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
/**
* The Class QueryCost.
*/
@@ -48,12 +48,16 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class QueryCost implements Comparable<QueryCost> {
- /** The estimated exec time millis. */
+ /**
+ * The estimated exec time millis.
+ */
@XmlElement
@Getter
private long estimatedExecTimeMillis;
- /** The estimated resource usage. */
+ /**
+ * The estimated resource usage.
+ */
@XmlElement
@Getter
private double estimatedResourceUsage;
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/QueryHandle.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/QueryHandle.java b/lens-api/src/main/java/org/apache/lens/api/query/QueryHandle.java
index 84f1ae5..5116590 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/QueryHandle.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/QueryHandle.java
@@ -21,17 +21,12 @@
*/
package org.apache.lens.api.query;
-import java.io.Serializable;
-import java.util.UUID;
+import lombok.*;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-
-import lombok.AccessLevel;
-import lombok.EqualsAndHashCode;
-import lombok.Getter;
-import lombok.AllArgsConstructor;
-import lombok.NoArgsConstructor;
+import java.io.Serializable;
+import java.util.UUID;
/**
* The Class QueryHandle.
@@ -56,10 +51,14 @@ import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = false)
public class QueryHandle extends QuerySubmitResult implements Serializable {
- /** The Constant serialVersionUID. */
+ /**
+ * The Constant serialVersionUID.
+ */
private static final long serialVersionUID = 1L;
- /** The handle id. */
+ /**
+ * The handle id.
+ */
@XmlElement
@Getter
private UUID handleId;
@@ -67,8 +66,7 @@ public class QueryHandle extends QuerySubmitResult implements Serializable {
/**
* From string.
*
- * @param handle
- * the handle
+ * @param handle the handle
* @return the query handle
*/
public static QueryHandle fromString(String handle) {
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/QueryHandleWithResultSet.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/QueryHandleWithResultSet.java b/lens-api/src/main/java/org/apache/lens/api/query/QueryHandleWithResultSet.java
index 6b95895..7f03edf 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/QueryHandleWithResultSet.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/QueryHandleWithResultSet.java
@@ -21,14 +21,14 @@
*/
package org.apache.lens.api.query;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
/**
* The Class QueryHandleWithResultSet.
*/
@@ -39,12 +39,16 @@ import lombok.Setter;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class QueryHandleWithResultSet extends QuerySubmitResult {
- /** The query handle. */
+ /**
+ * The query handle.
+ */
@XmlElement
@Getter
private QueryHandle queryHandle;
- /** The result. */
+ /**
+ * The result.
+ */
@Getter
@Setter
private QueryResult result;
@@ -52,8 +56,7 @@ public class QueryHandleWithResultSet extends QuerySubmitResult {
/**
* Instantiates a new query handle with result set.
*
- * @param handle
- * the handle
+ * @param handle the handle
*/
public QueryHandleWithResultSet(QueryHandle handle) {
this.queryHandle = handle;
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/QueryPlan.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/QueryPlan.java b/lens-api/src/main/java/org/apache/lens/api/query/QueryPlan.java
index 90552fc..29353b6 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/QueryPlan.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/QueryPlan.java
@@ -21,20 +21,15 @@
*/
package org.apache.lens.api.query;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.List;
-import java.util.Map;
+import lombok.*;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
-
-import lombok.AccessLevel;
-import lombok.Getter;
-import lombok.AllArgsConstructor;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.List;
+import java.util.Map;
/**
* The Class QueryPlan.
@@ -99,121 +94,169 @@ import lombok.Setter;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class QueryPlan extends QuerySubmitResult {
- /** The num joins. */
+ /**
+ * The num joins.
+ */
@XmlElement
@Getter
private int numJoins = 0;
- /** The num gbys. */
+ /**
+ * The num gbys.
+ */
@XmlElement
@Getter
private int numGbys = 0;
- /** The num sels. */
+ /**
+ * The num sels.
+ */
@XmlElement
@Getter
private int numSels = 0;
- /** The num sel di. */
+ /**
+ * The num sel di.
+ */
@XmlElement
@Getter
private int numSelDi = 0;
- /** The num having. */
+ /**
+ * The num having.
+ */
@XmlElement
@Getter
private int numHaving = 0;
- /** The num obys. */
+ /**
+ * The num obys.
+ */
@XmlElement
@Getter
private int numObys = 0;
- /** The num aggr exprs. */
+ /**
+ * The num aggr exprs.
+ */
@XmlElement
@Getter
private int numAggrExprs = 0;
- /** The num filters. */
+ /**
+ * The num filters.
+ */
@XmlElement
@Getter
private int numFilters = 0;
- /** The tables queried. */
+ /**
+ * The tables queried.
+ */
@XmlElementWrapper
@Getter
private List<String> tablesQueried;
- /** The has sub query. */
+ /**
+ * The has sub query.
+ */
@XmlElement
@Getter
private boolean hasSubQuery = false;
- /** The exec mode. */
+ /**
+ * The exec mode.
+ */
@XmlElement
@Getter
private String execMode;
- /** The scan mode. */
+ /**
+ * The scan mode.
+ */
@XmlElement
@Getter
private String scanMode;
- /** The table weights. */
+ /**
+ * The table weights.
+ */
@XmlElementWrapper
@Getter
private Map<String, Double> tableWeights;
- /** The join weight. */
+ /**
+ * The join weight.
+ */
@XmlElement
@Getter
private Double joinWeight;
- /** The gby weight. */
+ /**
+ * The gby weight.
+ */
@XmlElement
@Getter
private Double gbyWeight;
- /** The filter weight. */
+ /**
+ * The filter weight.
+ */
@XmlElement
@Getter
private Double filterWeight;
- /** The having weight. */
+ /**
+ * The having weight.
+ */
@XmlElement
@Getter
private Double havingWeight;
- /** The oby weight. */
+ /**
+ * The oby weight.
+ */
@XmlElement
@Getter
private Double obyWeight;
- /** The select weight. */
+ /**
+ * The select weight.
+ */
@XmlElement
@Getter
private Double selectWeight;
- /** The prepare handle. */
+ /**
+ * The prepare handle.
+ */
@Getter
@Setter
private QueryPrepareHandle prepareHandle;
- /** The plan string. */
+ /**
+ * The plan string.
+ */
@XmlElement
private String planString;
- /** The query cost. */
+ /**
+ * The query cost.
+ */
@XmlElement
@Getter
private QueryCost queryCost;
- /** The error. */
+ /**
+ * The error.
+ */
@XmlElement
@Getter
private boolean error = false;
- /** The error msg. */
+ /**
+ * The error msg.
+ */
@XmlElement
@Getter
private String errorMsg;
@@ -225,10 +268,8 @@ public class QueryPlan extends QuerySubmitResult {
/**
* Instantiates a new query plan.
*
- * @param hasError
- * the has error
- * @param errorMsg
- * the error msg
+ * @param hasError the has error
+ * @param errorMsg the error msg
*/
public QueryPlan(boolean hasError, String errorMsg) {
this.error = hasError;
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/QueryPrepareHandle.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/QueryPrepareHandle.java b/lens-api/src/main/java/org/apache/lens/api/query/QueryPrepareHandle.java
index a7b3b42..f977c0b 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/QueryPrepareHandle.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/QueryPrepareHandle.java
@@ -21,16 +21,11 @@
*/
package org.apache.lens.api.query;
-import java.util.UUID;
+import lombok.*;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-
-import lombok.AccessLevel;
-import lombok.EqualsAndHashCode;
-import lombok.Getter;
-import lombok.AllArgsConstructor;
-import lombok.NoArgsConstructor;
+import java.util.UUID;
/**
* The Class QueryPrepareHandle.
@@ -55,7 +50,9 @@ import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = false)
public class QueryPrepareHandle extends QuerySubmitResult {
- /** The prepare handle id. */
+ /**
+ * The prepare handle id.
+ */
@XmlElement
@Getter
private UUID prepareHandleId;
@@ -63,8 +60,7 @@ public class QueryPrepareHandle extends QuerySubmitResult {
/**
* From string.
*
- * @param handle
- * the handle
+ * @param handle the handle
* @return the query prepare handle
*/
public static QueryPrepareHandle fromString(String handle) {
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/QueryResult.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/QueryResult.java b/lens-api/src/main/java/org/apache/lens/api/query/QueryResult.java
index 2a50d94..f3d8276 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/QueryResult.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/QueryResult.java
@@ -21,17 +21,17 @@
*/
package org.apache.lens.api.query;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
/**
* The Class QueryResult.
*/
@XmlRootElement
-@XmlSeeAlso({ PersistentQueryResult.class, InMemoryQueryResult.class })
+@XmlSeeAlso({PersistentQueryResult.class, InMemoryQueryResult.class})
/**
* Instantiates a new query result.
*/
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/QueryResultSetMetadata.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/QueryResultSetMetadata.java b/lens-api/src/main/java/org/apache/lens/api/query/QueryResultSetMetadata.java
index 23506be..3ecfa0c 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/QueryResultSetMetadata.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/QueryResultSetMetadata.java
@@ -21,16 +21,15 @@
*/
package org.apache.lens.api.query;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-
import lombok.AccessLevel;
-import lombok.Getter;
import lombok.AllArgsConstructor;
+import lombok.Getter;
import lombok.NoArgsConstructor;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
/**
* The Class QueryResultSetMetadata.
*/
@@ -48,7 +47,9 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class QueryResultSetMetadata {
- /** The columns. */
+ /**
+ * The columns.
+ */
@XmlElementWrapper
@Getter
private List<ResultColumn> columns;
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/QueryStatus.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/QueryStatus.java b/lens-api/src/main/java/org/apache/lens/api/query/QueryStatus.java
index 8270ee5..84c210e 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/QueryStatus.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/QueryStatus.java
@@ -21,16 +21,11 @@
*/
package org.apache.lens.api.query;
-import java.io.Serializable;
+import lombok.*;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-
-import lombok.AccessLevel;
-import lombok.Getter;
-import lombok.AllArgsConstructor;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
+import java.io.Serializable;
/**
* The Class QueryStatus.
@@ -59,7 +54,9 @@ import lombok.Setter;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class QueryStatus implements Serializable {
- /** The Constant serialVersionUID. */
+ /**
+ * The Constant serialVersionUID.
+ */
private static final long serialVersionUID = 1L;
/**
@@ -67,60 +64,90 @@ public class QueryStatus implements Serializable {
*/
public enum Status {
- /** The new. */
+ /**
+ * The new.
+ */
NEW,
- /** The queued. */
+ /**
+ * The queued.
+ */
QUEUED,
- /** The launched. */
+ /**
+ * The launched.
+ */
LAUNCHED,
- /** The running. */
+ /**
+ * The running.
+ */
RUNNING,
- /** The executed. */
+ /**
+ * The executed.
+ */
EXECUTED,
- /** The successful. */
+ /**
+ * The successful.
+ */
SUCCESSFUL,
- /** The failed. */
+ /**
+ * The failed.
+ */
FAILED,
- /** The canceled. */
+ /**
+ * The canceled.
+ */
CANCELED,
- /** The closed. */
+ /**
+ * The closed.
+ */
CLOSED
}
- /** The progress. */
+ /**
+ * The progress.
+ */
@XmlElement
@Getter
private double progress;
- /** The status. */
+ /**
+ * The status.
+ */
@XmlElement
@Getter
private Status status;
- /** The status message. */
+ /**
+ * The status message.
+ */
@XmlElement
@Getter
private String statusMessage;
- /** The is result set available. */
+ /**
+ * The is result set available.
+ */
@XmlElement
@Getter
private boolean isResultSetAvailable = false;
- /** The progress message. */
+ /**
+ * The progress message.
+ */
@Getter
@Setter
private String progressMessage;
- /** The error message. */
+ /**
+ * The error message.
+ */
@Getter
@Setter
private String errorMessage;
@@ -156,10 +183,8 @@ public class QueryStatus implements Serializable {
/**
* Checks if is valid transition.
*
- * @param oldState
- * the old state
- * @param newState
- * the new state
+ * @param oldState the old state
+ * @param newState the new state
* @return true, if is valid transition
*/
public static boolean isValidTransition(Status oldState, Status newState) {
@@ -220,8 +245,7 @@ public class QueryStatus implements Serializable {
/**
* Checks if is validate transition.
*
- * @param newState
- * the new state
+ * @param newState the new state
* @return true, if is validate transition
*/
public boolean isValidateTransition(Status newState) {
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/QuerySubmitResult.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/QuerySubmitResult.java b/lens-api/src/main/java/org/apache/lens/api/query/QuerySubmitResult.java
index 66c1587..a1986b6 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/QuerySubmitResult.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/QuerySubmitResult.java
@@ -28,8 +28,8 @@ import javax.xml.bind.annotation.XmlSeeAlso;
* The Class QuerySubmitResult.
*/
@XmlRootElement
-@XmlSeeAlso({ QueryHandle.class, QueryPrepareHandle.class, QueryHandleWithResultSet.class,
- org.apache.lens.api.query.QueryPlan.class })
+@XmlSeeAlso({QueryHandle.class, QueryPrepareHandle.class, QueryHandleWithResultSet.class,
+ org.apache.lens.api.query.QueryPlan.class})
public abstract class QuerySubmitResult {
}
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/ResultColumn.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/ResultColumn.java b/lens-api/src/main/java/org/apache/lens/api/query/ResultColumn.java
index 7f97b1e..dfb04cf 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/ResultColumn.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/ResultColumn.java
@@ -21,14 +21,14 @@
*/
package org.apache.lens.api.query;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
import lombok.AccessLevel;
-import lombok.Getter;
import lombok.AllArgsConstructor;
+import lombok.Getter;
import lombok.NoArgsConstructor;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
/**
* The Class ResultColumn.
*/
@@ -48,12 +48,16 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class ResultColumn {
- /** The name. */
+ /**
+ * The name.
+ */
@XmlElement
@Getter
private String name;
- /** The type. */
+ /**
+ * The type.
+ */
@XmlElement
@Getter
private ResultColumnType type;
@@ -61,10 +65,8 @@ public class ResultColumn {
/**
* Instantiates a new result column.
*
- * @param name
- * the name
- * @param type
- * the type
+ * @param name the name
+ * @param type the type
*/
public ResultColumn(String name, String type) {
this(name, ResultColumnType.valueOf(type.toUpperCase()));
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/ResultColumnType.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/ResultColumnType.java b/lens-api/src/main/java/org/apache/lens/api/query/ResultColumnType.java
index 504494a..824f2ce 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/ResultColumnType.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/ResultColumnType.java
@@ -29,51 +29,91 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public enum ResultColumnType {
- /** The boolean. */
+ /**
+ * The boolean.
+ */
BOOLEAN, // boolean
- /** The tinyint. */
+ /**
+ * The tinyint.
+ */
TINYINT, // short
- /** The smallint. */
+ /**
+ * The smallint.
+ */
SMALLINT, // short
- /** The int. */
+ /**
+ * The int.
+ */
INT, // int
- /** The bigint. */
+ /**
+ * The bigint.
+ */
BIGINT, // long
- /** The float. */
+ /**
+ * The float.
+ */
FLOAT, // float
- /** The double. */
+ /**
+ * The double.
+ */
DOUBLE, // double
- /** The string. */
+ /**
+ * The string.
+ */
STRING, // string
- /** The timestamp. */
+ /**
+ * The timestamp.
+ */
TIMESTAMP, // Date
- /** The binary. */
+ /**
+ * The binary.
+ */
BINARY, // byte[]
- /** The array. */
+ /**
+ * The array.
+ */
ARRAY, // List
- /** The map. */
+ /**
+ * The map.
+ */
MAP, // Map
- /** The struct. */
+ /**
+ * The struct.
+ */
STRUCT,
- /** The uniontype. */
+ /**
+ * The uniontype.
+ */
UNIONTYPE,
- /** The user defined. */
+ /**
+ * The user defined.
+ */
USER_DEFINED,
- /** The decimal. */
+ /**
+ * The decimal.
+ */
DECIMAL,
- /** The null. */
+ /**
+ * The null.
+ */
NULL,
- /** The date. */
+ /**
+ * The date.
+ */
DATE,
- /** The varchar. */
+ /**
+ * The varchar.
+ */
VARCHAR,
- /** The char. */
+ /**
+ * The char.
+ */
CHAR;
}
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/ResultRow.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/ResultRow.java b/lens-api/src/main/java/org/apache/lens/api/query/ResultRow.java
index e2d2b80..1ed3b83 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/ResultRow.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/ResultRow.java
@@ -21,16 +21,15 @@
*/
package org.apache.lens.api.query;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-
import lombok.AccessLevel;
-import lombok.Getter;
import lombok.AllArgsConstructor;
+import lombok.Getter;
import lombok.NoArgsConstructor;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
/**
* The Class ResultRow.
*/
@@ -48,7 +47,9 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class ResultRow {
- /** The values. */
+ /**
+ * The values.
+ */
@XmlElementWrapper
@Getter
List<Object> values;
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/java/org/apache/lens/api/query/SubmitOp.java
----------------------------------------------------------------------
diff --git a/lens-api/src/main/java/org/apache/lens/api/query/SubmitOp.java b/lens-api/src/main/java/org/apache/lens/api/query/SubmitOp.java
index b57395a..8affd1d 100644
--- a/lens-api/src/main/java/org/apache/lens/api/query/SubmitOp.java
+++ b/lens-api/src/main/java/org/apache/lens/api/query/SubmitOp.java
@@ -26,18 +26,28 @@ package org.apache.lens.api.query;
*/
public enum SubmitOp {
- /** The execute. */
+ /**
+ * The execute.
+ */
EXECUTE,
- /** The explain. */
+ /**
+ * The explain.
+ */
EXPLAIN,
- /** The prepare. */
+ /**
+ * The prepare.
+ */
PREPARE,
- /** The explain and prepare. */
+ /**
+ * The explain and prepare.
+ */
EXPLAIN_AND_PREPARE,
- /** The execute with timeout. */
+ /**
+ * The execute with timeout.
+ */
EXECUTE_WITH_TIMEOUT
}
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/main/resources/cube-0.1.xsd
----------------------------------------------------------------------
diff --git a/lens-api/src/main/resources/cube-0.1.xsd b/lens-api/src/main/resources/cube-0.1.xsd
index 6d3fab2..000d27e 100644
--- a/lens-api/src/main/resources/cube-0.1.xsd
+++ b/lens-api/src/main/resources/cube-0.1.xsd
@@ -36,12 +36,12 @@
<xs:complexType name="x_cube">
<xs:annotation>
<xs:documentation>
- XCube can be a base cube for which user would give the full
- specification of the measures and dimensions. XCube can be
- a Derived cube, for which user would specify only the measure names,
- dimension names and parent. Derived cube can have subset of measure
- names and dimension names defined for its parent. It can have different
- weight and properties associated with.
+ XCube can be a base cube for which user would give the full
+ specification of the measures and dimensions. XCube can be
+ a Derived cube, for which user would specify only the measure names,
+ dimension names and parent. Derived cube can have subset of measure
+ names and dimension names defined for its parent. It can have different
+ weight and properties associated with.
</xs:documentation>
</xs:annotation>
<xs:sequence>
@@ -64,7 +64,7 @@
<xs:complexType name="x_dimension">
<xs:annotation>
<xs:documentation>
- XDimension consists the set dimension attributes
+ XDimension consists the set dimension attributes
</xs:documentation>
</xs:annotation>
<xs:sequence>
@@ -104,17 +104,17 @@
</xs:annotation>
<xs:attribute type="xs:string" name="name" use="required"/>
<xs:attribute type="xs:string" name="type" use="required"/>
- <xs:attribute type="xs:string" name="description" />
- <xs:attribute type="xs:string" name="display_string" />
- <xs:attribute type="xs:string" name="default_aggr" />
- <xs:attribute type="xs:string" name="format_string" />
- <xs:attribute type="xs:dateTime" name="start_time" />
- <xs:attribute type="xs:dateTime" name="end_time" />
- <xs:attribute type="xs:double" name="cost" />
- <xs:attribute type="xs:string" name="unit" />
+ <xs:attribute type="xs:string" name="description"/>
+ <xs:attribute type="xs:string" name="display_string"/>
+ <xs:attribute type="xs:string" name="default_aggr"/>
+ <xs:attribute type="xs:string" name="format_string"/>
+ <xs:attribute type="xs:dateTime" name="start_time"/>
+ <xs:attribute type="xs:dateTime" name="end_time"/>
+ <xs:attribute type="xs:double" name="cost"/>
+ <xs:attribute type="xs:string" name="unit"/>
<xs:attribute type="xs:string" name="cube_table"/>
- <xs:attribute type="xs:double" name="min" />
- <xs:attribute type="xs:double" name="max" />
+ <xs:attribute type="xs:double" name="min"/>
+ <xs:attribute type="xs:double" name="max"/>
</xs:complexType>
<xs:complexType name="x_measures">
@@ -147,9 +147,9 @@
</xs:annotation>
<xs:attribute type="xs:string" name="name" use="required"/>
<xs:attribute type="xs:string" name="type" use="required"/>
- <xs:attribute type="xs:string" name="description" />
- <xs:attribute type="xs:string" name="display_string" />
- <xs:attribute type="xs:string" name="expr" />
+ <xs:attribute type="xs:string" name="description"/>
+ <xs:attribute type="xs:string" name="display_string"/>
+ <xs:attribute type="xs:string" name="expr"/>
<xs:attribute type="xs:string" name="cube_table"/>
</xs:complexType>
@@ -171,16 +171,16 @@
</xs:documentation>
</xs:annotation>
<xs:sequence>
- <xs:element type="x_tablereferences" name="references" />
+ <xs:element type="x_tablereferences" name="references"/>
</xs:sequence>
<xs:attribute type="xs:string" name="name" use="required"/>
<xs:attribute type="xs:string" name="type" use="required"/>
- <xs:attribute type="xs:string" name="description" />
- <xs:attribute type="xs:string" name="display_string" />
- <xs:attribute type="xs:dateTime" name="start_time" />
- <xs:attribute type="xs:dateTime" name="end_time" />
- <xs:attribute type="xs:double" name="cost" />
- <xs:attribute type="xs:string" name="expr" />
+ <xs:attribute type="xs:string" name="description"/>
+ <xs:attribute type="xs:string" name="display_string"/>
+ <xs:attribute type="xs:dateTime" name="start_time"/>
+ <xs:attribute type="xs:dateTime" name="end_time"/>
+ <xs:attribute type="xs:double" name="cost"/>
+ <xs:attribute type="xs:string" name="expr"/>
<xs:attribute type="xs:string" name="cube_table"/>
</xs:complexType>
<xs:complexType name="x_tablereference">
@@ -192,7 +192,7 @@
<xs:element type="x_tablereference" name="table_references" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
-
+
<xs:complexType name="x_dim_attributes">
<xs:annotation>
<xs:documentation>
@@ -217,16 +217,16 @@
<xs:element name="dimension_table" type="dimension_table">
</xs:element>
-
+
<xs:complexType name="dimension_table">
<xs:sequence>
<xs:element type="columns" name="columns"/>
<xs:element type="update_periods" name="storage_dump_periods"/>
<xs:element type="x_properties" name="properties" minOccurs="0"/>
</xs:sequence>
- <xs:attribute name="dim_name" type="xs:string" use="required" />
- <xs:attribute name="table_name" type="xs:string" use="required" />
- <xs:attribute name="weight" type="xs:double" />
+ <xs:attribute name="dim_name" type="xs:string" use="required"/>
+ <xs:attribute name="table_name" type="xs:string" use="required"/>
+ <xs:attribute name="weight" type="xs:double"/>
</xs:complexType>
<xs:complexType name="columns">
@@ -237,8 +237,8 @@
<xs:complexType name="column">
<xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="type" type="xs:string" use="required" />
- <xs:attribute name="comment" type="xs:string" />
+ <xs:attribute name="type" type="xs:string" use="required"/>
+ <xs:attribute name="comment" type="xs:string"/>
</xs:complexType>
<xs:complexType name="update_periods">
@@ -246,7 +246,7 @@
<xs:element name="update_period_element" type="update_period_element" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
-
+
<xs:complexType name="update_period_element">
<xs:annotation>
<xs:documentation>
@@ -259,59 +259,59 @@
<xs:attribute name="storage_name" type="xs:string"/>
</xs:complexType>
- <xs:element name="x_storage" type="x_storage"/>
+ <xs:element name="x_storage" type="x_storage"/>
<xs:complexType name="x_storage">
<xs:sequence>
- <xs:element type="x_properties" name="properties" minOccurs="0"/>
+ <xs:element type="x_properties" name="properties" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="classname" type="xs:string" use="required"/>
</xs:complexType>
- <xs:element name="x_storage_table_desc" type="x_storage_table_desc"/>
+ <xs:element name="x_storage_table_desc" type="x_storage_table_desc"/>
<xs:complexType name="x_storage_table_desc">
<xs:sequence>
- <xs:element name="table_parameters" type="x_properties" />
- <xs:element name="serde_parameters" type="x_properties" />
- <xs:element name="part_cols" type="columns" />
- <xs:element name="bucket_cols" type="xs:string" maxOccurs="unbounded" minOccurs="0" />
- <xs:element name="sort_cols" type="xs:string" maxOccurs="unbounded" minOccurs="0" />
- <xs:element name="sort_col_order" type="xs:int" maxOccurs="unbounded" minOccurs="0" />
- <xs:element name="skewed_info" type="x_skewed_info" />
+ <xs:element name="table_parameters" type="x_properties"/>
+ <xs:element name="serde_parameters" type="x_properties"/>
+ <xs:element name="part_cols" type="columns"/>
+ <xs:element name="bucket_cols" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
+ <xs:element name="sort_cols" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
+ <xs:element name="sort_col_order" type="xs:int" maxOccurs="unbounded" minOccurs="0"/>
+ <xs:element name="skewed_info" type="x_skewed_info"/>
<xs:element name="time_part_cols" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="external" type="xs:boolean" use="required"/>
<xs:attribute name="table_location" type="xs:anyURI"/>
- <xs:attribute name="input_format" type="xs:string" />
- <xs:attribute name="output_format" type="xs:string" />
- <xs:attribute name="field_delimiter" type="xs:string" />
- <xs:attribute name="escape_char" type="xs:string" />
- <xs:attribute name="collection_delimiter" type="xs:string" />
- <xs:attribute name="line_delimiter" type="xs:string" />
- <xs:attribute name="map_key_delimiter" type="xs:string" />
- <xs:attribute name="serde_class_name" type="xs:string" />
- <xs:attribute name="storage_handler_name" type="xs:string" />
- <xs:attribute name="num_buckets" type="xs:int" />
- <xs:attribute name="compressed" type="xs:boolean" />
- </xs:complexType>
-
- <xs:element name="x_skewed_info" type="x_skewed_info"/>
+ <xs:attribute name="input_format" type="xs:string"/>
+ <xs:attribute name="output_format" type="xs:string"/>
+ <xs:attribute name="field_delimiter" type="xs:string"/>
+ <xs:attribute name="escape_char" type="xs:string"/>
+ <xs:attribute name="collection_delimiter" type="xs:string"/>
+ <xs:attribute name="line_delimiter" type="xs:string"/>
+ <xs:attribute name="map_key_delimiter" type="xs:string"/>
+ <xs:attribute name="serde_class_name" type="xs:string"/>
+ <xs:attribute name="storage_handler_name" type="xs:string"/>
+ <xs:attribute name="num_buckets" type="xs:int"/>
+ <xs:attribute name="compressed" type="xs:boolean"/>
+ </xs:complexType>
+
+ <xs:element name="x_skewed_info" type="x_skewed_info"/>
<xs:complexType name="x_skewed_info">
<xs:sequence>
- <xs:element name="col_names" type="xs:string" maxOccurs="unbounded" minOccurs="0" />
+ <xs:element name="col_names" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
<xs:element name="col_values" type="x_string_list" maxOccurs="unbounded" minOccurs="0"/>
<xs:element name="value_location_map" type="x_skewed_value_location" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
- <xs:element name="x_string_list" type="x_string_list"/>
+ <xs:element name="x_string_list" type="x_string_list"/>
<xs:complexType name="x_string_list">
<xs:sequence>
- <xs:element name="elements" type="xs:string" maxOccurs="unbounded" minOccurs="0" />
+ <xs:element name="elements" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
- <xs:element name="x_skewed_value_location" type="x_skewed_value_location"/>
+ <xs:element name="x_skewed_value_location" type="x_skewed_value_location"/>
<xs:complexType name="x_skewed_value_location">
<xs:sequence>
<xs:element name="value" type="x_string_list" minOccurs="1" maxOccurs="1"/>
@@ -319,7 +319,7 @@
<xs:attribute type="xs:string" name="location" use="required"/>
</xs:complexType>
- <xs:element name="x_storage_table_element" type="x_storage_table_element"/>
+ <xs:element name="x_storage_table_element" type="x_storage_table_element"/>
<xs:complexType name="x_storage_table_element">
<xs:annotation>
@@ -327,13 +327,13 @@
Storage and storage table description
</xs:documentation>
</xs:annotation>
- <xs:sequence>
- <xs:element name="update_periods" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
- <xs:element name="storage_name" type="xs:string"/>
- <xs:element type="x_storage_table_desc" name="table_desc"/>
- </xs:sequence>
+ <xs:sequence>
+ <xs:element name="update_periods" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
+ <xs:element name="storage_name" type="xs:string"/>
+ <xs:element type="x_storage_table_desc" name="table_desc"/>
+ </xs:sequence>
</xs:complexType>
- <xs:element name="x_storage_tables" type="x_storage_tables"/>
+ <xs:element name="x_storage_tables" type="x_storage_tables"/>
<xs:complexType name="x_storage_tables">
<xs:annotation>
<xs:documentation>
@@ -353,27 +353,27 @@
</xs:sequence>
</xs:complexType>
- <xs:element name="x_partition" type="x_partition"/>
-
+ <xs:element name="x_partition" type="x_partition"/>
+
<xs:complexType name="x_partition">
<xs:annotation>
<xs:documentation>
- Partition details
+ Partition details
</xs:documentation>
</xs:annotation>
<xs:sequence>
- <xs:element name="non_time_partition_spec" type="x_part_spec" />
+ <xs:element name="non_time_partition_spec" type="x_part_spec"/>
<xs:element name="time_partition_spec" type="x_time_part_spec"/>
- <xs:element name="full_partition_spec" type="x_part_spec" />
- <xs:element name="partition_parameters" type="x_properties" />
- <xs:element name="serde_parameters" type="x_properties" />
+ <xs:element name="full_partition_spec" type="x_part_spec"/>
+ <xs:element name="partition_parameters" type="x_properties"/>
+ <xs:element name="serde_parameters" type="x_properties"/>
</xs:sequence>
<xs:attribute type="xs:string" name="cube_table_name" use="required"/>
<xs:attribute type="xs:string" name="name"/>
<xs:attribute type="xs:string" name="location"/>
- <xs:attribute type="xs:string" name="input_format" />
- <xs:attribute type="xs:string" name="output_format" />
- <xs:attribute type="xs:string" name="serde_classname" />
+ <xs:attribute type="xs:string" name="input_format"/>
+ <xs:attribute type="xs:string" name="output_format"/>
+ <xs:attribute type="xs:string" name="serde_classname"/>
<xs:attribute name="update_period" type="xs:string"/>
</xs:complexType>
@@ -396,40 +396,40 @@
<xs:element type="x_time_part_spec_element" name="part_spec_element" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
-
+
<xs:element name="fact_table" type="fact_table"/>
-
+
<xs:complexType name="fact_table">
- <xs:sequence>
+ <xs:sequence>
<xs:element type="columns" name="columns"/>
<xs:element type="update_periods" name="storage_update_periods"/>
<xs:element type="x_properties" name="properties" minOccurs="0"/>
</xs:sequence>
- <xs:attribute name="name" type="xs:string" use="required" />
- <xs:attribute name="cube_name" type="xs:string" use="required" />
- <xs:attribute name="weight" type="xs:double" />
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="cube_name" type="xs:string" use="required"/>
+ <xs:attribute name="weight" type="xs:double"/>
</xs:complexType>
<xs:element name="native_table" type="native_table"/>
<xs:complexType name="native_table">
- <xs:sequence>
+ <xs:sequence>
<xs:element type="columns" name="columns"/>
<xs:element type="x_storage_table_desc" name="storage_descriptor"/>
</xs:sequence>
- <xs:attribute name="name" type="xs:string" use="required" />
- <xs:attribute name="dbname" type="xs:string" use="required" />
- <xs:attribute name="owner" type="xs:string" use="required" />
- <xs:attribute name="type" type="xs:string" use="required" />
- <xs:attribute name="createtime" type="xs:int" use="required" />
- <xs:attribute name="lastAccessTime" type="xs:int" use="required" />
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="dbname" type="xs:string" use="required"/>
+ <xs:attribute name="owner" type="xs:string" use="required"/>
+ <xs:attribute name="type" type="xs:string" use="required"/>
+ <xs:attribute name="createtime" type="xs:int" use="required"/>
+ <xs:attribute name="lastAccessTime" type="xs:int" use="required"/>
</xs:complexType>
<xs:element name="flattened_columns">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
- <xs:element name="measure" type="x_measure" />
- <xs:element name="expression" type="x_expr_column" />
- <xs:element name="dim_attribute" type="x_dim_attribute" />
+ <xs:element name="measure" type="x_measure"/>
+ <xs:element name="expression" type="x_expr_column"/>
+ <xs:element name="dim_attribute" type="x_dim_attribute"/>
</xs:choice>
</xs:complexType>
</xs:element>
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-api/src/test/java/org/apache/lens/doc/TestGenerateConfigDoc.java
----------------------------------------------------------------------
diff --git a/lens-api/src/test/java/org/apache/lens/doc/TestGenerateConfigDoc.java b/lens-api/src/test/java/org/apache/lens/doc/TestGenerateConfigDoc.java
index ea86755..d331c73 100644
--- a/lens-api/src/test/java/org/apache/lens/doc/TestGenerateConfigDoc.java
+++ b/lens-api/src/test/java/org/apache/lens/doc/TestGenerateConfigDoc.java
@@ -21,6 +21,14 @@
*/
package org.apache.lens.doc;
+import org.testng.annotations.Test;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
@@ -30,61 +38,75 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.testng.annotations.Test;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
/**
* The Class TestGenerateConfigDoc.
*/
public class TestGenerateConfigDoc {
- /** The Constant SERVER_CONF_FILE. */
+ /**
+ * The Constant SERVER_CONF_FILE.
+ */
public static final String SERVER_CONF_FILE = "../lens-server/src/main/resources/lensserver-default.xml";
- /** The Constant SESSION_CONF_FILE. */
+ /**
+ * The Constant SESSION_CONF_FILE.
+ */
public static final String SESSION_CONF_FILE = "../lens-server/src/main/resources/lenssession-default.xml";
- /** The Constant HIVE_DRIVER_CONF_FILE. */
+ /**
+ * The Constant HIVE_DRIVER_CONF_FILE.
+ */
public static final String HIVE_DRIVER_CONF_FILE = "../lens-driver-hive/src/main/resources/hivedriver-default.xml";
- /** The Constant JDBC_DRIVER_CONF_FILE. */
+ /**
+ * The Constant JDBC_DRIVER_CONF_FILE.
+ */
public static final String JDBC_DRIVER_CONF_FILE = "../lens-driver-jdbc/src/main/resources/jdbcdriver-default.xml";
- /** The Constant CLIENT_CONF_FILE. */
+ /**
+ * The Constant CLIENT_CONF_FILE.
+ */
public static final String CLIENT_CONF_FILE = "../lens-client/src/main/resources/lens-client-default.xml";
- /** The Constant CUBE_QUERY_CONF_FILE. */
+ /**
+ * The Constant CUBE_QUERY_CONF_FILE.
+ */
public static final String CUBE_QUERY_CONF_FILE = "../lens-cube/src/main/resources/olap-query-conf.xml";
- /** The Constant APT_FILE. */
+ /**
+ * The Constant APT_FILE.
+ */
public static final String APT_FILE = "../src/site/apt/admin/config.apt";
- /** The Constant SESSION_APT_FILE. */
+ /**
+ * The Constant SESSION_APT_FILE.
+ */
public static final String SESSION_APT_FILE = "../src/site/apt/admin/session-config.apt";
- /** The Constant HIVE_DRIVER_APT_FILE. */
+ /**
+ * The Constant HIVE_DRIVER_APT_FILE.
+ */
public static final String HIVE_DRIVER_APT_FILE = "../src/site/apt/admin/hivedriver-config.apt";
- /** The Constant JDBC_DRIVER_APT_FILE. */
+ /**
+ * The Constant JDBC_DRIVER_APT_FILE.
+ */
public static final String JDBC_DRIVER_APT_FILE = "../src/site/apt/admin/jdbcdriver-config.apt";
- /** The Constant CLIENT_APT_FILE. */
+ /**
+ * The Constant CLIENT_APT_FILE.
+ */
public static final String CLIENT_APT_FILE = "../src/site/apt/user/client-config.apt";
- /** The Constant CUBE_QUERY_CONF_APT_FILE. */
+ /**
+ * The Constant CUBE_QUERY_CONF_APT_FILE.
+ */
public static final String CUBE_QUERY_CONF_APT_FILE = "../src/site/apt/user/olap-query-conf.apt";
/**
* Generate server config doc.
*
- * @throws Exception
- * the exception
+ * @throws Exception the exception
*/
@Test
public void generateServerConfigDoc() throws Exception {
@@ -95,8 +117,7 @@ public class TestGenerateConfigDoc {
/**
* Generate session config doc.
*
- * @throws Exception
- * the exception
+ * @throws Exception the exception
*/
@Test
public void generateSessionConfigDoc() throws Exception {
@@ -107,8 +128,7 @@ public class TestGenerateConfigDoc {
/**
* Generate hivedriver config doc.
*
- * @throws Exception
- * the exception
+ * @throws Exception the exception
*/
@Test
public void generateHivedriverConfigDoc() throws Exception {
@@ -119,8 +139,7 @@ public class TestGenerateConfigDoc {
/**
* Generate jdbcdriver config doc.
*
- * @throws Exception
- * the exception
+ * @throws Exception the exception
*/
@Test
public void generateJdbcdriverConfigDoc() throws Exception {
@@ -131,8 +150,7 @@ public class TestGenerateConfigDoc {
/**
* Generate client config doc.
*
- * @throws Exception
- * the exception
+ * @throws Exception the exception
*/
@Test
public void generateClientConfigDoc() throws Exception {
@@ -143,8 +161,7 @@ public class TestGenerateConfigDoc {
/**
* Generate olap query config doc.
*
- * @throws Exception
- * the exception
+ * @throws Exception the exception
*/
@Test
public void generateOLAPQueryConfigDoc() throws Exception {
@@ -157,20 +174,25 @@ public class TestGenerateConfigDoc {
*/
class ConfigEntry {
- /** The name. */
+ /**
+ * The name.
+ */
private String name;
- /** The value. */
+ /**
+ * The value.
+ */
private String value;
- /** The description. */
+ /**
+ * The description.
+ */
private String description;
/**
* Validate.
*
- * @throws IllegalArgumentException
- * the illegal argument exception
+ * @throws IllegalArgumentException the illegal argument exception
*/
public void validate() throws IllegalArgumentException {
if (name == null || name.isEmpty()) {
@@ -197,31 +219,41 @@ public class TestGenerateConfigDoc {
*/
class ConfigPrinter extends DefaultHandler {
- /** The config file. */
+ /**
+ * The config file.
+ */
private final String configFile;
- /** The output apt file. */
+ /**
+ * The output apt file.
+ */
private final String outputAPTFile;
- /** The buf. */
+ /**
+ * The buf.
+ */
private StringBuilder buf;
- /** The entry. */
+ /**
+ * The entry.
+ */
private ConfigEntry entry;
- /** The entries. */
+ /**
+ * The entries.
+ */
private List<ConfigEntry> entries;
- /** The in property. */
+ /**
+ * The in property.
+ */
boolean inProperty;
/**
* Instantiates a new config printer.
*
- * @param confFile
- * the conf file
- * @param outputAPTFile
- * the output apt file
+ * @param confFile the conf file
+ * @param outputAPTFile the output apt file
*/
public ConfigPrinter(String confFile, String outputAPTFile) {
configFile = confFile;
@@ -232,12 +264,9 @@ public class TestGenerateConfigDoc {
/**
* Read config file.
*
- * @throws IOException
- * Signals that an I/O exception has occurred.
- * @throws ParserConfigurationException
- * the parser configuration exception
- * @throws SAXException
- * the SAX exception
+ * @throws IOException Signals that an I/O exception has occurred.
+ * @throws ParserConfigurationException the parser configuration exception
+ * @throws SAXException the SAX exception
*/
public void readConfigFile() throws IOException, ParserConfigurationException, SAXException {
SAXParserFactory factory = SAXParserFactory.newInstance();
@@ -297,10 +326,8 @@ public class TestGenerateConfigDoc {
/**
* Prints the apt.
*
- * @param heading
- * the heading
- * @throws IOException
- * Signals that an I/O exception has occurred.
+ * @param heading the heading
+ * @throws IOException Signals that an I/O exception has occurred.
*/
public void printAPT(String heading) throws IOException {
PrintWriter apt = null;
@@ -372,14 +399,10 @@ public class TestGenerateConfigDoc {
/**
* Generate doc.
*
- * @param heading
- * the heading
- * @throws IOException
- * Signals that an I/O exception has occurred.
- * @throws ParserConfigurationException
- * the parser configuration exception
- * @throws SAXException
- * the SAX exception
+ * @param heading the heading
+ * @throws IOException Signals that an I/O exception has occurred.
+ * @throws ParserConfigurationException the parser configuration exception
+ * @throws SAXException the SAX exception
*/
public void generateDoc(String heading) throws IOException, ParserConfigurationException, SAXException {
readConfigFile();
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-server-api/src/main/java/org/apache/lens/server/api/driver/DriverSelector.java
----------------------------------------------------------------------
diff --git a/lens-server-api/src/main/java/org/apache/lens/server/api/driver/DriverSelector.java b/lens-server-api/src/main/java/org/apache/lens/server/api/driver/DriverSelector.java
index 3e3f61f..004cfad 100644
--- a/lens-server-api/src/main/java/org/apache/lens/server/api/driver/DriverSelector.java
+++ b/lens-server-api/src/main/java/org/apache/lens/server/api/driver/DriverSelector.java
@@ -18,9 +18,6 @@
*/
package org.apache.lens.server.api.driver;
-import java.util.Collection;
-import java.util.Map;
-
import org.apache.hadoop.conf.Configuration;
import org.apache.lens.server.api.query.AbstractQueryContext;
@@ -32,11 +29,9 @@ public interface DriverSelector {
/**
* Select.
*
- * @param ctx
- * the context
- * @param conf
- * the conf
+ * @param ctx the context
+ * @param conf the conf
* @return the lens driver
*/
- public LensDriver select(AbstractQueryContext ctx, Configuration conf);
+ LensDriver select(AbstractQueryContext ctx, Configuration conf);
}
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-server-api/src/main/java/org/apache/lens/server/api/driver/LensDriver.java
----------------------------------------------------------------------
diff --git a/lens-server-api/src/main/java/org/apache/lens/server/api/driver/LensDriver.java b/lens-server-api/src/main/java/org/apache/lens/server/api/driver/LensDriver.java
index ce61952..840cd81 100644
--- a/lens-server-api/src/main/java/org/apache/lens/server/api/driver/LensDriver.java
+++ b/lens-server-api/src/main/java/org/apache/lens/server/api/driver/LensDriver.java
@@ -18,8 +18,6 @@
*/
package org.apache.lens.server.api.driver;
-import java.io.Externalizable;
-
import org.apache.hadoop.conf.Configuration;
import org.apache.lens.api.LensException;
import org.apache.lens.api.query.QueryHandle;
@@ -28,6 +26,8 @@ import org.apache.lens.server.api.events.LensEventListener;
import org.apache.lens.server.api.query.PreparedQueryContext;
import org.apache.lens.server.api.query.QueryContext;
+import java.io.Externalizable;
+
/**
* The Interface LensDriver.
*/
@@ -35,167 +35,135 @@ public interface LensDriver extends Externalizable {
/**
* Get driver configuration
- *
*/
- public Configuration getConf();
+ Configuration getConf();
/**
* Configure driver with {@link Configuration} passed.
*
- * @param conf
- * The configuration object
- * @throws LensException
- * the lens exception
+ * @param conf The configuration object
+ * @throws LensException the lens exception
*/
- public void configure(Configuration conf) throws LensException;
+ void configure(Configuration conf) throws LensException;
/**
* Explain the given query.
*
- * @param query
- * The query should be in HiveQL(SQL like)
- * @param conf
- * The query configuration
+ * @param query The query should be in HiveQL(SQL like)
+ * @param conf The query configuration
* @return The query plan object;
- * @throws LensException
- * the lens exception
+ * @throws LensException the lens exception
*/
- public DriverQueryPlan explain(String query, Configuration conf) throws LensException;
+ DriverQueryPlan explain(String query, Configuration conf) throws LensException;
/**
* Prepare the given query.
*
- * @param pContext
- * the context
- * @throws LensException
- * the lens exception
+ * @param pContext the context
+ * @throws LensException the lens exception
*/
- public void prepare(PreparedQueryContext pContext) throws LensException;
+ void prepare(PreparedQueryContext pContext) throws LensException;
/**
* Explain and prepare the given query.
*
- * @param pContext
- * the context
+ * @param pContext the context
* @return The query plan object;
- * @throws LensException
- * the lens exception
+ * @throws LensException the lens exception
*/
- public DriverQueryPlan explainAndPrepare(PreparedQueryContext pContext) throws LensException;
+ DriverQueryPlan explainAndPrepare(PreparedQueryContext pContext) throws LensException;
/**
* Close the prepare query specified by the prepared handle, releases all the resources held by the prepared query.
*
- * @param handle
- * The query handle
- * @throws LensException
- * the lens exception
+ * @param handle The query handle
+ * @throws LensException the lens exception
*/
- public void closePreparedQuery(QueryPrepareHandle handle) throws LensException;
+ void closePreparedQuery(QueryPrepareHandle handle) throws LensException;
/**
* Blocking execute of the query
- *
+ * <p/>
* The driver would be closing the driver handle, once the results are fetched.
*
- * @param context
- * the context
+ * @param context the context
* @return returns the result set, null if there is no result available
- * @throws LensException
- * the lens exception
+ * @throws LensException the lens exception
*/
- public LensResultSet execute(QueryContext context) throws LensException;
+ LensResultSet execute(QueryContext context) throws LensException;
/**
* Asynchronously execute the query.
*
- * @param context
- * The query context
- * @throws LensException
- * the lens exception
+ * @param context The query context
+ * @throws LensException the lens exception
*/
- public void executeAsync(QueryContext context) throws LensException;
+ void executeAsync(QueryContext context) throws LensException;
/**
* Register for query completion notification.
*
- * @param handle
- * the handle
- * @param timeoutMillis
- * the timeout millis
- * @param listener
- * the listener
- * @throws LensException
- * the lens exception
+ * @param handle the handle
+ * @param timeoutMillis the timeout millis
+ * @param listener the listener
+ * @throws LensException the lens exception
*/
- public void registerForCompletionNotification(QueryHandle handle, long timeoutMillis, QueryCompletionListener listener)
- throws LensException;
+ void registerForCompletionNotification(QueryHandle handle, long timeoutMillis, QueryCompletionListener listener)
+ throws LensException;
/**
* Update driver query status in the context object.
*
- * @param context
- * The query context
- * @throws LensException
- * the lens exception
+ * @param context The query context
+ * @throws LensException the lens exception
*/
- public void updateStatus(QueryContext context) throws LensException;
+ void updateStatus(QueryContext context) throws LensException;
/**
* Fetch the results of the query, specified by the handle.
*
- * @param context
- * The query context
+ * @param context The query context
* @return returns the result set
- * @throws LensException
- * the lens exception
+ * @throws LensException the lens exception
*/
- public LensResultSet fetchResultSet(QueryContext context) throws LensException;
+ LensResultSet fetchResultSet(QueryContext context) throws LensException;
/**
* Close the resultset for the query.
*
- * @param handle
- * The query handle
- * @throws LensException
- * the lens exception
+ * @param handle The query handle
+ * @throws LensException the lens exception
*/
- public void closeResultSet(QueryHandle handle) throws LensException;
+ void closeResultSet(QueryHandle handle) throws LensException;
/**
* Cancel the execution of the query, specified by the handle.
*
- * @param handle
- * The query handle.
+ * @param handle The query handle.
* @return true if cancel was successful, false otherwise
- * @throws LensException
- * the lens exception
+ * @throws LensException the lens exception
*/
- public boolean cancelQuery(QueryHandle handle) throws LensException;
+ boolean cancelQuery(QueryHandle handle) throws LensException;
/**
* Close the query specified by the handle, releases all the resources held by the query.
*
- * @param handle
- * The query handle
- * @throws LensException
- * the lens exception
+ * @param handle The query handle
+ * @throws LensException the lens exception
*/
- public void closeQuery(QueryHandle handle) throws LensException;
+ void closeQuery(QueryHandle handle) throws LensException;
/**
* Close the driver, releasing all resouces used up by the driver.
*
- * @throws LensException
- * the lens exception
+ * @throws LensException the lens exception
*/
- public void close() throws LensException;
+ void close() throws LensException;
/**
* Add a listener for driver events.
*
- * @param driverEventListener
- * the driver event listener
+ * @param driverEventListener the driver event listener
*/
- public void registerDriverEventListener(LensEventListener<DriverEvent> driverEventListener);
+ void registerDriverEventListener(LensEventListener<DriverEvent> driverEventListener);
}
http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/30d16a39/lens-server-api/src/main/java/org/apache/lens/server/api/driver/MinQueryCostSelector.java
----------------------------------------------------------------------
diff --git a/lens-server-api/src/main/java/org/apache/lens/server/api/driver/MinQueryCostSelector.java b/lens-server-api/src/main/java/org/apache/lens/server/api/driver/MinQueryCostSelector.java
index 1377d81..6c42795 100644
--- a/lens-server-api/src/main/java/org/apache/lens/server/api/driver/MinQueryCostSelector.java
+++ b/lens-server-api/src/main/java/org/apache/lens/server/api/driver/MinQueryCostSelector.java
@@ -19,24 +19,20 @@
package org.apache.lens.server.api.driver;
import org.apache.hadoop.conf.Configuration;
-import org.apache.lens.api.LensException;
import org.apache.lens.server.api.query.AbstractQueryContext;
import org.apache.log4j.Logger;
-import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
-import java.util.Map;
public class MinQueryCostSelector implements DriverSelector {
public static final Logger LOG = Logger.getLogger(MinQueryCostSelector.class);
+
/**
* Returns the driver that has the minimum query cost.
*
- * @param ctx
- * the context
- * @param conf
- * the conf
+ * @param ctx the context
+ * @param conf the conf
* @return the lens driver
*/
@Override
@@ -49,6 +45,7 @@ public class MinQueryCostSelector implements DriverSelector {
}
});
}
+
int comparePlans(DriverQueryPlan c1, DriverQueryPlan c2) {
if (c1 == null && c2 == null) {
return 0;