svn commit: r1685596 - /phoenix/doap_phoenix.rdf

2015-06-15 Thread jamestaylor
Author: jamestaylor
Date: Mon Jun 15 15:24:18 2015
New Revision: 1685596

URL: http://svn.apache.org/r1685596
Log:
Update DOAP file by putting version in separate release tags

Modified:
phoenix/doap_phoenix.rdf

Modified: phoenix/doap_phoenix.rdf
URL: 
http://svn.apache.org/viewvc/phoenix/doap_phoenix.rdf?rev=1685596r1=1685595r2=1685596view=diff
==
--- phoenix/doap_phoenix.rdf (original)
+++ phoenix/doap_phoenix.rdf Mon Jun 15 15:24:18 2015
@@ -27,8 +27,8 @@
 nameApache Phoenix/name
 homepage rdf:resource=http://phoenix.apache.org; /
 asfext:pmc rdf:resource=http://phoenix.apache.org; /
-shortdescApache Phoenix takes a NoSQL key/value store such as Apache 
HBase and turns it into a SQL database. /shortdesc
-description Apache Phoenix is a SQL query engine for accessing NoSQL 
datastores such as Apache HBase. It is accessed as a JDBC driver and enables 
querying, updating, and managing NoSQL tables through standard SQL. Instead of 
using map-reduce, Apache Phoenix compiles your SQL query into a series of HBase 
scans and orchestrates the running of those scans to produce regular JDBC 
result sets. Direct use of the HBase API, along with coprocessors and custom 
filters, results in performance on the order of milliseconds for small queries, 
or seconds for tens of millions of rows. /description
+shortdescApache Phoenix is a relational database layer on top of Apache 
HBase./shortdesc
+descriptionApache Phoenix is a relational database layer on top of 
Apache HBase. It is accessed as a JDBC driver and enables querying, updating, 
and managing HBase tables through standard SQL. Instead of using map-reduce, 
Apache Phoenix compiles your SQL query into a series of HBase scans and 
orchestrates the running of those scans to produce regular JDBC result sets. 
Direct use of the HBase API, along with coprocessors and custom filters, 
results in performance on the order of milliseconds for small queries, or 
seconds for tens of millions of rows./description
 bug-database rdf:resource=http://issues.apache.org/jira/browse/PHOENIX; 
/
 mailing-list rdf:resource=http://phoenix.apache.org/mailing_list.html; /
 download-page rdf:resource=http://phoenix.apache.org/download.html; /
@@ -38,19 +38,37 @@
 category rdf:resource=http://projects.apache.org/category/database; /
 release
   Version
-nameApache Phoenix 2.2.3-incubating/name
-created2014-03-13/created
-revision2.2.3/revision
+nameApache Phoenix 3.3.1/name
+created2015-04-07/created
+revision3.3.1/revision
   /Version
+/release
+release
+  Version
+nameApache Phoenix 4.3.1/name
+created2015-04-07/created
+revision4.3.1/revision
+  /Version
+/release
+release
   Version
-nameApache Phoenix 3.0.0-incubating/name
-created2014-04-03/created
-revision3.0.0/revision
+nameApache Phoenix 4.4.0 HBase 0.98/name
+created2015-05-18/created
+revision4.4.0-HBase-0.98/revision
   /Version
+/release
+release
+  Version
+nameApache Phoenix 4.4.0 HBase 1.0/name
+created2015-05-18/created
+revision4.4.0-HBase-1.0/revision
+  /Version
+/release
+release
   Version
-nameApache Phoenix 4.0.0-incubating/name
-created2014-04-04/created
-revision4.0.0/revision
+nameApache Phoenix 4.4.0 HBase 1.1/name
+created2015-05-29/created
+revision4.4.0-HBase-1.1/revision
   /Version
 /release
 repository




Apache-Phoenix | 4.4-HBase-1.1 | Build Successful

2015-06-15 Thread Apache Jenkins Server
4.4-HBase-1.1 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.4-HBase-1.1

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.4-HBase-1.1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.4-HBase-1.1/lastCompletedBuild/testReport/

Changes
[ndimiduk] PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


[3/4] phoenix git commit: minor changes based on jesses feedback

2015-06-15 Thread elilevine
minor changes based on jesses feedback


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

Branch: refs/heads/master
Commit: d1f7dedeccbb0befce071cb87efd38290271039a
Parents: a4aa780
Author: Prashant Kommireddi 
pkommire...@pkommireddi-ltm.internal.salesforce.com
Authored: Mon Jun 15 16:18:47 2015 -0700
Committer: Eli Levine elilev...@apache.org
Committed: Mon Jun 15 18:17:45 2015 -0700

--
 .../src/main/java/org/apache/phoenix/pig/util/TypeUtil.java   | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d1f7dede/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
--
diff --git 
a/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java 
b/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
index 6e32fb5..5820ec6 100644
--- a/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
+++ b/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
@@ -76,9 +76,7 @@ public final class TypeUtil {
 private TypeUtil() {}
 
 /**
- * A map of Phoenix to Pig data types.
- * 
- * @return
+ * @return map of Phoenix to Pig data types.
  */
 private static ImmutableMapPDataType, Byte init() {
 final ImmutableMap.BuilderPDataType, Byte builder = new 
BuilderPDataType, Byte();
@@ -160,7 +158,8 @@ public final class TypeUtil {
 
 /**
  * This method encodes a value with Phoenix data type. It begins with 
checking whether an object is BINARY and makes
- * a call to {@link #castBytes(Object, PDataType)} to convery bytes to 
targetPhoenixType
+ * a call to {@link #castBytes(Object, PDataType)} to convert bytes to 
targetPhoenixType. It returns a {@link RuntimeException}
+ * when object can not be coerced.
  * 
  * @param o
  * @param targetPhoenixType



[1/4] phoenix git commit: PHOENIX-1981 : PhoenixHBase Load and Store Funcs should handle all Pig data types

2015-06-15 Thread elilevine
Repository: phoenix
Updated Branches:
  refs/heads/master b61ef77e5 - d1f7dedec


PHOENIX-1981 : PhoenixHBase Load and Store Funcs should handle all Pig data 
types


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/8076126a
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/8076126a
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/8076126a

Branch: refs/heads/master
Commit: 8076126a741a0cf2a5839b88904fa08bfdfb6cdb
Parents: b61ef77
Author: Prashant Kommireddi 
pkommire...@pkommireddi-ltm.internal.salesforce.com
Authored: Mon May 18 19:41:08 2015 -0700
Committer: Eli Levine elilev...@apache.org
Committed: Mon Jun 15 18:17:44 2015 -0700

--
 .../org/apache/phoenix/pig/util/TypeUtil.java   | 415 +--
 .../apache/phoenix/pig/util/TypeUtilTest.java   |  52 +++
 2 files changed, 251 insertions(+), 216 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8076126a/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
--
diff --git 
a/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java 
b/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
index bdee3a4..6549445 100644
--- a/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
+++ b/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
@@ -1,19 +1,11 @@
 /*
- * 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
+ * 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 
http://www.apache.org/licenses/LICENSE-2.0 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.
  */
 
 package org.apache.phoenix.pig.util;
@@ -29,11 +21,11 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.phoenix.pig.writable.PhoenixPigDBWritable;
 import org.apache.phoenix.schema.types.PBinary;
-import org.apache.phoenix.schema.types.PChar;
-import org.apache.phoenix.schema.types.PDecimal;
 import org.apache.phoenix.schema.types.PBoolean;
+import org.apache.phoenix.schema.types.PChar;
 import org.apache.phoenix.schema.types.PDataType;
 import org.apache.phoenix.schema.types.PDate;
+import org.apache.phoenix.schema.types.PDecimal;
 import org.apache.phoenix.schema.types.PDouble;
 import org.apache.phoenix.schema.types.PFloat;
 import org.apache.phoenix.schema.types.PInteger;
@@ -56,7 +48,6 @@ import org.apache.phoenix.schema.types.PVarchar;
 import org.apache.pig.PigException;
 import org.apache.pig.ResourceSchema.ResourceFieldSchema;
 import org.apache.pig.backend.hadoop.hbase.HBaseBinaryConverter;
-import org.apache.pig.builtin.Utf8StorageConverter;
 import org.apache.pig.data.DataByteArray;
 import org.apache.pig.data.DataType;
 import org.apache.pig.data.Tuple;
@@ -68,258 +59,250 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableMap.Builder;
 
 public final class TypeUtil {
-   
+
 private static final Log LOG = LogFactory.getLog(TypeUtil.class);
-private static final HBaseBinaryConverter binaryConverter = new 
HBaseBinaryConverter ();
-   private static final ImmutableMapPDataType,Byte 
phoenixTypeToPigDataType = init();
-   
-   private TypeUtil(){
-   }
-   
-   /**
-* A map of Phoenix to Pig data types.
-* @return
-*/
-   private static ImmutableMapPDataType, Byte init() {
-final 

[2/4] phoenix git commit: PHOENIX-1981 : PhoenixHBase Load and Store Funcs should handle all Pig data types

2015-06-15 Thread elilevine
PHOENIX-1981 : PhoenixHBase Load and Store Funcs should handle all Pig data 
types


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/8a0dee77
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/8a0dee77
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/8a0dee77

Branch: refs/heads/master
Commit: 8a0dee77c67761c57feae31350c84304ccc44c07
Parents: 8076126
Author: Prashant Kommireddi 
pkommire...@pkommireddi-ltm.internal.salesforce.com
Authored: Mon May 18 19:47:01 2015 -0700
Committer: Eli Levine elilev...@apache.org
Committed: Mon Jun 15 18:17:45 2015 -0700

--
 .../org/apache/phoenix/pig/util/TypeUtil.java   | 24 ++--
 .../apache/phoenix/pig/util/TypeUtilTest.java   | 20 
 2 files changed, 37 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8a0dee77/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
--
diff --git 
a/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java 
b/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
index 6549445..c8bc9d8 100644
--- a/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
+++ b/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
@@ -1,11 +1,21 @@
 /*
- * 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 
http://www.apache.org/licenses/LICENSE-2.0 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.
+ * Copyright 2010 The Apache Software Foundation
+ *
+ * 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 maynot use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicablelaw 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.
  */
 
 package org.apache.phoenix.pig.util;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/8a0dee77/phoenix-pig/src/test/java/org/apache/phoenix/pig/util/TypeUtilTest.java
--
diff --git 
a/phoenix-pig/src/test/java/org/apache/phoenix/pig/util/TypeUtilTest.java 
b/phoenix-pig/src/test/java/org/apache/phoenix/pig/util/TypeUtilTest.java
index 25d9f48..56167f6 100644
--- a/phoenix-pig/src/test/java/org/apache/phoenix/pig/util/TypeUtilTest.java
+++ b/phoenix-pig/src/test/java/org/apache/phoenix/pig/util/TypeUtilTest.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright 2010 The Apache Software Foundation
+ *
+ * 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 maynot use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicablelaw 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.
+ */
+
 package org.apache.phoenix.pig.util;
 
 import static org.junit.Assert.assertEquals;



[4/4] phoenix git commit: PHOENIX-1981 : PhoenixHBase Load and Store Funcs should handle all Pig data types

2015-06-15 Thread elilevine
PHOENIX-1981 : PhoenixHBase Load and Store Funcs should handle all Pig data 
types


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

Branch: refs/heads/master
Commit: a4aa780c78f73cf0ee5f7d5e7afefd7ab581097a
Parents: 8a0dee7
Author: Prashant Kommireddi 
pkommire...@pkommireddi-ltm.internal.salesforce.com
Authored: Mon May 18 19:48:30 2015 -0700
Committer: Eli Levine elilev...@apache.org
Committed: Mon Jun 15 18:17:45 2015 -0700

--
 .../src/main/java/org/apache/phoenix/pig/util/TypeUtil.java  | 8 +++-
 .../test/java/org/apache/phoenix/pig/util/TypeUtilTest.java  | 8 +++-
 2 files changed, 6 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a4aa780c/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
--
diff --git 
a/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java 
b/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
index c8bc9d8..6e32fb5 100644
--- a/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
+++ b/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java
@@ -1,17 +1,15 @@
 /*
- * Copyright 2010 The Apache Software Foundation
- *
  * 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
+ * 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 maynot use this file except in compliance
+ * License); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicablelaw or agreed to in writing, software
+ * 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

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a4aa780c/phoenix-pig/src/test/java/org/apache/phoenix/pig/util/TypeUtilTest.java
--
diff --git 
a/phoenix-pig/src/test/java/org/apache/phoenix/pig/util/TypeUtilTest.java 
b/phoenix-pig/src/test/java/org/apache/phoenix/pig/util/TypeUtilTest.java
index 56167f6..0b44d2b 100644
--- a/phoenix-pig/src/test/java/org/apache/phoenix/pig/util/TypeUtilTest.java
+++ b/phoenix-pig/src/test/java/org/apache/phoenix/pig/util/TypeUtilTest.java
@@ -1,17 +1,15 @@
 /*
- * Copyright 2010 The Apache Software Foundation
- *
  * 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
+ * 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 maynot use this file except in compliance
+ * License); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicablelaw or agreed to in writing, software
+ * 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



Apache-Phoenix | Master | Build Successful

2015-06-15 Thread Apache Jenkins Server
Master branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/master

Last Successful Compiled Artifacts https://builds.apache.org/job/Phoenix-master/lastSuccessfulBuild/artifact/

Last Complete Test Report https://builds.apache.org/job/Phoenix-master/lastCompletedBuild/testReport/

Changes
[elilevine] PHOENIX-1981 : PhoenixHBase Load and Store Funcs should handle all Pig data types

[elilevine] PHOENIX-1981 : PhoenixHBase Load and Store Funcs should handle all Pig data types

[elilevine] PHOENIX-1981 : PhoenixHBase Load and Store Funcs should handle all Pig data types

[elilevine] minor changes based on jesses feedback



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


[05/50] [abbrv] phoenix git commit: PHOENIX-1856 Include min row key for each region in stats row-addendum_1(Ram)

2015-06-15 Thread maryannxue
PHOENIX-1856 Include min row key for each region in stats row-addendum_1(Ram)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/70de0cd4
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/70de0cd4
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/70de0cd4

Branch: refs/heads/calcite
Commit: 70de0cd485705ecc1f8b7864fe3657c4e8408d36
Parents: efd7c9f
Author: Rajeshbabu Chintaguntla rajeshb...@apache.org
Authored: Thu Apr 30 16:25:33 2015 +0530
Committer: Rajeshbabu Chintaguntla rajeshb...@apache.org
Committed: Thu Apr 30 16:25:33 2015 +0530

--
 .../java/org/apache/phoenix/schema/stats/StatisticsCollector.java  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/70de0cd4/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
index 8e41d4e..272cac6 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
@@ -284,6 +284,8 @@ public class StatisticsCollector {
 public void getMinKey(ImmutableBytesWritable ptr) {
 if (minKey != null) {
 ptr.set(minKey, minKeyOffset, minKeyLength);
+} else {
+ptr.set(HConstants.EMPTY_BYTE_ARRAY);
 }
 }
 }



[50/50] [abbrv] phoenix git commit: Fix merge errors

2015-06-15 Thread maryannxue
Fix merge errors


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/62d6720f
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/62d6720f
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/62d6720f

Branch: refs/heads/calcite
Commit: 62d6720f7f2f1bef8a2c99ca2a6aa3feb29a51df
Parents: f9ddb98 d1934af
Author: maryannxue wei@intel.com
Authored: Mon Jun 15 14:45:03 2015 -0400
Committer: maryannxue wei@intel.com
Committed: Mon Jun 15 14:45:03 2015 -0400

--
 .gitignore  |1 +
 NOTICE  |   10 +
 bin/daemon.py   |  989 
 bin/end2endTest.py  |5 +-
 bin/log4j.properties|9 +-
 bin/phoenix_utils.py|  139 +-
 bin/psql.py |8 +-
 bin/queryserver.py  |  203 +
 bin/sqlline-thin.py |   89 +
 bin/sqlline.py  |6 +-
 dev/jenkinsEnv.sh   |   31 +
 dev/make_rc.sh  |5 +
 dev/smart-apply-patch.sh|   96 +
 dev/test-patch.properties   |   35 +
 dev/test-patch.sh   | 1081 +
 phoenix-assembly/pom.xml|   52 +-
 phoenix-assembly/src/build/client.xml   |   37 +-
 .../src/build/components-minimal.xml|2 +
 .../components/all-common-dependencies.xml  |1 +
 .../src/build/components/all-common-files.xml   |6 +-
 .../src/build/components/all-common-jars.xml|   30 +-
 phoenix-assembly/src/build/src.xml  |4 +-
 phoenix-core/pom.xml|   23 +-
 ...ReplayWithIndexWritesAndCompressedWALIT.java |4 +-
 .../org/apache/phoenix/end2end/ArrayIT.java |  125 +-
 .../phoenix/end2end/ArrayPrependFunctionIT.java |  652 +++
 .../phoenix/end2end/ArraysWithNullsIT.java  |  300 ++
 .../phoenix/end2end/DecodeFunctionIT.java   |9 +-
 .../phoenix/end2end/EncodeFunctionIT.java   |8 +-
 .../phoenix/end2end/EvaluationOfORIT.java   |   11 +
 .../org/apache/phoenix/end2end/HashJoinIT.java  |   54 +
 .../apache/phoenix/end2end/InstrFunctionIT.java |   12 +-
 .../phoenix/end2end/MappingTableDataTypeIT.java |   67 +-
 .../phoenix/end2end/PhoenixMetricsIT.java   |4 -
 .../end2end/QueryDatabaseMetaDataIT.java|5 +
 .../org/apache/phoenix/end2end/QueryMoreIT.java |6 +-
 .../end2end/SkipScanAfterManualSplitIT.java |2 +-
 .../apache/phoenix/end2end/SortMergeJoinIT.java |   54 +
 .../phoenix/end2end/SqrtFunctionEnd2EndIT.java  |  143 +
 .../StatsCollectorWithSplitsAndMultiCFIT.java   |   32 +-
 .../org/apache/phoenix/end2end/SubqueryIT.java  |   18 +
 .../end2end/TenantSpecificTablesDDLIT.java  |5 +
 .../phoenix/end2end/ToDateFunctionIT.java   |   46 +-
 .../phoenix/end2end/UserDefinedFunctionsIT.java |  656 +++
 .../end2end/index/DropIndexDuringUpsertIT.java  |2 +-
 .../apache/phoenix/execute/PartialCommitIT.java |  317 ++
 .../EndToEndCoveredColumnsIndexBuilderIT.java   |4 +-
 .../iterate/RoundRobinResultIteratorIT.java |  319 ++
 .../apache/phoenix/mapreduce/IndexToolIT.java   |3 +-
 phoenix-core/src/main/antlr3/PhoenixSQL.g   |   76 +-
 .../regionserver/IndexHalfStoreFileReader.java  |   31 +-
 .../IndexHalfStoreFileReaderGenerator.java  |9 +-
 .../regionserver/IndexSplitTransaction.java |  104 +-
 .../hbase/regionserver/LocalIndexMerger.java|   19 +-
 .../hbase/regionserver/LocalIndexSplitter.java  |   11 +-
 .../org/apache/phoenix/cache/GlobalCache.java   |   30 +-
 .../apache/phoenix/cache/ServerCacheClient.java |   10 +-
 .../cache/aggcache/SpillableGroupByCache.java   |   13 +-
 .../apache/phoenix/compile/ColumnResolver.java  |   17 +
 .../phoenix/compile/CreateFunctionCompiler.java |   80 +
 .../phoenix/compile/CreateIndexCompiler.java|2 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |   15 +-
 .../phoenix/compile/ExpressionCompiler.java |   33 +-
 .../apache/phoenix/compile/FromCompiler.java|  199 +-
 .../apache/phoenix/compile/JoinCompiler.java|9 +-
 .../apache/phoenix/compile/PostDDLCompiler.java |   14 +
 .../phoenix/compile/ProjectionCompiler.java |2 +-
 .../apache/phoenix/compile/QueryCompiler.java   |   18 +-
 .../org/apache/phoenix/compile/QueryPlan.java   |   11 +
 .../apache/phoenix/compile/RowProjector.java|   32 +-
 .../phoenix/compile/StatementNormalizer.java|5 +-
 .../phoenix/compile/SubqueryRewriter.java   |6 +-
 .../phoenix/compile/SubselectRewriter.java  |2 +-
 .../apache/phoenix/compile/TraceQueryPlan.java  |5 +
 

[22/50] [abbrv] phoenix git commit: PHOENIX-1995 client uberjar doesn't support dfs

2015-06-15 Thread maryannxue
PHOENIX-1995 client uberjar doesn't support dfs


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/981ed472
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/981ed472
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/981ed472

Branch: refs/heads/calcite
Commit: 981ed472cb597440fe7c3a2aaa088b103f8f7352
Parents: a4b4e0e
Author: Nick Dimiduk ndimi...@apache.org
Authored: Wed May 20 12:29:36 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Wed May 20 12:55:23 2015 -0700

--
 phoenix-assembly/src/build/client.xml | 10 ++
 1 file changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/981ed472/phoenix-assembly/src/build/client.xml
--
diff --git a/phoenix-assembly/src/build/client.xml 
b/phoenix-assembly/src/build/client.xml
index 101ccd6..4bd4544 100644
--- a/phoenix-assembly/src/build/client.xml
+++ b/phoenix-assembly/src/build/client.xml
@@ -29,6 +29,16 @@
 formatjar/format
   /formats
   includeBaseDirectoryfalse/includeBaseDirectory
+
+  containerDescriptorHandlers
+containerDescriptorHandler
+  !--
+  aggregate SPI's so that things like HDFS FileSystem works in uberjar
+  http://docs.oracle.com/javase/tutorial/sound/SPI-intro.html
+  --
+  handlerNamemetaInf-services/handlerName
+/containerDescriptorHandler
+  /containerDescriptorHandlers
   
   componentDescriptors
 componentDescriptorsrc/build/components-minimal.xml/componentDescriptor



[36/50] [abbrv] phoenix git commit: PHOENIX-2022 Make BaseRegionScanner.next abstract

2015-06-15 Thread maryannxue
PHOENIX-2022 Make BaseRegionScanner.next abstract

Avoid infinite recursion by removing a recursive call within
BaseRegionScanner.next, which was already being used as an
abstract method.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/583b5b1e
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/583b5b1e
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/583b5b1e

Branch: refs/heads/calcite
Commit: 583b5b1e115a81799cc3e6d0a20a0fe665f666e3
Parents: b7f1382
Author: Gabriel Reid gabri...@ngdata.com
Authored: Mon Jun 1 08:57:22 2015 +0200
Committer: Gabriel Reid gabri...@ngdata.com
Committed: Mon Jun 1 08:57:22 2015 +0200

--
 .../java/org/apache/phoenix/coprocessor/BaseRegionScanner.java   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/583b5b1e/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/BaseRegionScanner.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/BaseRegionScanner.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/BaseRegionScanner.java
index 828f776..3f73048 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/BaseRegionScanner.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/BaseRegionScanner.java
@@ -33,9 +33,7 @@ public abstract class BaseRegionScanner implements 
RegionScanner {
 }
 
 @Override
-public boolean next(ListCell results) throws IOException {
-return next(results);
-}
+public abstract boolean next(ListCell results) throws IOException;
 
 @Override
 public boolean next(ListCell result, ScannerContext scannerContext) 
throws IOException {



[41/50] [abbrv] phoenix git commit: PHOENIX-777 - Support null value for fixed length ARRAY - Addendum (Ram)

2015-06-15 Thread maryannxue
PHOENIX-777 - Support null value for fixed length ARRAY - Addendum (Ram)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/6c3d50ac
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/6c3d50ac
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/6c3d50ac

Branch: refs/heads/calcite
Commit: 6c3d50ac198dd9159fb50cfe898734db99257c10
Parents: 7f6bf10
Author: ramkrishna ramkrishna.s.vasude...@gmail.com
Authored: Tue Jun 2 14:32:02 2015 +0530
Committer: ramkrishna ramkrishna.s.vasude...@gmail.com
Committed: Tue Jun 2 14:32:02 2015 +0530

--
 .../main/java/org/apache/phoenix/schema/types/PTimestamp.java   | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6c3d50ac/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PTimestamp.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PTimestamp.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PTimestamp.java
index d396adc..16b110e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PTimestamp.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PTimestamp.java
@@ -26,6 +26,7 @@ import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.query.QueryConstants;
 import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.util.ByteUtil;
 import org.apache.phoenix.util.DateUtil;
 
 public class PTimestamp extends PDataTypeTimestamp {
@@ -47,6 +48,10 @@ public class PTimestamp extends PDataTypeTimestamp {
   @Override
   public int toBytes(Object object, byte[] bytes, int offset) {
 if (object == null) {
+  // Create the byte[] of size MAX_TIMESTAMP_BYTES
+  if(bytes.length != getByteSize()) {
+  bytes = Bytes.padTail(bytes, (getByteSize() - bytes.length));
+  }
   PDate.INSTANCE.getCodec().encodeLong(0l, bytes, offset);
   Bytes.putInt(bytes, offset + Bytes.SIZEOF_LONG, 0);
   return getByteSize();



[31/50] [abbrv] phoenix git commit: PHOENIX-2005 Connection utilities omit zk client port, parent znode (addendum)

2015-06-15 Thread maryannxue
PHOENIX-2005 Connection utilities omit zk client port, parent znode (addendum)


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

Branch: refs/heads/calcite
Commit: e493215bff7057bad1a52efecca90384a1dd9412
Parents: afb0120
Author: Nick Dimiduk ndimi...@apache.org
Authored: Tue May 26 17:41:04 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Tue May 26 17:41:04 2015 -0700

--
 .../phoenix/jdbc/PhoenixEmbeddedDriver.java |  2 +-
 .../java/org/apache/phoenix/util/QueryUtil.java |  2 +-
 .../phoenix/jdbc/PhoenixEmbeddedDriverTest.java | 20 
 3 files changed, 22 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e493215b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
index 2451603..3cfaacc 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
@@ -209,7 +209,7 @@ public abstract class PhoenixEmbeddedDriver implements 
Driver, org.apache.phoeni
 url = url == null ?  : url;
 url = url.startsWith(PhoenixRuntime.JDBC_PROTOCOL)
 ? url.substring(PhoenixRuntime.JDBC_PROTOCOL.length())
-: url;
+: PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR + url;
 StringTokenizer tokenizer = new StringTokenizer(url, DELIMITERS, 
true);
 int nTokens = 0;
 String[] tokens = new String[5];

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e493215b/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
--
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
index bd38983..a2d4a91 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
@@ -290,7 +290,7 @@ public final class QueryUtil {
 throws ClassNotFoundException,
 SQLException {
 String url = getConnectionUrl(props, conf);
-LOG.info(Creating connection with the jdbc url: + url);
+LOG.info(Creating connection with the jdbc url:  + url);
 PropertiesUtil.extractProperties(props, conf);
 return DriverManager.getConnection(url, props);
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e493215b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java
 
b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java
index 083b205..4eda825 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java
@@ -34,23 +34,33 @@ public class PhoenixEmbeddedDriverTest {
 @Test
 public void testGetConnectionInfo() throws SQLException {
 String[] urls = new String[] {
+null,
+,
 jdbc:phoenix,
 jdbc:phoenix;test=true,
 jdbc:phoenix:localhost,
+localhost,
+localhost;,
 jdbc:phoenix:localhost:123,
 jdbc:phoenix:localhost:123;foo=bar,
+localhost:123,
 jdbc:phoenix:localhost:123:/hbase,
 jdbc:phoenix:localhost:123:/foo-bar,
 jdbc:phoenix:localhost:123:/foo-bar;foo=bas,
+localhost:123:/foo-bar,
 jdbc:phoenix:localhost:/hbase,
 jdbc:phoenix:localhost:/foo-bar,
 jdbc:phoenix:localhost:/foo-bar;test=true,
+localhost:/foo-bar,
 jdbc:phoenix:v1,v2,v3,
 jdbc:phoenix:v1,v2,v3;,
 jdbc:phoenix:v1,v2,v3;test=true,
+v1,v2,v3,
 jdbc:phoenix:v1,v2,v3:/hbase,
 jdbc:phoenix:v1,v2,v3:/hbase;test=true,
+v1,v2,v3:/foo-bar,
 jdbc:phoenix:v1,v2,v3:123:/hbase,
+v1,v2,v3:123:/hbase,
 jdbc:phoenix:v1,v2,v3:123:/hbase;test=false,
 

[18/50] [abbrv] phoenix git commit: PHOENIX-1976 Exit gracefully if addShutdownHook fails.

2015-06-15 Thread maryannxue
PHOENIX-1976 Exit gracefully if addShutdownHook fails.

If the JVM is already in the process of shutting down,
we don't need to add the shutdown hook for the PhoenixDriver
instance. Additionally, we shouldn't advertise this instance
either since we're going down.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/23f5acf8
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/23f5acf8
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/23f5acf8

Branch: refs/heads/calcite
Commit: 23f5acf86e1065f6bc8c342df4ba29f18aafea8a
Parents: 289a875
Author: Josh Elser josh.el...@gmail.com
Authored: Thu May 14 17:40:46 2015 -0400
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Fri May 15 11:05:05 2015 -0700

--
 .../org/apache/phoenix/jdbc/PhoenixDriver.java  | 46 ++--
 1 file changed, 32 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/23f5acf8/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java
index 6360d06..cfabe82 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java
@@ -60,25 +60,43 @@ public final class PhoenixDriver extends 
PhoenixEmbeddedDriver {
 private static volatile String driverShutdownMsg;
 static {
 try {
-DriverManager.registerDriver( INSTANCE = new PhoenixDriver() );
-// Add shutdown hook to release any resources that were never 
closed
-// In theory not necessary, but it won't hurt anything
-Runtime.getRuntime().addShutdownHook(new Thread() {
-@Override
-public void run() {
-try {
-INSTANCE.close();
-} catch (SQLException e) {
-logger.warn(Unable to close PhoenixDriver on 
shutdown, e);
-} finally {
-driverShutdownMsg = Phoenix driver closed because 
server is shutting down;
+INSTANCE = new PhoenixDriver();
+try {
+// Add shutdown hook to release any resources that were never 
closed
+// In theory not necessary, but it won't hurt anything
+Runtime.getRuntime().addShutdownHook(new Thread() {
+@Override
+public void run() {
+closeInstance(INSTANCE);
 }
-}
-});
+});
+
+// Only register the driver when we successfully register the 
shutdown hook
+// Don't want to register it if we're already in the process 
of going down.
+DriverManager.registerDriver( INSTANCE );
+} catch (IllegalStateException e) {
+logger.warn(Failed to register PhoenixDriver shutdown hook as 
the JVM is already shutting down);
+
+// Close the instance now because we don't have the shutdown 
hook
+closeInstance(INSTANCE);
+
+throw e;
+}
 } catch (SQLException e) {
 throw new IllegalStateException(Unable to register  + 
PhoenixDriver.class.getName() + : + e.getMessage());
 }
 }
+
+private static void closeInstance(PhoenixDriver instance) {
+try {
+instance.close();
+} catch (SQLException e) {
+logger.warn(Unable to close PhoenixDriver on shutdown, e);
+} finally {
+driverShutdownMsg = Phoenix driver closed because server is 
shutting down;
+}
+}
+
 // One entry per cluster here
 private final ConcurrentMapConnectionInfo,ConnectionQueryServices 
connectionQueryServicesMap = new 
ConcurrentHashMapConnectionInfo,ConnectionQueryServices(3);
 



[30/50] [abbrv] phoenix git commit: PHOENIX-2005 Connection utilities omit zk client port, parent znode

2015-06-15 Thread maryannxue
PHOENIX-2005 Connection utilities omit zk client port, parent znode


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

Branch: refs/heads/calcite
Commit: afb0120e079502d926c5f37de4e28d3865e29089
Parents: a28c1d3
Author: Nick Dimiduk ndimi...@apache.org
Authored: Tue May 26 11:11:48 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Tue May 26 11:12:28 2015 -0700

--
 .../phoenix/jdbc/PhoenixEmbeddedDriver.java | 28 --
 .../phoenix/mapreduce/CsvBulkLoadTool.java  | 93 ++--
 .../phoenix/mapreduce/CsvToKeyValueMapper.java  | 26 +-
 .../query/ConnectionQueryServicesImpl.java  |  4 +-
 .../java/org/apache/phoenix/util/QueryUtil.java | 45 --
 .../phoenix/jdbc/PhoenixEmbeddedDriverTest.java | 14 ++-
 .../phoenix/mapreduce/CsvBulkLoadToolTest.java  | 11 ---
 .../mapreduce/CsvToKeyValueMapperTest.java  | 15 
 .../org/apache/phoenix/util/QueryUtilTest.java  | 33 ---
 9 files changed, 139 insertions(+), 130 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/afb0120e/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
index 9e95667..2451603 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
@@ -31,6 +31,7 @@ import java.util.logging.Logger;
 
 import javax.annotation.concurrent.Immutable;
 
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.phoenix.coprocessor.MetaDataProtocol;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
@@ -174,10 +175,10 @@ public abstract class PhoenixEmbeddedDriver implements 
Driver, org.apache.phoeni
 }
 
 /**
- * 
+ *
  * Class to encapsulate connection info for HBase
  *
- * 
+ *
  * @since 0.1.1
  */
 public static class ConnectionInfo {
@@ -204,12 +205,18 @@ public abstract class PhoenixEmbeddedDriver implements 
Driver, org.apache.phoeni
 return false;
 }
 
-protected static ConnectionInfo create(String url) throws SQLException 
{
-StringTokenizer tokenizer = new StringTokenizer(url == null ?  : 
url.substring(PhoenixRuntime.JDBC_PROTOCOL.length()),DELIMITERS, true);
+public static ConnectionInfo create(String url) throws SQLException {
+url = url == null ?  : url;
+url = url.startsWith(PhoenixRuntime.JDBC_PROTOCOL)
+? url.substring(PhoenixRuntime.JDBC_PROTOCOL.length())
+: url;
+StringTokenizer tokenizer = new StringTokenizer(url, DELIMITERS, 
true);
 int nTokens = 0;
 String[] tokens = new String[5];
 String token = null;
-while (tokenizer.hasMoreTokens()  
!(token=tokenizer.nextToken()).equals(TERMINATOR)  tokenizer.hasMoreTokens() 
 nTokens  tokens.length) {
+while (tokenizer.hasMoreTokens() 
+!(token=tokenizer.nextToken()).equals(TERMINATOR) 
+tokenizer.hasMoreTokens()  nTokens  tokens.length) {
 token = tokenizer.nextToken();
 // This would mean we have an empty string for a token which 
is illegal
 if (DELIMITERS.contains(token)) {
@@ -316,8 +323,7 @@ public abstract class PhoenixEmbeddedDriver implements 
Driver, org.apache.phoeni
 private final String principal;
 private final String keytab;
 
-// used for testing
-ConnectionInfo(String zookeeperQuorum, Integer port, String rootNode, 
String principal, String keytab) {
+public ConnectionInfo(String zookeeperQuorum, Integer port, String 
rootNode, String principal, String keytab) {
 this.zookeeperQuorum = zookeeperQuorum;
 this.port = port;
 this.rootNode = rootNode;
@@ -326,8 +332,7 @@ public abstract class PhoenixEmbeddedDriver implements 
Driver, org.apache.phoeni
 this.keytab = keytab;
 }
 
-// used for testing
-ConnectionInfo(String zookeeperQuorum, Integer port, String rootNode) {
+public ConnectionInfo(String zookeeperQuorum, Integer port, String 
rootNode) {
this(zookeeperQuorum, port, rootNode, null, null);
 }
 
@@ -417,6 +422,11 @@ public 

[10/50] [abbrv] phoenix git commit: PHOENIX-1956 SELECT (FALSE OR FALSE) RETURNS TRUE

2015-06-15 Thread maryannxue
PHOENIX-1956 SELECT (FALSE OR FALSE) RETURNS TRUE


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

Branch: refs/heads/calcite
Commit: c2fee39efff87930ab3a00d4ed36ec32a493cf7d
Parents: 45a919f
Author: James Taylor jtay...@salesforce.com
Authored: Fri May 8 13:13:44 2015 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Fri May 8 13:14:24 2015 -0700

--
 .../org/apache/phoenix/end2end/EvaluationOfORIT.java | 11 +++
 .../org/apache/phoenix/compile/ExpressionCompiler.java   |  3 +--
 2 files changed, 12 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c2fee39e/phoenix-core/src/it/java/org/apache/phoenix/end2end/EvaluationOfORIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/EvaluationOfORIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/EvaluationOfORIT.java
index c9cc1e2..4355036 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/EvaluationOfORIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/EvaluationOfORIT.java
@@ -19,6 +19,7 @@ package org.apache.phoenix.end2end;
  
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import java.sql.Connection;
@@ -34,6 +35,16 @@ import org.junit.Test;
 
 public class EvaluationOfORIT extends BaseHBaseManagedTimeIT{

+@Test
+public void testFalseOrFalse() throws SQLException {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+ResultSet rs = conn.createStatement().executeQuery(SELECT (FALSE OR 
FALSE) AS B FROM SYSTEM.CATALOG LIMIT 1);
+assertTrue(rs.next());
+assertFalse(rs.getBoolean(1));
+conn.close();
+}
+
@Test
public void testPKOrNotPKInOREvaluation() throws SQLException {
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c2fee39e/phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java
index 92899a6..66c1b85 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java
@@ -71,7 +71,6 @@ import 
org.apache.phoenix.expression.function.ArrayAnyComparisonExpression;
 import org.apache.phoenix.expression.function.ArrayElemRefExpression;
 import org.apache.phoenix.expression.function.RoundDecimalExpression;
 import org.apache.phoenix.expression.function.RoundTimestampExpression;
-import org.apache.phoenix.expression.function.UDFExpression;
 import org.apache.phoenix.parse.AddParseNode;
 import org.apache.phoenix.parse.AndParseNode;
 import org.apache.phoenix.parse.ArithmeticParseNode;
@@ -261,7 +260,7 @@ public class ExpressionCompiler extends 
UnsupportedAllParseNodeVisitorExpressio
 determinism = determinism.combine(child.getDeterminism());
 }
 if (children.size() == 0) {
-return LiteralExpression.newConstant(true, determinism);
+return LiteralExpression.newConstant(false, determinism);
 }
 if (children.size() == 1) {
 return children.get(0);



[04/50] [abbrv] phoenix git commit: PHOENIX-1882 Issue column family deletes instead of row deletes in PTableImpl

2015-06-15 Thread maryannxue
PHOENIX-1882 Issue column family deletes instead of row deletes in PTableImpl


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

Branch: refs/heads/calcite
Commit: efd7c9f735433c8512877ad3db194bb325bdde32
Parents: d2c1f2c
Author: Thomas tdsi...@salesforce.com
Authored: Sun Apr 26 11:38:51 2015 -0700
Committer: Thomas tdsi...@salesforce.com
Committed: Wed Apr 29 20:48:06 2015 -0700

--
 .../phoenix/end2end/MappingTableDataTypeIT.java | 67 ++--
 .../apache/phoenix/index/IndexMaintainer.java   |  7 --
 .../org/apache/phoenix/schema/PTableImpl.java   |  8 +--
 3 files changed, 53 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/efd7c9f7/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java
index 98e536e..9617e37 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java
@@ -19,23 +19,31 @@ package org.apache.phoenix.end2end;
 
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
+import java.util.List;
 import java.util.Properties;
 
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.ResultScanner;
+import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.Test;
@@ -52,18 +60,44 @@ public class MappingTableDataTypeIT extends 
BaseHBaseManagedTimeIT {
 try {
 // Create table then get the single region for our new table.
 HTableDescriptor descriptor = new HTableDescriptor(tableName);
-HColumnDescriptor columnDescriptor =  new 
HColumnDescriptor(Bytes.toBytes(cf));
-descriptor.addFamily(columnDescriptor);
+HColumnDescriptor columnDescriptor1 =  new 
HColumnDescriptor(Bytes.toBytes(cf1));
+HColumnDescriptor columnDescriptor2 =  new 
HColumnDescriptor(Bytes.toBytes(cf2));
+descriptor.addFamily(columnDescriptor1);
+descriptor.addFamily(columnDescriptor2);
 admin.createTable(descriptor);
 HTableInterface t = 
conn.getQueryServices().getTable(Bytes.toBytes(MTEST));
 insertData(tableName.getName(), admin, t);
 t.close();
-try {
-testCreateTableMismatchedType();
-fail();
-} catch (SQLException e) {
-
assertEquals(SQLExceptionCode.ILLEGAL_DATA.getErrorCode(),e.getErrorCode());
-}
+// create phoenix table that maps to existing HBase table
+createPhoenixTable();
+
+String selectSql = SELECT * FROM MTEST;
+ResultSet rs = conn.createStatement().executeQuery(selectSql);
+ResultSetMetaData rsMetaData = rs.getMetaData();
+assertTrue(Expected single row, rs.next());
+// verify values from cf2 is not returned
+assertEquals(Number of columns, 2, rsMetaData.getColumnCount());
+assertEquals(Column Value, value1, rs.getString(2));
+assertFalse(Expected single row , rs.next());
+
+// delete the row
+String deleteSql = DELETE FROM MTEST WHERE id = 'row';
+conn.createStatement().executeUpdate(deleteSql);
+conn.commit();
+
+// verify that no rows are returned when querying through 

[37/50] [abbrv] phoenix git commit: PHOENIX-2007 java.sql.SQLException: Encountered exception in sub plan [0] execution(Alicia Ying Shu)

2015-06-15 Thread maryannxue
PHOENIX-2007 java.sql.SQLException: Encountered exception in sub plan [0] 
execution(Alicia Ying Shu)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/82df3b97
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/82df3b97
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/82df3b97

Branch: refs/heads/calcite
Commit: 82df3b97a9ca88605f78b59e547819ff3bf9cd7a
Parents: 583b5b1
Author: Rajeshbabu Chintaguntla rajeshb...@apache.org
Authored: Mon Jun 1 21:04:43 2015 +0530
Committer: Rajeshbabu Chintaguntla rajeshb...@apache.org
Committed: Mon Jun 1 21:04:43 2015 +0530

--
 .../org/apache/phoenix/end2end/HashJoinIT.java  | 54 
 .../apache/phoenix/execute/HashJoinPlan.java|  7 +--
 2 files changed, 58 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/82df3b97/phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinIT.java
index a03204a..88e03ca 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinIT.java
@@ -3813,6 +3813,60 @@ public class HashJoinIT extends BaseHBaseManagedTimeIT {
 }
 }
 
+@Test
+public void testSubqueryWithoutData() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+conn.setAutoCommit(false);
+
+try {
+String GRAMMAR_TABLE = CREATE TABLE IF NOT EXISTS GRAMMAR_TABLE 
(ID INTEGER PRIMARY KEY,  +
+unsig_id UNSIGNED_INT, big_id BIGINT, unsig_long_id 
UNSIGNED_LONG, tiny_id TINYINT, +
+unsig_tiny_id UNSIGNED_TINYINT, small_id SMALLINT, 
unsig_small_id UNSIGNED_SMALLINT, + 
+float_id FLOAT, unsig_float_id UNSIGNED_FLOAT, double_id 
DOUBLE, unsig_double_id UNSIGNED_DOUBLE, + 
+decimal_id DECIMAL, boolean_id BOOLEAN, time_id TIME, 
date_id DATE, timestamp_id TIMESTAMP, + 
+unsig_time_id TIME, unsig_date_id DATE, 
unsig_timestamp_id TIMESTAMP, varchar_id VARCHAR (30), + 
+char_id CHAR (30), binary_id BINARY (100), varbinary_id 
VARBINARY (100));
+
+String LARGE_TABLE = CREATE TABLE IF NOT EXISTS LARGE_TABLE (ID 
INTEGER PRIMARY KEY,  +
+unsig_id UNSIGNED_INT, big_id BIGINT, unsig_long_id 
UNSIGNED_LONG, tiny_id TINYINT, +
+unsig_tiny_id UNSIGNED_TINYINT, small_id SMALLINT, 
unsig_small_id UNSIGNED_SMALLINT, + 
+float_id FLOAT, unsig_float_id UNSIGNED_FLOAT, double_id 
DOUBLE, unsig_double_id UNSIGNED_DOUBLE, + 
+decimal_id DECIMAL, boolean_id BOOLEAN, time_id TIME, 
date_id DATE, timestamp_id TIMESTAMP, + 
+unsig_time_id TIME, unsig_date_id DATE, 
unsig_timestamp_id TIMESTAMP, varchar_id VARCHAR (30), + 
+char_id CHAR (30), binary_id BINARY (100), varbinary_id 
VARBINARY (100));
+
+String SECONDARY_LARGE_TABLE = CREATE TABLE IF NOT EXISTS 
SECONDARY_LARGE_TABLE (SEC_ID INTEGER PRIMARY KEY, +
+sec_unsig_id UNSIGNED_INT, sec_big_id BIGINT, 
sec_usnig_long_id UNSIGNED_LONG, sec_tiny_id TINYINT, + 
+sec_unsig_tiny_id UNSIGNED_TINYINT, sec_small_id 
SMALLINT, sec_unsig_small_id UNSIGNED_SMALLINT, + 
+sec_float_id FLOAT, sec_unsig_float_id UNSIGNED_FLOAT, 
sec_double_id DOUBLE, sec_unsig_double_id UNSIGNED_DOUBLE, +
+sec_decimal_id DECIMAL, sec_boolean_id BOOLEAN, 
sec_time_id TIME, sec_date_id DATE, +
+sec_timestamp_id TIMESTAMP, sec_unsig_time_id TIME, 
sec_unsig_date_id DATE, sec_unsig_timestamp_id TIMESTAMP, +
+sec_varchar_id VARCHAR (30), sec_char_id CHAR (30), 
sec_binary_id BINARY (100), sec_varbinary_id VARBINARY (100));
+createTestTable(getUrl(), GRAMMAR_TABLE);
+createTestTable(getUrl(), LARGE_TABLE);
+createTestTable(getUrl(), SECONDARY_LARGE_TABLE);
+
+String ddl = SELECT * FROM (SELECT ID, BIG_ID, DATE_ID FROM 
LARGE_TABLE AS A WHERE (A.ID % 5) = 0) AS A  +
+INNER JOIN (SELECT SEC_ID, SEC_TINY_ID, 
SEC_UNSIG_FLOAT_ID FROM SECONDARY_LARGE_TABLE AS B WHERE (B.SEC_ID % 5) = 0) AS 
B  + 
+ON A.ID=B.SEC_ID WHERE A.DATE_ID  ALL (SELECT 
SEC_DATE_ID FROM SECONDARY_LARGE_TABLE LIMIT 100)  +  
+AND B.SEC_UNSIG_FLOAT_ID = ANY (SELECT sec_unsig_float_id 
FROM 

[01/50] [abbrv] phoenix git commit: PHOENIX-1930 [BW COMPAT] Queries hangs with client on Phoenix 4.3.0 and server on 4.x-HBase-0.98

2015-06-15 Thread maryannxue
Repository: phoenix
Updated Branches:
  refs/heads/calcite f9ddb988c - 62d6720f7


PHOENIX-1930 [BW COMPAT] Queries hangs with client on Phoenix 4.3.0 and server 
on 4.x-HBase-0.98


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/864faba6
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/864faba6
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/864faba6

Branch: refs/heads/calcite
Commit: 864faba6d6091136d6776f1d81cd5264d3a0e14e
Parents: 064b7af
Author: Thomas tdsi...@salesforce.com
Authored: Wed Apr 29 11:16:41 2015 -0700
Committer: Thomas tdsi...@salesforce.com
Committed: Wed Apr 29 11:42:09 2015 -0700

--
 .../org/apache/phoenix/expression/ExpressionType.java   | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/864faba6/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
index d5cf745..843a768 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
@@ -143,7 +143,7 @@ public enum ExpressionType {
 SumAggregateFunction(SumAggregateFunction.class),
 MinAggregateFunction(MinAggregateFunction.class),
 MaxAggregateFunction(MaxAggregateFunction.class),
-LikeExpression(LikeExpression.class),
+StringBasedLikeExpression(StringBasedLikeExpression.class),
 NotExpression(NotExpression.class),
 CaseExpression(CaseExpression.class),
 InListExpression(InListExpression.class),
@@ -159,9 +159,9 @@ public enum ExpressionType {
 LongDivideExpression(LongDivideExpression.class),
 DecimalDivideExpression(DecimalDivideExpression.class),
 CoalesceFunction(CoalesceFunction.class),
-RegexpReplaceFunction(RegexpReplaceFunction.class),
+StringBasedRegexpReplaceFunction(StringBasedRegexpReplaceFunction.class),
 SQLTypeNameFunction(SqlTypeNameFunction.class),
-RegexpSubstrFunction(RegexpSubstrFunction.class),
+StringBasedRegexpSubstrFunction(StringBasedRegexpSubstrFunction.class),
 StringConcatExpression(StringConcatExpression.class),
 LengthFunction(LengthFunction.class),
 LTrimFunction(LTrimFunction.class),
@@ -206,7 +206,7 @@ public enum ExpressionType {
 SQLIndexTypeFunction(SQLIndexTypeFunction.class),
 ModulusExpression(ModulusExpression.class),
 DistinctValueAggregateFunction(DistinctValueAggregateFunction.class),
-RegexpSplitFunction(RegexpSplitFunction.class),
+StringBasedRegexpSplitFunction(StringBasedRegexpSplitFunction.class),
 RandomFunction(RandomFunction.class),
 ToTimeFunction(ToTimeFunction.class),
 ToTimestampFunction(ToTimestampFunction.class),
@@ -214,10 +214,6 @@ public enum ExpressionType {
 ByteBasedRegexpReplaceFunction(ByteBasedRegexpReplaceFunction.class),
 ByteBasedRegexpSubstrFunction(ByteBasedRegexpSubstrFunction.class),
 ByteBasedRegexpSplitFunction(ByteBasedRegexpSplitFunction.class),
-StringBasedLikeExpression(StringBasedLikeExpression.class),
-StringBasedRegexpReplaceFunction(StringBasedRegexpReplaceFunction.class),
-StringBasedRegexpSubstrFunction(StringBasedRegexpSubstrFunction.class),
-StringBasedRegexpSplitFunction(StringBasedRegexpSplitFunction.class),
 SignFunction(SignFunction.class),
 YearFunction(YearFunction.class),
 MonthFunction(MonthFunction.class),



[17/50] [abbrv] phoenix git commit: PHOENIX-1963 - Irregular failures in ResultTest#testMonitorResult

2015-06-15 Thread maryannxue
PHOENIX-1963 - Irregular failures in ResultTest#testMonitorResult


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/289a875b
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/289a875b
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/289a875b

Branch: refs/heads/calcite
Commit: 289a875bd1cd76b6437ae1400d6c324bfe3e0754
Parents: a1032fb
Author: cmarcel cmar...@salesforce.com
Authored: Thu May 14 15:56:46 2015 -0700
Committer: cmarcel cmar...@salesforce.com
Committed: Thu May 14 15:57:00 2015 -0700

--
 phoenix-pherf/cluster/pherf.sh  | 2 +-
 .../main/java/org/apache/phoenix/pherf/jmx/MonitorManager.java  | 5 ++---
 .../src/test/java/org/apache/phoenix/pherf/ResultTest.java  | 4 ++--
 phoenix-pherf/standalone/pherf.sh   | 2 +-
 4 files changed, 6 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/289a875b/phoenix-pherf/cluster/pherf.sh
--
diff --git a/phoenix-pherf/cluster/pherf.sh b/phoenix-pherf/cluster/pherf.sh
index aeff856..8d58dfe 100755
--- a/phoenix-pherf/cluster/pherf.sh
+++ b/phoenix-pherf/cluster/pherf.sh
@@ -28,6 +28,6 @@ for f in $PHERF_HOME/lib/*.jar; do
   CLASSPATH=${CLASSPATH}:$f;
 done
 
-CMD=time $}JAVA_HOME}/bin/java ${REMOTE_DEBUG} -Dapp.home=${PHERF_HOME} 
${ENV_PROPS} -Xms512m -Xmx3072m -cp ${CLASSPATH} org.apache.phoenix.pherf.Pherf 
${@}
+CMD=time ${JAVA_HOME}/bin/java ${REMOTE_DEBUG} -Dapp.home=${PHERF_HOME} 
${ENV_PROPS} -Xms512m -Xmx3072m -cp ${CLASSPATH} org.apache.phoenix.pherf.Pherf 
${@}
 
 eval $CMD
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/289a875b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/jmx/MonitorManager.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/jmx/MonitorManager.java 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/jmx/MonitorManager.java
index 9f46cf7..6f97551 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/jmx/MonitorManager.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/jmx/MonitorManager.java
@@ -106,8 +106,9 @@ public class MonitorManager implements Runnable {
 rowCount.getAndIncrement();
 }
 try {
+resultHandler.flush();
 Thread.sleep(getMonitorFrequency());
-} catch (InterruptedException e) {
+} catch (Exception e) {
 Thread.currentThread().interrupt();
 e.printStackTrace();
 }
@@ -117,9 +118,7 @@ public class MonitorManager implements Runnable {
 try {
 isRunning = false;
 if (resultHandler != null) {
-resultHandler.flush();
 resultHandler.close();
-
 }
 } catch (Exception e) {
 throw new FileLoaderRuntimeException(Could not close monitor 
results., e);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/289a875b/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResultTest.java
--
diff --git 
a/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResultTest.java 
b/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResultTest.java
index 0f4dfd1..c51f0dc 100644
--- a/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResultTest.java
+++ b/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResultTest.java
@@ -55,7 +55,7 @@ public class ResultTest {
 resultMonitorWriter.write(result);
 resultMonitorWriter.write(result);
 resultMonitorWriter.write(result);
-resultMonitorWriter.flush();
+resultMonitorWriter.close();
 ListResult results = resultMonitorWriter.read();
 assertEquals(Results did not contain row., results.size(), 3);
 
@@ -72,7 +72,7 @@ public class ResultTest {
 ExecutorService executorService = Executors.newFixedThreadPool(1);
 MonitorManager monitor = new MonitorManager(100);
 Future future = executorService.submit(monitor);
-ListResult records = null;
+ListResult records;
 final int TIMEOUT = 30;
 
 int ct = 0;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/289a875b/phoenix-pherf/standalone/pherf.sh
--
diff --git a/phoenix-pherf/standalone/pherf.sh 
b/phoenix-pherf/standalone/pherf.sh
index e08035a..2b91d2c 100755
--- 

[35/50] [abbrv] phoenix git commit: PHOENIX-2010 Properly validate number of arguments passed to the functions in FunctionParseNode#validate(Rajeshbabu)

2015-06-15 Thread maryannxue
PHOENIX-2010 Properly validate number of arguments passed to the functions in 
FunctionParseNode#validate(Rajeshbabu)


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

Branch: refs/heads/calcite
Commit: b7f138246328ea80ce53fb73539a1e48413a32d2
Parents: 08fc27d
Author: Rajeshbabu Chintaguntla rajeshb...@apache.org
Authored: Sun May 31 07:40:16 2015 +0530
Committer: Rajeshbabu Chintaguntla rajeshb...@apache.org
Committed: Sun May 31 07:40:16 2015 +0530

--
 .../phoenix/end2end/UserDefinedFunctionsIT.java   | 14 ++
 .../org/apache/phoenix/parse/FunctionParseNode.java   |  4 
 .../main/java/org/apache/phoenix/parse/PFunction.java |  4 +---
 3 files changed, 19 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b7f13824/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
index 7dbde3c..868e19d 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
@@ -442,6 +442,20 @@ public class UserDefinedFunctionsIT extends 
BaseOwnClusterIT{
 rs = stmt.executeQuery(select k from t9 where mysum9(k)=11);
 assertTrue(rs.next());
 assertEquals(1, rs.getInt(1));
+try {
+rs = stmt.executeQuery(select k from t9 where 
mysum9(k,10,'x')=11);
+fail(FunctionNotFoundException should be thrown);
+} catch(FunctionNotFoundException e) {
+} catch(Exception e) {
+fail(FunctionNotFoundException should be thrown);
+}
+try {
+rs = stmt.executeQuery(select mysum9() from t9);
+fail(FunctionNotFoundException should be thrown);
+} catch(FunctionNotFoundException e) {
+} catch(Exception e) {
+fail(FunctionNotFoundException should be thrown);
+}
 stmt.execute(drop function mysum9);
 try {
 rs = stmt.executeQuery(select k from t9 where mysum9(k)=11);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b7f13824/phoenix-core/src/main/java/org/apache/phoenix/parse/FunctionParseNode.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/parse/FunctionParseNode.java 
b/phoenix-core/src/main/java/org/apache/phoenix/parse/FunctionParseNode.java
index d1001ee..be52d89 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/parse/FunctionParseNode.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/parse/FunctionParseNode.java
@@ -41,6 +41,7 @@ import 
org.apache.phoenix.expression.function.FunctionExpression;
 import org.apache.phoenix.expression.function.UDFExpression;
 import org.apache.phoenix.parse.PFunction.FunctionArgument;
 import org.apache.phoenix.schema.ArgumentTypeMismatchException;
+import org.apache.phoenix.schema.FunctionNotFoundException;
 import org.apache.phoenix.schema.ValueRangeExcpetion;
 import org.apache.phoenix.schema.types.PDataType;
 import org.apache.phoenix.schema.types.PDataTypeFactory;
@@ -133,6 +134,9 @@ public class FunctionParseNode extends CompoundParseNode {
 public ListExpression validate(ListExpression children, 
StatementContext context) throws SQLException {
 BuiltInFunctionInfo info = this.getInfo();
 BuiltInFunctionArgInfo[] args = info.getArgs();
+if (args.length  children.size() || info.getRequiredArgCount()  
children.size()) {
+throw new FunctionNotFoundException(this.name);
+}
 if (args.length  children.size()) {
 ListExpression moreChildren = new 
ArrayListExpression(children);
 for (int i = children.size(); i  info.getArgs().length; i++) {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b7f13824/phoenix-core/src/main/java/org/apache/phoenix/parse/PFunction.java
--
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/parse/PFunction.java 
b/phoenix-core/src/main/java/org/apache/phoenix/parse/PFunction.java
index f4bac35..8a95ae7 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/parse/PFunction.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/parse/PFunction.java
@@ -95,9 +95,7 @@ public class PFunction implements PMetaDataEntity {
 }
 
 public 

[48/50] [abbrv] phoenix git commit: PHOENIX-2034 Update pre-commit branches

2015-06-15 Thread maryannxue
PHOENIX-2034 Update pre-commit branches


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

Branch: refs/heads/calcite
Commit: bfb0eee75b2ce0edb931599a9b024d3cd7160ae9
Parents: 67fea16
Author: Nick Dimiduk ndimi...@apache.org
Authored: Fri Jun 12 10:06:59 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Fri Jun 12 10:06:59 2015 -0700

--
 dev/test-patch.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/bfb0eee7/dev/test-patch.properties
--
diff --git a/dev/test-patch.properties b/dev/test-patch.properties
index 6a82eee..53f2ad4 100644
--- a/dev/test-patch.properties
+++ b/dev/test-patch.properties
@@ -27,7 +27,7 @@ MAX_LINE_LENGTH=100
 # All supported branches for testing with precommit build
 # be sure to consider branch name prefixes in the order, ie, 4.x should appear
 # before 4 since the latter is a prefix
-BRANCH_NAMES=3.0 3.2 4.0.1 4.2 4.3 4.x-HBase-0.98 master
+BRANCH_NAMES=4.4-HBase-0.98 4.4-HBase-1.0 4.4-HBase-1.1 4.x-HBase-0.98 
4.x-HBase-1.0 4.x-HBase-1.1 master
 
 
 # All supported Hadoop versions that we want to test the compilation with



[28/50] [abbrv] phoenix git commit: PHOENIX-1681 Use the new Region Interface (Andrew Purtell)

2015-06-15 Thread maryannxue
PHOENIX-1681 Use the new Region Interface (Andrew Purtell)


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

Branch: refs/heads/calcite
Commit: edff624f193324762fae04907c551e3d2fec93a3
Parents: 7bc9cce
Author: Enis Soztutar e...@apache.org
Authored: Thu May 21 23:22:54 2015 -0700
Committer: Enis Soztutar e...@apache.org
Committed: Fri May 22 00:16:31 2015 -0700

--
 ...ReplayWithIndexWritesAndCompressedWALIT.java |  4 +-
 .../EndToEndCoveredColumnsIndexBuilderIT.java   |  4 +-
 .../IndexHalfStoreFileReaderGenerator.java  |  9 +-
 .../regionserver/IndexSplitTransaction.java | 65 +-
 .../hbase/regionserver/LocalIndexMerger.java| 16 ++--
 .../hbase/regionserver/LocalIndexSplitter.java  | 11 +--
 .../coprocessor/BaseScannerRegionObserver.java  | 26 +++---
 .../GroupedAggregateRegionObserver.java | 13 +--
 .../coprocessor/MetaDataEndpointImpl.java   | 94 ++--
 .../phoenix/coprocessor/ScanRegionObserver.java | 17 ++--
 .../coprocessor/SequenceRegionObserver.java | 16 ++--
 .../UngroupedAggregateRegionObserver.java   | 29 +++---
 .../hbase/index/covered/data/LocalTable.java|  5 +-
 .../write/ParallelWriterIndexCommitter.java |  8 +-
 .../recovery/PerRegionIndexWriteCache.java  | 10 +--
 .../recovery/StoreFailuresInCachePolicy.java|  4 +-
 .../TrackingParallelWriterIndexCommitter.java   |  8 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  4 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java | 14 ++-
 .../schema/stats/StatisticsCollector.java   | 14 +--
 .../phoenix/schema/stats/StatisticsScanner.java | 16 ++--
 .../phoenix/schema/stats/StatisticsWriter.java  | 16 ++--
 .../java/org/apache/phoenix/util/IndexUtil.java | 38 
 .../index/covered/TestLocalTableState.java  |  8 +-
 .../index/write/TestWALRecoveryCaching.java | 17 ++--
 .../recovery/TestPerRegionIndexWriteCache.java  |  6 +-
 26 files changed, 230 insertions(+), 242 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/edff624f/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
 
b/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
index 3b8ff29..611ba68 100644
--- 
a/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
@@ -159,7 +159,7 @@ public class WALReplayWithIndexWritesAndCompressedWALIT {
   }
 
   /**
-   * Test writing edits into an HRegion, closing it, splitting logs, opening 
Region again. Verify
+   * Test writing edits into an region, closing it, splitting logs, opening 
Region again. Verify
* seqids.
* @throws Exception on failure
*/
@@ -183,7 +183,7 @@ public class WALReplayWithIndexWritesAndCompressedWALIT {
 builder.build(htd);
 
 // create the region + its WAL
-HRegion region0 = HRegion.createHRegion(hri, hbaseRootDir, this.conf, htd);
+HRegion region0 = HRegion.createHRegion(hri, hbaseRootDir, this.conf, 
htd); // FIXME: Uses private type
 region0.close();
 region0.getWAL().close();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/edff624f/phoenix-core/src/it/java/org/apache/phoenix/hbase/index/covered/EndToEndCoveredColumnsIndexBuilderIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/hbase/index/covered/EndToEndCoveredColumnsIndexBuilderIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/hbase/index/covered/EndToEndCoveredColumnsIndexBuilderIT.java
index d90733f..6b2309e 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/hbase/index/covered/EndToEndCoveredColumnsIndexBuilderIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/hbase/index/covered/EndToEndCoveredColumnsIndexBuilderIT.java
@@ -41,7 +41,7 @@ import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Put;
-import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.util.EnvironmentEdge;
 import 

[11/50] [abbrv] phoenix git commit: PHOENIX-1958 Minimize memory allocation on new connection

2015-06-15 Thread maryannxue
PHOENIX-1958 Minimize memory allocation on new connection


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

Branch: refs/heads/calcite
Commit: cd81738b1fbcb5cf19123b2dca8da31f602b9c64
Parents: c2fee39
Author: James Taylor jtay...@salesforce.com
Authored: Sat May 9 10:18:57 2015 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Sat May 9 10:18:57 2015 -0700

--
 .../apache/phoenix/jdbc/PhoenixConnection.java  | 41 +++-
 .../org/apache/phoenix/util/ReadOnlyProps.java  | 32 +++
 2 files changed, 54 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/cd81738b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
index c22a7fa..dad60c1 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
@@ -48,7 +48,6 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.concurrent.Executor;
 
@@ -56,6 +55,8 @@ import javax.annotation.Nullable;
 
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.client.Consistency;
+import org.apache.htrace.Sampler;
+import org.apache.htrace.TraceScope;
 import org.apache.phoenix.call.CallRunner;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
@@ -95,15 +96,12 @@ import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SQLCloseable;
 import org.apache.phoenix.util.SQLCloseables;
-import org.apache.htrace.Sampler;
-import org.apache.htrace.TraceScope;
 
 import com.google.common.base.Objects;
 import com.google.common.base.Strings;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableMap.Builder;
 import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
 
 
 /**
@@ -185,21 +183,9 @@ public class PhoenixConnection implements Connection, 
org.apache.phoenix.jdbc.Jd
 if (tenantId != null) {
 services = 
services.getChildQueryServices(tenantId.getBytesPtr());
 }
-// TODO: we could avoid creating another wrapper if the only 
property
-// specified was for the tenant ID
-MapString, String existingProps = services.getProps().asMap();
-final MapString, String tmpAugmentedProps = 
Maps.newHashMapWithExpectedSize(existingProps.size() + info.size());
-tmpAugmentedProps.putAll(existingProps);
-boolean needsDelegate = false;
-for (EntryObject, Object entry : this.info.entrySet()) {
-String key = entry.getKey().toString();
-String value = entry.getValue().toString();
-String oldValue = tmpAugmentedProps.put(key, value);
-needsDelegate |= !Objects.equal(oldValue, value);
-}
-this.services = !needsDelegate ? services : new 
DelegateConnectionQueryServices(services) {
-final ReadOnlyProps augmentedProps = new 
ReadOnlyProps(tmpAugmentedProps);
-
+ReadOnlyProps currentProps = services.getProps();
+final ReadOnlyProps augmentedProps = 
currentProps.addAll(filterKnownNonProperties(this.info));
+this.services = augmentedProps == currentProps ? services : new 
DelegateConnectionQueryServices(services) {
 @Override
 public ReadOnlyProps getProps() {
 return augmentedProps;
@@ -261,6 +247,23 @@ public class PhoenixConnection implements Connection, 
org.apache.phoenix.jdbc.Jd
 this.customTracingAnnotations = getImmutableCustomTracingAnnotations();
 }
 
+private static Properties filterKnownNonProperties(Properties info) {
+Properties prunedProperties = info;
+if (info.contains(PhoenixRuntime.CURRENT_SCN_ATTRIB)) {
+if (prunedProperties == info) {
+prunedProperties = PropertiesUtil.deepCopy(info);
+}
+prunedProperties.remove(PhoenixRuntime.CURRENT_SCN_ATTRIB);
+}
+if (info.contains(PhoenixRuntime.TENANT_ID_ATTRIB)) {
+if (prunedProperties == info) {
+ 

[25/50] [abbrv] phoenix git commit: PHOENIX-1996 Use BytesStringer instead of ZeroCopyByteString

2015-06-15 Thread maryannxue
PHOENIX-1996 Use BytesStringer instead of ZeroCopyByteString


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/286ff26d
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/286ff26d
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/286ff26d

Branch: refs/heads/calcite
Commit: 286ff26d82b2638dc5d3db850fa6f4537ab6153f
Parents: c2fed1d
Author: Nick Dimiduk ndimi...@apache.org
Authored: Wed May 20 14:17:47 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Thu May 21 09:25:34 2015 -0700

--
 .../apache/phoenix/cache/ServerCacheClient.java | 10 +++
 .../phoenix/coprocessor/MetaDataProtocol.java   |  9 +++
 .../org/apache/phoenix/parse/PFunction.java |  5 ++--
 .../apache/phoenix/protobuf/ProtobufUtil.java   |  4 +--
 .../query/ConnectionQueryServicesImpl.java  | 18 ++---
 .../org/apache/phoenix/schema/PColumnImpl.java  |  8 +++---
 .../org/apache/phoenix/schema/PTableImpl.java   | 28 ++--
 7 files changed, 40 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/286ff26d/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
index 1233e1c..9718709 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
@@ -44,6 +44,7 @@ import org.apache.hadoop.hbase.client.coprocessor.Batch;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.ipc.BlockingRpcCallback;
 import org.apache.hadoop.hbase.ipc.ServerRpcController;
+import org.apache.hadoop.hbase.util.ByteStringer;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.compile.ScanRanges;
 import org.apache.phoenix.coprocessor.ServerCachingProtocol.ServerCacheFactory;
@@ -68,7 +69,6 @@ import org.apache.phoenix.util.SQLCloseables;
 import org.apache.phoenix.util.ScanUtil;
 
 import com.google.common.collect.ImmutableSet;
-import com.google.protobuf.HBaseZeroCopyByteString;
 
 /**
  * 
@@ -194,9 +194,9 @@ public class ServerCacheClient {
 new 
BlockingRpcCallbackAddServerCacheResponse();
 
AddServerCacheRequest.Builder builder = AddServerCacheRequest.newBuilder();
 
if(connection.getTenantId() != null){
-
builder.setTenantId(HBaseZeroCopyByteString.wrap(connection.getTenantId().getBytes()));
+
builder.setTenantId(ByteStringer.wrap(connection.getTenantId().getBytes()));
 }
-
builder.setCacheId(HBaseZeroCopyByteString.wrap(cacheId));
+
builder.setCacheId(ByteStringer.wrap(cacheId));
 
builder.setCachePtr(org.apache.phoenix.protobuf.ProtobufUtil.toProto(cachePtr));
 
ServerCacheFactoryProtos.ServerCacheFactory.Builder svrCacheFactoryBuider = 
ServerCacheFactoryProtos.ServerCacheFactory.newBuilder();
 
svrCacheFactoryBuider.setClassName(cacheFactory.getClass().getName());
@@ -307,9 +307,9 @@ public class ServerCacheClient {
new 
BlockingRpcCallbackRemoveServerCacheResponse();

RemoveServerCacheRequest.Builder builder = 
RemoveServerCacheRequest.newBuilder();

if(connection.getTenantId() != null){
-   
builder.setTenantId(HBaseZeroCopyByteString.wrap(connection.getTenantId().getBytes()));
+   
builder.setTenantId(ByteStringer.wrap(connection.getTenantId().getBytes()));
}
-   
builder.setCacheId(HBaseZeroCopyByteString.wrap(cacheId));
+   
builder.setCacheId(ByteStringer.wrap(cacheId));

instance.removeServerCache(controller, builder.build(), rpcCallback);

[21/50] [abbrv] phoenix git commit: PHOENIX-1979 Remove unused FamilyOnlyFilter

2015-06-15 Thread maryannxue
PHOENIX-1979 Remove unused FamilyOnlyFilter


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

Branch: refs/heads/calcite
Commit: a4b4e0e2d862d5d4ee0f3a6f9587f53fe87d629f
Parents: c83ab9e
Author: Andrew Purtell apurt...@apache.org
Authored: Wed May 20 09:53:53 2015 -0700
Committer: Andrew Purtell apurt...@apache.org
Committed: Wed May 20 09:53:53 2015 -0700

--
 .../index/covered/filter/FamilyOnlyFilter.java  |  80 --
 .../covered/filter/TestFamilyOnlyFilter.java| 106 ---
 2 files changed, 186 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a4b4e0e2/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/filter/FamilyOnlyFilter.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/filter/FamilyOnlyFilter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/filter/FamilyOnlyFilter.java
deleted file mode 100644
index 68555ef..000
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/filter/FamilyOnlyFilter.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-package org.apache.phoenix.hbase.index.covered.filter;
-
-import org.apache.hadoop.hbase.Cell;
-import org.apache.hadoop.hbase.filter.BinaryComparator;
-import org.apache.hadoop.hbase.filter.ByteArrayComparable;
-import org.apache.hadoop.hbase.filter.FamilyFilter;
-
-/**
- * Similar to the {@link FamilyFilter} but stops when the end of the family is 
reached and only
- * supports equality
- */
-public class FamilyOnlyFilter extends FamilyFilter {
-
-  boolean done = false;
-  private boolean previousMatchFound;
-
-  /**
-   * Filter on exact binary matches to the passed family
-   * @param family to compare against
-   */
-  public FamilyOnlyFilter(final byte[] family) {
-this(new BinaryComparator(family));
-  }
-
-  public FamilyOnlyFilter(final ByteArrayComparable familyComparator) {
-super(CompareOp.EQUAL, familyComparator);
-  }
-
-
-  @Override
-  public boolean filterAllRemaining() {
-return done;
-  }
-
-  @Override
-  public void reset() {
-done = false;
-previousMatchFound = false;
-  }
-
-  @Override
-  public ReturnCode filterKeyValue(Cell v) {
-if (done) {
-  return ReturnCode.SKIP;
-}
-ReturnCode code = super.filterKeyValue(v);
-if (previousMatchFound) {
-  // we found a match before, and now we are skipping the key because of 
the family, therefore
-  // we are done (no more of the family).
-  if (code.equals(ReturnCode.SKIP)) {
-  done = true;
-  }
-} else {
-  // if we haven't seen a match before, then it doesn't matter what we see 
now, except to mark
-  // if we've seen a match
-  if (code.equals(ReturnCode.INCLUDE)) {
-previousMatchFound = true;
-  }
-}
-return code;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a4b4e0e2/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/filter/TestFamilyOnlyFilter.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/filter/TestFamilyOnlyFilter.java
 
b/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/filter/TestFamilyOnlyFilter.java
deleted file mode 100644
index 216f548..000
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/filter/TestFamilyOnlyFilter.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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 

[34/50] [abbrv] phoenix git commit: PHOENIX-1939 Test are failing with DoNotRetryIOException: ATABLE: null (Alicia Ying Shu)

2015-06-15 Thread maryannxue
PHOENIX-1939 Test are failing with DoNotRetryIOException: ATABLE: null (Alicia 
Ying Shu)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/08fc27d4
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/08fc27d4
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/08fc27d4

Branch: refs/heads/calcite
Commit: 08fc27d4c352f41f4999c8aa8bce953b3f4092cb
Parents: 160e949
Author: Nick Dimiduk ndimi...@apache.org
Authored: Fri May 29 17:12:25 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Fri May 29 17:12:25 2015 -0700

--
 .../src/main/java/org/apache/phoenix/schema/PTableImpl.java  | 4 ++--
 .../src/test/java/org/apache/phoenix/query/BaseTest.java | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/08fc27d4/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
index 9a2ae7f..b62dbf5 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
@@ -88,8 +88,8 @@ public class PTableImpl implements PTable {
 
 private PTableKey key;
 private PName name;
-private PName schemaName;
-private PName tableName;
+private PName schemaName = PName.EMPTY_NAME;
+private PName tableName = PName.EMPTY_NAME;
 private PName tenantId;
 private PTableType type;
 private PIndexState state;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/08fc27d4/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
--
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
index 54ae670..b0574c3 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
@@ -121,7 +121,6 @@ import 
org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
 import org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory;
-import org.apache.hadoop.hbase.regionserver.HRegionServer;
 import org.apache.hadoop.hbase.regionserver.LocalIndexMerger;
 import org.apache.hadoop.hbase.regionserver.RSRpcServices;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -829,6 +828,7 @@ public abstract class BaseTest {
 logger.info(Table  + fullTableName +  is already 
deleted.);
 }
 }
+rs.close();
 if (lastTenantId != null) {
 conn.close();
 }
@@ -860,6 +860,7 @@ public abstract class BaseTest {
 logger.info(DROP SEQUENCE STATEMENT: DROP SEQUENCE  + 
SchemaUtil.getEscapedTableName(rs.getString(2), rs.getString(3)));
 conn.createStatement().execute(DROP SEQUENCE  + 
SchemaUtil.getEscapedTableName(rs.getString(2), rs.getString(3)));
 }
+rs.close();
 }
 
 protected static void initSumDoubleValues(byte[][] splits, String url) 
throws Exception {



[16/50] [abbrv] phoenix git commit: PHOENIX-1965 Upgrade Pig to version 0.13 (Prashant Kommireddi)

2015-06-15 Thread maryannxue
PHOENIX-1965 Upgrade Pig to version 0.13 (Prashant Kommireddi)


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

Branch: refs/heads/calcite
Commit: a1032fba34164b9ac9c62d2187302cdc0e8b2846
Parents: c1e5c71
Author: Jesse Yates jya...@apache.org
Authored: Wed May 13 10:00:52 2015 -0700
Committer: Jesse Yates jya...@apache.org
Committed: Thu May 14 12:52:57 2015 -0700

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a1032fba/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 23ac578..eec1f2a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -85,7 +85,7 @@
 !-- Dependency versions --
 commons-cli.version1.2/commons-cli.version
 hadoop.version2.5.1/hadoop.version
-pig.version0.12.0/pig.version
+pig.version0.13.0/pig.version
 jackson.version1.8.8/jackson.version
 antlr.version3.5/antlr.version
 log4j.version1.2.17/log4j.version



[32/50] [abbrv] phoenix git commit: Revert PHOENIX-2008 Integration tests are failing with HBase-1.1.0 because HBASE-13756(Rajeshbabu)

2015-06-15 Thread maryannxue
Revert PHOENIX-2008 Integration tests are failing with HBase-1.1.0 because 
HBASE-13756(Rajeshbabu)

This reverts commit a28c1d3b2d31377f70e0a4c661c3c70d8bc99216.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/170e8cca
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/170e8cca
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/170e8cca

Branch: refs/heads/calcite
Commit: 170e8cca2f2e53002fa08ca16fa63d70248397ff
Parents: e493215
Author: Rajeshbabu Chintaguntla rajeshb...@apache.org
Authored: Wed May 27 14:51:14 2015 +0530
Committer: Rajeshbabu Chintaguntla rajeshb...@apache.org
Committed: Wed May 27 14:51:14 2015 +0530

--
 phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/170e8cca/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
--
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
index 4aa28c4..54ae670 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
@@ -620,8 +620,6 @@ public abstract class BaseTest {
 }
 //no point doing sanity checks when running tests.
 conf.setBoolean(hbase.table.sanity.checks, false);
-// Remove this configuration once hbase has HBASE-13756 fix.
-conf.set(hbase.regionserver.msginterval, 30);
 // set the server rpc controller and rpc scheduler factory, used to 
configure the cluster
 conf.set(RpcControllerFactory.CUSTOM_CONTROLLER_CONF_KEY, 
DEFAULT_SERVER_RPC_CONTROLLER_FACTORY);
 conf.set(RSRpcServices.REGION_SERVER_RPC_SCHEDULER_FACTORY_CLASS, 
DEFAULT_RPC_SCHEDULER_FACTORY);



[44/50] [abbrv] phoenix git commit: PHOENIX-1978 UDF ArgumentTypeMismatchException(Rajeshbabu)

2015-06-15 Thread maryannxue
PHOENIX-1978 UDF ArgumentTypeMismatchException(Rajeshbabu)


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

Branch: refs/heads/calcite
Commit: b3ed60bb935a09c3ed07a6d77502136c9b8a6eef
Parents: e54c99d
Author: Rajeshbabu Chintaguntla rajeshb...@apache.org
Authored: Fri Jun 5 09:02:31 2015 +0530
Committer: Rajeshbabu Chintaguntla rajeshb...@apache.org
Committed: Fri Jun 5 09:02:31 2015 +0530

--
 .../phoenix/end2end/UserDefinedFunctionsIT.java | 58 ++--
 phoenix-core/src/main/antlr3/PhoenixSQL.g   | 17 +++---
 2 files changed, 61 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b3ed60bb/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
index 868e19d..c6bd62f 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
@@ -58,6 +58,8 @@ import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.FunctionAlreadyExistsException;
 import org.apache.phoenix.schema.FunctionNotFoundException;
 import org.apache.phoenix.schema.ValueRangeExcpetion;
+import org.apache.phoenix.schema.types.PDataType;
+import org.apache.phoenix.schema.types.PArrayDataType;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.QueryUtil;
 import org.apache.phoenix.util.ReadOnlyProps;
@@ -121,11 +123,31 @@ public class UserDefinedFunctionsIT extends 
BaseOwnClusterIT{
 .append(
ptr.set(PInteger.INSTANCE.toBytes((Integer)sum));\n)
 .append(return true;\n)
 .append(}\n).toString();
-
+private static String ARRAY_INDEX_EVALUATE_METHOD =
+new StringBuffer()
+.append(public boolean evaluate(Tuple tuple, 
ImmutableBytesWritable ptr) {\n)
+.append(Expression indexExpr = 
children.get(1);\n)
+.append(if (!indexExpr.evaluate(tuple, ptr)) {\n)
+.append(   return false;\n)
+.append(} else if (ptr.getLength() == 0) {\n)
+.append(   return true;\n)
+.append(}\n)
+.append(// Use Codec to prevent Integer object 
allocation\n)
+.append(int index = 
PInteger.INSTANCE.getCodec().decodeInt(ptr, indexExpr.getSortOrder());\n)
+.append(if(index  0) {\n)
+.append(   throw new ParseException(\Index 
cannot be negative :\ + index);\n)
+.append(}\n)
+.append(Expression arrayExpr = 
children.get(0);\n)
+.append(return 
PArrayDataType.positionAtArrayElement(tuple, ptr, index, arrayExpr, 
getDataType(),getMaxLength());\n)
+.append(}\n).toString();
+
+
 private static String MY_REVERSE_CLASS_NAME = MyReverse;
 private static String MY_SUM_CLASS_NAME = MySum;
-private static String MY_REVERSE_PROGRAM = 
getProgram(MY_REVERSE_CLASS_NAME, STRING_REVERSE_EVALUATE_METHOD, PVarchar);
-private static String MY_SUM_PROGRAM = getProgram(MY_SUM_CLASS_NAME, 
SUM_COLUMN_VALUES_EVALUATE_METHOD, PInteger);
+private static String MY_ARRAY_INDEX_CLASS_NAME = MyArrayIndex;
+private static String MY_REVERSE_PROGRAM = 
getProgram(MY_REVERSE_CLASS_NAME, STRING_REVERSE_EVALUATE_METHOD, return 
PVarchar.INSTANCE;);
+private static String MY_SUM_PROGRAM = getProgram(MY_SUM_CLASS_NAME, 
SUM_COLUMN_VALUES_EVALUATE_METHOD, return PInteger.INSTANCE;);
+private static String MY_ARRAY_INDEX_PROGRAM = 
getProgram(MY_ARRAY_INDEX_CLASS_NAME, ARRAY_INDEX_EVALUATE_METHOD, return 
PDataType.fromTypeId(children.get(0).getDataType().getSqlType()- 
PDataType.ARRAY_TYPE_BASE););
 private static Properties EMPTY_PROPS = new Properties();
 
 
@@ -144,6 +166,8 @@ public class UserDefinedFunctionsIT extends 
BaseOwnClusterIT{
 .append(import org.apache.phoenix.schema.types.PInteger;\n)
 .append(import org.apache.phoenix.schema.types.PVarchar;\n)
 .append(import org.apache.phoenix.util.StringUtil;\n)
+.append(import 

[26/50] [abbrv] phoenix git commit: PHOENIX-1763 Support building with HBase-1.1.0

2015-06-15 Thread maryannxue
PHOENIX-1763 Support building with HBase-1.1.0


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

Branch: refs/heads/calcite
Commit: 7bc9cce172b2b1cebd00275a0f2c586944709231
Parents: 286ff26
Author: Enis Soztutar e...@apache.org
Authored: Thu May 21 23:08:26 2015 -0700
Committer: Enis Soztutar e...@apache.org
Committed: Thu May 21 23:33:48 2015 -0700

--
 phoenix-core/pom.xml| 17 +++--
 .../regionserver/IndexHalfStoreFileReader.java  | 31 ++--
 .../regionserver/IndexSplitTransaction.java | 39 --
 .../hbase/regionserver/LocalIndexMerger.java|  3 +-
 .../cache/aggcache/SpillableGroupByCache.java   | 13 +++-
 .../phoenix/coprocessor/BaseRegionScanner.java  | 12 +--
 .../coprocessor/BaseScannerRegionObserver.java  | 77 +++-
 .../coprocessor/DelegateRegionScanner.java  | 23 --
 .../GroupedAggregateRegionObserver.java | 53 --
 .../coprocessor/HashJoinRegionScanner.java  | 60 ---
 .../coprocessor/MetaDataRegionObserver.java | 23 +++---
 .../phoenix/coprocessor/ScanRegionObserver.java | 11 ++-
 .../UngroupedAggregateRegionObserver.java   | 55 +++---
 .../hbase/index/covered/data/LocalTable.java|  2 +-
 .../index/scanner/FilteredKeyValueScanner.java  |  2 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  6 +-
 .../iterate/RegionScannerResultIterator.java|  9 ++-
 .../phoenix/schema/stats/StatisticsScanner.java | 10 ++-
 .../hbase/ipc/PhoenixIndexRpcSchedulerTest.java |  6 +-
 .../index/covered/TestLocalTableState.java  |  1 -
 .../index/write/TestWALRecoveryCaching.java |  4 +-
 phoenix-flume/pom.xml   |  9 ---
 phoenix-pig/pom.xml | 31 +---
 phoenix-spark/pom.xml   |  7 ++
 pom.xml | 41 ++-
 25 files changed, 352 insertions(+), 193 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7bc9cce1/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 65e4f8e..9ab2a0e 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -354,16 +354,25 @@
 dependency
   groupIdorg.apache.hbase/groupId
   artifactIdhbase-it/artifactId
-  version${hbase.version}/version
   typetest-jar/type
   scopetest/scope
 /dependency
 dependency
   groupIdorg.apache.hbase/groupId
+  artifactIdhbase-annotations/artifactId
+/dependency
+dependency
+  groupIdorg.apache.hbase/groupId
   artifactIdhbase-common/artifactId
 /dependency
 dependency
   groupIdorg.apache.hbase/groupId
+  artifactIdhbase-common/artifactId
+  scopetest/scope
+  typetest-jar/type
+/dependency
+dependency
+  groupIdorg.apache.hbase/groupId
   artifactIdhbase-protocol/artifactId
 /dependency
 dependency
@@ -373,18 +382,16 @@
 dependency
   groupIdorg.apache.hbase/groupId
   artifactIdhbase-server/artifactId
-  version${hbase.version}/version
 /dependency
 dependency
   groupIdorg.apache.hbase/groupId
   artifactIdhbase-server/artifactId
-  version${hbase.version}/version
   typetest-jar/type
+  scopetest/scope
 /dependency
 dependency
   groupIdorg.apache.hbase/groupId
   artifactIdhbase-hadoop-compat/artifactId
-  scopetest/scope
 /dependency
 dependency
   groupIdorg.apache.hbase/groupId
@@ -395,13 +402,11 @@
 dependency
   groupIdorg.apache.hbase/groupId
   artifactIdhbase-hadoop2-compat/artifactId
-  version${hbase.version}/version
   scopetest/scope
 /dependency
 dependency
   groupIdorg.apache.hbase/groupId
   artifactIdhbase-hadoop2-compat/artifactId
-  version${hbase.version}/version
   typetest-jar/type
   scopetest/scope
 /dependency

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7bc9cce1/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
index 49e2022..9befc8c 100644
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
+++ 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
@@ -47,11 +47,11 

[14/50] [abbrv] phoenix git commit: PHOENIX-1875 implement ARRAY_PREPEND built in function (Dumindu)

2015-06-15 Thread maryannxue
PHOENIX-1875 implement ARRAY_PREPEND built in function (Dumindu)


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

Branch: refs/heads/calcite
Commit: b5ef25c942fb0f4ab9a6fec66e821c5c3473ea46
Parents: 978b232
Author: ramkrishna ramkrishna.s.vasude...@gmail.com
Authored: Wed May 13 10:46:19 2015 +0530
Committer: ramkrishna ramkrishna.s.vasude...@gmail.com
Committed: Wed May 13 10:46:19 2015 +0530

--
 .../phoenix/end2end/ArrayPrependFunctionIT.java | 652 +++
 .../phoenix/expression/ExpressionType.java  |   4 +-
 .../function/ArrayAppendFunction.java   |  35 +-
 .../function/ArrayModifierFunction.java |  75 +++
 .../function/ArrayPrependFunction.java  |  96 +++
 .../phoenix/schema/types/PArrayDataType.java| 161 -
 .../expression/ArrayPrependFunctionTest.java| 552 
 7 files changed, 1541 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b5ef25c9/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayPrependFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayPrependFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayPrependFunctionIT.java
new file mode 100644
index 000..3145d95
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayPrependFunctionIT.java
@@ -0,0 +1,652 @@
+/*
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.*;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.apache.phoenix.schema.types.PhoenixArray;
+import org.junit.Test;
+
+public class ArrayPrependFunctionIT extends BaseHBaseManagedTimeIT {
+
+private void initTableWithVarArray(Connection conn, String type, Object[] 
objectArray, String value) throws SQLException {
+conn.createStatement().execute(CREATE TABLE t ( k VARCHAR PRIMARY 
KEY, a  + type + [],b  + type + ));
+conn.commit();
+PreparedStatement stmt = conn.prepareStatement(UPSERT INTO t 
VALUES(?,?, + value + ));
+PhoenixArray array = (PhoenixArray) conn.createArrayOf(type, 
objectArray);
+stmt.setString(1, a);
+stmt.setArray(2, array);
+stmt.execute();
+conn.commit();
+
+}
+
+private void initTables(Connection conn) throws Exception {
+String ddl = CREATE TABLE regions (region_name VARCHAR PRIMARY 
KEY,varchars VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints 
BIGINT[],chars CHAR(15)[],double1 DOUBLE,char1 CHAR(17),nullcheck 
INTEGER,chars2 CHAR(15)[]);
+conn.createStatement().execute(ddl);
+String dml = UPSERT INTO 
regions(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2)
 VALUES('SF Bay Area', +
+ARRAY['2345','46345','23234'], +
+ARRAY[2345,46345,23234,456], +
+ARRAY[23.45,46.345,23.234,45.6,5.78], +
+ARRAY[12,34,56,78,910], +
+ARRAY['a','','c','ddd','e'], +
+23.45, +
+'wert', +
+NULL, +
+ARRAY['foo','a','','c','ddd','e'] +
+);
+PreparedStatement stmt = conn.prepareStatement(dml);
+stmt.execute();
+conn.commit();
+}
+
+private void initTablesDesc(Connection conn, String type, String val) 
throws Exception {
+String ddl = CREATE TABLE regions (pk  + type +  PRIMARY KEY 
DESC,varchars VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints 
BIGINT[],chars CHAR(15)[],chars2 CHAR(15)[], bools BOOLEAN[]);
+conn.createStatement().execute(ddl);
+String dml = 

[27/50] [abbrv] phoenix git commit: PHOENIX-1681 Use the new Region Interface (Andrew Purtell)

2015-06-15 Thread maryannxue
http://git-wip-us.apache.org/repos/asf/phoenix/blob/edff624f/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
index 272cac6..e7e1dd7 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
@@ -31,8 +31,8 @@ import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
-import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.Store;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.coprocessor.MetaDataProtocol;
@@ -111,7 +111,7 @@ public class StatisticsCollector {
 this.statsTable.close();
 }
 
-public void updateStatistic(HRegion region) {
+public void updateStatistic(Region region) {
 try {
 ArrayListMutation mutations = new ArrayListMutation();
 writeStatsToStatsTable(region, true, mutations, 
TimeKeeper.SYSTEM.getCurrentTime());
@@ -126,7 +126,7 @@ public class StatisticsCollector {
 }
 }
 
-private void writeStatsToStatsTable(final HRegion region,
+private void writeStatsToStatsTable(final Region region,
 boolean delete, ListMutation mutations, long currentTime) throws 
IOException {
 try {
 // update the statistics table
@@ -215,7 +215,7 @@ public class StatisticsCollector {
 }
 }
 
-public InternalScanner createCompactionScanner(HRegion region, Store 
store, InternalScanner s) throws IOException {
+public InternalScanner createCompactionScanner(Region region, Store store, 
InternalScanner s) throws IOException {
 // See if this is for Major compaction
 if (logger.isDebugEnabled()) {
 logger.debug(Compaction scanner created for stats);
@@ -224,13 +224,13 @@ public class StatisticsCollector {
 return getInternalScanner(region, store, s, cfKey);
 }
 
-public void splitStats(HRegion parent, HRegion left, HRegion right) {
+public void splitStats(Region parent, Region left, Region right) {
 try {
 if (logger.isDebugEnabled()) {
 logger.debug(Collecting stats for split of  + 
parent.getRegionInfo() +  into  + left.getRegionInfo() +  and  + 
right.getRegionInfo());
 }
 ListMutation mutations = Lists.newArrayListWithExpectedSize(3);
-for (byte[] fam : parent.getStores().keySet()) {
+for (byte[] fam : parent.getTableDesc().getFamiliesKeys()) {
statsTable.splitStats(parent, left, right, this, new 
ImmutableBytesPtr(fam), mutations);
 }
 if (logger.isDebugEnabled()) {
@@ -243,7 +243,7 @@ public class StatisticsCollector {
 }
 }
 
-protected InternalScanner getInternalScanner(HRegion region, Store store,
+protected InternalScanner getInternalScanner(Region region, Store store,
 InternalScanner internalScan, ImmutableBytesPtr family) {
 return new StatisticsScanner(this, statsTable, region, internalScan, 
family);
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/edff624f/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsScanner.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsScanner.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsScanner.java
index 0e50923..582c4de 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsScanner.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsScanner.java
@@ -26,9 +26,9 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
 import org.apache.hadoop.hbase.regionserver.ScannerContext;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 
 /**
@@ -38,11 +38,11 @@ public class StatisticsScanner implements InternalScanner {
 private static final Log LOG = LogFactory.getLog(StatisticsScanner.class);
 private InternalScanner delegate;
 private StatisticsWriter 

[47/50] [abbrv] phoenix git commit: PHOENIX-2033 PQS log environment details on launch

2015-06-15 Thread maryannxue
PHOENIX-2033 PQS log environment details on launch


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/67fea166
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/67fea166
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/67fea166

Branch: refs/heads/calcite
Commit: 67fea1665d6ebb963e0dff335f513e4f61cbd22c
Parents: 31a1ca6
Author: Nick Dimiduk ndimi...@apache.org
Authored: Tue Jun 9 17:12:21 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Fri Jun 12 09:33:56 2015 -0700

--
 .../apache/phoenix/queryserver/server/Main.java | 69 
 1 file changed, 69 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/67fea166/phoenix-server/src/main/java/org/apache/phoenix/queryserver/server/Main.java
--
diff --git 
a/phoenix-server/src/main/java/org/apache/phoenix/queryserver/server/Main.java 
b/phoenix-server/src/main/java/org/apache/phoenix/queryserver/server/Main.java
index 55febc5..9f9bfc7 100644
--- 
a/phoenix-server/src/main/java/org/apache/phoenix/queryserver/server/Main.java
+++ 
b/phoenix-server/src/main/java/org/apache/phoenix/queryserver/server/Main.java
@@ -34,7 +34,12 @@ import org.apache.hadoop.security.SecurityUtil;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
 import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
@@ -50,6 +55,11 @@ public final class Main extends Configured implements Tool, 
Runnable {
   phoenix.queryserver.http.port;
   public static final int DEFAULT_HTTP_PORT = 8765;
 
+  public static final String QUERY_SERVER_ENV_LOGGING_KEY =
+  phoenix.queryserver.envvars.logging.disabled;
+  public static final String QUERY_SERVER_ENV_LOGGING_SKIPWORDS_KEY =
+  phoenix.queryserver.envvars.logging.skipwords;
+
   public static final String KEYTAB_FILENAME_KEY = 
phoenix.queryserver.keytab.file;
   public static final String KERBEROS_PRINCIPAL_KEY = 
phoenix.queryserver.kerberos.principal;
   public static final String DNS_NAMESERVER_KEY = 
phoenix.queryserver.dns.nameserver;
@@ -58,12 +68,70 @@ public final class Main extends Configured implements Tool, 
Runnable {
 
   protected static final Log LOG = LogFactory.getLog(Main.class);
 
+  @SuppressWarnings(serial)
+  private static final SetString DEFAULT_SKIP_WORDS = new HashSetString() {
+{
+  add(secret);
+  add(passwd);
+  add(password);
+  add(credential);
+}
+  };
+
   private final String[] argv;
   private final CountDownLatch runningLatch = new CountDownLatch(1);
   private HttpServer server = null;
   private int retCode = 0;
   private Throwable t = null;
 
+  /**
+   * Log information about the currently running JVM.
+   */
+  public static void logJVMInfo() {
+// Print out vm stats before starting up.
+RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
+if (runtime != null) {
+  LOG.info(vmName= + runtime.getVmName() + , vmVendor= +
+  runtime.getVmVendor() + , vmVersion= + runtime.getVmVersion());
+  LOG.info(vmInputArguments= + runtime.getInputArguments());
+}
+  }
+
+  /**
+   * Logs information about the currently running JVM process including
+   * the environment variables. Logging of env vars can be disabled by
+   * setting {@code phoenix.envvars.logging.disabled} to {@code true}.
+   * pIf enabled, you can also exclude environment variables containing
+   * certain substrings by setting {@code phoenix.envvars.logging.skipwords}
+   * to comma separated list of such substrings.
+   */
+  public static void logProcessInfo(Configuration conf) {
+// log environment variables unless asked not to
+if (conf == null || !conf.getBoolean(QUERY_SERVER_ENV_LOGGING_KEY, false)) 
{
+  SetString skipWords = new HashSetString(DEFAULT_SKIP_WORDS);
+  if (conf != null) {
+String[] confSkipWords = 
conf.getStrings(QUERY_SERVER_ENV_LOGGING_SKIPWORDS_KEY);
+if (confSkipWords != null) {
+  skipWords.addAll(Arrays.asList(confSkipWords));
+}
+  }
+
+  nextEnv:
+  for (Map.EntryString, String entry : System.getenv().entrySet()) {
+String key = entry.getKey().toLowerCase();
+String value = entry.getValue().toLowerCase();
+// exclude variables which may contain skip words
+for(String skipWord : skipWords) {
+  if (key.contains(skipWord) || value.contains(skipWord))
+continue nextEnv;
+}
+LOG.info(env:+entry);
+  }
+}
+// and JVM info

[08/50] [abbrv] phoenix git commit: PHOENIX-1944 PQS secure login only executed when debug is enabled

2015-06-15 Thread maryannxue
PHOENIX-1944 PQS secure login only executed when debug is enabled


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

Branch: refs/heads/calcite
Commit: b47dcb66055642559b9dd75f5647473329df432f
Parents: 1fa09dc
Author: Nick Dimiduk ndimi...@apache.org
Authored: Fri May 1 14:23:42 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Fri May 1 14:23:42 2015 -0700

--
 .../src/main/java/org/apache/phoenix/queryserver/server/Main.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b47dcb66/phoenix-server/src/main/java/org/apache/phoenix/queryserver/server/Main.java
--
diff --git 
a/phoenix-server/src/main/java/org/apache/phoenix/queryserver/server/Main.java 
b/phoenix-server/src/main/java/org/apache/phoenix/queryserver/server/Main.java
index b099f91..55febc5 100644
--- 
a/phoenix-server/src/main/java/org/apache/phoenix/queryserver/server/Main.java
+++ 
b/phoenix-server/src/main/java/org/apache/phoenix/queryserver/server/Main.java
@@ -121,8 +121,8 @@ public final class Main extends Configured implements Tool, 
Runnable {
 if (LOG.isDebugEnabled()) {
   LOG.debug(Login to  + hostname +  using  + 
getConf().get(KEYTAB_FILENAME_KEY)
   +  and principal  + getConf().get(KERBEROS_PRINCIPAL_KEY) + 
.);
-  SecurityUtil.login(getConf(), KEYTAB_FILENAME_KEY, 
KERBEROS_PRINCIPAL_KEY, hostname);
 }
+SecurityUtil.login(getConf(), KEYTAB_FILENAME_KEY, 
KERBEROS_PRINCIPAL_KEY, hostname);
 LOG.info(Login successful.);
   }
   Class? extends PhoenixMetaFactory factoryClass = getConf().getClass(



[33/50] [abbrv] phoenix git commit: PHOENIX-2013 Apply PHOENIX-1995 to runnable uberjar as well

2015-06-15 Thread maryannxue
PHOENIX-2013 Apply PHOENIX-1995 to runnable uberjar as well


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/160e9497
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/160e9497
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/160e9497

Branch: refs/heads/calcite
Commit: 160e9497dcef541af0e0a9aacf93eed9acb7f8ca
Parents: 170e8cc
Author: Nick Dimiduk ndimi...@apache.org
Authored: Wed May 27 11:27:04 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Wed May 27 11:27:04 2015 -0700

--
 phoenix-server/src/build/query-server-runnable.xml | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/160e9497/phoenix-server/src/build/query-server-runnable.xml
--
diff --git a/phoenix-server/src/build/query-server-runnable.xml 
b/phoenix-server/src/build/query-server-runnable.xml
index e2a3dc4..ef22b14 100644
--- a/phoenix-server/src/build/query-server-runnable.xml
+++ b/phoenix-server/src/build/query-server-runnable.xml
@@ -28,6 +28,15 @@
 formatjar/format
   /formats
   includeBaseDirectoryfalse/includeBaseDirectory
+  containerDescriptorHandlers
+containerDescriptorHandler
+  !--
+  aggregate SPI's so that things like HDFS FileSystem works in uberjar
+  http://docs.oracle.com/javase/tutorial/sound/SPI-intro.html
+  --
+  handlerNamemetaInf-services/handlerName
+/containerDescriptorHandler
+  /containerDescriptorHandlers
   dependencySets
 dependencySet
   outputDirectory//outputDirectory



[46/50] [abbrv] phoenix git commit: PHOENIX 1968: Should support saving arrays

2015-06-15 Thread maryannxue
PHOENIX 1968: Should support saving arrays


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/31a1ca6c
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/31a1ca6c
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/31a1ca6c

Branch: refs/heads/calcite
Commit: 31a1ca6caefb45430969fc7c0d28b50bb515c605
Parents: db90196
Author: ravimagham ravimag...@apache.org
Authored: Thu Jun 11 11:50:21 2015 -0700
Committer: ravimagham ravimag...@apache.org
Committed: Thu Jun 11 11:50:21 2015 -0700

--
 .../apache/phoenix/spark/PhoenixSparkIT.scala   | 21 
 .../phoenix/spark/PhoenixRecordWritable.scala   | 25 
 2 files changed, 41 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/31a1ca6c/phoenix-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala
--
diff --git 
a/phoenix-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala 
b/phoenix-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala
index 42e8676..5f256e6 100644
--- a/phoenix-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala
+++ b/phoenix-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala
@@ -415,4 +415,25 @@ class PhoenixSparkIT extends FunSuite with Matchers with 
BeforeAndAfterAll {
 
 results.toList shouldEqual checkResults
   }
+
+  test(Can save arrays back to phoenix) {
+val dataSet = List((2L, Array(String1, String2, String3)))
+
+sc
+  .parallelize(dataSet)
+  .saveToPhoenix(
+ARRAY_TEST_TABLE,
+Seq(ID,VCARRAY),
+zkUrl = Some(quorumAddress)
+  )
+
+// Load the results back
+val stmt = conn.createStatement()
+val rs = stmt.executeQuery(SELECT VCARRAY FROM ARRAY_TEST_TABLE WHERE ID 
= 2)
+rs.next()
+val sqlArray = rs.getArray(1).getArray().asInstanceOf[Array[String]]
+
+// Verify the arrays are equal
+sqlArray shouldEqual dataSet(0)._2
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/31a1ca6c/phoenix-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRecordWritable.scala
--
diff --git 
a/phoenix-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRecordWritable.scala
 
b/phoenix-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRecordWritable.scala
index 67e0bd2..3977657 100644
--- 
a/phoenix-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRecordWritable.scala
+++ 
b/phoenix-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRecordWritable.scala
@@ -16,11 +16,12 @@ package org.apache.phoenix.spark
 import java.sql.{PreparedStatement, ResultSet}
 import org.apache.hadoop.mapreduce.lib.db.DBWritable
 import org.apache.phoenix.mapreduce.util.ColumnInfoToStringEncoderDecoder
-import org.apache.phoenix.schema.types.{PDate, PhoenixArray}
+import org.apache.phoenix.schema.types.{PDataType, PDate, PhoenixArray}
 import org.joda.time.DateTime
 import scala.collection.{immutable, mutable}
 import scala.collection.JavaConversions._
 
+
 class PhoenixRecordWritable(var encodedColumns: String) extends DBWritable {
   val upsertValues = mutable.ArrayBuffer[Any]()
   val resultMap = mutable.Map[String, AnyRef]()
@@ -44,13 +45,27 @@ class PhoenixRecordWritable(var encodedColumns: String) 
extends DBWritable {
 upsertValues.zip(columns).zipWithIndex.foreach {
   case ((v, c), i) = {
 if (v != null) {
+
   // Both Java and Joda dates used to work in 4.2.3, but now they must 
be java.sql.Date
+  // Can override any other types here as needed
   val (finalObj, finalType) = v match {
-case dt: DateTime = (new java.sql.Date(dt.getMillis), 
PDate.INSTANCE.getSqlType)
-case d: java.util.Date = (new java.sql.Date(d.getTime), 
PDate.INSTANCE.getSqlType)
-case _ = (v, c.getSqlType)
+case dt: DateTime = (new java.sql.Date(dt.getMillis), 
PDate.INSTANCE)
+case d: java.util.Date = (new java.sql.Date(d.getTime), 
PDate.INSTANCE)
+case _ = (v, c.getPDataType)
+  }
+
+  // Save as array or object
+  finalObj match {
+case obj: Array[AnyRef] = {
+  // Create a java.sql.Array, need to lookup the base sql type name
+  val sqlArray = statement.getConnection.createArrayOf(
+PDataType.arrayBaseType(finalType).getSqlTypeName,
+obj
+  )
+  statement.setArray(i + 1, sqlArray)
+}
+case _ = statement.setObject(i + 1, finalObj)
   }
-  statement.setObject(i + 1, finalObj, finalType)
 } else {
   

[45/50] [abbrv] phoenix git commit: PHOENIX-2027 Subqueries with no data are raising IllegalStateException(Alicia Ying Shu)

2015-06-15 Thread maryannxue
PHOENIX-2027 Subqueries with no data are raising IllegalStateException(Alicia 
Ying Shu)


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

Branch: refs/heads/calcite
Commit: db90196dc2561a220fc376ce01a8ad1ba185bea8
Parents: b3ed60b
Author: Rajeshbabu Chintaguntla rajeshb...@apache.org
Authored: Wed Jun 10 01:00:50 2015 +0530
Committer: Rajeshbabu Chintaguntla rajeshb...@apache.org
Committed: Wed Jun 10 01:00:50 2015 +0530

--
 .../apache/phoenix/end2end/SortMergeJoinIT.java | 54 
 .../phoenix/execute/SortMergeJoinPlan.java  |  4 +-
 2 files changed, 56 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/db90196d/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinIT.java
index 6f14a45..8b65ab3 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinIT.java
@@ -2658,5 +2658,59 @@ public class SortMergeJoinIT extends 
BaseHBaseManagedTimeIT {
 }
 }
 
+@Test
+public void testSubqueryWithoutData() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+conn.setAutoCommit(false);
+
+try {
+String GRAMMAR_TABLE = CREATE TABLE IF NOT EXISTS GRAMMAR_TABLE 
(ID INTEGER PRIMARY KEY,  +
+unsig_id UNSIGNED_INT, big_id BIGINT, unsig_long_id 
UNSIGNED_LONG, tiny_id TINYINT, +
+unsig_tiny_id UNSIGNED_TINYINT, small_id SMALLINT, 
unsig_small_id UNSIGNED_SMALLINT, + 
+float_id FLOAT, unsig_float_id UNSIGNED_FLOAT, double_id 
DOUBLE, unsig_double_id UNSIGNED_DOUBLE, + 
+decimal_id DECIMAL, boolean_id BOOLEAN, time_id TIME, 
date_id DATE, timestamp_id TIMESTAMP, + 
+unsig_time_id TIME, unsig_date_id DATE, 
unsig_timestamp_id TIMESTAMP, varchar_id VARCHAR (30), + 
+char_id CHAR (30), binary_id BINARY (100), varbinary_id 
VARBINARY (100));
+
+String LARGE_TABLE = CREATE TABLE IF NOT EXISTS LARGE_TABLE (ID 
INTEGER PRIMARY KEY,  +
+unsig_id UNSIGNED_INT, big_id BIGINT, unsig_long_id 
UNSIGNED_LONG, tiny_id TINYINT, +
+unsig_tiny_id UNSIGNED_TINYINT, small_id SMALLINT, 
unsig_small_id UNSIGNED_SMALLINT, + 
+float_id FLOAT, unsig_float_id UNSIGNED_FLOAT, double_id 
DOUBLE, unsig_double_id UNSIGNED_DOUBLE, + 
+decimal_id DECIMAL, boolean_id BOOLEAN, time_id TIME, 
date_id DATE, timestamp_id TIMESTAMP, + 
+unsig_time_id TIME, unsig_date_id DATE, 
unsig_timestamp_id TIMESTAMP, varchar_id VARCHAR (30), + 
+char_id CHAR (30), binary_id BINARY (100), varbinary_id 
VARBINARY (100));
+
+String SECONDARY_LARGE_TABLE = CREATE TABLE IF NOT EXISTS 
SECONDARY_LARGE_TABLE (SEC_ID INTEGER PRIMARY KEY, +
+sec_unsig_id UNSIGNED_INT, sec_big_id BIGINT, 
sec_usnig_long_id UNSIGNED_LONG, sec_tiny_id TINYINT, + 
+sec_unsig_tiny_id UNSIGNED_TINYINT, sec_small_id 
SMALLINT, sec_unsig_small_id UNSIGNED_SMALLINT, + 
+sec_float_id FLOAT, sec_unsig_float_id UNSIGNED_FLOAT, 
sec_double_id DOUBLE, sec_unsig_double_id UNSIGNED_DOUBLE, +
+sec_decimal_id DECIMAL, sec_boolean_id BOOLEAN, 
sec_time_id TIME, sec_date_id DATE, +
+sec_timestamp_id TIMESTAMP, sec_unsig_time_id TIME, 
sec_unsig_date_id DATE, sec_unsig_timestamp_id TIMESTAMP, +
+sec_varchar_id VARCHAR (30), sec_char_id CHAR (30), 
sec_binary_id BINARY (100), sec_varbinary_id VARBINARY (100));
+createTestTable(getUrl(), GRAMMAR_TABLE);
+createTestTable(getUrl(), LARGE_TABLE);
+createTestTable(getUrl(), SECONDARY_LARGE_TABLE);
+
+String ddl = SELECT /*+USE_SORT_MERGE_JOIN*/ * FROM (SELECT ID, 
BIG_ID, DATE_ID FROM LARGE_TABLE AS A WHERE (A.ID % 5) = 0) AS A  +
+INNER JOIN (SELECT SEC_ID, SEC_TINY_ID, 
SEC_UNSIG_FLOAT_ID FROM SECONDARY_LARGE_TABLE AS B WHERE (B.SEC_ID % 5) = 0) AS 
B  + 
+ON A.ID=B.SEC_ID WHERE A.DATE_ID  ALL (SELECT 
SEC_DATE_ID FROM SECONDARY_LARGE_TABLE LIMIT 100)  +  
+AND B.SEC_UNSIG_FLOAT_ID 

[03/50] [abbrv] phoenix git commit: PHOENIX-1930 [BW COMPAT] Queries hangs with client on Phoenix 4.3.0 and server on 4.x-HBase-0.98

2015-06-15 Thread maryannxue
PHOENIX-1930 [BW COMPAT] Queries hangs with client on Phoenix 4.3.0 and server 
on 4.x-HBase-0.98


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

Branch: refs/heads/calcite
Commit: d2c1f2c0a6a0994da296b20158697fa725f1b4a7
Parents: 902cf0d
Author: Thomas tdsi...@salesforce.com
Authored: Wed Apr 29 15:44:13 2015 -0700
Committer: Thomas tdsi...@salesforce.com
Committed: Wed Apr 29 16:36:04 2015 -0700

--
 .../main/java/org/apache/phoenix/expression/ExpressionType.java  | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d2c1f2c0/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
index 843a768..71f0521 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
@@ -214,6 +214,10 @@ public enum ExpressionType {
 ByteBasedRegexpReplaceFunction(ByteBasedRegexpReplaceFunction.class),
 ByteBasedRegexpSubstrFunction(ByteBasedRegexpSubstrFunction.class),
 ByteBasedRegexpSplitFunction(ByteBasedRegexpSplitFunction.class),
+LikeExpression(LikeExpression.class),
+RegexpReplaceFunction(RegexpReplaceFunction.class),
+RegexpSubstrFunction(RegexpSubstrFunction.class),
+RegexpSplitFunction(RegexpSplitFunction.class),
 SignFunction(SignFunction.class),
 YearFunction(YearFunction.class),
 MonthFunction(MonthFunction.class),



[02/50] [abbrv] phoenix git commit: PHOENIX-1856 Include min row key for each region in stats row -addendum(Ram)

2015-06-15 Thread maryannxue
PHOENIX-1856 Include min row key for each region in stats row -addendum(Ram)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/902cf0de
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/902cf0de
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/902cf0de

Branch: refs/heads/calcite
Commit: 902cf0de317db917ae320193ba51ec3588611ede
Parents: 864faba
Author: Rajeshbabu Chintaguntla rajeshb...@apache.org
Authored: Thu Apr 30 02:05:14 2015 +0530
Committer: Rajeshbabu Chintaguntla rajeshb...@apache.org
Committed: Thu Apr 30 02:05:14 2015 +0530

--
 .../java/org/apache/phoenix/schema/stats/StatisticsCollector.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/902cf0de/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
index 382cead..8e41d4e 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java
@@ -169,7 +169,7 @@ public class StatisticsCollector {
 rowTracker = 
 new ArrayListGuidePostsInfo();
 }
-if (minKey == null) {
+if (minKey == null  !results.isEmpty()) {
 Cell minCell = results.get(0);
 minKey = minCell.getRowArray();
 minKeyOffset =  minCell.getRowOffset();



[13/50] [abbrv] phoenix git commit: PHOENIX-1962 Apply check style to the build

2015-06-15 Thread maryannxue
PHOENIX-1962 Apply check style to the build


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/978b2322
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/978b2322
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/978b2322

Branch: refs/heads/calcite
Commit: 978b2322e3e962550c1cddda9910f4f70346aaee
Parents: 93397af
Author: Nick Dimiduk ndimi...@apache.org
Authored: Sat May 9 11:10:54 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Mon May 11 09:52:00 2015 -0700

--
 phoenix-assembly/pom.xml|   4 +
 phoenix-core/pom.xml|   4 +
 phoenix-flume/pom.xml   |   4 +
 phoenix-pherf/pom.xml   |   1 +
 phoenix-pig/pom.xml |   4 +
 phoenix-server-client/pom.xml   |   4 +
 phoenix-server/pom.xml  |   4 +
 phoenix-spark/pom.xml   |   1 +
 pom.xml |  23 ++
 src/main/config/checkstyle/checker.xml  | 281 +++
 src/main/config/checkstyle/header.txt   |  16 ++
 src/main/config/checkstyle/suppressions.xml |  46 
 12 files changed, 392 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/978b2322/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index d743bcf..5a73e7a 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -33,6 +33,10 @@
   descriptionAssemble Phoenix artifacts/description
   packagingpom/packaging
 
+  properties
+top.dir${project.basedir}/../top.dir
+  /properties
+
   build
 plugins
   plugin

http://git-wip-us.apache.org/repos/asf/phoenix/blob/978b2322/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index a4c052c..65e4f8e 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -24,6 +24,10 @@
   urlhttp://www.apache.org/url
   /organization
 
+  properties
+top.dir${project.basedir}/../top.dir
+  /properties
+
   build
 resources
   resource

http://git-wip-us.apache.org/repos/asf/phoenix/blob/978b2322/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index b8c4b8a..a35e309 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -31,6 +31,10 @@
   artifactIdphoenix-flume/artifactId
   namePhoenix - Flume/name
 
+  properties
+top.dir${project.basedir}/../top.dir
+  /properties
+
   dependencies
dependency
   groupIdorg.apache.phoenix/groupId

http://git-wip-us.apache.org/repos/asf/phoenix/blob/978b2322/phoenix-pherf/pom.xml
--
diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml
index 337f69c..1667c66 100644
--- a/phoenix-pherf/pom.xml
+++ b/phoenix-pherf/pom.xml
@@ -30,6 +30,7 @@
 namePhoenix - Pherf/name
 
 properties
+  top.dir${project.basedir}/../top.dir
 /properties
 
 profiles

http://git-wip-us.apache.org/repos/asf/phoenix/blob/978b2322/phoenix-pig/pom.xml
--
diff --git a/phoenix-pig/pom.xml b/phoenix-pig/pom.xml
index c1b0985..5005f7c 100644
--- a/phoenix-pig/pom.xml
+++ b/phoenix-pig/pom.xml
@@ -31,6 +31,10 @@
   artifactIdphoenix-pig/artifactId
   namePhoenix - Pig/name
 
+  properties
+top.dir${project.basedir}/../top.dir
+  /properties
+
   dependencies
 dependency
   groupIdorg.apache.phoenix/groupId

http://git-wip-us.apache.org/repos/asf/phoenix/blob/978b2322/phoenix-server-client/pom.xml
--
diff --git a/phoenix-server-client/pom.xml b/phoenix-server-client/pom.xml
index 5e2d32e..e23fcba 100644
--- a/phoenix-server-client/pom.xml
+++ b/phoenix-server-client/pom.xml
@@ -24,6 +24,10 @@
 urlhttp://www.apache.org/url
   /organization
 
+  properties
+top.dir${project.basedir}/../top.dir
+  /properties
+
   build
 plugins
   plugin

http://git-wip-us.apache.org/repos/asf/phoenix/blob/978b2322/phoenix-server/pom.xml
--
diff --git a/phoenix-server/pom.xml b/phoenix-server/pom.xml
index 4737b63..7dd09aa 100644
--- a/phoenix-server/pom.xml
+++ b/phoenix-server/pom.xml
@@ -24,6 +24,10 @@
 urlhttp://www.apache.org/url
   /organization
 
+  properties
+top.dir${project.basedir}/../top.dir
+  /properties
+
   build
 plugins
   plugin


[12/50] [abbrv] phoenix git commit: PHOENIX-1958 Minimize memory allocation on new connection

2015-06-15 Thread maryannxue
PHOENIX-1958 Minimize memory allocation on new connection


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/93397aff
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/93397aff
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/93397aff

Branch: refs/heads/calcite
Commit: 93397affd75fb5877146ca7b4bb028db301f671e
Parents: cd81738
Author: James Taylor jtay...@salesforce.com
Authored: Sat May 9 18:13:49 2015 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Sat May 9 18:13:49 2015 -0700

--
 .../src/main/java/org/apache/phoenix/util/ReadOnlyProps.java| 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/93397aff/phoenix-core/src/main/java/org/apache/phoenix/util/ReadOnlyProps.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/util/ReadOnlyProps.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/ReadOnlyProps.java
index 47137ef..a6fb7a5 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/ReadOnlyProps.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/ReadOnlyProps.java
@@ -27,6 +27,9 @@ import java.util.Properties;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import com.google.common.base.Objects;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
@@ -40,6 +43,7 @@ import com.google.common.collect.Maps;
  * @since 1.2.2
  */
 public class ReadOnlyProps implements IterableEntryString, String {
+private static final Logger logger = 
LoggerFactory.getLogger(ReadOnlyProps.class);
 public static final ReadOnlyProps EMPTY_PROPS = new ReadOnlyProps();
 private final MapString, String props;
 
@@ -296,6 +300,7 @@ public class ReadOnlyProps implements 
IterableEntryString, String {
 String value = entry.getValue().toString();
 String oldValue = props.get(key);
 if (!Objects.equal(oldValue, value)) {
+if (logger.isDebugEnabled()) logger.debug(Creating new 
ReadOnlyProps due to  + key +  with  + oldValue + != + value);
 return new ReadOnlyProps(this, overrides);
 }
 }



[40/50] [abbrv] phoenix git commit: PHOENIX-777 Support null value for fixed length ARRAY (Dumindu Buddhika)

2015-06-15 Thread maryannxue
PHOENIX-777 Support null value for fixed length ARRAY (Dumindu Buddhika)


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

Branch: refs/heads/calcite
Commit: 7f6bf10b2cc54279b9210772323dc8f4d2939a19
Parents: 9e686b7
Author: ramkrishna ramkrishna.s.vasude...@gmail.com
Authored: Tue Jun 2 11:13:44 2015 +0530
Committer: ramkrishna ramkrishna.s.vasude...@gmail.com
Committed: Tue Jun 2 11:13:44 2015 +0530

--
 .../phoenix/end2end/ArraysWithNullsIT.java  | 300 +++
 .../phoenix/compile/ExpressionCompiler.java |   9 +-
 .../apache/phoenix/schema/types/PBinary.java|   2 +-
 .../org/apache/phoenix/schema/types/PChar.java  |   5 +-
 .../org/apache/phoenix/schema/types/PDate.java  |   6 +-
 .../apache/phoenix/schema/types/PDecimal.java   |   3 +
 .../apache/phoenix/schema/types/PTimestamp.java |  17 +-
 .../phoenix/schema/types/PhoenixArray.java  |  51 ++--
 8 files changed, 358 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7f6bf10b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java
new file mode 100644
index 000..b034193
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java
@@ -0,0 +1,300 @@
+/*
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+
+import java.sql.*;
+
+import org.apache.phoenix.schema.types.PTimestamp;
+import org.apache.phoenix.schema.types.PhoenixArray;
+import org.junit.Test;
+
+public class ArraysWithNullsIT extends BaseClientManagedTimeIT {
+
+@Test
+public void testArrayUpsertIntWithNulls() throws Exception {
+Connection conn = DriverManager.getConnection(getUrl());
+conn.createStatement().execute(CREATE TABLE t1 ( k VARCHAR PRIMARY 
KEY, a INTEGER[]));
+
+PreparedStatement stmt = conn.prepareStatement(UPSERT INTO t1 
VALUES('a',ARRAY[null,3,null]));
+stmt.execute();
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery(Select a from t1 
where k = 'a');
+rs.next();
+Array array = conn.createArrayOf(INTEGER,new Object[]{null,3,null});
+
+assertEquals(rs.getArray(1),array);
+conn.close();
+
+}
+
+
+
+@Test
+public void testArrayUpsertVarcharWithNulls() throws Exception {
+Connection conn = DriverManager.getConnection(getUrl());
+conn.createStatement().execute(CREATE TABLE t2 ( k VARCHAR PRIMARY 
KEY, a VARCHAR[]));
+
+PreparedStatement stmt = conn.prepareStatement(UPSERT INTO t2 
VALUES('a',ARRAY['10',null]));
+stmt.execute();
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery(Select a from t2 
where k = 'a');
+rs.next();
+Array array = conn.createArrayOf(VARCHAR,new Object[]{10,null});
+
+assertEquals(rs.getArray(1),array);
+conn.close();
+
+}
+
+@Test
+public void testArrayUpsertBigIntWithNulls() throws Exception {
+Connection conn = DriverManager.getConnection(getUrl());
+conn.createStatement().execute(CREATE TABLE t3 ( k VARCHAR PRIMARY 
KEY, a BIGINT[]));
+
+PreparedStatement stmt = conn.prepareStatement(UPSERT INTO t3 
VALUES('a',ARRAY[2,null,32335,4]));
+stmt.execute();
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery(Select a from t3 
where k = 'a');
+rs.next();
+Array array = conn.createArrayOf(BIGINT,new 
Object[]{(long)2,null,(long)32335,(long)4});
+
+assertEquals(rs.getArray(1),array);
+conn.close();
+
+}

[43/50] [abbrv] phoenix git commit: PHOENIX-2018 Implement math build-in function SQRT (Shuxiong Ye)

2015-06-15 Thread maryannxue
PHOENIX-2018 Implement math build-in function SQRT (Shuxiong Ye)


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

Branch: refs/heads/calcite
Commit: e54c99d8b1ce7bd6118df46209e102e9a86c3782
Parents: 47466e3
Author: James Taylor jamestay...@apache.org
Authored: Thu Jun 4 14:26:27 2015 -0700
Committer: James Taylor jamestay...@apache.org
Committed: Thu Jun 4 14:26:27 2015 -0700

--
 .../phoenix/end2end/SqrtFunctionEnd2EndIT.java  | 143 ++
 .../phoenix/expression/ExpressionType.java  |   4 +-
 .../function/JavaMathOneArgumentFunction.java   |  77 ++
 .../expression/function/SqrtFunction.java   |  49 ++
 .../phoenix/expression/SqrtFunctionTest.java| 150 +++
 5 files changed, 422 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e54c99d8/phoenix-core/src/it/java/org/apache/phoenix/end2end/SqrtFunctionEnd2EndIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SqrtFunctionEnd2EndIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SqrtFunctionEnd2EndIT.java
new file mode 100644
index 000..50fdd4f
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SqrtFunctionEnd2EndIT.java
@@ -0,0 +1,143 @@
+/*
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.apache.phoenix.util.TestUtil.closeStmtAndConn;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.expression.function.SqrtFunction;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * End to end tests for {@link SqrtFunction}
+ */
+public class SqrtFunctionEnd2EndIT extends BaseHBaseManagedTimeIT {
+
+private static final String KEY = key;
+private static final double ZERO = 1e-8;
+
+@Before
+public void initTable() throws Exception {
+Connection conn = null;
+PreparedStatement stmt = null;
+try {
+conn = DriverManager.getConnection(getUrl());
+String ddl;
+ddl = CREATE TABLE testSigned (k VARCHAR NOT NULL PRIMARY KEY, 
doub DOUBLE, fl FLOAT, inte INTEGER, lon BIGINT, smalli SMALLINT, tinyi 
TINYINT);
+conn.createStatement().execute(ddl);
+ddl = CREATE TABLE testUnsigned (k VARCHAR NOT NULL PRIMARY KEY, 
doub UNSIGNED_DOUBLE, fl UNSIGNED_FLOAT, inte UNSIGNED_INT, lon UNSIGNED_LONG, 
smalli UNSIGNED_SMALLINT, tinyi UNSIGNED_TINYINT);
+conn.createStatement().execute(ddl);
+conn.commit();
+} finally {
+closeStmtAndConn(stmt, conn);
+}
+}
+
+private void updateSignedTable(Connection conn, double data) throws 
Exception {
+PreparedStatement stmt = conn.prepareStatement(UPSERT INTO testSigned 
VALUES (?, ?, ?, ?, ?, ?, ?));
+stmt.setString(1, KEY);
+Double d = Double.valueOf(data);
+stmt.setDouble(2, d.doubleValue());
+stmt.setFloat(3, d.floatValue());
+stmt.setInt(4, d.intValue());
+stmt.setLong(5, d.longValue());
+stmt.setShort(6, d.shortValue());
+stmt.setByte(7, d.byteValue());
+stmt.executeUpdate();
+conn.commit();
+}
+
+private void updateUnsignedTable(Connection conn, double data) throws 
Exception {
+PreparedStatement stmt = conn.prepareStatement(UPSERT INTO 
testUnsigned VALUES (?, ?, ?, ?, ?, ?, ?));
+stmt.setString(1, KEY);
+Double d = Double.valueOf(data);
+stmt.setDouble(2, d.doubleValue());
+stmt.setFloat(3, d.floatValue());
+stmt.setInt(4, d.intValue());
+stmt.setLong(5, d.longValue());
+ 

[24/50] [abbrv] phoenix git commit: PHOENIX-1984 Make INSTR 1-based instead of 0-based

2015-06-15 Thread maryannxue
PHOENIX-1984 Make INSTR 1-based instead of 0-based

Bring functionality of INSTR built-in function in-line with other
SQL string functions, with indexing of strings starting at 1.

Signed-off-by: Gabriel Reid gabri...@ngdata.com


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

Branch: refs/heads/calcite
Commit: c2fed1dac8305f489939fc18e47cd2c2a6c596d8
Parents: d3ff079
Author: NAVEEN MADHIRE vmadh...@indiana.edu
Authored: Mon May 18 22:14:57 2015 -0500
Committer: Gabriel Reid gabri...@ngdata.com
Committed: Thu May 21 17:24:47 2015 +0200

--
 .../apache/phoenix/end2end/InstrFunctionIT.java | 12 ++---
 .../expression/function/InstrFunction.java  |  2 +-
 .../expression/function/InstrFunctionTest.java  | 48 ++--
 3 files changed, 31 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c2fed1da/phoenix-core/src/it/java/org/apache/phoenix/end2end/InstrFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InstrFunctionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InstrFunctionIT.java
index 57c0661..b869ff4 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InstrFunctionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InstrFunctionIT.java
@@ -63,7 +63,7 @@ public class InstrFunctionIT extends BaseHBaseManagedTimeIT {
 Connection conn = DriverManager.getConnection(getUrl());
 initTable(conn, ASC, abcdefghijkl,fgh);
 String queryToExecute = SELECT INSTR(name, 'fgh') FROM SAMPLE;
-testInstr(conn, queryToExecute, 5);
+testInstr(conn, queryToExecute, 6);
 }
 
 @Test
@@ -71,7 +71,7 @@ public class InstrFunctionIT extends BaseHBaseManagedTimeIT {
 Connection conn = DriverManager.getConnection(getUrl());
 initTable(conn, DESC, abcdefghijkl,fgh);
 String queryToExecute = SELECT INSTR(name, 'fgh') FROM SAMPLE;
-testInstr(conn, queryToExecute, 5);
+testInstr(conn, queryToExecute, 6);
 }
 
 @Test
@@ -79,7 +79,7 @@ public class InstrFunctionIT extends BaseHBaseManagedTimeIT {
 Connection conn = DriverManager.getConnection(getUrl());
 initTable(conn, ASC, abcde fghijkl,lmn);
 String queryToExecute = SELECT INSTR(name, 'lmn') FROM SAMPLE;
-testInstr(conn, queryToExecute, -1);
+testInstr(conn, queryToExecute, 0);
 }
 
 @Test
@@ -87,7 +87,7 @@ public class InstrFunctionIT extends BaseHBaseManagedTimeIT {
 Connection conn = DriverManager.getConnection(getUrl());
 initTable(conn, DESC, abcde fghijkl,lmn);
 String queryToExecute = SELECT INSTR(name, 'lmn') FROM SAMPLE;
-testInstr(conn, queryToExecute, -1);
+testInstr(conn, queryToExecute, 0);
 }
 
 @Test
@@ -95,7 +95,7 @@ public class InstrFunctionIT extends BaseHBaseManagedTimeIT {
 Connection conn = DriverManager.getConnection(getUrl());
 initTable(conn, ASC, AɚɦFGH,ɚɦ);
 String queryToExecute = SELECT INSTR(name, 'ɚɦ') FROM SAMPLE;
-testInstr(conn, queryToExecute, 1);
+testInstr(conn, queryToExecute, 2);
 }
 
 @Test
@@ -103,7 +103,7 @@ public class InstrFunctionIT extends BaseHBaseManagedTimeIT 
{
 Connection conn = DriverManager.getConnection(getUrl());
 initTable(conn, DESC, AɚɦFGH,ɚɦ);
 String queryToExecute = SELECT INSTR(name, 'ɚɦ') FROM SAMPLE;
-testInstr(conn, queryToExecute, 1);
+testInstr(conn, queryToExecute, 2);
 } 
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c2fed1da/phoenix-core/src/main/java/org/apache/phoenix/expression/function/InstrFunction.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/InstrFunction.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/InstrFunction.java
index 317d4b3..7a002f8 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/InstrFunction.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/InstrFunction.java
@@ -82,7 +82,7 @@ public class InstrFunction extends ScalarFunction{
 
 String sourceStr = (String) PVarchar.INSTANCE.toObject(ptr, 
getChildren().get(0).getSortOrder());
 
-position = sourceStr.indexOf(strToSearch);
+position = sourceStr.indexOf(strToSearch) + 1;
 ptr.set(PInteger.INSTANCE.toBytes(position));
 return true;
 }


[06/50] [abbrv] phoenix git commit: PHOENIX-1908 TenantSpecificTablesDDLIT#testAddDropColumn is flaky(Rajeshbabu)

2015-06-15 Thread maryannxue
PHOENIX-1908 TenantSpecificTablesDDLIT#testAddDropColumn is flaky(Rajeshbabu)


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

Branch: refs/heads/calcite
Commit: d223f2c3997bcd8f85c8dcae3703ceb39036662d
Parents: 70de0cd
Author: Rajeshbabu Chintaguntla rajeshb...@apache.org
Authored: Thu Apr 30 19:05:57 2015 +0530
Committer: Rajeshbabu Chintaguntla rajeshb...@apache.org
Committed: Thu Apr 30 19:05:57 2015 +0530

--
 .../java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d223f2c3/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
index 3ee527a..e613007 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -1795,7 +1795,7 @@ public class MetaDataEndpointImpl extends 
MetaDataProtocol implements Coprocesso
 // column, get lock and drop the index. If 
found as covered
 // column, delete from index (do this 
client side?).
 // In either case, invalidate index if the 
column is in it
-PhoenixConnection connection = 
QueryUtil.getConnection(env.getConfiguration()).unwrap(PhoenixConnection.class);
+PhoenixConnection connection = 
table.getIndexes().isEmpty() ? null : 
QueryUtil.getConnection(env.getConfiguration()).unwrap(PhoenixConnection.class);
 for (PTable index : table.getIndexes()) {
 try {
 IndexMaintainer indexMaintainer = 
index.getIndexMaintainer(table, connection);



[19/50] [abbrv] phoenix git commit: PHOENIX-1980 CsvBulkLoad cannot load hbase-site.xml from classpath

2015-06-15 Thread maryannxue
PHOENIX-1980 CsvBulkLoad cannot load hbase-site.xml from classpath


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/6fc53b57
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/6fc53b57
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/6fc53b57

Branch: refs/heads/calcite
Commit: 6fc53b5792ea7bdd1b486860606966e76f2e5e3f
Parents: 23f5acf
Author: Nick Dimiduk ndimi...@apache.org
Authored: Mon May 18 10:33:42 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Mon May 18 10:33:42 2015 -0700

--
 .../main/java/org/apache/phoenix/mapreduce/CsvBulkLoadTool.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6fc53b57/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/CsvBulkLoadTool.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/CsvBulkLoadTool.java 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/CsvBulkLoadTool.java
index 31f8b42..a5a8aa1 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/CsvBulkLoadTool.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/CsvBulkLoadTool.java
@@ -176,7 +176,7 @@ public class CsvBulkLoadTool extends Configured implements 
Tool {
 @Override
 public int run(String[] args) throws Exception {
 
-Configuration conf = HBaseConfiguration.addHbaseResources(getConf());
+Configuration conf = HBaseConfiguration.create(getConf());
 
 CommandLine cmdLine = null;
 try {



[49/50] [abbrv] phoenix git commit: PHOENIX-2032 psql.py is broken after PHOENIX-2013

2015-06-15 Thread maryannxue
PHOENIX-2032 psql.py is broken after PHOENIX-2013


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

Branch: refs/heads/calcite
Commit: d1934afbe6230e823b9009950fe721165e98cc7c
Parents: bfb0eee
Author: Nick Dimiduk ndimi...@apache.org
Authored: Fri Jun 12 10:23:05 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Fri Jun 12 12:12:09 2015 -0700

--
 phoenix-assembly/pom.xml  |  4 
 phoenix-assembly/src/build/client.xml | 27 +++
 2 files changed, 23 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d1934afb/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 51ff74d..baf6738 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -152,10 +152,6 @@
 /dependency
 dependency
   groupIdorg.apache.phoenix/groupId
-  artifactIdphoenix-spark/artifactId
-/dependency
-dependency
-  groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-server/artifactId
 /dependency
 dependency

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d1934afb/phoenix-assembly/src/build/client.xml
--
diff --git a/phoenix-assembly/src/build/client.xml 
b/phoenix-assembly/src/build/client.xml
index 4bd4544..0e1e1f6 100644
--- a/phoenix-assembly/src/build/client.xml
+++ b/phoenix-assembly/src/build/client.xml
@@ -63,13 +63,32 @@
 /dependencySet
 
 !-- Make sure we get all the components, not just the minimal client ones 
(e.g.
-  phoenix-flume, phoenix-pig, etc) --
+  phoenix-flume, phoenix-pig, etc). We should exclude phoenix-server and
+  phoenix-server-client in the future, see PHOENIX-2032, PHOENIX-2038 --
 dependencySet
   outputDirectory//outputDirectory
   unpacktrue/unpack
-  includes
-includeorg.apache.phoenix:phoenix-*/include
-  /includes
+  !-- multiple deps provide some variant of LICENSE files/directories. 
These
+   overwrite each other at best, at worst conflict on case-insensitive
+   filesystems like HDFS+ and FAT32. Just exclude them --
+  unpackOptions
+excludes
+  exclude*license*/exclude
+  exclude*LICENSE*/exclude
+  exclude**/license/**/exclude
+  exclude**/LICENSE/**/exclude
+/excludes
+  /unpackOptions
+  !-- this is default, but make intentions clear --
+  useTransitiveDependenciestrue/useTransitiveDependencies
+  !-- When include subelements are present, they define a set of
+   artifact coordinates to include. If none is present, then includes
+   represents all valid values
+   
https://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#class_dependencySet
+   This means bring in all dependencies transitively of the
+   phoenix-assembly module.
+  --
+  includes /
 /dependencySet
   /dependencySets
 /assembly



[09/50] [abbrv] phoenix git commit: PHOENIX-1948 bin scripts run under make_rc.sh packaging

2015-06-15 Thread maryannxue
PHOENIX-1948 bin scripts run under make_rc.sh packaging


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/45a919f3
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/45a919f3
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/45a919f3

Branch: refs/heads/calcite
Commit: 45a919f380a2743bdcf3838da2cd9873c3f518c0
Parents: b47dcb6
Author: Nick Dimiduk ndimi...@apache.org
Authored: Wed May 6 09:58:35 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Wed May 6 09:58:35 2015 -0700

--
 bin/phoenix_utils.py | 142 +++---
 1 file changed, 84 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/45a919f3/bin/phoenix_utils.py
--
diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py
index 2cf7db7..383e0e1 100755
--- a/bin/phoenix_utils.py
+++ b/bin/phoenix_utils.py
@@ -41,7 +41,8 @@ def find(pattern, classPaths):
 return 
 
 def findFileInPathWithoutRecursion(pattern, path):
-
+if not os.path.exists(path):
+return 
 files = [f for f in os.listdir(path) if 
os.path.isfile(os.path.join(path,f))]
 # sort the file names so *-client always precedes *-thin-client
 files.sort()
@@ -52,63 +53,71 @@ def findFileInPathWithoutRecursion(pattern, path):
 return 
 
 def setPath():
- PHOENIX_CLIENT_JAR_PATTERN = phoenix-*-client.jar
- PHOENIX_THIN_CLIENT_JAR_PATTERN = phoenix-*-thin-client.jar
- PHOENIX_QUERYSERVER_JAR_PATTERN = phoenix-server-*-runnable.jar
- PHOENIX_TESTS_JAR_PATTERN = phoenix-core-*-tests*.jar
- global current_dir
- current_dir = os.path.dirname(os.path.abspath(__file__))
- global phoenix_jar_path
- phoenix_jar_path = os.path.join(current_dir, .., phoenix-assembly, 
target,*)
- global phoenix_client_jar
- phoenix_client_jar = find(phoenix-*-client.jar, phoenix_jar_path)
- global phoenix_test_jar_path
- phoenix_test_jar_path = os.path.join(current_dir, .., phoenix-core, 
target,*)
- global hadoop_common_jar_path
- hadoop_common_jar_path = os.path.join(current_dir, .., phoenix-assembly, 
target,*)
- global hadoop_common_jar
- hadoop_common_jar = find(hadoop-common*.jar, hadoop_common_jar_path)
- global hadoop_hdfs_jar_path
- hadoop_hdfs_jar_path = os.path.join(current_dir, .., phoenix-assembly, 
target,*)
- global hadoop_hdfs_jar
- hadoop_hdfs_jar = find(hadoop-hdfs*.jar, hadoop_hdfs_jar_path)
-
- global hbase_conf_dir
- hbase_conf_dir = os.getenv('HBASE_CONF_DIR', os.getenv('HBASE_CONF_PATH', 
'.'))
- global hbase_conf_path # keep conf_path around for backward compatibility
- hbase_conf_path = hbase_conf_dir
- global testjar
- testjar = find(PHOENIX_TESTS_JAR_PATTERN, phoenix_test_jar_path)
- global phoenix_queryserver_jar
- phoenix_queryserver_jar = find(PHOENIX_QUERYSERVER_JAR_PATTERN, 
os.path.join(current_dir, .., phoenix-server, target, *))
- global phoenix_thin_client_jar
- phoenix_thin_client_jar = find(PHOENIX_THIN_CLIENT_JAR_PATTERN, 
os.path.join(current_dir, .., phoenix-server-client, target, *))
-
- if phoenix_client_jar == :
- phoenix_client_jar = 
findFileInPathWithoutRecursion(PHOENIX_CLIENT_JAR_PATTERN, 
os.path.join(current_dir, ..))
-
- if phoenix_thin_client_jar == :
- phoenix_thin_client_jar = 
findFileInPathWithoutRecursion(PHOENIX_THIN_CLIENT_JAR_PATTERN, 
os.path.join(current_dir, ..))
-
- if phoenix_queryserver_jar == :
- phoenix_queryserver_jar = 
findFileInPathWithoutRecursion(PHOENIX_QUERYSERVER_JAR_PATTERN, 
os.path.join(current_dir, .., lib))
-
- if testjar == :
- testjar = findFileInPathWithoutRecursion(PHOENIX_TESTS_JAR_PATTERN, 
os.path.join(current_dir, ..))
-
- # Backward support old env variable PHOENIX_LIB_DIR replaced by 
PHOENIX_CLASS_PATH
- global phoenix_class_path
- phoenix_class_path = os.getenv('PHOENIX_LIB_DIR','')
- if phoenix_class_path == :
- phoenix_class_path = os.getenv('PHOENIX_CLASS_PATH','')
-
- if phoenix_client_jar == :
- phoenix_client_jar = find(PHOENIX_CLIENT_JAR_PATTERN, phoenix_class_path)
-
- if testjar == :
- testjar = find(PHOENIX_TESTS_JAR_PATTERN, phoenix_class_path)
-
- return 
+PHOENIX_CLIENT_JAR_PATTERN = phoenix-*-client.jar
+PHOENIX_THIN_CLIENT_JAR_PATTERN = phoenix-*-thin-client.jar
+PHOENIX_QUERYSERVER_JAR_PATTERN = phoenix-server-*-runnable.jar
+PHOENIX_TESTS_JAR_PATTERN = phoenix-core-*-tests*.jar
+
+# Backward support old env variable PHOENIX_LIB_DIR replaced by 
PHOENIX_CLASS_PATH
+global phoenix_class_path
+phoenix_class_path = os.getenv('PHOENIX_LIB_DIR','')
+if phoenix_class_path == :
+phoenix_class_path = os.getenv('PHOENIX_CLASS_PATH','')
+
+global hbase_conf_dir
+hbase_conf_dir = os.getenv('HBASE_CONF_DIR', os.getenv('HBASE_CONF_PATH', 
'.'))
+

[29/50] [abbrv] phoenix git commit: PHOENIX-2008 Integration tests are failing with HBase-1.1.0 because HBASE-13756(Rajeshbabu)

2015-06-15 Thread maryannxue
PHOENIX-2008 Integration tests are failing with HBase-1.1.0 because 
HBASE-13756(Rajeshbabu)


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

Branch: refs/heads/calcite
Commit: a28c1d3b2d31377f70e0a4c661c3c70d8bc99216
Parents: edff624
Author: Rajeshbabu Chintaguntla rajeshb...@apache.org
Authored: Sat May 23 23:27:27 2015 +0530
Committer: Rajeshbabu Chintaguntla rajeshb...@apache.org
Committed: Sat May 23 23:27:27 2015 +0530

--
 phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a28c1d3b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
--
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
index 54ae670..4aa28c4 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
@@ -620,6 +620,8 @@ public abstract class BaseTest {
 }
 //no point doing sanity checks when running tests.
 conf.setBoolean(hbase.table.sanity.checks, false);
+// Remove this configuration once hbase has HBASE-13756 fix.
+conf.set(hbase.regionserver.msginterval, 30);
 // set the server rpc controller and rpc scheduler factory, used to 
configure the cluster
 conf.set(RpcControllerFactory.CUSTOM_CONTROLLER_CONF_KEY, 
DEFAULT_SERVER_RPC_CONTROLLER_FACTORY);
 conf.set(RSRpcServices.REGION_SERVER_RPC_SCHEDULER_FACTORY_CLASS, 
DEFAULT_RPC_SCHEDULER_FACTORY);



[23/50] [abbrv] phoenix git commit: PHOENIX-1964 - Pherf tests write output in module base directory

2015-06-15 Thread maryannxue
PHOENIX-1964 - Pherf tests write output in module base directory


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

Branch: refs/heads/calcite
Commit: d3ff0798f3e87bb489e3c91f7d11813503fe7861
Parents: 981ed47
Author: cmarcel cmar...@salesforce.com
Authored: Tue May 19 15:54:52 2015 -0700
Committer: cmarcel cmar...@salesforce.com
Committed: Wed May 20 13:36:34 2015 -0700

--
 phoenix-pherf/config/pherf.properties   |  3 ++
 .../org/apache/phoenix/pherf/DataIngestIT.java  |  3 +-
 .../apache/phoenix/pherf/ResultBaseTestIT.java  | 45 ++
 .../java/org/apache/phoenix/pherf/Pherf.java|  7 +--
 .../apache/phoenix/pherf/PherfConstants.java| 50 +++-
 .../phoenix/pherf/loaddata/DataLoader.java  |  2 +-
 .../apache/phoenix/pherf/result/ResultUtil.java |  4 +-
 .../pherf/result/impl/CSVResultHandler.java |  5 +-
 .../pherf/result/impl/ImageResultHandler.java   |  5 +-
 .../pherf/result/impl/XMLResultHandler.java |  6 ++-
 .../apache/phoenix/pherf/util/ResourceList.java | 26 --
 .../pherf/workload/WorkloadExecutor.java|  2 +-
 .../phoenix/pherf/ConfigurationParserTest.java  |  2 +-
 .../org/apache/phoenix/pherf/ResourceTest.java  |  8 ++--
 .../apache/phoenix/pherf/ResultBaseTest.java| 44 +
 .../org/apache/phoenix/pherf/ResultTest.java|  5 +-
 16 files changed, 168 insertions(+), 49 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d3ff0798/phoenix-pherf/config/pherf.properties
--
diff --git a/phoenix-pherf/config/pherf.properties 
b/phoenix-pherf/config/pherf.properties
index 354707a..1142f9b5 100644
--- a/phoenix-pherf/config/pherf.properties
+++ b/phoenix-pherf/config/pherf.properties
@@ -29,3 +29,6 @@ pherf.default.dataloader.threadpool=0
 # When upserting, this is the max # of rows that will be inserted in a single 
commit
 pherf.default.dataloader.batchsize=1000
 
+# Directory where results from a scenario run will be written
+pherf.default.results.dir=RESULTS
+

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d3ff0798/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/DataIngestIT.java
--
diff --git 
a/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/DataIngestIT.java 
b/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/DataIngestIT.java
index b29656d..2b56f43 100644
--- a/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/DataIngestIT.java
+++ b/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/DataIngestIT.java
@@ -18,7 +18,6 @@
 
 package org.apache.phoenix.pherf;
 
-import org.apache.phoenix.end2end.BaseHBaseManagedTimeIT;
 import org.apache.phoenix.pherf.configuration.Column;
 import org.apache.phoenix.pherf.configuration.DataTypeMapping;
 import org.apache.phoenix.pherf.configuration.Scenario;
@@ -39,7 +38,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-public class DataIngestIT extends BaseHBaseManagedTimeIT {
+public class DataIngestIT extends ResultBaseTestIT {
 protected static PhoenixUtil util = new PhoenixUtil(true);
 static final String matcherScenario = .*scenario/.*test.*xml;
 static final String matcherSchema = .*datamodel/.*test.*sql;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d3ff0798/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/ResultBaseTestIT.java
--
diff --git 
a/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/ResultBaseTestIT.java 
b/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/ResultBaseTestIT.java
new file mode 100644
index 000..6e103b8
--- /dev/null
+++ b/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/ResultBaseTestIT.java
@@ -0,0 +1,45 @@
+/*
+ * 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
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   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 

[42/50] [abbrv] phoenix git commit: PHOENIX-1987 SIGN built-in function should be order preserving (Shuxiong Ye)

2015-06-15 Thread maryannxue
PHOENIX-1987 SIGN built-in function should be order preserving (Shuxiong Ye)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/47466e31
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/47466e31
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/47466e31

Branch: refs/heads/calcite
Commit: 47466e317db72d651c120b1c04bf687abfe10e34
Parents: 6c3d50a
Author: James Taylor jamestay...@apache.org
Authored: Thu Jun 4 14:24:06 2015 -0700
Committer: James Taylor jamestay...@apache.org
Committed: Thu Jun 4 14:24:06 2015 -0700

--
 .../org/apache/phoenix/expression/function/SignFunction.java| 5 +
 .../java/org/apache/phoenix/expression/SignFunctionTest.java| 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/47466e31/phoenix-core/src/main/java/org/apache/phoenix/expression/function/SignFunction.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/SignFunction.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/SignFunction.java
index 0b470f8..a11eaff 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/SignFunction.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/SignFunction.java
@@ -71,4 +71,9 @@ public class SignFunction extends ScalarFunction {
 public String getName() {
 return NAME;
 }
+
+@Override
+public OrderPreserving preservesOrder() {
+return OrderPreserving.YES;
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/47466e31/phoenix-core/src/test/java/org/apache/phoenix/expression/SignFunctionTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/expression/SignFunctionTest.java
 
b/phoenix-core/src/test/java/org/apache/phoenix/expression/SignFunctionTest.java
index 37d6e1d..e4a5f80 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/expression/SignFunctionTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/expression/SignFunctionTest.java
@@ -54,7 +54,8 @@ public class SignFunctionTest {
 Expression signFunction = new SignFunction(expressions);
 ImmutableBytesWritable ptr = new ImmutableBytesWritable();
 signFunction.evaluate(null, ptr);
-Integer result = (Integer) signFunction.getDataType().toObject(ptr);
+Integer result =
+(Integer) signFunction.getDataType().toObject(ptr, 
signFunction.getSortOrder());
 assertTrue(result.compareTo(expected) == 0);
 }
 



[39/50] [abbrv] phoenix git commit: PHOENIX-2012 RowKeyComparisonFilter logs unencoded data at DEBUG level

2015-06-15 Thread maryannxue
PHOENIX-2012 RowKeyComparisonFilter logs unencoded data at DEBUG level


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/9e686b75
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/9e686b75
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/9e686b75

Branch: refs/heads/calcite
Commit: 9e686b758ff735fd9129430cd31fe36993b9711b
Parents: dc3083f
Author: Nick Dimiduk ndimi...@apache.org
Authored: Wed May 27 15:58:32 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Mon Jun 1 15:54:37 2015 -0700

--
 .../java/org/apache/phoenix/filter/RowKeyComparisonFilter.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9e686b75/phoenix-core/src/main/java/org/apache/phoenix/filter/RowKeyComparisonFilter.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/filter/RowKeyComparisonFilter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/filter/RowKeyComparisonFilter.java
index 2e2037b..b7de7ac 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/filter/RowKeyComparisonFilter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/filter/RowKeyComparisonFilter.java
@@ -73,8 +73,9 @@ public class RowKeyComparisonFilter extends 
BooleanExpressionFilter {
 if (evaluate) {
 inputTuple.setKey(v.getRowArray(), v.getRowOffset(), 
v.getRowLength());
 this.keepRow = Boolean.TRUE.equals(evaluate(inputTuple));
-if (logger.isDebugEnabled()) {
-logger.debug(RowKeyComparisonFilter:  + (this.keepRow ? 
KEEP : FILTER)  +  row  + inputTuple);
+if (logger.isTraceEnabled()) {
+logger.trace(RowKeyComparisonFilter:  + (this.keepRow ? 
KEEP : FILTER)
++  row  + inputTuple);
 }
 evaluate = false;
 }



phoenix git commit: PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)

2015-06-15 Thread ndimiduk
Repository: phoenix
Updated Branches:
  refs/heads/master c2927ddec - b61ef77e5


PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)


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

Branch: refs/heads/master
Commit: b61ef77e509a024ccaf6c3ce74c385c31c5f534a
Parents: c2927dd
Author: Nick Dimiduk ndimi...@apache.org
Authored: Mon Jun 15 16:16:03 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Mon Jun 15 16:16:03 2015 -0700

--
 phoenix-assembly/pom.xml |  4 
 phoenix-spark/pom.xml| 51 ---
 2 files changed, 32 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b61ef77e/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index baf6738..51ff74d 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -152,6 +152,10 @@
 /dependency
 dependency
   groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-spark/artifactId
+/dependency
+dependency
+  groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-server/artifactId
 /dependency
 dependency

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b61ef77e/phoenix-spark/pom.xml
--
diff --git a/phoenix-spark/pom.xml b/phoenix-spark/pom.xml
index 7086bb6..289801a 100644
--- a/phoenix-spark/pom.xml
+++ b/phoenix-spark/pom.xml
@@ -45,12 +45,7 @@
   groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-core/artifactId
 /dependency
-dependency
-  groupIdorg.apache.phoenix/groupId
-  artifactIdphoenix-core/artifactId
-  classifiertests/classifier
-  scopetest/scope
-/dependency
+
 !-- Force import of Spark's servlet API for unit tests --
 dependency
   groupIdjavax.servlet/groupId
@@ -59,16 +54,38 @@
   scopetest/scope
 /dependency
 
+!-- Mark Spark / Scala as provided --
 dependency
-  groupIdjunit/groupId
-  artifactIdjunit/artifactId
+  groupIdorg.scala-lang/groupId
+  artifactIdscala-library/artifactId
+  version${scala.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-core_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-sql_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+
+!-- Test dependencies --
+dependency
+  groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-core/artifactId
+  classifiertests/classifier
   scopetest/scope
 /dependency
 
 dependency
-  groupIdorg.scala-lang/groupId
-  artifactIdscala-library/artifactId
-  version${scala.version}/version
+  groupIdjunit/groupId
+  artifactIdjunit/artifactId
+  scopetest/scope
 /dependency
 
 dependency
@@ -86,18 +103,6 @@
 /dependency
 
 dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-core_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-sql_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
   groupIdorg.apache.hadoop/groupId
   artifactIdhadoop-client/artifactId
   version${hadoop-two.version}/version



phoenix git commit: PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)

2015-06-15 Thread ndimiduk
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 d0bcb7b23 - 43c722ca6


PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/43c722ca
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/43c722ca
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/43c722ca

Branch: refs/heads/4.x-HBase-1.1
Commit: 43c722ca6d2d55347d1f2caf7641ce03339e1e1e
Parents: d0bcb7b
Author: Nick Dimiduk ndimi...@apache.org
Authored: Mon Jun 15 16:16:03 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Mon Jun 15 16:16:30 2015 -0700

--
 phoenix-assembly/pom.xml |  4 
 phoenix-spark/pom.xml| 51 ---
 2 files changed, 32 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/43c722ca/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index ebc5d71..d275d03 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -152,6 +152,10 @@
 /dependency
 dependency
   groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-spark/artifactId
+/dependency
+dependency
+  groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-server/artifactId
 /dependency
 dependency

http://git-wip-us.apache.org/repos/asf/phoenix/blob/43c722ca/phoenix-spark/pom.xml
--
diff --git a/phoenix-spark/pom.xml b/phoenix-spark/pom.xml
index 1747573..aea5c7e 100644
--- a/phoenix-spark/pom.xml
+++ b/phoenix-spark/pom.xml
@@ -45,12 +45,7 @@
   groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-core/artifactId
 /dependency
-dependency
-  groupIdorg.apache.phoenix/groupId
-  artifactIdphoenix-core/artifactId
-  classifiertests/classifier
-  scopetest/scope
-/dependency
+
 !-- Force import of Spark's servlet API for unit tests --
 dependency
   groupIdjavax.servlet/groupId
@@ -59,16 +54,38 @@
   scopetest/scope
 /dependency
 
+!-- Mark Spark / Scala as provided --
 dependency
-  groupIdjunit/groupId
-  artifactIdjunit/artifactId
+  groupIdorg.scala-lang/groupId
+  artifactIdscala-library/artifactId
+  version${scala.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-core_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-sql_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+
+!-- Test dependencies --
+dependency
+  groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-core/artifactId
+  classifiertests/classifier
   scopetest/scope
 /dependency
 
 dependency
-  groupIdorg.scala-lang/groupId
-  artifactIdscala-library/artifactId
-  version${scala.version}/version
+  groupIdjunit/groupId
+  artifactIdjunit/artifactId
+  scopetest/scope
 /dependency
 
 dependency
@@ -86,18 +103,6 @@
 /dependency
 
 dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-core_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-sql_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
   groupIdorg.apache.hadoop/groupId
   artifactIdhadoop-client/artifactId
   version${hadoop-two.version}/version



[2/2] phoenix git commit: PHOENIX-1660 Implement missing math built-in functions ABS, POWER, LN, LOG, SQRT, CBRT, EXP (Shuxiong Ye)

2015-06-15 Thread jamestaylor
PHOENIX-1660 Implement missing math built-in functions ABS, POWER, LN, LOG, 
SQRT, CBRT, EXP (Shuxiong Ye)


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

Branch: refs/heads/4.x-HBase-1.0
Commit: b618234d601d2805d27081c6c52a9c8bfbd30d69
Parents: 04406c8
Author: James Taylor jamestay...@apache.org
Authored: Mon Jun 15 15:53:44 2015 -0700
Committer: James Taylor jamestay...@apache.org
Committed: Mon Jun 15 16:27:38 2015 -0700

--
 .../phoenix/end2end/AbsFunctionEnd2EndIT.java   | 108 +++
 .../phoenix/end2end/CbrtFunctionEnd2EndIT.java  | 143 +++
 .../phoenix/end2end/ExpFunctionEnd2EndIT.java   | 128 +
 .../phoenix/end2end/LnLogFunctionEnd2EndIT.java | 143 +++
 .../phoenix/end2end/PowerFunctionEnd2EndIT.java | 144 +++
 .../phoenix/expression/ExpressionType.java  |  14 +-
 .../expression/function/AbsFunction.java|  66 +++
 .../expression/function/CbrtFunction.java   |  55 ++
 .../expression/function/ExpFunction.java|  55 ++
 .../function/JavaMathOneArgumentFunction.java   |  43 ++---
 .../function/JavaMathTwoArgumentFunction.java   |  69 +++
 .../phoenix/expression/function/LnFunction.java |  55 ++
 .../expression/function/LogFunction.java|  56 ++
 .../expression/function/PowerFunction.java  |  51 ++
 .../expression/function/ScalarFunction.java |   4 +-
 .../expression/function/SqrtFunction.java   |   8 +-
 .../apache/phoenix/schema/types/PDecimal.java   |  11 ++
 .../phoenix/schema/types/PNumericType.java  |   8 +
 .../phoenix/schema/types/PRealNumber.java   |   8 +
 .../phoenix/schema/types/PWholeNumber.java  |   8 +
 .../phoenix/compile/QueryCompilerTest.java  |  68 ++-
 .../phoenix/expression/AbsFunctionTest.java | 180 ++
 .../phoenix/expression/CbrtFunctionTest.java| 127 +
 .../phoenix/expression/ExpFunctionTest.java | 150 +++
 .../phoenix/expression/LnLogFunctionTest.java   | 182 +++
 .../phoenix/expression/PowerFunctionTest.java   | 182 +++
 26 files changed, 2036 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b618234d/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java
new file mode 100644
index 000..0c6204c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java
@@ -0,0 +1,108 @@
+/*
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.apache.phoenix.util.TestUtil.closeStmtAndConn;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.math.BigDecimal;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.expression.function.AbsFunction;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * End to end tests for {@link AbsFunction}
+ */
+public class AbsFunctionEnd2EndIT extends BaseHBaseManagedTimeIT {
+
+private static final String KEY = key;
+
+@Before
+public void initTable() throws Exception {
+Connection conn = null;
+PreparedStatement stmt = null;
+try {
+conn = DriverManager.getConnection(getUrl());
+String ddl;
+ddl = CREATE TABLE testSigned (k VARCHAR NOT NULL PRIMARY KEY, 
dec DECIMAL, doub DOUBLE, fl FLOAT, inte INTEGER, lon BIGINT, smalli SMALLINT, 
tinyi TINYINT);
+conn.createStatement().execute(ddl);
+

[1/2] phoenix git commit: PHOENIX-1660 Implement missing math built-in functions ABS, POWER, LN, LOG, SQRT, CBRT, EXP (Shuxiong Ye)

2015-06-15 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.0 04406c86a - b618234d6


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b618234d/phoenix-core/src/test/java/org/apache/phoenix/expression/ExpFunctionTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/expression/ExpFunctionTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/expression/ExpFunctionTest.java
new file mode 100644
index 000..b7b95c2
--- /dev/null
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/expression/ExpFunctionTest.java
@@ -0,0 +1,150 @@
+/*
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+package org.apache.phoenix.expression;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.math.BigDecimal;
+import java.sql.SQLException;
+import java.util.List;
+import java.util.Random;
+
+import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.phoenix.expression.function.ExpFunction;
+import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.types.PDecimal;
+import org.apache.phoenix.schema.types.PDouble;
+import org.apache.phoenix.schema.types.PFloat;
+import org.apache.phoenix.schema.types.PInteger;
+import org.apache.phoenix.schema.types.PLong;
+import org.apache.phoenix.schema.types.PNumericType;
+import org.apache.phoenix.schema.types.PSmallint;
+import org.apache.phoenix.schema.types.PTinyint;
+import org.apache.phoenix.schema.types.PUnsignedDouble;
+import org.apache.phoenix.schema.types.PUnsignedFloat;
+import org.apache.phoenix.schema.types.PUnsignedInt;
+import org.apache.phoenix.schema.types.PUnsignedLong;
+import org.junit.Test;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Unit tests for {@link ExpFunction}
+ */
+public class ExpFunctionTest {
+private static final double ZERO = 1e-9;
+
+private static boolean twoDoubleEquals(double a, double b) {
+if (Double.isNaN(a) ^ Double.isNaN(b)) return false;
+if (Double.isNaN(a)) return true;
+if (Double.isInfinite(a) ^ Double.isInfinite(b)) return false;
+if (Double.isInfinite(a)) {
+if ((a  0) ^ (b  0)) return false;
+else return true;
+}
+if (Math.abs(a - b) = ZERO) {
+return true;
+} else {
+return false;
+}
+}
+
+private static boolean testExpression(LiteralExpression literal, double 
expected)
+throws SQLException {
+ListExpression expressions = Lists.newArrayList((Expression) 
literal);
+Expression sqrtFunction = new ExpFunction(expressions);
+ImmutableBytesWritable ptr = new ImmutableBytesWritable();
+boolean ret = sqrtFunction.evaluate(null, ptr);
+if (ret) {
+Double result =
+(Double) sqrtFunction.getDataType().toObject(ptr, 
sqrtFunction.getSortOrder());
+assertTrue(twoDoubleEquals(result.doubleValue(), expected));
+}
+return ret;
+}
+
+private static void test(Number value, PNumericType dataType, double 
expected)
+throws SQLException {
+LiteralExpression literal;
+literal = LiteralExpression.newConstant(value, dataType, 
SortOrder.ASC);
+boolean ret1 = testExpression(literal, expected);
+literal = LiteralExpression.newConstant(value, dataType, 
SortOrder.DESC);
+boolean ret2 = testExpression(literal, expected);
+assertEquals(ret1, ret2);
+}
+
+private static void testBatch(Number[] value, PNumericType dataType) 
throws SQLException {
+double[] expected = new double[value.length];
+for (int i = 0; i  expected.length; ++i) {
+expected[i] = Math.exp(value[i].doubleValue());
+}
+assertEquals(value.length, expected.length);
+for (int i = 0; i  value.length; ++i) {
+test(value[i], dataType, expected[i]);
+}
+}
+
+@Test
+public void testSqrtFunction() throws Exception {
+Random random = new Random();
+
+testBatch(
+new BigDecimal[] { BigDecimal.valueOf(1.0), 
BigDecimal.valueOf(0.0),
+  

phoenix git commit: PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)

2015-06-15 Thread ndimiduk
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 a8f3d980d - e7c152173


PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)


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

Branch: refs/heads/4.x-HBase-0.98
Commit: e7c152173cffdc75201530b8977b7b51521cfa8d
Parents: a8f3d98
Author: Nick Dimiduk ndimi...@apache.org
Authored: Mon Jun 15 16:16:03 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Mon Jun 15 16:28:06 2015 -0700

--
 phoenix-assembly/pom.xml |  4 
 phoenix-spark/pom.xml| 51 ---
 2 files changed, 32 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e7c15217/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index d3e1341..9c2bc46 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -152,6 +152,10 @@
 /dependency
 dependency
   groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-spark/artifactId
+/dependency
+dependency
+  groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-server/artifactId
 /dependency
 dependency

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e7c15217/phoenix-spark/pom.xml
--
diff --git a/phoenix-spark/pom.xml b/phoenix-spark/pom.xml
index 3aae7a1..a289869 100644
--- a/phoenix-spark/pom.xml
+++ b/phoenix-spark/pom.xml
@@ -45,12 +45,7 @@
   groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-core/artifactId
 /dependency
-dependency
-  groupIdorg.apache.phoenix/groupId
-  artifactIdphoenix-core/artifactId
-  classifiertests/classifier
-  scopetest/scope
-/dependency
+
 !-- Force import of Spark's servlet API for unit tests --
 dependency
   groupIdjavax.servlet/groupId
@@ -59,16 +54,38 @@
   scopetest/scope
 /dependency
 
+!-- Mark Spark / Scala as provided --
 dependency
-  groupIdjunit/groupId
-  artifactIdjunit/artifactId
+  groupIdorg.scala-lang/groupId
+  artifactIdscala-library/artifactId
+  version${scala.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-core_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-sql_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+
+!-- Test dependencies --
+dependency
+  groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-core/artifactId
+  classifiertests/classifier
   scopetest/scope
 /dependency
 
 dependency
-  groupIdorg.scala-lang/groupId
-  artifactIdscala-library/artifactId
-  version${scala.version}/version
+  groupIdjunit/groupId
+  artifactIdjunit/artifactId
+  scopetest/scope
 /dependency
 
 dependency
@@ -86,18 +103,6 @@
 /dependency
 
 dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-core_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-sql_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
   groupIdorg.apache.hadoop/groupId
   artifactIdhadoop-client/artifactId
   version${hadoop-two.version}/version



phoenix git commit: PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)

2015-06-15 Thread ndimiduk
Repository: phoenix
Updated Branches:
  refs/heads/4.4-HBase-1.1 0a1095044 - 905d61cf1


PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/905d61cf
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/905d61cf
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/905d61cf

Branch: refs/heads/4.4-HBase-1.1
Commit: 905d61cf1ffca26e777ae43541f33dbfb1ad5499
Parents: 0a10950
Author: Nick Dimiduk ndimi...@apache.org
Authored: Mon Jun 15 16:16:03 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Mon Jun 15 16:16:42 2015 -0700

--
 phoenix-assembly/pom.xml |  4 
 phoenix-spark/pom.xml| 51 ---
 2 files changed, 32 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/905d61cf/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index ba84332..0200459 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -148,6 +148,10 @@
 /dependency
 dependency
   groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-spark/artifactId
+/dependency
+dependency
+  groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-server/artifactId
 /dependency
 dependency

http://git-wip-us.apache.org/repos/asf/phoenix/blob/905d61cf/phoenix-spark/pom.xml
--
diff --git a/phoenix-spark/pom.xml b/phoenix-spark/pom.xml
index 85d72c2..10277ff 100644
--- a/phoenix-spark/pom.xml
+++ b/phoenix-spark/pom.xml
@@ -44,12 +44,7 @@
   groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-core/artifactId
 /dependency
-dependency
-  groupIdorg.apache.phoenix/groupId
-  artifactIdphoenix-core/artifactId
-  classifiertests/classifier
-  scopetest/scope
-/dependency
+
 !-- Force import of Spark's servlet API for unit tests --
 dependency
   groupIdjavax.servlet/groupId
@@ -58,16 +53,38 @@
   scopetest/scope
 /dependency
 
+!-- Mark Spark / Scala as provided --
 dependency
-  groupIdjunit/groupId
-  artifactIdjunit/artifactId
+  groupIdorg.scala-lang/groupId
+  artifactIdscala-library/artifactId
+  version${scala.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-core_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-sql_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+
+!-- Test dependencies --
+dependency
+  groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-core/artifactId
+  classifiertests/classifier
   scopetest/scope
 /dependency
 
 dependency
-  groupIdorg.scala-lang/groupId
-  artifactIdscala-library/artifactId
-  version${scala.version}/version
+  groupIdjunit/groupId
+  artifactIdjunit/artifactId
+  scopetest/scope
 /dependency
 
 dependency
@@ -85,18 +102,6 @@
 /dependency
 
 dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-core_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-sql_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
   groupIdorg.apache.hadoop/groupId
   artifactIdhadoop-client/artifactId
   version${hadoop-two.version}/version



phoenix git commit: PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)

2015-06-15 Thread ndimiduk
Repository: phoenix
Updated Branches:
  refs/heads/4.4-HBase-1.0 23ff28c9f - e4dc06eb5


PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)


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

Branch: refs/heads/4.4-HBase-1.0
Commit: e4dc06eb56e029eebea305f6d7f18028974ae5ea
Parents: 23ff28c
Author: Nick Dimiduk ndimi...@apache.org
Authored: Mon Jun 15 16:16:03 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Mon Jun 15 16:16:45 2015 -0700

--
 phoenix-assembly/pom.xml |  4 
 phoenix-spark/pom.xml| 51 ---
 2 files changed, 32 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e4dc06eb/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index df1b468..26d2244 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -148,6 +148,10 @@
 /dependency
 dependency
   groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-spark/artifactId
+/dependency
+dependency
+  groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-server/artifactId
 /dependency
 dependency

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e4dc06eb/phoenix-spark/pom.xml
--
diff --git a/phoenix-spark/pom.xml b/phoenix-spark/pom.xml
index 14d9f89..559ba12 100644
--- a/phoenix-spark/pom.xml
+++ b/phoenix-spark/pom.xml
@@ -44,12 +44,7 @@
   groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-core/artifactId
 /dependency
-dependency
-  groupIdorg.apache.phoenix/groupId
-  artifactIdphoenix-core/artifactId
-  classifiertests/classifier
-  scopetest/scope
-/dependency
+
 !-- Force import of Spark's servlet API for unit tests --
 dependency
   groupIdjavax.servlet/groupId
@@ -58,16 +53,38 @@
   scopetest/scope
 /dependency
 
+!-- Mark Spark / Scala as provided --
 dependency
-  groupIdjunit/groupId
-  artifactIdjunit/artifactId
+  groupIdorg.scala-lang/groupId
+  artifactIdscala-library/artifactId
+  version${scala.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-core_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-sql_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+
+!-- Test dependencies --
+dependency
+  groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-core/artifactId
+  classifiertests/classifier
   scopetest/scope
 /dependency
 
 dependency
-  groupIdorg.scala-lang/groupId
-  artifactIdscala-library/artifactId
-  version${scala.version}/version
+  groupIdjunit/groupId
+  artifactIdjunit/artifactId
+  scopetest/scope
 /dependency
 
 dependency
@@ -85,18 +102,6 @@
 /dependency
 
 dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-core_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-sql_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
   groupIdorg.apache.hadoop/groupId
   artifactIdhadoop-client/artifactId
   version${hadoop-two.version}/version



phoenix git commit: PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)

2015-06-15 Thread ndimiduk
Repository: phoenix
Updated Branches:
  refs/heads/4.4-HBase-0.98 2463ca23c - cebe0392d


PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)


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

Branch: refs/heads/4.4-HBase-0.98
Commit: cebe0392da2c1260527675b7ed829f12025bcd08
Parents: 2463ca2
Author: Nick Dimiduk ndimi...@apache.org
Authored: Mon Jun 15 16:16:03 2015 -0700
Committer: Nick Dimiduk ndimi...@apache.org
Committed: Mon Jun 15 16:16:48 2015 -0700

--
 phoenix-assembly/pom.xml |  4 
 phoenix-spark/pom.xml| 51 ---
 2 files changed, 32 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/cebe0392/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 49b0721..bcdb9a7 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -148,6 +148,10 @@
 /dependency
 dependency
   groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-spark/artifactId
+/dependency
+dependency
+  groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-server/artifactId
 /dependency
 dependency

http://git-wip-us.apache.org/repos/asf/phoenix/blob/cebe0392/phoenix-spark/pom.xml
--
diff --git a/phoenix-spark/pom.xml b/phoenix-spark/pom.xml
index 0fa967f..04439ef 100644
--- a/phoenix-spark/pom.xml
+++ b/phoenix-spark/pom.xml
@@ -44,12 +44,7 @@
   groupIdorg.apache.phoenix/groupId
   artifactIdphoenix-core/artifactId
 /dependency
-dependency
-  groupIdorg.apache.phoenix/groupId
-  artifactIdphoenix-core/artifactId
-  classifiertests/classifier
-  scopetest/scope
-/dependency
+
 !-- Force import of Spark's servlet API for unit tests --
 dependency
   groupIdjavax.servlet/groupId
@@ -58,16 +53,38 @@
   scopetest/scope
 /dependency
 
+!-- Mark Spark / Scala as provided --
 dependency
-  groupIdjunit/groupId
-  artifactIdjunit/artifactId
+  groupIdorg.scala-lang/groupId
+  artifactIdscala-library/artifactId
+  version${scala.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-core_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.spark/groupId
+  artifactIdspark-sql_${scala.binary.version}/artifactId
+  version${spark.version}/version
+  scopeprovided/scope
+/dependency
+
+!-- Test dependencies --
+dependency
+  groupIdorg.apache.phoenix/groupId
+  artifactIdphoenix-core/artifactId
+  classifiertests/classifier
   scopetest/scope
 /dependency
 
 dependency
-  groupIdorg.scala-lang/groupId
-  artifactIdscala-library/artifactId
-  version${scala.version}/version
+  groupIdjunit/groupId
+  artifactIdjunit/artifactId
+  scopetest/scope
 /dependency
 
 dependency
@@ -85,18 +102,6 @@
 /dependency
 
 dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-core_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
-  groupIdorg.apache.spark/groupId
-  artifactIdspark-sql_${scala.binary.version}/artifactId
-  version${spark.version}/version
-/dependency
-
-dependency
   groupIdorg.apache.hadoop/groupId
   artifactIdhadoop-client/artifactId
   version${hadoop-two.version}/version



[2/2] phoenix git commit: PHOENIX-1660 Implement missing math built-in functions ABS, POWER, LN, LOG, SQRT, CBRT, EXP (Shuxiong Ye)

2015-06-15 Thread jamestaylor
PHOENIX-1660 Implement missing math built-in functions ABS, POWER, LN, LOG, 
SQRT, CBRT, EXP (Shuxiong Ye)


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

Branch: refs/heads/master
Commit: c2927ddec5ab954dd779516ed29b4b7fa4b011d9
Parents: d1934af
Author: James Taylor jamestay...@apache.org
Authored: Mon Jun 15 15:53:44 2015 -0700
Committer: James Taylor jamestay...@apache.org
Committed: Mon Jun 15 15:53:44 2015 -0700

--
 .../phoenix/end2end/AbsFunctionEnd2EndIT.java   | 108 +++
 .../phoenix/end2end/CbrtFunctionEnd2EndIT.java  | 143 +++
 .../phoenix/end2end/ExpFunctionEnd2EndIT.java   | 128 +
 .../phoenix/end2end/LnLogFunctionEnd2EndIT.java | 143 +++
 .../phoenix/end2end/PowerFunctionEnd2EndIT.java | 144 +++
 .../phoenix/expression/ExpressionType.java  |  14 +-
 .../expression/function/AbsFunction.java|  66 +++
 .../expression/function/CbrtFunction.java   |  55 ++
 .../expression/function/ExpFunction.java|  55 ++
 .../function/JavaMathOneArgumentFunction.java   |  43 ++---
 .../function/JavaMathTwoArgumentFunction.java   |  69 +++
 .../phoenix/expression/function/LnFunction.java |  55 ++
 .../expression/function/LogFunction.java|  56 ++
 .../expression/function/PowerFunction.java  |  51 ++
 .../expression/function/ScalarFunction.java |   4 +-
 .../expression/function/SqrtFunction.java   |   8 +-
 .../apache/phoenix/schema/types/PDecimal.java   |  11 ++
 .../phoenix/schema/types/PNumericType.java  |   8 +
 .../phoenix/schema/types/PRealNumber.java   |   8 +
 .../phoenix/schema/types/PWholeNumber.java  |   8 +
 .../phoenix/compile/QueryCompilerTest.java  |  68 ++-
 .../phoenix/expression/AbsFunctionTest.java | 180 ++
 .../phoenix/expression/CbrtFunctionTest.java| 127 +
 .../phoenix/expression/ExpFunctionTest.java | 150 +++
 .../phoenix/expression/LnLogFunctionTest.java   | 182 +++
 .../phoenix/expression/PowerFunctionTest.java   | 182 +++
 26 files changed, 2036 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c2927dde/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java
new file mode 100644
index 000..0c6204c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java
@@ -0,0 +1,108 @@
+/*
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.apache.phoenix.util.TestUtil.closeStmtAndConn;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.math.BigDecimal;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.expression.function.AbsFunction;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * End to end tests for {@link AbsFunction}
+ */
+public class AbsFunctionEnd2EndIT extends BaseHBaseManagedTimeIT {
+
+private static final String KEY = key;
+
+@Before
+public void initTable() throws Exception {
+Connection conn = null;
+PreparedStatement stmt = null;
+try {
+conn = DriverManager.getConnection(getUrl());
+String ddl;
+ddl = CREATE TABLE testSigned (k VARCHAR NOT NULL PRIMARY KEY, 
dec DECIMAL, doub DOUBLE, fl FLOAT, inte INTEGER, lon BIGINT, smalli SMALLINT, 
tinyi TINYINT);
+conn.createStatement().execute(ddl);
+conn.commit();

[1/2] phoenix git commit: PHOENIX-1660 Implement missing math built-in functions ABS, POWER, LN, LOG, SQRT, CBRT, EXP (Shuxiong Ye)

2015-06-15 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master d1934afbe - c2927ddec


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c2927dde/phoenix-core/src/test/java/org/apache/phoenix/expression/ExpFunctionTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/expression/ExpFunctionTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/expression/ExpFunctionTest.java
new file mode 100644
index 000..b7b95c2
--- /dev/null
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/expression/ExpFunctionTest.java
@@ -0,0 +1,150 @@
+/*
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+package org.apache.phoenix.expression;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.math.BigDecimal;
+import java.sql.SQLException;
+import java.util.List;
+import java.util.Random;
+
+import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.phoenix.expression.function.ExpFunction;
+import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.types.PDecimal;
+import org.apache.phoenix.schema.types.PDouble;
+import org.apache.phoenix.schema.types.PFloat;
+import org.apache.phoenix.schema.types.PInteger;
+import org.apache.phoenix.schema.types.PLong;
+import org.apache.phoenix.schema.types.PNumericType;
+import org.apache.phoenix.schema.types.PSmallint;
+import org.apache.phoenix.schema.types.PTinyint;
+import org.apache.phoenix.schema.types.PUnsignedDouble;
+import org.apache.phoenix.schema.types.PUnsignedFloat;
+import org.apache.phoenix.schema.types.PUnsignedInt;
+import org.apache.phoenix.schema.types.PUnsignedLong;
+import org.junit.Test;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Unit tests for {@link ExpFunction}
+ */
+public class ExpFunctionTest {
+private static final double ZERO = 1e-9;
+
+private static boolean twoDoubleEquals(double a, double b) {
+if (Double.isNaN(a) ^ Double.isNaN(b)) return false;
+if (Double.isNaN(a)) return true;
+if (Double.isInfinite(a) ^ Double.isInfinite(b)) return false;
+if (Double.isInfinite(a)) {
+if ((a  0) ^ (b  0)) return false;
+else return true;
+}
+if (Math.abs(a - b) = ZERO) {
+return true;
+} else {
+return false;
+}
+}
+
+private static boolean testExpression(LiteralExpression literal, double 
expected)
+throws SQLException {
+ListExpression expressions = Lists.newArrayList((Expression) 
literal);
+Expression sqrtFunction = new ExpFunction(expressions);
+ImmutableBytesWritable ptr = new ImmutableBytesWritable();
+boolean ret = sqrtFunction.evaluate(null, ptr);
+if (ret) {
+Double result =
+(Double) sqrtFunction.getDataType().toObject(ptr, 
sqrtFunction.getSortOrder());
+assertTrue(twoDoubleEquals(result.doubleValue(), expected));
+}
+return ret;
+}
+
+private static void test(Number value, PNumericType dataType, double 
expected)
+throws SQLException {
+LiteralExpression literal;
+literal = LiteralExpression.newConstant(value, dataType, 
SortOrder.ASC);
+boolean ret1 = testExpression(literal, expected);
+literal = LiteralExpression.newConstant(value, dataType, 
SortOrder.DESC);
+boolean ret2 = testExpression(literal, expected);
+assertEquals(ret1, ret2);
+}
+
+private static void testBatch(Number[] value, PNumericType dataType) 
throws SQLException {
+double[] expected = new double[value.length];
+for (int i = 0; i  expected.length; ++i) {
+expected[i] = Math.exp(value[i].doubleValue());
+}
+assertEquals(value.length, expected.length);
+for (int i = 0; i  value.length; ++i) {
+test(value[i], dataType, expected[i]);
+}
+}
+
+@Test
+public void testSqrtFunction() throws Exception {
+Random random = new Random();
+
+testBatch(
+new BigDecimal[] { BigDecimal.valueOf(1.0), 
BigDecimal.valueOf(0.0),
+

Apache-Phoenix | Master | Build Successful

2015-06-15 Thread Apache Jenkins Server
Master branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/master

Last Successful Compiled Artifacts https://builds.apache.org/job/Phoenix-master/lastSuccessfulBuild/artifact/

Last Complete Test Report https://builds.apache.org/job/Phoenix-master/lastCompletedBuild/testReport/

Changes
[jamestaylor] PHOENIX-1660 Implement missing math built-in functions ABS, POWER, LN, LOG, SQRT, CBRT, EXP (Shuxiong Ye)



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


Apache-Phoenix | 4.x-HBase-1.1 | Build Successful

2015-06-15 Thread Apache Jenkins Server
4.x-HBase-1.1 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-1.1

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-1.1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-1.1/lastCompletedBuild/testReport/

Changes
[ndimiduk] PHOENIX-2040 Mark spark/scala dependencies as 'provided' (Josh Mahonin)



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout