HBASE-1757 REST server runs out of fds

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@802875 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2009-08-10 18:00:07 +00:00
parent 069b77e0f9
commit 14a7712b0b
6 changed files with 15 additions and 15 deletions

View File

@ -316,6 +316,7 @@ Release 0.20.0 - Unreleased
HBASE-1739 hbase-1683 broke splitting; only split three logs no matter
what N was
HBASE-1745 [tools] Tool to kick region out of inTransistion
HBASE-1757 REST server runs out of fds
IMPROVEMENTS
HBASE-1089 Add count of regions on filesystem to master UI; add percentage

View File

@ -69,7 +69,7 @@ public abstract class AbstractModel {
protected byte[][] getColumns(byte[] tableName) throws HBaseRestException {
try {
HTable h = new HTable(tableName);
HTable h = new HTable(this.conf, tableName);
Collection<HColumnDescriptor> columns = h.getTableDescriptor()
.getFamilies();
byte[][] resultant = new byte[columns.size()][];
@ -93,7 +93,6 @@ public abstract class AbstractModel {
return true;
}
}
return false;
}
}
}

View File

@ -55,7 +55,7 @@ public class RowModel extends AbstractModel {
public Result get(byte[] tableName, Get get)
throws HBaseRestException {
try {
HTable table = new HTable(tableName);
HTable table = new HTable(this.conf, tableName);
return table.get(get);
} catch (IOException e) {
throw new HBaseRestException(e);
@ -112,7 +112,7 @@ public class RowModel extends AbstractModel {
public void post(byte[] tableName, Put put) throws HBaseRestException {
try {
HTable table = new HTable(tableName);
HTable table = new HTable(this.conf, tableName);
table.put(put);
} catch (IOException e) {
throw new HBaseRestException(e);
@ -122,7 +122,7 @@ public class RowModel extends AbstractModel {
public void post(byte[] tableName, List<Put> puts)
throws HBaseRestException {
try {
HTable table = new HTable(tableName);
HTable table = new HTable(this.conf, tableName);
table.put(puts);
} catch (IOException e) {
throw new HBaseRestException(e);
@ -150,7 +150,7 @@ public class RowModel extends AbstractModel {
public void delete(byte[] tableName, Delete delete)
throws HBaseRestException {
try {
HTable table = new HTable(tableName);
HTable table = new HTable(this.conf, tableName);
table.delete(delete);
} catch (IOException e) {
throw new HBaseRestException(e);

View File

@ -208,7 +208,7 @@ public class ScannerModel extends AbstractModel {
long timestamp) throws HBaseRestException {
try {
HTable table;
table = new HTable(tableName);
table = new HTable(this.conf, tableName);
Scan scan = new Scan();
scan.addColumns(columns);
scan.setTimeRange(0, timestamp);
@ -228,7 +228,7 @@ public class ScannerModel extends AbstractModel {
byte[] startRow, long timestamp) throws HBaseRestException {
try {
HTable table;
table = new HTable(tableName);
table = new HTable(this.conf, tableName);
Scan scan = new Scan(startRow);
scan.addColumns(columns);
scan.setTimeRange(0, timestamp);
@ -249,7 +249,7 @@ public class ScannerModel extends AbstractModel {
long timestamp, RowFilterInterface filter) throws HBaseRestException {
try {
HTable table;
table = new HTable(tableName);
table = new HTable(this.conf, tableName);
Scan scan = new Scan();
scan.addColumns(columns);
scan.setTimeRange(0, timestamp);
@ -271,7 +271,7 @@ public class ScannerModel extends AbstractModel {
throws HBaseRestException {
try {
HTable table;
table = new HTable(tableName);
table = new HTable(this.conf, tableName);
Scan scan = new Scan(startRow);
scan.addColumns(columns);
scan.setTimeRange(0, timestamp);

View File

@ -68,7 +68,7 @@ public class TableModel extends AbstractModel {
throws HBaseRestException {
try {
ArrayList<Result> a = new ArrayList<Result>();
HTable table = new HTable(tableName);
HTable table = new HTable(this.conf, tableName);
Scan scan = new Scan();
scan.addColumns(columnNames);

View File

@ -50,7 +50,7 @@ public class TimestampModel extends AbstractModel {
public void delete(byte [] tableName, Delete delete)
throws HBaseRestException {
try {
HTable table = new HTable(tableName);
HTable table = new HTable(this.conf, tableName);
table.delete(delete);
} catch (IOException e) {
throw new HBaseRestException(e);
@ -78,7 +78,7 @@ public class TimestampModel extends AbstractModel {
public Result get(final byte [] tableName, final Get get)
throws HBaseRestException {
try {
HTable table = new HTable(tableName);
HTable table = new HTable(this.conf, tableName);
return table.get(get);
} catch (IOException e) {
throw new HBaseRestException(e);
@ -140,7 +140,7 @@ public class TimestampModel extends AbstractModel {
public void post(byte[] tableName, byte[] rowName, byte[] columnName,
long timestamp, byte[] value) throws HBaseRestException {
try {
HTable table = new HTable(tableName);
HTable table = new HTable(this.conf, tableName);
Put put = new Put(rowName);
put.setTimeStamp(timestamp);
byte [][] famAndQf = KeyValue.parseColumn(columnName);