PHOENIX-1366 Use static constants
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/11206294 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/11206294 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/11206294 Branch: refs/heads/master Commit: 11206294c405ea843f0b4b81bdf12a049ba34a19 Parents: 3cbd85b Author: James Taylor <jtay...@salesforce.com> Authored: Sun Oct 26 22:25:32 2014 -0700 Committer: James Taylor <jtay...@salesforce.com> Committed: Sun Oct 26 22:39:40 2014 -0700 ---------------------------------------------------------------------- .../java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/11206294/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java index a03cda4..8edc7ae 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java @@ -29,6 +29,7 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang.StringEscapeUtils; +import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.util.Bytes; @@ -536,14 +537,14 @@ public class PhoenixDatabaseMetaData implements DatabaseMetaData, org.apache.pho if (tuple != null && tenantColumnSkipped) { ResultTuple resultTuple = (ResultTuple)tuple; - List<KeyValue> cells = resultTuple.getResult().list(); + List<Cell> cells = resultTuple.getResult().listCells(); KeyValue kv = new KeyValue(resultTuple.getResult().getRow(), TABLE_FAMILY_BYTES, TENANT_POS_SHIFT_BYTES, PDataType.TRUE_BYTES); - List<KeyValue> newCells = Lists.newArrayListWithCapacity(cells.size() + 1); + List<Cell> newCells = Lists.newArrayListWithCapacity(cells.size() + 1); newCells.addAll(cells); newCells.add(kv); Collections.sort(newCells, KeyValue.COMPARATOR); - resultTuple.setResult(new Result(newCells)); + resultTuple.setResult(Result.create(newCells)); } return tuple;