phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamestay...@apache.org
Subject [2/4] git commit: PHOENIX-1366 Use static constants
Date Mon, 27 Oct 2014 05:38:16 GMT
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/5093c2f2
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/5093c2f2
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/5093c2f2

Branch: refs/heads/4.0
Commit: 5093c2f262480d04f8495c55d23960b89a674c6e
Parents: ba96d70
Author: James Taylor <jtaylor@salesforce.com>
Authored: Sun Oct 26 22:25:32 2014 -0700
Committer: James Taylor <jtaylor@salesforce.com>
Committed: Sun Oct 26 22:25:32 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/5093c2f2/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;


Mime
View raw message