HBASE-669 MultiRegion transactions with Optimistic Concurrency Control; Fix silly copy in get

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@666356 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-06-10 22:53:41 +00:00
parent c23580b101
commit c3bb630ef2
1 changed files with 5 additions and 16 deletions

View File

@ -481,18 +481,16 @@ public class HTable {
/**
* Get the specified number of versions of the specified row and column
*
* @param row - row key
* @param column - column name
* @param numVersions - number of versions to retrieve
* @return - array byte values
* @param row row key
* @param column column name
* @param numVersions number of versions to retrieve
* @return Array of Cells.
* @throws IOException
*/
public Cell[] get(final byte [] row, final byte [] column,
final int numVersions)
throws IOException {
Cell[] values = null;
values = connection.getRegionServerWithRetries(
return connection.getRegionServerWithRetries(
new ServerCallable<Cell[]>(connection, tableName, row) {
public Cell[] call() throws IOException {
return server.get(location.getRegionInfo().getRegionName(), row,
@ -500,15 +498,6 @@ public class HTable {
}
}
);
if (values != null) {
ArrayList<Cell> cellValues = new ArrayList<Cell>();
for (int i = 0 ; i < values.length; i++) {
cellValues.add(values[i]);
}
return cellValues.toArray(new Cell[values.length]);
}
return null;
}
/**