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 2015/08/17 10:21:05 UTC

incubator-lens git commit: LENS-729 : Add apache license header in es driver's json files

Repository: incubator-lens
Updated Branches:
  refs/heads/master a7ecd9c76 -> 7b2cb4ec0


LENS-729 : Add apache license header in es driver's json files


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

Branch: refs/heads/master
Commit: 7b2cb4ec07793989068dc3a3bd2ac4f1d2f6a370
Parents: a7ecd9c
Author: Rajat Khandelwal <pr...@apache.org>
Authored: Mon Aug 17 13:50:03 2015 +0530
Committer: Amareshwari Sriramadasu <am...@apache.org>
Committed: Mon Aug 17 13:50:03 2015 +0530

----------------------------------------------------------------------
 .../lens/driver/es/QueryTranslationTest.java    |  2 ++
 .../src/test/resources/invalid-queries.data     | 21 +++++++++++++++++++-
 .../src/test/resources/valid-queries.data       | 21 +++++++++++++++++++-
 3 files changed, 42 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/7b2cb4ec/lens-driver-es/src/test/java/org/apache/lens/driver/es/QueryTranslationTest.java
----------------------------------------------------------------------
diff --git a/lens-driver-es/src/test/java/org/apache/lens/driver/es/QueryTranslationTest.java b/lens-driver-es/src/test/java/org/apache/lens/driver/es/QueryTranslationTest.java
index be33764..3846b23 100644
--- a/lens-driver-es/src/test/java/org/apache/lens/driver/es/QueryTranslationTest.java
+++ b/lens-driver-es/src/test/java/org/apache/lens/driver/es/QueryTranslationTest.java
@@ -33,6 +33,7 @@ import org.testng.annotations.Test;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
@@ -85,6 +86,7 @@ public class QueryTranslationTest extends ESDriverTest {
   private static final ImmutableList<ValidQuery> VALID_QUERIES;
   private static final ImmutableList<InvalidQuery> IN_VALID_QUERIES;
   static {
+    OBJECT_MAPPER.configure(JsonParser.Feature.ALLOW_COMMENTS, true); // Jackson 1.2+
     VALID_QUERIES = ImmutableList.copyOf(loadResource(VALID_QUERIES_RESOURCE_PATH, ValidQuery[].class));
     IN_VALID_QUERIES = ImmutableList.copyOf(loadResource(INVALID_QUERIES_RESOURCE_PATH, InvalidQuery[].class));
   }

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/7b2cb4ec/lens-driver-es/src/test/resources/invalid-queries.data
----------------------------------------------------------------------
diff --git a/lens-driver-es/src/test/resources/invalid-queries.data b/lens-driver-es/src/test/resources/invalid-queries.data
index 8756a51..dd6a57f 100644
--- a/lens-driver-es/src/test/resources/invalid-queries.data
+++ b/lens-driver-es/src/test/resources/invalid-queries.data
@@ -1,3 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 [
   {
     "name" : "Ambiguous column selection",
@@ -15,4 +34,4 @@
     "name" : "Invalid columns in select and group by",
     "hql" : "select a, b from a.x group by r"
   }
-]
\ No newline at end of file
+]

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/7b2cb4ec/lens-driver-es/src/test/resources/valid-queries.data
----------------------------------------------------------------------
diff --git a/lens-driver-es/src/test/resources/valid-queries.data b/lens-driver-es/src/test/resources/valid-queries.data
index 982325c..46de030 100644
--- a/lens-driver-es/src/test/resources/valid-queries.data
+++ b/lens-driver-es/src/test/resources/valid-queries.data
@@ -1,3 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 [
   {
     "name" : "Basic simple select",
@@ -64,4 +83,4 @@
     "hql" : "select count(col1), col2, max(col3) from index.type where !(col1=5 and col2='p' and col3='wer' or (col4='9')) group by col2",
     "expectedJson" : {"size":0,"timeout":10000,"aggs":{"filter_wrapper":{"aggs":{"col2":{"terms":{"field":"col2","size":100},"aggs":{"col1":{"value_count":{"field":"col1"}},"col3":{"max":{"field":"col3"}}}}},"filter":{"not":{"or":[{"and":[{"and":[{"term":{"col1":"5"}},{"term":{"col2":"p"}}]},{"term":{"col3":"wer"}}]},{"term":{"col4":"9"}}]}}}}}
   }
-]
\ No newline at end of file
+]