Jenkins build is back to normal : Phoenix | Master | Hadoop1 #368

2014-09-18 Thread Apache Jenkins Server
See 



git commit: Custom tracing annotations PHOENIX-1196

2014-09-18 Thread elilevine
Repository: phoenix
Updated Branches:
  refs/heads/master 797af91a6 -> f4ef42d69


Custom tracing annotations PHOENIX-1196


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

Branch: refs/heads/master
Commit: f4ef42d6902b8edf8aa88dd81756300f6071d34d
Parents: 797af91
Author: Eli Levine 
Authored: Thu Sep 18 20:31:19 2014 -0700
Committer: Eli Levine 
Committed: Thu Sep 18 20:32:13 2014 -0700

--
 .../apache/phoenix/trace/BaseTracingTestIT.java | 16 -
 .../phoenix/trace/PhoenixTracingEndToEndIT.java | 61 
 .../apache/phoenix/jdbc/PhoenixConnection.java  | 22 +++
 .../org/apache/phoenix/trace/util/Tracing.java  | 21 +++
 .../java/org/apache/phoenix/util/JDBCUtil.java  | 45 ++-
 .../org/apache/phoenix/util/PhoenixRuntime.java |  7 +++
 .../org/apache/phoenix/util/JDBCUtilTest.java   | 59 +++
 7 files changed, 228 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f4ef42d6/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
index 1f4990b..92b2250 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
@@ -17,11 +17,14 @@
  */
 package org.apache.phoenix.trace;
 
+import static org.apache.phoenix.util.PhoenixRuntime.ANNOTATION_ATTRIB_PREFIX;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Map;
 import java.util.Properties;
 
 import org.apache.commons.logging.Log;
@@ -36,6 +39,7 @@ import org.apache.phoenix.query.QueryServicesOptions;
 import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.trace.util.Tracing;
 import org.apache.phoenix.trace.util.Tracing.Frequency;
+import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.Before;
 
@@ -86,9 +90,19 @@ public class BaseTracingTestIT extends 
BaseHBaseManagedTimeIT {
 conn.setAutoCommit(false);
 return conn;
 }
+
+public static Connection getTracingConnection() throws Exception { 
+   return getTracingConnection(Collections.emptyMap(), 
null);
+}
 
-public static Connection getTracingConnection() throws Exception {
+public static Connection getTracingConnection(Map 
customAnnotations, String tenantId) throws Exception {
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+for (Map.Entry annot : customAnnotations.entrySet()) {
+   props.put(ANNOTATION_ATTRIB_PREFIX + annot.getKey(), 
annot.getValue());
+}
+if (tenantId != null) {
+   props.put(PhoenixRuntime.TENANT_ID_ATTRIB, tenantId);
+}
 return getConnectionWithTracingFrequency(props, 
Tracing.Frequency.ALWAYS);
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f4ef42d6/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTracingEndToEndIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTracingEndToEndIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTracingEndToEndIT.java
index 6742f9e..0fc80ed 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTracingEndToEndIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTracingEndToEndIT.java
@@ -17,6 +17,7 @@
  */
 package org.apache.phoenix.trace;
 
+import static org.apache.phoenix.util.PhoenixRuntime.TENANT_ID_ATTRIB;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -49,6 +50,8 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 
+import com.google.common.collect.ImmutableMap;
+
 /**
  * Test that the logging sink stores the expected metrics/stats
  */
@@ -353,7 +356,65 @@ public class PhoenixTracingEndToEndIT extends 
BaseTracingTestIT {
 });
 assertTrue("Didn't find the parallel scanner in the tracing", found);
 }
+
+@Test
+public void testCustomAnnotationTracing() throws Exception {
+   final String customAnnotationKey = "myannot";
+   final String customAnnotationValue = "a1";
+   fina

Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-09-18 Thread Apache Jenkins Server
4.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] Remove unused local variable

[jtaylor] PHOENIX-1237 COALESCE Function - type of second parameter (Vaclav Loffelmann)



Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2014-09-18 Thread Apache Jenkins Server
3.0 branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf/phoenix.git

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

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

Changes
[jtaylor] Remove unused local variable

[jtaylor] PHOENIX-1237 COALESCE Function - type of second parameter (Vaclav Loffelmann)



Build failed in Jenkins: Phoenix | Master | Hadoop1 #367

2014-09-18 Thread Apache Jenkins Server
See 

Changes:

[jtaylor] Remove unused local variable

[jtaylor] PHOENIX-1237 COALESCE Function - type of second parameter (Vaclav 
Loffelmann)

--
[...truncated 23058 lines...]
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runners.Suite.runChild(Suite.java:127)
at org.junit.runners.Suite.runChild(Suite.java:26)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:113)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeLazy(JUnitCoreWrapper.java:94)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:58)
at 
org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:134)
at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Tests run: 2, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: -1,963,759.595 
sec <<< FAILURE! - in org.apache.phoenix.end2end.ReadIsolationLevelIT
org.apache.phoenix.end2end.ReadIsolationLevelIT  Time elapsed: -1,963,759.595 
sec  <<< ERROR!
java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.phoenix.query.BaseTest.initMiniCluster(BaseTest.java:488)
at org.apache.phoenix.query.BaseTest.setUpTestCluster(BaseTest.java:449)
at 
org.apache.phoenix.end2end.BaseClientManagedTimeIT.checkClusterInitialized(BaseClientManagedTimeIT.java:89)
at 
org.apache.phoenix.end2end.BaseClientManagedTimeIT.getUrl(BaseClientManagedTimeIT.java:59)
at 
org.apache.phoenix.end2end.BaseClientManagedTimeIT.doSetup(BaseClientManagedTimeIT.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runners.Suite.runChild(Suite.java:127)
at org.junit.runners.Suite.runChild(Suite.java:26)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:113)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeLazy(JUnitCoreWrapper.java:94)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:58)
at 
org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:134)
at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java

[1/2] git commit: Remove unused local variable

2014-09-18 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 486e28b58 -> 797af91a6


Remove unused local variable


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

Branch: refs/heads/master
Commit: bba2eeecf76c8b30cab0272273bd89a0de30e0e0
Parents: 486e28b
Author: James Taylor 
Authored: Thu Sep 18 15:38:31 2014 -0700
Committer: James Taylor 
Committed: Thu Sep 18 15:46:25 2014 -0700

--
 .../expression/function/RegexpSplitFunction.java| 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/bba2eeec/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
index 1a9e961..5dd70c4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
@@ -17,8 +17,10 @@
  */
 package org.apache.phoenix.expression.function;
 
-import com.google.common.base.Splitter;
-import com.google.common.collect.Lists;
+import java.io.DataInput;
+import java.io.IOException;
+import java.util.List;
+
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.phoenix.expression.Expression;
 import org.apache.phoenix.expression.LiteralExpression;
@@ -28,9 +30,8 @@ import org.apache.phoenix.schema.PhoenixArray;
 import org.apache.phoenix.schema.tuple.Tuple;
 import org.apache.phoenix.util.ByteUtil;
 
-import java.io.DataInput;
-import java.io.IOException;
-import java.util.List;
+import com.google.common.base.Splitter;
+import com.google.common.collect.Lists;
 
 /**
  * Function to split a string value into a {@code VARCHAR_ARRAY}.
@@ -50,7 +51,6 @@ public class RegexpSplitFunction extends ScalarFunction {
 
 public static final String NAME = "REGEXP_SPLIT";
 
-private ImmutableBytesWritable patternPtr = new ImmutableBytesWritable();
 private Splitter initializedSplitter = null;
 
 public RegexpSplitFunction() {}



[2/2] git commit: PHOENIX-1237 COALESCE Function - type of second parameter (Vaclav Loffelmann)

2014-09-18 Thread jamestaylor
PHOENIX-1237 COALESCE Function - type of second parameter (Vaclav Loffelmann)


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

Branch: refs/heads/master
Commit: 797af91a6b77e3cbea51ec94ba5a01762efa293c
Parents: bba2eee
Author: James Taylor 
Authored: Thu Sep 18 15:41:27 2014 -0700
Committer: James Taylor 
Committed: Thu Sep 18 15:46:29 2014 -0700

--
 .../end2end/ClientTimeArithmeticQueryIT.java|   2 +-
 .../phoenix/end2end/CoalesceFunctionIT.java | 273 ++-
 .../expression/function/CoalesceFunction.java   |  40 ++-
 3 files changed, 293 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/797af91a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
index 9be6fc1..98b233c 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
@@ -537,7 +537,7 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
 
 @Test
 public void testCoalesceFunction() throws Exception {
-String query = "SELECT entity_id FROM aTable WHERE a_integer > 0 and 
coalesce(X_DECIMAL,0.0) = 0.0";
+String query = "SELECT entity_id FROM aTable WHERE 
coalesce(X_DECIMAL,0.0) = 0.0";
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts 
+ 10)); // Execute at timestamp 2
 Connection conn = DriverManager.getConnection(getUrl(), props);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/797af91a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
index 48808ab..57599e6 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
@@ -19,6 +19,7 @@ package org.apache.phoenix.end2end;
 
 import static org.apache.phoenix.util.TestUtil.ROW6;
 import static org.apache.phoenix.util.TestUtil.ROW7;
+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;
@@ -27,37 +28,285 @@ import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
+import java.sql.SQLException;
 import java.util.Properties;
 
-import org.apache.phoenix.util.PhoenixRuntime;
+import org.apache.phoenix.schema.IllegalDataException;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.junit.Assert;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-@Category(ClientManagedTimeTest.class)
-public class CoalesceFunctionIT extends BaseClientManagedTimeIT {
+@Category(HBaseManagedTimeTest.class)
+public class CoalesceFunctionIT extends BaseHBaseManagedTimeIT {
+
 @Test
 public void testCoalesce() throws Exception {
-long ts = nextTimestamp();
 String tenantId = getOrganizationId();
-initATableValues(tenantId, getDefaultSplits(tenantId), null, ts);
-Properties props = new Properties();
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts 
+ 1)); // Execute at timestamp 1
+initATableValues(tenantId, getDefaultSplits(tenantId), getUrl());
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 Connection conn = DriverManager.getConnection(getUrl(), props);
 String query = "SELECT entity_id, a_integer + COALESCE(x_integer,1) 
FROM ATABLE WHERE organization_id = ? AND a_integer >= 6 AND a_integer <= 7";
 PreparedStatement statement = conn.prepareStatement(query);
 statement.setString(1, tenantId);
 ResultSet rs = statement.executeQuery();
-
-assertTrue (rs.next());
+
+assertTrue(rs.next());
 assertEquals(ROW6, rs.getString(1));
 assertEquals(7, rs.getInt(2));
-
-assertTrue (rs.next());
+
+assertTrue(rs.next());
 assertEquals(ROW7, 

[2/2] git commit: PHOENIX-1237 COALESCE Function - type of second parameter (Vaclav Loffelmann)

2014-09-18 Thread jamestaylor
PHOENIX-1237 COALESCE Function - type of second parameter (Vaclav Loffelmann)


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

Branch: refs/heads/4.0
Commit: c84b5f9251160a4a28267b2e6cb3b3cf5ac93442
Parents: 1280ad4
Author: James Taylor 
Authored: Thu Sep 18 15:41:27 2014 -0700
Committer: James Taylor 
Committed: Thu Sep 18 15:44:09 2014 -0700

--
 .../end2end/ClientTimeArithmeticQueryIT.java|   2 +-
 .../phoenix/end2end/CoalesceFunctionIT.java | 273 ++-
 .../expression/function/CoalesceFunction.java   |  40 ++-
 3 files changed, 293 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c84b5f92/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
index 9be6fc1..98b233c 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
@@ -537,7 +537,7 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
 
 @Test
 public void testCoalesceFunction() throws Exception {
-String query = "SELECT entity_id FROM aTable WHERE a_integer > 0 and 
coalesce(X_DECIMAL,0.0) = 0.0";
+String query = "SELECT entity_id FROM aTable WHERE 
coalesce(X_DECIMAL,0.0) = 0.0";
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts 
+ 10)); // Execute at timestamp 2
 Connection conn = DriverManager.getConnection(getUrl(), props);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c84b5f92/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
index 48808ab..57599e6 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
@@ -19,6 +19,7 @@ package org.apache.phoenix.end2end;
 
 import static org.apache.phoenix.util.TestUtil.ROW6;
 import static org.apache.phoenix.util.TestUtil.ROW7;
+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;
@@ -27,37 +28,285 @@ import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
+import java.sql.SQLException;
 import java.util.Properties;
 
-import org.apache.phoenix.util.PhoenixRuntime;
+import org.apache.phoenix.schema.IllegalDataException;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.junit.Assert;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-@Category(ClientManagedTimeTest.class)
-public class CoalesceFunctionIT extends BaseClientManagedTimeIT {
+@Category(HBaseManagedTimeTest.class)
+public class CoalesceFunctionIT extends BaseHBaseManagedTimeIT {
+
 @Test
 public void testCoalesce() throws Exception {
-long ts = nextTimestamp();
 String tenantId = getOrganizationId();
-initATableValues(tenantId, getDefaultSplits(tenantId), null, ts);
-Properties props = new Properties();
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts 
+ 1)); // Execute at timestamp 1
+initATableValues(tenantId, getDefaultSplits(tenantId), getUrl());
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 Connection conn = DriverManager.getConnection(getUrl(), props);
 String query = "SELECT entity_id, a_integer + COALESCE(x_integer,1) 
FROM ATABLE WHERE organization_id = ? AND a_integer >= 6 AND a_integer <= 7";
 PreparedStatement statement = conn.prepareStatement(query);
 statement.setString(1, tenantId);
 ResultSet rs = statement.executeQuery();
-
-assertTrue (rs.next());
+
+assertTrue(rs.next());
 assertEquals(ROW6, rs.getString(1));
 assertEquals(7, rs.getInt(2));
-
-assertTrue (rs.next());
+
+assertTrue(rs.next());
 assertEquals(ROW7, rs.

[1/2] git commit: Remove unused local variable

2014-09-18 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 e174793e9 -> c84b5f925


Remove unused local variable


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

Branch: refs/heads/4.0
Commit: 1280ad439b04d1d9756035e13ef3119ac80827c7
Parents: e174793
Author: James Taylor 
Authored: Thu Sep 18 15:38:31 2014 -0700
Committer: James Taylor 
Committed: Thu Sep 18 15:43:43 2014 -0700

--
 .../expression/function/RegexpSplitFunction.java| 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1280ad43/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
index 1a9e961..5dd70c4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
@@ -17,8 +17,10 @@
  */
 package org.apache.phoenix.expression.function;
 
-import com.google.common.base.Splitter;
-import com.google.common.collect.Lists;
+import java.io.DataInput;
+import java.io.IOException;
+import java.util.List;
+
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.phoenix.expression.Expression;
 import org.apache.phoenix.expression.LiteralExpression;
@@ -28,9 +30,8 @@ import org.apache.phoenix.schema.PhoenixArray;
 import org.apache.phoenix.schema.tuple.Tuple;
 import org.apache.phoenix.util.ByteUtil;
 
-import java.io.DataInput;
-import java.io.IOException;
-import java.util.List;
+import com.google.common.base.Splitter;
+import com.google.common.collect.Lists;
 
 /**
  * Function to split a string value into a {@code VARCHAR_ARRAY}.
@@ -50,7 +51,6 @@ public class RegexpSplitFunction extends ScalarFunction {
 
 public static final String NAME = "REGEXP_SPLIT";
 
-private ImmutableBytesWritable patternPtr = new ImmutableBytesWritable();
 private Splitter initializedSplitter = null;
 
 public RegexpSplitFunction() {}



git commit: PHOENIX-1237 COALESCE Function - type of second parameter (Vaclav Loffelmann)

2014-09-18 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 f6f4fca0e -> 7829f0e5a


PHOENIX-1237 COALESCE Function - type of second parameter (Vaclav Loffelmann)


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

Branch: refs/heads/3.0
Commit: 7829f0e5a12dcd2bd36eb0d9042a68167d940551
Parents: f6f4fca
Author: James Taylor 
Authored: Thu Sep 18 15:41:27 2014 -0700
Committer: James Taylor 
Committed: Thu Sep 18 15:41:27 2014 -0700

--
 .../end2end/ClientTimeArithmeticQueryIT.java|   2 +-
 .../phoenix/end2end/CoalesceFunctionIT.java | 273 ++-
 .../expression/function/CoalesceFunction.java   |  40 ++-
 3 files changed, 293 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7829f0e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
index 9be6fc1..98b233c 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
@@ -537,7 +537,7 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
 
 @Test
 public void testCoalesceFunction() throws Exception {
-String query = "SELECT entity_id FROM aTable WHERE a_integer > 0 and 
coalesce(X_DECIMAL,0.0) = 0.0";
+String query = "SELECT entity_id FROM aTable WHERE 
coalesce(X_DECIMAL,0.0) = 0.0";
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts 
+ 10)); // Execute at timestamp 2
 Connection conn = DriverManager.getConnection(getUrl(), props);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7829f0e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
index 48808ab..57599e6 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
@@ -19,6 +19,7 @@ package org.apache.phoenix.end2end;
 
 import static org.apache.phoenix.util.TestUtil.ROW6;
 import static org.apache.phoenix.util.TestUtil.ROW7;
+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;
@@ -27,37 +28,285 @@ import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
+import java.sql.SQLException;
 import java.util.Properties;
 
-import org.apache.phoenix.util.PhoenixRuntime;
+import org.apache.phoenix.schema.IllegalDataException;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.junit.Assert;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-@Category(ClientManagedTimeTest.class)
-public class CoalesceFunctionIT extends BaseClientManagedTimeIT {
+@Category(HBaseManagedTimeTest.class)
+public class CoalesceFunctionIT extends BaseHBaseManagedTimeIT {
+
 @Test
 public void testCoalesce() throws Exception {
-long ts = nextTimestamp();
 String tenantId = getOrganizationId();
-initATableValues(tenantId, getDefaultSplits(tenantId), null, ts);
-Properties props = new Properties();
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts 
+ 1)); // Execute at timestamp 1
+initATableValues(tenantId, getDefaultSplits(tenantId), getUrl());
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 Connection conn = DriverManager.getConnection(getUrl(), props);
 String query = "SELECT entity_id, a_integer + COALESCE(x_integer,1) 
FROM ATABLE WHERE organization_id = ? AND a_integer >= 6 AND a_integer <= 7";
 PreparedStatement statement = conn.prepareStatement(query);
 statement.setString(1, tenantId);
 ResultSet rs = statement.executeQuery();
-
-assertTrue (rs.next());
+
+assertTrue(rs.next());
 assertEquals(ROW6, rs.getString(1));
 assertEquals(7, rs.getInt(2));
-
-assertTru

git commit: Remove unused local variable

2014-09-18 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 963ea0f91 -> f6f4fca0e


Remove unused local variable


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

Branch: refs/heads/3.0
Commit: f6f4fca0e6af874493861a5a5215ccde69b693fb
Parents: 963ea0f
Author: James Taylor 
Authored: Thu Sep 18 15:38:31 2014 -0700
Committer: James Taylor 
Committed: Thu Sep 18 15:38:31 2014 -0700

--
 .../expression/function/RegexpSplitFunction.java| 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f6f4fca0/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
index 1a9e961..5dd70c4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/RegexpSplitFunction.java
@@ -17,8 +17,10 @@
  */
 package org.apache.phoenix.expression.function;
 
-import com.google.common.base.Splitter;
-import com.google.common.collect.Lists;
+import java.io.DataInput;
+import java.io.IOException;
+import java.util.List;
+
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.phoenix.expression.Expression;
 import org.apache.phoenix.expression.LiteralExpression;
@@ -28,9 +30,8 @@ import org.apache.phoenix.schema.PhoenixArray;
 import org.apache.phoenix.schema.tuple.Tuple;
 import org.apache.phoenix.util.ByteUtil;
 
-import java.io.DataInput;
-import java.io.IOException;
-import java.util.List;
+import com.google.common.base.Splitter;
+import com.google.common.collect.Lists;
 
 /**
  * Function to split a string value into a {@code VARCHAR_ARRAY}.
@@ -50,7 +51,6 @@ public class RegexpSplitFunction extends ScalarFunction {
 
 public static final String NAME = "REGEXP_SPLIT";
 
-private ImmutableBytesWritable patternPtr = new ImmutableBytesWritable();
 private Splitter initializedSplitter = null;
 
 public RegexpSplitFunction() {}



Jenkins build is back to normal : Phoenix | 4.0 | Hadoop2 #136

2014-09-18 Thread Apache Jenkins Server
See