[43/50] [abbrv] phoenix git commit: PHOENIX-2696 Delete stale stats for a region if in later run no guidePosts found for that region(Ankit Singhal)

2016-02-24 Thread maryannxue
PHOENIX-2696 Delete stale stats for a region if in later run no guidePosts 
found for that region(Ankit Singhal)


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

Branch: refs/heads/calcite
Commit: 9dd6babd86186242b55d01afcb857aa02497ea95
Parents: c2cc1be
Author: Ankit Singhal 
Authored: Fri Feb 19 22:28:07 2016 +0530
Committer: Ankit Singhal 
Committed: Fri Feb 19 22:28:07 2016 +0530

--
 .../phoenix/schema/stats/DefaultStatisticsCollector.java | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9dd6babd/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
index 96b35f1..cb6f5d4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
@@ -126,6 +126,14 @@ class DefaultStatisticsCollector implements 
StatisticsCollector {
 throws IOException {
 try {
 // update the statistics table
+// Delete statistics for a region if no guidepost is collected for 
that region during UPDATE STATISTICS
+// This will not impact a stats collection of single column family 
during compaction as
+// guidePostsInfoWriterMap cannot be empty in this case.
+if (guidePostsInfoWriterMap.keySet().isEmpty()) {
+for (Store store : region.getStores()) {
+statsTable.deleteStats(region, this, new 
ImmutableBytesPtr(store.getFamily().getName()), mutations);
+}
+}
 for (ImmutableBytesPtr fam : guidePostsInfoWriterMap.keySet()) {
 if (delete) {
 if (logger.isDebugEnabled()) {



phoenix git commit: PHOENIX-2696 Delete stale stats for a region if in later run no guidePosts found for that region(Ankit Singhal)

2016-02-19 Thread ankit
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 508751847 -> eac2ba7e7


PHOENIX-2696 Delete stale stats for a region if in later run no guidePosts 
found for that region(Ankit Singhal)


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

Branch: refs/heads/4.x-HBase-0.98
Commit: eac2ba7e770cfd0bec9d4f1a2e5e08bf7a3aa171
Parents: 5087518
Author: Ankit Singhal 
Authored: Fri Feb 19 22:29:43 2016 +0530
Committer: Ankit Singhal 
Committed: Fri Feb 19 22:29:43 2016 +0530

--
 .../phoenix/schema/stats/DefaultStatisticsCollector.java | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/eac2ba7e/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
index e7ba443..c56c102 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
@@ -124,6 +124,14 @@ public class DefaultStatisticsCollector implements 
StatisticsCollector {
 throws IOException {
 try {
 // update the statistics table
+// Delete statistics for a region if no guidepost is collected for 
that region during UPDATE STATISTICS
+// This will not impact a stats collection of single column family 
during compaction as
+// guidePostsInfoWriterMap cannot be empty in this case.
+if (guidePostsInfoWriterMap.keySet().isEmpty()) {
+for (Store store : region.getStores()) {
+statsTable.deleteStats(region, this, new 
ImmutableBytesPtr(store.getFamily().getName()), mutations);
+}
+}
 for (ImmutableBytesPtr fam : guidePostsInfoWriterMap.keySet()) {
 if (delete) {
 if (logger.isDebugEnabled()) {



phoenix git commit: PHOENIX-2696 Delete stale stats for a region if in later run no guidePosts found for that region(Ankit Singhal)

2016-02-19 Thread ankit
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.0 f88b76662 -> 918990971


PHOENIX-2696 Delete stale stats for a region if in later run no guidePosts 
found for that region(Ankit Singhal)


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

Branch: refs/heads/4.x-HBase-1.0
Commit: 918990971d321ed70b37f74cb8e7b4844f427841
Parents: f88b766
Author: Ankit Singhal 
Authored: Fri Feb 19 22:28:56 2016 +0530
Committer: Ankit Singhal 
Committed: Fri Feb 19 22:28:56 2016 +0530

--
 .../phoenix/schema/stats/DefaultStatisticsCollector.java | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/91899097/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
index 38e1ca5..ce6e7db 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
@@ -125,6 +125,14 @@ class DefaultStatisticsCollector implements 
StatisticsCollector {
 throws IOException {
 try {
 // update the statistics table
+// Delete statistics for a region if no guidepost is collected for 
that region during UPDATE STATISTICS
+// This will not impact a stats collection of single column family 
during compaction as
+// guidePostsInfoWriterMap cannot be empty in this case.
+if (guidePostsInfoWriterMap.keySet().isEmpty()) {
+for (Store store : region.getStores()) {
+statsTable.deleteStats(region, this, new 
ImmutableBytesPtr(store.getFamily().getName()), mutations);
+}
+}
 for (ImmutableBytesPtr fam : guidePostsInfoWriterMap.keySet()) {
 if (delete) {
 if (logger.isDebugEnabled()) {



phoenix git commit: PHOENIX-2696 Delete stale stats for a region if in later run no guidePosts found for that region(Ankit Singhal)

2016-02-19 Thread ankit
Repository: phoenix
Updated Branches:
  refs/heads/master c2cc1be60 -> 9dd6babd8


PHOENIX-2696 Delete stale stats for a region if in later run no guidePosts 
found for that region(Ankit Singhal)


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

Branch: refs/heads/master
Commit: 9dd6babd86186242b55d01afcb857aa02497ea95
Parents: c2cc1be
Author: Ankit Singhal 
Authored: Fri Feb 19 22:28:07 2016 +0530
Committer: Ankit Singhal 
Committed: Fri Feb 19 22:28:07 2016 +0530

--
 .../phoenix/schema/stats/DefaultStatisticsCollector.java | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9dd6babd/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
index 96b35f1..cb6f5d4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/DefaultStatisticsCollector.java
@@ -126,6 +126,14 @@ class DefaultStatisticsCollector implements 
StatisticsCollector {
 throws IOException {
 try {
 // update the statistics table
+// Delete statistics for a region if no guidepost is collected for 
that region during UPDATE STATISTICS
+// This will not impact a stats collection of single column family 
during compaction as
+// guidePostsInfoWriterMap cannot be empty in this case.
+if (guidePostsInfoWriterMap.keySet().isEmpty()) {
+for (Store store : region.getStores()) {
+statsTable.deleteStats(region, this, new 
ImmutableBytesPtr(store.getFamily().getName()), mutations);
+}
+}
 for (ImmutableBytesPtr fam : guidePostsInfoWriterMap.keySet()) {
 if (delete) {
 if (logger.isDebugEnabled()) {