Jenkins build is back to normal : Phoenix | Master #507

2014-12-01 Thread Apache Jenkins Server
See 



Jenkins build is back to normal : Phoenix | 3.0 | Hadoop1 #327

2014-12-01 Thread Apache Jenkins Server
See 



Jenkins build is back to normal : Phoenix | 4.0 #478

2014-12-01 Thread Apache Jenkins Server
See 



[3/3] phoenix git commit: Revert "PHOENIX-1496 Further reduce work in StatsCollector."

2014-12-01 Thread larsh
Revert "PHOENIX-1496 Further reduce work in StatsCollector."

This reverts commit 3fa1ddccf782e8b708c3d1f13d7046fd8b511dce.


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

Branch: refs/heads/master
Commit: a180860250058c8f0fd3afa9807530ccddaaeb32
Parents: 3fa1ddc
Author: Lars Hofhansl 
Authored: Mon Dec 1 21:54:57 2014 -0800
Committer: Lars Hofhansl 
Committed: Mon Dec 1 21:54:57 2014 -0800

--
 .../UngroupedAggregateRegionObserver.java   |  4 +--
 .../schema/stats/StatisticsCollector.java   | 36 +---
 2 files changed, 10 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a1808602/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
index ff05dad..e0ff5b3 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
@@ -466,9 +466,7 @@ public class UngroupedAggregateRegionObserver extends 
BaseScannerRegionObserver{
 // when background tasks are updating stats. Instead we track 
the max timestamp of
 // the cells and use that.
 long clientTimeStamp = useCurrentTime ? 
TimeKeeper.SYSTEM.getCurrentTime() : StatisticsCollector.NO_TIMESTAMP;
-StatisticsCollector stats = new StatisticsCollector(
-c.getEnvironment(), table.getNameAsString(),
-clientTimeStamp, store.getFamily().getName());
+StatisticsCollector stats = new 
StatisticsCollector(c.getEnvironment(), table.getNameAsString(), 
clientTimeStamp);
 internalScanner = 
stats.createCompactionScanner(c.getEnvironment().getRegion(), store, scanner);
 } catch (IOException e) {
 // If we can't reach the stats table, don't interrupt the 
normal

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a1808602/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 619684a..4123ebe 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
@@ -65,13 +65,8 @@ public class StatisticsCollector {
 // Tracks the bytecount per family if it has reached the guidePostsDepth
 private Map familyMap = Maps.newHashMap();
 protected StatisticsWriter statsTable;
-private Pair cachedGps = null;
 
 public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp) throws IOException {
-this(env, tableName, clientTimeStamp, null);
-}
-
-public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp, byte[] family) throws IOException {
 Configuration config = env.getConfiguration();
 int guidepostPerRegion = 
config.getInt(QueryServices.STATS_GUIDEPOST_PER_REGION_ATTRIB, 
 QueryServicesOptions.DEFAULT_STATS_GUIDEPOST_PER_REGION);
@@ -81,14 +76,6 @@ public class StatisticsCollector {
 // Get the stats table associated with the current table on which the 
CP is
 // triggered
 this.statsTable = StatisticsWriter.newWriter(env, tableName, 
clientTimeStamp);
-// in a compaction we know the one family ahead of time
-// pre-populate familyMap and guidePostsMap here
-if (family != null) {
-ImmutableBytesPtr cfKey = new ImmutableBytesPtr(family, 0, 
family.length);
-familyMap.put(cfKey, true);
-cachedGps = new Pair(0L,new GuidePostsInfo(0, 
Collections.emptyList()));
-guidePostsMap.put(cfKey, cachedGps);
-}
 }
 
 public long getMaxTimeStamp() {
@@ -205,22 +192,17 @@ public class StatisticsCollector {
 maxTimeStamp = Math.max(maxTimeStamp, timestamp);
 }
 
+@SuppressWarnings("deprecation")
 public void updateStatistic(KeyValue kv) {
+ImmutableBytesPtr cfKey

[1/3] phoenix git commit: Revert "PHOENIX-1496 Further reduce work in StatsCollector."

2014-12-01 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/3.0 c1da4c9f2 -> 4f9a71d79
  refs/heads/4.0 198d749df -> db06f21df
  refs/heads/master 3fa1ddccf -> a18086025


Revert "PHOENIX-1496 Further reduce work in StatsCollector."

This reverts commit c1da4c9f2f3a3838554723cdb3eb91d23962b42f.


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

Branch: refs/heads/3.0
Commit: 4f9a71d792475b4f01acd19e68c761cb1d2ee770
Parents: c1da4c9
Author: Lars Hofhansl 
Authored: Mon Dec 1 21:53:55 2014 -0800
Committer: Lars Hofhansl 
Committed: Mon Dec 1 21:53:55 2014 -0800

--
 .../UngroupedAggregateRegionObserver.java   |  4 +--
 .../schema/stats/StatisticsCollector.java   | 38 ++--
 2 files changed, 11 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4f9a71d7/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
index d561f30..4cf816a 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
@@ -438,9 +438,7 @@ public class UngroupedAggregateRegionObserver extends 
BaseScannerRegionObserver
 // when background tasks are updating stats. Instead we track 
the max timestamp of
 // the cells and use that.
 long clientTimeStamp = useCurrentTime ? 
TimeKeeper.SYSTEM.getCurrentTime() : StatisticsCollector.NO_TIMESTAMP;
-StatisticsCollector stats = new StatisticsCollector(
-c.getEnvironment(), table,
-clientTimeStamp, store.getFamily().getName());
+StatisticsCollector stats = new 
StatisticsCollector(c.getEnvironment(), table, clientTimeStamp);
 internalScanner = 
stats.createCompactionScanner(c.getEnvironment().getRegion(), store, scanner);
 } catch (IOException e) {
 // If we can't reach the stats table, don't interrupt the 
normal

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4f9a71d7/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 258ef6d..7ad1d9b 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
@@ -54,13 +54,9 @@ public class StatisticsCollector {
 // Tracks the bytecount per family if it has reached the guidePostsDepth
 private Map familyMap = Maps.newHashMap();
 protected StatisticsWriter statsTable;
-private Pair cachedGps = null;
 
-public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp) throws IOException {
-this(env, tableName, clientTimeStamp, null);
-}
-
-public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp, byte[] family) throws IOException {
+public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp)
+throws IOException {
 Configuration config = env.getConfiguration();
 int guidepostPerRegion = 
config.getInt(QueryServices.STATS_GUIDEPOST_PER_REGION_ATTRIB, 
 QueryServicesOptions.DEFAULT_STATS_GUIDEPOST_PER_REGION);
@@ -70,14 +66,6 @@ public class StatisticsCollector {
 // Get the stats table associated with the current table on which the 
CP is
 // triggered
 this.statsTable = StatisticsWriter.newWriter(env, tableName, 
clientTimeStamp);
-// in a compaction we know the one family ahead of time
-// pre-populate familyMap and guidePostsMap here
-if (family != null) {
-ImmutableBytesPtr cfKey = new ImmutableBytesPtr(family, 0, 
family.length);
-familyMap.put(cfKey, true);
-cachedGps = new Pair(0L,new GuidePostsInfo(0, 
Collections.emptyList()));
-guidePostsMap.put(cfKey, cachedGps);
-}
 }
 
 public long getM

[2/3] phoenix git commit: Revert "PHOENIX-1496 Further reduce work in StatsCollector."

2014-12-01 Thread larsh
Revert "PHOENIX-1496 Further reduce work in StatsCollector."

This reverts commit 198d749df8de8b09227f70864b1f3be777b552d0.


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

Branch: refs/heads/4.0
Commit: db06f21dfb0c3810b63f7acc417896d3ed1ced45
Parents: 198d749
Author: Lars Hofhansl 
Authored: Mon Dec 1 21:54:31 2014 -0800
Committer: Lars Hofhansl 
Committed: Mon Dec 1 21:54:31 2014 -0800

--
 .../UngroupedAggregateRegionObserver.java   |  4 +--
 .../schema/stats/StatisticsCollector.java   | 36 +---
 2 files changed, 10 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/db06f21d/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
index ff05dad..e0ff5b3 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
@@ -466,9 +466,7 @@ public class UngroupedAggregateRegionObserver extends 
BaseScannerRegionObserver{
 // when background tasks are updating stats. Instead we track 
the max timestamp of
 // the cells and use that.
 long clientTimeStamp = useCurrentTime ? 
TimeKeeper.SYSTEM.getCurrentTime() : StatisticsCollector.NO_TIMESTAMP;
-StatisticsCollector stats = new StatisticsCollector(
-c.getEnvironment(), table.getNameAsString(),
-clientTimeStamp, store.getFamily().getName());
+StatisticsCollector stats = new 
StatisticsCollector(c.getEnvironment(), table.getNameAsString(), 
clientTimeStamp);
 internalScanner = 
stats.createCompactionScanner(c.getEnvironment().getRegion(), store, scanner);
 } catch (IOException e) {
 // If we can't reach the stats table, don't interrupt the 
normal

http://git-wip-us.apache.org/repos/asf/phoenix/blob/db06f21d/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 619684a..4123ebe 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
@@ -65,13 +65,8 @@ public class StatisticsCollector {
 // Tracks the bytecount per family if it has reached the guidePostsDepth
 private Map familyMap = Maps.newHashMap();
 protected StatisticsWriter statsTable;
-private Pair cachedGps = null;
 
 public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp) throws IOException {
-this(env, tableName, clientTimeStamp, null);
-}
-
-public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp, byte[] family) throws IOException {
 Configuration config = env.getConfiguration();
 int guidepostPerRegion = 
config.getInt(QueryServices.STATS_GUIDEPOST_PER_REGION_ATTRIB, 
 QueryServicesOptions.DEFAULT_STATS_GUIDEPOST_PER_REGION);
@@ -81,14 +76,6 @@ public class StatisticsCollector {
 // Get the stats table associated with the current table on which the 
CP is
 // triggered
 this.statsTable = StatisticsWriter.newWriter(env, tableName, 
clientTimeStamp);
-// in a compaction we know the one family ahead of time
-// pre-populate familyMap and guidePostsMap here
-if (family != null) {
-ImmutableBytesPtr cfKey = new ImmutableBytesPtr(family, 0, 
family.length);
-familyMap.put(cfKey, true);
-cachedGps = new Pair(0L,new GuidePostsInfo(0, 
Collections.emptyList()));
-guidePostsMap.put(cfKey, cachedGps);
-}
 }
 
 public long getMaxTimeStamp() {
@@ -205,22 +192,17 @@ public class StatisticsCollector {
 maxTimeStamp = Math.max(maxTimeStamp, timestamp);
 }
 
+@SuppressWarnings("deprecation")
 public void updateStatistic(KeyValue kv) {
+ImmutableBytesPtr cfKey = 

Build failed in Jenkins: Phoenix | 3.0 | Hadoop1 #326

2014-12-01 Thread Apache Jenkins Server
See 

Changes:

[larsh] PHOENIX-1496 Further reduce work in StatsCollector.

--
[...truncated 436 lines...]
Running org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.542 sec - in 
org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
Running org.apache.phoenix.end2end.AlterTableIT
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.555 sec - in 
org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
Running org.apache.phoenix.end2end.HashJoinIT
Tests run: 68, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 95.247 sec - 
in org.apache.phoenix.end2end.SpooledSortMergeJoinIT
Running org.apache.phoenix.end2end.MD5FunctionIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.711 sec - in 
org.apache.phoenix.end2end.MD5FunctionIT
Running org.apache.phoenix.end2end.TenantSpecificViewIndexIT
Tests run: 25, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 101.156 sec - 
in org.apache.phoenix.end2end.InListIT
Running org.apache.phoenix.end2end.DecodeFunctionIT
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.445 sec - in 
org.apache.phoenix.end2end.DecodeFunctionIT
Running org.apache.phoenix.end2end.ServerExceptionIT
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 43.776 sec - 
in org.apache.phoenix.end2end.AlterTableIT
Running org.apache.phoenix.end2end.RegexpSplitFunctionIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.468 sec - in 
org.apache.phoenix.end2end.ServerExceptionIT
Running org.apache.phoenix.end2end.ExecuteStatementsIT
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.541 sec - in 
org.apache.phoenix.end2end.RegexpSplitFunctionIT
Running org.apache.phoenix.end2end.SkipScanAfterManualSplitIT
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.059 sec - in 
org.apache.phoenix.end2end.TenantSpecificViewIndexIT
Running org.apache.phoenix.end2end.ConvertTimezoneFunctionIT
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.586 sec - in 
org.apache.phoenix.end2end.ConvertTimezoneFunctionIT
Running org.apache.phoenix.end2end.SkipScanQueryIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.969 sec - in 
org.apache.phoenix.end2end.ExecuteStatementsIT
Running org.apache.phoenix.end2end.LpadFunctionIT
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.923 sec - in 
org.apache.phoenix.end2end.LpadFunctionIT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 17.333 sec - in 
org.apache.phoenix.end2end.SkipScanQueryIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 29.209 sec - in 
org.apache.phoenix.end2end.SkipScanAfterManualSplitIT
Tests run: 68, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 98.284 sec - 
in org.apache.phoenix.end2end.HashJoinIT

Results :




Tests run: 558, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-failsafe-plugin:2.18:integration-test (ClientManagedTimeTests) 
@ phoenix-core ---
[INFO] Failsafe report directory: 

[INFO] parallel='none', perCoreThreadCount=true, threadCount=0, 
useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0, 
threadCountMethods=0, parallelOptimized=true

---
 T E S T S
---
Running org.apache.phoenix.end2end.ProductMetricsIT
Running org.apache.phoenix.end2end.NotQueryIT
Running org.apache.phoenix.end2end.DistinctCountIT
Running org.apache.phoenix.end2end.TopNIT
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.191 sec - in 
org.apache.phoenix.end2end.TopNIT
Running org.apache.phoenix.end2end.CaseStatementIT
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.827 sec - 
in org.apache.phoenix.end2end.DistinctCountIT
Running org.apache.phoenix.end2end.CastAndCoerceIT
Tests run: 61, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 34.176 sec - 
in org.apache.phoenix.end2end.ProductMetricsIT
Running org.apache.phoenix.end2end.InMemoryOrderByIT
Tests run: 44, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 34.138 sec - 
in org.apache.phoenix.end2end.NotQueryIT
Running org.apache.phoenix.end2end.ReadIsolationLevelIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 3.964 sec - in 
org.apache.phoenix.end2end.InMemoryOrderByIT
Running org.apache.phoenix.end2end.ClientTimeArithmeticQueryIT
Tests run: 36, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 29.764 sec - 
in org.apache.phoenix.end2end.CaseStatementIT
Running org.apache.phoenix.end2end.ColumnProjectionOptimizationIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.696 sec - in 
org.apache.phoenix.end2end.ReadIsolationLevelIT
Running org.apach

Build failed in Jenkins: Phoenix | 4.0 #477

2014-12-01 Thread Apache Jenkins Server
See 

Changes:

[larsh] PHOENIX-1496 Further reduce work in StatsCollector.

--
[...truncated 370 lines...]
Running org.apache.phoenix.end2end.ArrayIT
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.98 sec - in 
org.apache.phoenix.end2end.TopNIT
Tests run: 36, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 37.22 sec - in 
org.apache.phoenix.end2end.RowValueConstructorIT
Tests run: 182, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 202.965 sec - 
in org.apache.phoenix.end2end.QueryIT
Tests run: 48, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.395 sec - 
in org.apache.phoenix.end2end.ArrayIT
Tests run: 210, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 173.088 sec - 
in org.apache.phoenix.end2end.ClientTimeArithmeticQueryIT

Results :




Tests run: 1224, Failures: 0, Errors: 0, Skipped: 0

[INFO] [failsafe:integration-test {execution: HBaseManagedTimeTests}]
[INFO] Failsafe report directory: 

[INFO] parallel='none', perCoreThreadCount=true, threadCount=0, 
useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0, 
threadCountMethods=0, parallelOptimized=true

---
 T E S T S
---
Running org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
Running org.apache.phoenix.end2end.HashJoinIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.009 sec - in 
org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
Running org.apache.phoenix.trace.PhoenixTracingEndToEndIT
Running org.apache.phoenix.end2end.EncodeFunctionIT
Running org.apache.phoenix.trace.PhoenixTraceReaderIT
Running org.apache.phoenix.end2end.SkipScanQueryIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.681 sec - in 
org.apache.phoenix.trace.PhoenixTraceReaderIT
Running org.apache.phoenix.end2end.SortOrderFIT
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.695 sec - in 
org.apache.phoenix.end2end.EncodeFunctionIT
Running org.apache.phoenix.end2end.StatementHintsIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.618 sec - in 
org.apache.phoenix.end2end.StatementHintsIT
Running org.apache.phoenix.end2end.ArithmeticQueryIT
Tests run: 30, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.57 sec - in 
org.apache.phoenix.end2end.SortOrderFIT
Running org.apache.phoenix.end2end.SortMergeJoinIT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.193 sec - in 
org.apache.phoenix.end2end.SkipScanQueryIT
Running org.apache.phoenix.end2end.ConvertTimezoneFunctionIT
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.91 sec - in 
org.apache.phoenix.end2end.ConvertTimezoneFunctionIT
Running org.apache.phoenix.end2end.RegexpSubstrFunctionIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.023 sec - in 
org.apache.phoenix.end2end.RegexpSubstrFunctionIT
Running org.apache.phoenix.end2end.TimezoneOffsetFunctionIT
Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.026 sec - 
in org.apache.phoenix.end2end.ArithmeticQueryIT
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.359 sec - in 
org.apache.phoenix.end2end.TimezoneOffsetFunctionIT
Running org.apache.phoenix.end2end.UpsertSelectAutoCommitIT
Running org.apache.phoenix.end2end.QueryMoreIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.832 sec - in 
org.apache.phoenix.end2end.UpsertSelectAutoCommitIT
Running org.apache.phoenix.end2end.BinaryRowKeyIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.135 sec - in 
org.apache.phoenix.end2end.BinaryRowKeyIT
Running org.apache.phoenix.end2end.AlterTableIT
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.955 sec - in 
org.apache.phoenix.end2end.QueryMoreIT
Running org.apache.phoenix.end2end.TenantSpecificViewIndexIT
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.943 sec - in 
org.apache.phoenix.end2end.TenantSpecificViewIndexIT
Running org.apache.phoenix.end2end.MappingTableDataTypeIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.792 sec - in 
org.apache.phoenix.end2end.MappingTableDataTypeIT
Running org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.432 sec - in 
org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
Running org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.623 sec - in 
org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
Running org.apache.phoenix.end2end.SpooledSortMergeJoinIT
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 86.392 sec - in 
org.apache.phoenix.trace.PhoenixTracingEndToEndIT
Running org.apache.phoe

Build failed in Jenkins: Phoenix | Master #506

2014-12-01 Thread Apache Jenkins Server
See 

Changes:

[larsh] PHOENIX-1496 Further reduce work in StatsCollector.

--
[...truncated 418 lines...]
---
 T E S T S
---
Running org.apache.phoenix.trace.PhoenixTraceReaderIT
Running org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
Running org.apache.phoenix.end2end.EncodeFunctionIT
Running org.apache.phoenix.end2end.MappingTableDataTypeIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.078 sec - in 
org.apache.phoenix.trace.PhoenixTraceReaderIT
Running org.apache.phoenix.end2end.SpooledSortMergeJoinIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.528 sec - in 
org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
Running org.apache.phoenix.end2end.CSVCommonsLoaderIT
Running org.apache.phoenix.trace.PhoenixTracingEndToEndIT
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.891 sec - in 
org.apache.phoenix.end2end.EncodeFunctionIT
Running org.apache.phoenix.end2end.SpooledTmpFileDeleteIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.335 sec - in 
org.apache.phoenix.end2end.MappingTableDataTypeIT
Running org.apache.phoenix.end2end.SkipScanAfterManualSplitIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.563 sec - in 
org.apache.phoenix.end2end.SpooledTmpFileDeleteIT
Running org.apache.phoenix.end2end.TenantSpecificViewIndexSaltedIT
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.807 sec - 
in org.apache.phoenix.end2end.CSVCommonsLoaderIT
Running org.apache.phoenix.end2end.EvaluationOfORIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.34 sec - in 
org.apache.phoenix.end2end.EvaluationOfORIT
Running org.apache.phoenix.end2end.index.SaltedIndexIT
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.258 sec - in 
org.apache.phoenix.end2end.TenantSpecificViewIndexSaltedIT
Running org.apache.phoenix.end2end.index.DropViewIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.313 sec - in 
org.apache.phoenix.end2end.index.DropViewIT
Running org.apache.phoenix.end2end.index.ViewIndexIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.097 sec - in 
org.apache.phoenix.end2end.SkipScanAfterManualSplitIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.004 sec - in 
org.apache.phoenix.end2end.index.ViewIndexIT
Running org.apache.phoenix.end2end.index.LocalIndexIT
Running org.apache.phoenix.end2end.index.IndexMetadataIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 17.287 sec - in 
org.apache.phoenix.end2end.index.SaltedIndexIT
Running org.apache.phoenix.end2end.index.MutableIndexIT
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.431 sec - in 
org.apache.phoenix.end2end.index.IndexMetadataIT
Running org.apache.phoenix.end2end.index.ImmutableIndexIT
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 28.311 sec - 
in org.apache.phoenix.end2end.index.ImmutableIndexIT
Running org.apache.phoenix.end2end.BinaryRowKeyIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.169 sec - in 
org.apache.phoenix.end2end.BinaryRowKeyIT
Running org.apache.phoenix.end2end.DynamicFamilyIT
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 92.418 sec - in 
org.apache.phoenix.trace.PhoenixTracingEndToEndIT
Running org.apache.phoenix.end2end.AlterTableIT
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.769 sec - in 
org.apache.phoenix.end2end.DynamicFamilyIT
Running org.apache.phoenix.end2end.NthValueFunctionIT
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.084 sec - in 
org.apache.phoenix.end2end.NthValueFunctionIT
Running org.apache.phoenix.end2end.SkipScanQueryIT
Tests run: 102, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 107.739 sec - 
in org.apache.phoenix.end2end.SpooledSortMergeJoinIT
Running org.apache.phoenix.end2end.InListIT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.946 sec - in 
org.apache.phoenix.end2end.SkipScanQueryIT
Running org.apache.phoenix.end2end.ReadOnlyIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.266 sec - in 
org.apache.phoenix.end2end.ReadOnlyIT
Running org.apache.phoenix.end2end.DeleteIT
Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 27.234 sec - 
in org.apache.phoenix.end2end.DeleteIT
Running org.apache.phoenix.end2end.ModulusExpressionIT
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 110.329 sec - 
in org.apache.phoenix.end2end.index.LocalIndexIT
Running org.apache.phoenix.end2end.DecodeFunctionIT
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.469 sec - in 
org.apache.phoenix.end2end.DecodeFunctionIT
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.602 sec - in 
org.apache.phoeni

[2/3] phoenix git commit: PHOENIX-1496 Further reduce work in StatsCollector.

2014-12-01 Thread larsh
PHOENIX-1496 Further reduce work in StatsCollector.


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

Branch: refs/heads/4.0
Commit: 198d749df8de8b09227f70864b1f3be777b552d0
Parents: 0585ba4
Author: Lars Hofhansl 
Authored: Mon Dec 1 20:44:01 2014 -0800
Committer: Lars Hofhansl 
Committed: Mon Dec 1 20:45:21 2014 -0800

--
 .../UngroupedAggregateRegionObserver.java   |  4 ++-
 .../schema/stats/StatisticsCollector.java   | 36 +++-
 2 files changed, 30 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/198d749d/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
index e0ff5b3..ff05dad 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
@@ -466,7 +466,9 @@ public class UngroupedAggregateRegionObserver extends 
BaseScannerRegionObserver{
 // when background tasks are updating stats. Instead we track 
the max timestamp of
 // the cells and use that.
 long clientTimeStamp = useCurrentTime ? 
TimeKeeper.SYSTEM.getCurrentTime() : StatisticsCollector.NO_TIMESTAMP;
-StatisticsCollector stats = new 
StatisticsCollector(c.getEnvironment(), table.getNameAsString(), 
clientTimeStamp);
+StatisticsCollector stats = new StatisticsCollector(
+c.getEnvironment(), table.getNameAsString(),
+clientTimeStamp, store.getFamily().getName());
 internalScanner = 
stats.createCompactionScanner(c.getEnvironment().getRegion(), store, scanner);
 } catch (IOException e) {
 // If we can't reach the stats table, don't interrupt the 
normal

http://git-wip-us.apache.org/repos/asf/phoenix/blob/198d749d/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 4123ebe..619684a 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
@@ -65,8 +65,13 @@ public class StatisticsCollector {
 // Tracks the bytecount per family if it has reached the guidePostsDepth
 private Map familyMap = Maps.newHashMap();
 protected StatisticsWriter statsTable;
+private Pair cachedGps = null;
 
 public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp) throws IOException {
+this(env, tableName, clientTimeStamp, null);
+}
+
+public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp, byte[] family) throws IOException {
 Configuration config = env.getConfiguration();
 int guidepostPerRegion = 
config.getInt(QueryServices.STATS_GUIDEPOST_PER_REGION_ATTRIB, 
 QueryServicesOptions.DEFAULT_STATS_GUIDEPOST_PER_REGION);
@@ -76,6 +81,14 @@ public class StatisticsCollector {
 // Get the stats table associated with the current table on which the 
CP is
 // triggered
 this.statsTable = StatisticsWriter.newWriter(env, tableName, 
clientTimeStamp);
+// in a compaction we know the one family ahead of time
+// pre-populate familyMap and guidePostsMap here
+if (family != null) {
+ImmutableBytesPtr cfKey = new ImmutableBytesPtr(family, 0, 
family.length);
+familyMap.put(cfKey, true);
+cachedGps = new Pair(0L,new GuidePostsInfo(0, 
Collections.emptyList()));
+guidePostsMap.put(cfKey, cachedGps);
+}
 }
 
 public long getMaxTimeStamp() {
@@ -192,17 +205,22 @@ public class StatisticsCollector {
 maxTimeStamp = Math.max(maxTimeStamp, timestamp);
 }
 
-@SuppressWarnings("deprecation")
 public void updateStatistic(KeyValue kv) {
-ImmutableBytesPtr cfKey = new ImmutableBytesPtr(kv.getBuffer(), 
kv.getFamilyOffset(), kv.getFamil

[1/3] phoenix git commit: PHOENIX-1496 Further reduce work in StatsCollector.

2014-12-01 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/3.0 401931872 -> c1da4c9f2
  refs/heads/4.0 0585ba4e4 -> 198d749df
  refs/heads/master edf5ec27c -> 3fa1ddccf


PHOENIX-1496 Further reduce work in StatsCollector.


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

Branch: refs/heads/master
Commit: 3fa1ddccf782e8b708c3d1f13d7046fd8b511dce
Parents: edf5ec2
Author: Lars Hofhansl 
Authored: Mon Dec 1 20:44:01 2014 -0800
Committer: Lars Hofhansl 
Committed: Mon Dec 1 20:44:01 2014 -0800

--
 .../UngroupedAggregateRegionObserver.java   |  4 ++-
 .../schema/stats/StatisticsCollector.java   | 36 +++-
 2 files changed, 30 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3fa1ddcc/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
index e0ff5b3..ff05dad 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
@@ -466,7 +466,9 @@ public class UngroupedAggregateRegionObserver extends 
BaseScannerRegionObserver{
 // when background tasks are updating stats. Instead we track 
the max timestamp of
 // the cells and use that.
 long clientTimeStamp = useCurrentTime ? 
TimeKeeper.SYSTEM.getCurrentTime() : StatisticsCollector.NO_TIMESTAMP;
-StatisticsCollector stats = new 
StatisticsCollector(c.getEnvironment(), table.getNameAsString(), 
clientTimeStamp);
+StatisticsCollector stats = new StatisticsCollector(
+c.getEnvironment(), table.getNameAsString(),
+clientTimeStamp, store.getFamily().getName());
 internalScanner = 
stats.createCompactionScanner(c.getEnvironment().getRegion(), store, scanner);
 } catch (IOException e) {
 // If we can't reach the stats table, don't interrupt the 
normal

http://git-wip-us.apache.org/repos/asf/phoenix/blob/3fa1ddcc/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 4123ebe..619684a 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
@@ -65,8 +65,13 @@ public class StatisticsCollector {
 // Tracks the bytecount per family if it has reached the guidePostsDepth
 private Map familyMap = Maps.newHashMap();
 protected StatisticsWriter statsTable;
+private Pair cachedGps = null;
 
 public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp) throws IOException {
+this(env, tableName, clientTimeStamp, null);
+}
+
+public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp, byte[] family) throws IOException {
 Configuration config = env.getConfiguration();
 int guidepostPerRegion = 
config.getInt(QueryServices.STATS_GUIDEPOST_PER_REGION_ATTRIB, 
 QueryServicesOptions.DEFAULT_STATS_GUIDEPOST_PER_REGION);
@@ -76,6 +81,14 @@ public class StatisticsCollector {
 // Get the stats table associated with the current table on which the 
CP is
 // triggered
 this.statsTable = StatisticsWriter.newWriter(env, tableName, 
clientTimeStamp);
+// in a compaction we know the one family ahead of time
+// pre-populate familyMap and guidePostsMap here
+if (family != null) {
+ImmutableBytesPtr cfKey = new ImmutableBytesPtr(family, 0, 
family.length);
+familyMap.put(cfKey, true);
+cachedGps = new Pair(0L,new GuidePostsInfo(0, 
Collections.emptyList()));
+guidePostsMap.put(cfKey, cachedGps);
+}
 }
 
 public long getMaxTimeStamp() {
@@ -192,17 +205,22 @@ public class StatisticsCollector {
 maxTimeStamp = Math.max(maxTimeStamp, timestamp);
 }
 
-@SuppressWarnings("dep

[3/3] phoenix git commit: PHOENIX-1496 Further reduce work in StatsCollector.

2014-12-01 Thread larsh
PHOENIX-1496 Further reduce work in StatsCollector.


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

Branch: refs/heads/3.0
Commit: c1da4c9f2f3a3838554723cdb3eb91d23962b42f
Parents: 4019318
Author: Lars Hofhansl 
Authored: Mon Dec 1 20:44:01 2014 -0800
Committer: Lars Hofhansl 
Committed: Mon Dec 1 20:51:08 2014 -0800

--
 .../UngroupedAggregateRegionObserver.java   |  4 ++-
 .../schema/stats/StatisticsCollector.java   | 38 ++--
 2 files changed, 31 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1da4c9f/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
index 4cf816a..d561f30 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
@@ -438,7 +438,9 @@ public class UngroupedAggregateRegionObserver extends 
BaseScannerRegionObserver
 // when background tasks are updating stats. Instead we track 
the max timestamp of
 // the cells and use that.
 long clientTimeStamp = useCurrentTime ? 
TimeKeeper.SYSTEM.getCurrentTime() : StatisticsCollector.NO_TIMESTAMP;
-StatisticsCollector stats = new 
StatisticsCollector(c.getEnvironment(), table, clientTimeStamp);
+StatisticsCollector stats = new StatisticsCollector(
+c.getEnvironment(), table,
+clientTimeStamp, store.getFamily().getName());
 internalScanner = 
stats.createCompactionScanner(c.getEnvironment().getRegion(), store, scanner);
 } catch (IOException e) {
 // If we can't reach the stats table, don't interrupt the 
normal

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1da4c9f/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 7ad1d9b..258ef6d 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
@@ -54,9 +54,13 @@ public class StatisticsCollector {
 // Tracks the bytecount per family if it has reached the guidePostsDepth
 private Map familyMap = Maps.newHashMap();
 protected StatisticsWriter statsTable;
+private Pair cachedGps = null;
 
-public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp)
-throws IOException {
+public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp) throws IOException {
+this(env, tableName, clientTimeStamp, null);
+}
+
+public StatisticsCollector(RegionCoprocessorEnvironment env, String 
tableName, long clientTimeStamp, byte[] family) throws IOException {
 Configuration config = env.getConfiguration();
 int guidepostPerRegion = 
config.getInt(QueryServices.STATS_GUIDEPOST_PER_REGION_ATTRIB, 
 QueryServicesOptions.DEFAULT_STATS_GUIDEPOST_PER_REGION);
@@ -66,6 +70,14 @@ public class StatisticsCollector {
 // Get the stats table associated with the current table on which the 
CP is
 // triggered
 this.statsTable = StatisticsWriter.newWriter(env, tableName, 
clientTimeStamp);
+// in a compaction we know the one family ahead of time
+// pre-populate familyMap and guidePostsMap here
+if (family != null) {
+ImmutableBytesPtr cfKey = new ImmutableBytesPtr(family, 0, 
family.length);
+familyMap.put(cfKey, true);
+cachedGps = new Pair(0L,new GuidePostsInfo(0, 
Collections.emptyList()));
+guidePostsMap.put(cfKey, cachedGps);
+}
 }
 
 public long getMaxTimeStamp() {
@@ -176,15 +188,21 @@ public class StatisticsCollector {
 }
 
 public void updateStatistic(KeyValue kv) {
-ImmutableBytesPtr cfKey = new ImmutableBytesPtr(kv.getBuffer(), 
kv.getFamilyOffset(), kv.ge