Apache-Phoenix | 4.0 | Build Successful

2014-12-30 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/lastSuccessfulBuild/artifact/

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

Changes
[jtaylor] PHOENIX-1511 Invalidate stats row even if not running stats due to phoenix.stats.minUpdateFrequency



Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2014-12-30 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] PHOENIX-1511 Invalidate stats row even if not running stats due to phoenix.stats.minUpdateFrequency



Apache-Phoenix | Master | Build Successful

2014-12-30 Thread Apache Jenkins Server
Master 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-master/lastSuccessfulBuild/artifact/

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

Changes
[jtaylor] PHOENIX-1511 Invalidate stats row even if not running stats due to phoenix.stats.minUpdateFrequency



phoenix git commit: PHOENIX-1511 Invalidate stats row even if not running stats due to phoenix.stats.minUpdateFrequency

2014-12-30 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 6f720a6e8 -> bf064b7c3


PHOENIX-1511 Invalidate stats row even if not running stats due to 
phoenix.stats.minUpdateFrequency

Conflicts:
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java


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

Branch: refs/heads/3.0
Commit: bf064b7c3767f199f3e3b4462dc30579aa7a0a6c
Parents: 6f720a6
Author: James Taylor 
Authored: Tue Dec 30 10:51:48 2014 -0800
Committer: James Taylor 
Committed: Tue Dec 30 11:08:53 2014 -0800

--
 .../phoenix/end2end/StatsCollectorIT.java   | 60 
 .../apache/phoenix/schema/MetaDataClient.java   | 33 ++-
 2 files changed, 66 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/bf064b7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
index 39d5bd4..0a56caa 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
@@ -21,6 +21,7 @@ import static 
org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.apache.phoenix.util.TestUtil.getAllSplits;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -43,6 +44,7 @@ import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.ConnectionQueryServices;
 import org.apache.phoenix.query.KeyRange;
 import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.query.QueryServicesOptions;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.QueryUtil;
 import org.apache.phoenix.util.ReadOnlyProps;
@@ -230,28 +232,39 @@ public class StatsCollectorIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 return stmt;
 }
 
-private void compactTable(Connection conn) throws IOException, 
InterruptedException, SQLException {
+private void compactTable(Connection conn, String tableName) throws 
IOException, InterruptedException, SQLException {
 ConnectionQueryServices services = 
conn.unwrap(PhoenixConnection.class).getQueryServices();
 HBaseAdmin admin = services.getAdmin();
 try {
-admin.flush(STATS_TEST_TABLE_NAME);
-admin.majorCompact(STATS_TEST_TABLE_NAME);
+admin.flush(tableName);
+admin.majorCompact(tableName);
 Thread.sleep(1); // FIXME: how do we know when compaction is 
done?
 } finally {
 admin.close();
 }
-services.clearCache();
 }
 
 @Test
 public void testCompactUpdatesStats() throws Exception {
+testCompactUpdatesStats(null, STATS_TEST_TABLE_NAME + 1);
+}
+
+@Test
+public void testCompactUpdatesStatsWithMinStatsUpdateFreq() throws 
Exception {
+
testCompactUpdatesStats(QueryServicesOptions.DEFAULT_STATS_UPDATE_FREQ_MS, 
STATS_TEST_TABLE_NAME + 2);
+}
+
+private void testCompactUpdatesStats(Integer minStatsUpdateFreq, String 
tableName) throws Exception {
 int nRows = 10;
 Connection conn;
 PreparedStatement stmt;
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+if (minStatsUpdateFreq != null) {
+props.setProperty(QueryServices.MIN_STATS_UPDATE_FREQ_MS_ATTRIB, 
minStatsUpdateFreq.toString());
+}
 conn = DriverManager.getConnection(getUrl(), props);
-conn.createStatement().execute("CREATE TABLE " + STATS_TEST_TABLE_NAME 
+ "(k CHAR(1) PRIMARY KEY, v INTEGER) " + HColumnDescriptor.KEEP_DELETED_CELLS 
+ "=" + Boolean.FALSE);
-stmt = conn.prepareStatement("UPSERT INTO " + STATS_TEST_TABLE_NAME + 
" VALUES(?,?)");
+conn.createStatement().execute("CREATE TABLE " + tableName + "(k 
CHAR(1) PRIMARY KEY, v INTEGER) " + HColumnDescriptor.KEEP_DELETED_CELLS + "=" 
+ Boolean.FALSE);
+stmt = conn.prepareStatement("UPSERT INTO " + tableName + " 
VALUES(?,?)");
 for (int i = 0; i < nRows; i++) {
 stmt.setString(1, Character.toString((char) ('a' + i)));
 stmt.setInt(2, i);
@@ -259,18 +272,41 @@ public class StatsCollectorIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 }
   

phoenix git commit: PHOENIX-1511 Invalidate stats row even if not running stats due to phoenix.stats.minUpdateFrequency

2014-12-30 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 6cb5e2cab -> 1a5c52683


PHOENIX-1511 Invalidate stats row even if not running stats due to 
phoenix.stats.minUpdateFrequency


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

Branch: refs/heads/4.0
Commit: 1a5c52683cbfe27e25298179245e24125efd7cf9
Parents: 6cb5e2c
Author: James Taylor 
Authored: Tue Dec 30 10:51:48 2014 -0800
Committer: James Taylor 
Committed: Tue Dec 30 10:53:06 2014 -0800

--
 .../phoenix/end2end/StatsCollectorIT.java   | 60 
 .../apache/phoenix/schema/MetaDataClient.java   | 33 ++-
 2 files changed, 66 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1a5c5268/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
index ca8ab81..8b3bdee 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
@@ -21,6 +21,7 @@ import static 
org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.apache.phoenix.util.TestUtil.getAllSplits;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -43,6 +44,7 @@ import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.ConnectionQueryServices;
 import org.apache.phoenix.query.KeyRange;
 import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.query.QueryServicesOptions;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.QueryUtil;
 import org.apache.phoenix.util.ReadOnlyProps;
@@ -228,28 +230,39 @@ public class StatsCollectorIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 return stmt;
 }
 
-private void compactTable(Connection conn) throws IOException, 
InterruptedException, SQLException {
+private void compactTable(Connection conn, String tableName) throws 
IOException, InterruptedException, SQLException {
 ConnectionQueryServices services = 
conn.unwrap(PhoenixConnection.class).getQueryServices();
 HBaseAdmin admin = services.getAdmin();
 try {
-admin.flush(STATS_TEST_TABLE_NAME);
-admin.majorCompact(STATS_TEST_TABLE_NAME);
+admin.flush(tableName);
+admin.majorCompact(tableName);
 Thread.sleep(1); // FIXME: how do we know when compaction is 
done?
 } finally {
 admin.close();
 }
-services.clearCache();
 }
 
 @Test
 public void testCompactUpdatesStats() throws Exception {
+testCompactUpdatesStats(null, STATS_TEST_TABLE_NAME + 1);
+}
+
+@Test
+public void testCompactUpdatesStatsWithMinStatsUpdateFreq() throws 
Exception {
+
testCompactUpdatesStats(QueryServicesOptions.DEFAULT_STATS_UPDATE_FREQ_MS, 
STATS_TEST_TABLE_NAME + 2);
+}
+
+private void testCompactUpdatesStats(Integer minStatsUpdateFreq, String 
tableName) throws Exception {
 int nRows = 10;
 Connection conn;
 PreparedStatement stmt;
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+if (minStatsUpdateFreq != null) {
+props.setProperty(QueryServices.MIN_STATS_UPDATE_FREQ_MS_ATTRIB, 
minStatsUpdateFreq.toString());
+}
 conn = DriverManager.getConnection(getUrl(), props);
-conn.createStatement().execute("CREATE TABLE " + STATS_TEST_TABLE_NAME 
+ "(k CHAR(1) PRIMARY KEY, v INTEGER) " + HColumnDescriptor.KEEP_DELETED_CELLS 
+ "=" + Boolean.FALSE);
-stmt = conn.prepareStatement("UPSERT INTO " + STATS_TEST_TABLE_NAME + 
" VALUES(?,?)");
+conn.createStatement().execute("CREATE TABLE " + tableName + "(k 
CHAR(1) PRIMARY KEY, v INTEGER) " + HColumnDescriptor.KEEP_DELETED_CELLS + "=" 
+ Boolean.FALSE);
+stmt = conn.prepareStatement("UPSERT INTO " + tableName + " 
VALUES(?,?)");
 for (int i = 0; i < nRows; i++) {
 stmt.setString(1, Character.toString((char) ('a' + i)));
 stmt.setInt(2, i);
@@ -257,18 +270,41 @@ public class StatsCollectorIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 }
 conn.commit();
 
-compactTable(conn);
-conn = DriverManager.get

phoenix git commit: PHOENIX-1511 Invalidate stats row even if not running stats due to phoenix.stats.minUpdateFrequency

2014-12-30 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master d6a4caf5c -> 9fc37c7cd


PHOENIX-1511 Invalidate stats row even if not running stats due to 
phoenix.stats.minUpdateFrequency


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

Branch: refs/heads/master
Commit: 9fc37c7cd0ce7c5fd0b133bf43bd7024d6d7
Parents: d6a4caf
Author: James Taylor 
Authored: Tue Dec 30 10:51:48 2014 -0800
Committer: James Taylor 
Committed: Tue Dec 30 10:51:48 2014 -0800

--
 .../phoenix/end2end/StatsCollectorIT.java   | 60 
 .../apache/phoenix/schema/MetaDataClient.java   | 33 ++-
 2 files changed, 66 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9fc37c7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
index ca8ab81..8b3bdee 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
@@ -21,6 +21,7 @@ import static 
org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.apache.phoenix.util.TestUtil.getAllSplits;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -43,6 +44,7 @@ import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.ConnectionQueryServices;
 import org.apache.phoenix.query.KeyRange;
 import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.query.QueryServicesOptions;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.QueryUtil;
 import org.apache.phoenix.util.ReadOnlyProps;
@@ -228,28 +230,39 @@ public class StatsCollectorIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 return stmt;
 }
 
-private void compactTable(Connection conn) throws IOException, 
InterruptedException, SQLException {
+private void compactTable(Connection conn, String tableName) throws 
IOException, InterruptedException, SQLException {
 ConnectionQueryServices services = 
conn.unwrap(PhoenixConnection.class).getQueryServices();
 HBaseAdmin admin = services.getAdmin();
 try {
-admin.flush(STATS_TEST_TABLE_NAME);
-admin.majorCompact(STATS_TEST_TABLE_NAME);
+admin.flush(tableName);
+admin.majorCompact(tableName);
 Thread.sleep(1); // FIXME: how do we know when compaction is 
done?
 } finally {
 admin.close();
 }
-services.clearCache();
 }
 
 @Test
 public void testCompactUpdatesStats() throws Exception {
+testCompactUpdatesStats(null, STATS_TEST_TABLE_NAME + 1);
+}
+
+@Test
+public void testCompactUpdatesStatsWithMinStatsUpdateFreq() throws 
Exception {
+
testCompactUpdatesStats(QueryServicesOptions.DEFAULT_STATS_UPDATE_FREQ_MS, 
STATS_TEST_TABLE_NAME + 2);
+}
+
+private void testCompactUpdatesStats(Integer minStatsUpdateFreq, String 
tableName) throws Exception {
 int nRows = 10;
 Connection conn;
 PreparedStatement stmt;
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+if (minStatsUpdateFreq != null) {
+props.setProperty(QueryServices.MIN_STATS_UPDATE_FREQ_MS_ATTRIB, 
minStatsUpdateFreq.toString());
+}
 conn = DriverManager.getConnection(getUrl(), props);
-conn.createStatement().execute("CREATE TABLE " + STATS_TEST_TABLE_NAME 
+ "(k CHAR(1) PRIMARY KEY, v INTEGER) " + HColumnDescriptor.KEEP_DELETED_CELLS 
+ "=" + Boolean.FALSE);
-stmt = conn.prepareStatement("UPSERT INTO " + STATS_TEST_TABLE_NAME + 
" VALUES(?,?)");
+conn.createStatement().execute("CREATE TABLE " + tableName + "(k 
CHAR(1) PRIMARY KEY, v INTEGER) " + HColumnDescriptor.KEEP_DELETED_CELLS + "=" 
+ Boolean.FALSE);
+stmt = conn.prepareStatement("UPSERT INTO " + tableName + " 
VALUES(?,?)");
 for (int i = 0; i < nRows; i++) {
 stmt.setString(1, Character.toString((char) ('a' + i)));
 stmt.setInt(2, i);
@@ -257,18 +270,41 @@ public class StatsCollectorIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 }
 conn.commit();
 
-compactTable(conn);
-conn = DriverManag