Repository: phoenix Updated Branches: refs/heads/txn 59ba25a59 -> b14e88551
Fix test failures Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/b14e8855 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/b14e8855 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/b14e8855 Branch: refs/heads/txn Commit: b14e8855188ca472ed0ea291105d75bdca418ba5 Parents: 59ba25a Author: Thomas D'Silva <tdsi...@salesforce.com> Authored: Tue Nov 10 15:47:39 2015 -0800 Committer: Thomas D'Silva <tdsi...@salesforce.com> Committed: Tue Nov 10 15:48:31 2015 -0800 ---------------------------------------------------------------------- .../phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java | 6 +++--- .../it/java/org/apache/phoenix/execute/PartialCommitIT.java | 2 +- .../main/java/org/apache/phoenix/jdbc/PhoenixConnection.java | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/b14e8855/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java index d2e9dd0..6191a4f 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java @@ -133,7 +133,7 @@ public class StatsCollectorWithSplitsAndMultiCFIT extends StatsCollectorAbstract Collection<GuidePostsInfo> infos = TestUtil.getGuidePostsList(conn, STATS_TEST_TABLE_NAME_NEW); long[] rowCountArr = new long[]{25, 20, 25, 25}; // CF A alone has double the bytecount because it has column qualifier A and column qualifier _0 - long[] byteCountArr = new long[]{12168, 5540, 6652, 6652}; + long[] byteCountArr = new long[]{12144, 5540, 6652, 6652}; int i = 0; for(GuidePostsInfo info : infos) { assertRowCountAndByteCount(info, rowCountArr[i], byteCountArr[i]); @@ -176,7 +176,7 @@ public class StatsCollectorWithSplitsAndMultiCFIT extends StatsCollectorAbstract Collection<GuidePostsInfo> infos = TestUtil.getGuidePostsList(conn, STATS_TEST_TABLE_NAME); for (GuidePostsInfo info : infos) { assertEquals(20, info.getRowCount()); - assertEquals(11060, info.getByteCount()); + assertEquals(11040, info.getByteCount()); break; } List<KeyRange> keyRanges = getAllSplits(conn, STATS_TEST_TABLE_NAME); @@ -269,7 +269,7 @@ public class StatsCollectorWithSplitsAndMultiCFIT extends StatsCollectorAbstract infos = TestUtil.getGuidePostsList(conn, STATS_TEST_TABLE_NAME); for (GuidePostsInfo info : infos) { assertEquals(20, info.getRowCount()); - assertEquals(9954, info.getByteCount()); + assertEquals(9936, info.getByteCount()); break; } conn.close(); http://git-wip-us.apache.org/repos/asf/phoenix/blob/b14e8855/phoenix-core/src/it/java/org/apache/phoenix/execute/PartialCommitIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/execute/PartialCommitIT.java b/phoenix-core/src/it/java/org/apache/phoenix/execute/PartialCommitIT.java index b3b3316..a9ac5fa 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/execute/PartialCommitIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/execute/PartialCommitIT.java @@ -259,7 +259,7 @@ public class PartialCommitIT { Connection con = driver.connect(url, new Properties()); PhoenixConnection phxCon = new PhoenixConnection(con.unwrap(PhoenixConnection.class)); final Map<TableRef,Map<ImmutableBytesPtr,MutationState.RowMutationState>> mutations = Maps.newTreeMap(new TableRefComparator()); - return new PhoenixConnection(phxCon) { + return new PhoenixConnection(phxCon, null) { @Override protected MutationState newMutationState(int maxSize) { return new MutationState(maxSize, this, mutations, null); http://git-wip-us.apache.org/repos/asf/phoenix/blob/b14e8855/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java index 0a28f8e..ee71a96 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java @@ -172,6 +172,10 @@ public class PhoenixConnection implements Connection, org.apache.phoenix.jdbc.Jd this(connection, connection.isDescVarLengthRowKeyUpgrade); } + public PhoenixConnection(PhoenixConnection connection, MutationState mutationState) throws SQLException { + this(connection.getQueryServices(), connection.getURL(), connection.getClientInfo(), connection.getMetaDataCache(), mutationState, connection.isDescVarLengthRowKeyUpgrade()); + } + public PhoenixConnection(PhoenixConnection connection, long scn) throws SQLException { this(connection.getQueryServices(), connection, scn); }