You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2009/08/10 20:00:59 UTC

svn commit: r802876 - in /hadoop/hbase/branches/0.20: ./ src/java/org/apache/hadoop/hbase/rest/

Author: stack
Date: Mon Aug 10 18:00:59 2009
New Revision: 802876

URL: http://svn.apache.org/viewvc?rev=802876&view=rev
Log:
HBASE-1757 REST server runs out of fds

Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/AbstractModel.java
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/RowModel.java
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/ScannerModel.java
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/TableModel.java
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/TimestampModel.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=802876&r1=802875&r2=802876&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Mon Aug 10 18:00:59 2009
@@ -315,6 +315,7 @@
                what N was
    HBASE-1737  Regions unbalanced when adding new node
    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

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/AbstractModel.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/AbstractModel.java?rev=802876&r1=802875&r2=802876&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/AbstractModel.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/AbstractModel.java Mon Aug 10 18:00:59 2009
@@ -69,7 +69,7 @@
 
   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 @@
         return true;
       }
     }
-
     return false;
   }
-}
+}
\ No newline at end of file

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/RowModel.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/RowModel.java?rev=802876&r1=802875&r2=802876&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/RowModel.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/RowModel.java Mon Aug 10 18:00:59 2009
@@ -55,7 +55,7 @@
   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 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 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 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);

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/ScannerModel.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/ScannerModel.java?rev=802876&r1=802875&r2=802876&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/ScannerModel.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/ScannerModel.java Mon Aug 10 18:00:59 2009
@@ -208,7 +208,7 @@
       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 @@
       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 @@
       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 @@
       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);

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/TableModel.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/TableModel.java?rev=802876&r1=802875&r2=802876&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/TableModel.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/TableModel.java Mon Aug 10 18:00:59 2009
@@ -68,7 +68,7 @@
       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);

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/TimestampModel.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/TimestampModel.java?rev=802876&r1=802875&r2=802876&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/TimestampModel.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/TimestampModel.java Mon Aug 10 18:00:59 2009
@@ -50,7 +50,7 @@
   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 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 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);