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/04/23 22:36:01 UTC

svn commit: r768044 - in /hadoop/hbase/trunk/src: java/org/apache/hadoop/hbase/thrift/ java/org/apache/hadoop/hbase/thrift/generated/ test/org/apache/hadoop/hbase/thrift/

Author: stack
Date: Thu Apr 23 20:36:00 2009
New Revision: 768044

URL: http://svn.apache.org/viewvc?rev=768044&view=rev
Log:
HBASE-1292  php thrift's getRow() would throw an exception if the row does not exist

Modified:
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/thrift/DisabledTestThriftServer.java

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift?rev=768044&r1=768043&r2=768044&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift Thu Apr 23 20:36:00 2009
@@ -281,10 +281,11 @@
    * 
    * @param tableName name of table
    * @param row row key
-   * @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
+   * @return TRowResult containing the row and map of columns to TCells
+   * @throws NotFound if the row does not exist
    */
   TRowResult getRow(1:Text tableName, 2:Text row)
-    throws (1:IOError io)
+    throws (1:IOError io, 2:NotFound nf)
 
   /** 
    * Get the specified columns for the specified table and row at the latest
@@ -293,10 +294,11 @@
    * @param tableName name of table
    * @param row row key
    * @param columns List of columns to return, null for all columns
-   * @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
+   * @return TRowResult containing the row and map of columns to TCells
+   * @throws NotFound if the row does not exist
    */
   TRowResult getRowWithColumns(1:Text tableName, 2:Text row, 3:list<Text> columns)
-    throws (1:IOError io)
+    throws (1:IOError io, 2:NotFound nf)
 
   /** 
    * Get all the data for the specified table and row at the specified
@@ -305,10 +307,11 @@
    * @param tableName of table
    * @param row row key
    * @param timestamp timestamp
-   * @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
+   * @return TRowResult containing the row and map of columns to TCells
+   * @throws NotFound if the row does not exist
    */
   TRowResult getRowTs(1:Text tableName, 2:Text row, 3:i64 timestamp)
-    throws (1:IOError io)
+    throws (1:IOError io, 2:NotFound nf)
     
   /** 
    * Get the specified columns for the specified table and row at the specified
@@ -317,10 +320,11 @@
    * @param tableName name of table
    * @param row row key
    * @param columns List of columns to return, null for all columns
-   * @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
+   * @return TRowResult containing the row and map of columns to TCells
+   * @throws NotFound if the row does not exist
    */
   TRowResult getRowWithColumnsTs(1:Text tableName, 2:Text row, 3:list<Text> columns, 4:i64 timestamp)
-    throws (1:IOError io)
+    throws (1:IOError io, 2:NotFound nf)
 
   /** 
    * Apply a series of mutations (updates/deletes) to a row in a

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java?rev=768044&r1=768043&r2=768044&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java Thu Apr 23 20:36:00 2009
@@ -267,25 +267,25 @@
     }
     
     public TRowResult getRow(byte[] tableName, byte[] row)
-        throws IOError {
+        throws IOError, NotFound {
       return getRowWithColumnsTs(tableName, row, null,
                                  HConstants.LATEST_TIMESTAMP);
     }
     
     public TRowResult getRowWithColumns(byte[] tableName, byte[] row,
-        List<byte[]> columns) throws IOError {
+        List<byte[]> columns) throws IOError, NotFound {
       return getRowWithColumnsTs(tableName, row, columns,
                                  HConstants.LATEST_TIMESTAMP);
     }
     
     public TRowResult getRowTs(byte[] tableName, byte[] row,
-        long timestamp) throws IOError {
+        long timestamp) throws IOError, NotFound {
       return getRowWithColumnsTs(tableName, row, null,
                                  timestamp);
     }
     
     public TRowResult getRowWithColumnsTs(byte[] tableName, byte[] row,
-        List<byte[]> columns, long timestamp) throws IOError {
+        List<byte[]> columns, long timestamp) throws IOError, NotFound {
       try {
         HTable table = getTable(tableName);
         if (columns == null) {

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java?rev=768044&r1=768043&r2=768044&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java Thu Apr 23 20:36:00 2009
@@ -27,6 +27,7 @@
 import org.apache.hadoop.hbase.io.hfile.Compression;
 import org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor;
 import org.apache.hadoop.hbase.thrift.generated.IllegalArgument;
+import org.apache.hadoop.hbase.thrift.generated.NotFound;
 import org.apache.hadoop.hbase.thrift.generated.TCell;
 import org.apache.hadoop.hbase.thrift.generated.TRowResult;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -99,12 +100,14 @@
    * @param in
    *          Hbase RowResult object
    * @return Thrift TRowResult
+   * @throws NotFound
    */
-  static public TRowResult rowResultFromHBase(RowResult in) {
-    TRowResult result = new TRowResult();
+  static public TRowResult rowResultFromHBase(RowResult in)
+      throws NotFound {
     if(in == null) {
-    	return null;
+      throw new NotFound();
     }
+    TRowResult result = new TRowResult();
     result.row = in.getRow();
     result.columns = new TreeMap<byte[], TCell>(Bytes.BYTES_COMPARATOR);
     for (Map.Entry<byte[], Cell> entry : in.entrySet()){

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java?rev=768044&r1=768043&r2=768044&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java Thu Apr 23 20:36:00 2009
@@ -145,9 +145,10 @@
      * 
      * @param tableName name of table
      * @param row row key
-     * @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
+     * @return TRowResult containing the row and map of columns to TCells
+     * @throws NotFound if the row does not exist
      */
-    public TRowResult getRow(byte[] tableName, byte[] row) throws IOError, TException;
+    public TRowResult getRow(byte[] tableName, byte[] row) throws IOError, NotFound, TException;
 
     /**
      * Get the specified columns for the specified table and row at the latest
@@ -156,9 +157,10 @@
      * @param tableName name of table
      * @param row row key
      * @param columns List of columns to return, null for all columns
-     * @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
+     * @return TRowResult containing the row and map of columns to TCells
+     * @throws NotFound if the row does not exist
      */
-    public TRowResult getRowWithColumns(byte[] tableName, byte[] row, List<byte[]> columns) throws IOError, TException;
+    public TRowResult getRowWithColumns(byte[] tableName, byte[] row, List<byte[]> columns) throws IOError, NotFound, TException;
 
     /**
      * Get all the data for the specified table and row at the specified
@@ -167,9 +169,10 @@
      * @param tableName of table
      * @param row row key
      * @param timestamp timestamp
-     * @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
+     * @return TRowResult containing the row and map of columns to TCells
+     * @throws NotFound if the row does not exist
      */
-    public TRowResult getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException;
+    public TRowResult getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, NotFound, TException;
 
     /**
      * Get the specified columns for the specified table and row at the specified
@@ -178,9 +181,10 @@
      * @param tableName name of table
      * @param row row key
      * @param columns List of columns to return, null for all columns
-     * @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
+     * @return TRowResult containing the row and map of columns to TCells
+     * @throws NotFound if the row does not exist
      */
-    public TRowResult getRowWithColumnsTs(byte[] tableName, byte[] row, List<byte[]> columns, long timestamp) throws IOError, TException;
+    public TRowResult getRowWithColumnsTs(byte[] tableName, byte[] row, List<byte[]> columns, long timestamp) throws IOError, NotFound, TException;
 
     /**
      * Apply a series of mutations (updates/deletes) to a row in a
@@ -865,7 +869,7 @@
       throw new TApplicationException(TApplicationException.MISSING_RESULT, "getVerTs failed: unknown result");
     }
 
-    public TRowResult getRow(byte[] tableName, byte[] row) throws IOError, TException
+    public TRowResult getRow(byte[] tableName, byte[] row) throws IOError, NotFound, TException
     {
       send_getRow(tableName, row);
       return recv_getRow();
@@ -882,7 +886,7 @@
       oprot_.getTransport().flush();
     }
 
-    public TRowResult recv_getRow() throws IOError, TException
+    public TRowResult recv_getRow() throws IOError, NotFound, TException
     {
       TMessage msg = iprot_.readMessageBegin();
       if (msg.type == TMessageType.EXCEPTION) {
@@ -899,10 +903,13 @@
       if (result.__isset.io) {
         throw result.io;
       }
+      if (result.__isset.nf) {
+        throw result.nf;
+      }
       throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRow failed: unknown result");
     }
 
-    public TRowResult getRowWithColumns(byte[] tableName, byte[] row, List<byte[]> columns) throws IOError, TException
+    public TRowResult getRowWithColumns(byte[] tableName, byte[] row, List<byte[]> columns) throws IOError, NotFound, TException
     {
       send_getRowWithColumns(tableName, row, columns);
       return recv_getRowWithColumns();
@@ -920,7 +927,7 @@
       oprot_.getTransport().flush();
     }
 
-    public TRowResult recv_getRowWithColumns() throws IOError, TException
+    public TRowResult recv_getRowWithColumns() throws IOError, NotFound, TException
     {
       TMessage msg = iprot_.readMessageBegin();
       if (msg.type == TMessageType.EXCEPTION) {
@@ -937,10 +944,13 @@
       if (result.__isset.io) {
         throw result.io;
       }
+      if (result.__isset.nf) {
+        throw result.nf;
+      }
       throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumns failed: unknown result");
     }
 
-    public TRowResult getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException
+    public TRowResult getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, NotFound, TException
     {
       send_getRowTs(tableName, row, timestamp);
       return recv_getRowTs();
@@ -958,7 +968,7 @@
       oprot_.getTransport().flush();
     }
 
-    public TRowResult recv_getRowTs() throws IOError, TException
+    public TRowResult recv_getRowTs() throws IOError, NotFound, TException
     {
       TMessage msg = iprot_.readMessageBegin();
       if (msg.type == TMessageType.EXCEPTION) {
@@ -975,10 +985,13 @@
       if (result.__isset.io) {
         throw result.io;
       }
+      if (result.__isset.nf) {
+        throw result.nf;
+      }
       throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowTs failed: unknown result");
     }
 
-    public TRowResult getRowWithColumnsTs(byte[] tableName, byte[] row, List<byte[]> columns, long timestamp) throws IOError, TException
+    public TRowResult getRowWithColumnsTs(byte[] tableName, byte[] row, List<byte[]> columns, long timestamp) throws IOError, NotFound, TException
     {
       send_getRowWithColumnsTs(tableName, row, columns, timestamp);
       return recv_getRowWithColumnsTs();
@@ -997,7 +1010,7 @@
       oprot_.getTransport().flush();
     }
 
-    public TRowResult recv_getRowWithColumnsTs() throws IOError, TException
+    public TRowResult recv_getRowWithColumnsTs() throws IOError, NotFound, TException
     {
       TMessage msg = iprot_.readMessageBegin();
       if (msg.type == TMessageType.EXCEPTION) {
@@ -1014,6 +1027,9 @@
       if (result.__isset.io) {
         throw result.io;
       }
+      if (result.__isset.nf) {
+        throw result.nf;
+      }
       throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumnsTs failed: unknown result");
     }
 
@@ -1917,6 +1933,9 @@
         } catch (IOError io) {
           result.io = io;
           result.__isset.io = true;
+        } catch (NotFound nf) {
+          result.nf = nf;
+          result.__isset.nf = true;
         }
         oprot.writeMessageBegin(new TMessage("getRow", TMessageType.REPLY, seqid));
         result.write(oprot);
@@ -1939,6 +1958,9 @@
         } catch (IOError io) {
           result.io = io;
           result.__isset.io = true;
+        } catch (NotFound nf) {
+          result.nf = nf;
+          result.__isset.nf = true;
         }
         oprot.writeMessageBegin(new TMessage("getRowWithColumns", TMessageType.REPLY, seqid));
         result.write(oprot);
@@ -1961,6 +1983,9 @@
         } catch (IOError io) {
           result.io = io;
           result.__isset.io = true;
+        } catch (NotFound nf) {
+          result.nf = nf;
+          result.__isset.nf = true;
         }
         oprot.writeMessageBegin(new TMessage("getRowTs", TMessageType.REPLY, seqid));
         result.write(oprot);
@@ -1983,6 +2008,9 @@
         } catch (IOError io) {
           result.io = io;
           result.__isset.io = true;
+        } catch (NotFound nf) {
+          result.nf = nf;
+          result.__isset.nf = true;
         }
         oprot.writeMessageBegin(new TMessage("getRowWithColumnsTs", TMessageType.REPLY, seqid));
         result.write(oprot);
@@ -5937,11 +5965,13 @@
   public final static class getRow_result implements TBase, java.io.Serializable   {
     public TRowResult success;
     public IOError io;
+    public NotFound nf;
 
     public final Isset __isset = new Isset();
     public static final class Isset implements java.io.Serializable {
       public boolean success = false;
       public boolean io = false;
+      public boolean nf = false;
     }
 
     public getRow_result() {
@@ -5949,13 +5979,16 @@
 
     public getRow_result(
       TRowResult success,
-      IOError io)
+      IOError io,
+      NotFound nf)
     {
       this();
       this.success = success;
       this.__isset.success = true;
       this.io = io;
       this.__isset.io = true;
+      this.nf = nf;
+      this.__isset.nf = true;
     }
 
     public boolean equals(Object that) {
@@ -5988,6 +6021,15 @@
           return false;
       }
 
+      boolean this_present_nf = true && (this.nf != null);
+      boolean that_present_nf = true && (that.nf != null);
+      if (this_present_nf || that_present_nf) {
+        if (!(this_present_nf && that_present_nf))
+          return false;
+        if (!this.nf.equals(that.nf))
+          return false;
+      }
+
       return true;
     }
 
@@ -6024,6 +6066,15 @@
               TProtocolUtil.skip(iprot, field.type);
             }
             break;
+          case 2:
+            if (field.type == TType.STRUCT) {
+              this.nf = new NotFound();
+              this.nf.read(iprot);
+              this.__isset.nf = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
           default:
             TProtocolUtil.skip(iprot, field.type);
             break;
@@ -6056,6 +6107,15 @@
           this.io.write(oprot);
           oprot.writeFieldEnd();
         }
+      } else if (this.__isset.nf) {
+        if (this.nf != null) {
+          field.name = "nf";
+          field.type = TType.STRUCT;
+          field.id = 2;
+          oprot.writeFieldBegin(field);
+          this.nf.write(oprot);
+          oprot.writeFieldEnd();
+        }
       }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
@@ -6067,6 +6127,8 @@
       sb.append(this.success.toString());
       sb.append(",io:");
       sb.append(this.io.toString());
+      sb.append(",nf:");
+      sb.append(this.nf.toString());
       sb.append(")");
       return sb.toString();
     }
@@ -6257,11 +6319,13 @@
   public final static class getRowWithColumns_result implements TBase, java.io.Serializable   {
     public TRowResult success;
     public IOError io;
+    public NotFound nf;
 
     public final Isset __isset = new Isset();
     public static final class Isset implements java.io.Serializable {
       public boolean success = false;
       public boolean io = false;
+      public boolean nf = false;
     }
 
     public getRowWithColumns_result() {
@@ -6269,13 +6333,16 @@
 
     public getRowWithColumns_result(
       TRowResult success,
-      IOError io)
+      IOError io,
+      NotFound nf)
     {
       this();
       this.success = success;
       this.__isset.success = true;
       this.io = io;
       this.__isset.io = true;
+      this.nf = nf;
+      this.__isset.nf = true;
     }
 
     public boolean equals(Object that) {
@@ -6308,6 +6375,15 @@
           return false;
       }
 
+      boolean this_present_nf = true && (this.nf != null);
+      boolean that_present_nf = true && (that.nf != null);
+      if (this_present_nf || that_present_nf) {
+        if (!(this_present_nf && that_present_nf))
+          return false;
+        if (!this.nf.equals(that.nf))
+          return false;
+      }
+
       return true;
     }
 
@@ -6344,6 +6420,15 @@
               TProtocolUtil.skip(iprot, field.type);
             }
             break;
+          case 2:
+            if (field.type == TType.STRUCT) {
+              this.nf = new NotFound();
+              this.nf.read(iprot);
+              this.__isset.nf = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
           default:
             TProtocolUtil.skip(iprot, field.type);
             break;
@@ -6376,6 +6461,15 @@
           this.io.write(oprot);
           oprot.writeFieldEnd();
         }
+      } else if (this.__isset.nf) {
+        if (this.nf != null) {
+          field.name = "nf";
+          field.type = TType.STRUCT;
+          field.id = 2;
+          oprot.writeFieldBegin(field);
+          this.nf.write(oprot);
+          oprot.writeFieldEnd();
+        }
       }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
@@ -6387,6 +6481,8 @@
       sb.append(this.success.toString());
       sb.append(",io:");
       sb.append(this.io.toString());
+      sb.append(",nf:");
+      sb.append(this.nf.toString());
       sb.append(")");
       return sb.toString();
     }
@@ -6559,11 +6655,13 @@
   public final static class getRowTs_result implements TBase, java.io.Serializable   {
     public TRowResult success;
     public IOError io;
+    public NotFound nf;
 
     public final Isset __isset = new Isset();
     public static final class Isset implements java.io.Serializable {
       public boolean success = false;
       public boolean io = false;
+      public boolean nf = false;
     }
 
     public getRowTs_result() {
@@ -6571,13 +6669,16 @@
 
     public getRowTs_result(
       TRowResult success,
-      IOError io)
+      IOError io,
+      NotFound nf)
     {
       this();
       this.success = success;
       this.__isset.success = true;
       this.io = io;
       this.__isset.io = true;
+      this.nf = nf;
+      this.__isset.nf = true;
     }
 
     public boolean equals(Object that) {
@@ -6610,6 +6711,15 @@
           return false;
       }
 
+      boolean this_present_nf = true && (this.nf != null);
+      boolean that_present_nf = true && (that.nf != null);
+      if (this_present_nf || that_present_nf) {
+        if (!(this_present_nf && that_present_nf))
+          return false;
+        if (!this.nf.equals(that.nf))
+          return false;
+      }
+
       return true;
     }
 
@@ -6646,6 +6756,15 @@
               TProtocolUtil.skip(iprot, field.type);
             }
             break;
+          case 2:
+            if (field.type == TType.STRUCT) {
+              this.nf = new NotFound();
+              this.nf.read(iprot);
+              this.__isset.nf = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
           default:
             TProtocolUtil.skip(iprot, field.type);
             break;
@@ -6678,6 +6797,15 @@
           this.io.write(oprot);
           oprot.writeFieldEnd();
         }
+      } else if (this.__isset.nf) {
+        if (this.nf != null) {
+          field.name = "nf";
+          field.type = TType.STRUCT;
+          field.id = 2;
+          oprot.writeFieldBegin(field);
+          this.nf.write(oprot);
+          oprot.writeFieldEnd();
+        }
       }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
@@ -6689,6 +6817,8 @@
       sb.append(this.success.toString());
       sb.append(",io:");
       sb.append(this.io.toString());
+      sb.append(",nf:");
+      sb.append(this.nf.toString());
       sb.append(")");
       return sb.toString();
     }
@@ -6909,11 +7039,13 @@
   public final static class getRowWithColumnsTs_result implements TBase, java.io.Serializable   {
     public TRowResult success;
     public IOError io;
+    public NotFound nf;
 
     public final Isset __isset = new Isset();
     public static final class Isset implements java.io.Serializable {
       public boolean success = false;
       public boolean io = false;
+      public boolean nf = false;
     }
 
     public getRowWithColumnsTs_result() {
@@ -6921,13 +7053,16 @@
 
     public getRowWithColumnsTs_result(
       TRowResult success,
-      IOError io)
+      IOError io,
+      NotFound nf)
     {
       this();
       this.success = success;
       this.__isset.success = true;
       this.io = io;
       this.__isset.io = true;
+      this.nf = nf;
+      this.__isset.nf = true;
     }
 
     public boolean equals(Object that) {
@@ -6960,6 +7095,15 @@
           return false;
       }
 
+      boolean this_present_nf = true && (this.nf != null);
+      boolean that_present_nf = true && (that.nf != null);
+      if (this_present_nf || that_present_nf) {
+        if (!(this_present_nf && that_present_nf))
+          return false;
+        if (!this.nf.equals(that.nf))
+          return false;
+      }
+
       return true;
     }
 
@@ -6996,6 +7140,15 @@
               TProtocolUtil.skip(iprot, field.type);
             }
             break;
+          case 2:
+            if (field.type == TType.STRUCT) {
+              this.nf = new NotFound();
+              this.nf.read(iprot);
+              this.__isset.nf = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
           default:
             TProtocolUtil.skip(iprot, field.type);
             break;
@@ -7028,6 +7181,15 @@
           this.io.write(oprot);
           oprot.writeFieldEnd();
         }
+      } else if (this.__isset.nf) {
+        if (this.nf != null) {
+          field.name = "nf";
+          field.type = TType.STRUCT;
+          field.id = 2;
+          oprot.writeFieldBegin(field);
+          this.nf.write(oprot);
+          oprot.writeFieldEnd();
+        }
       }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
@@ -7039,6 +7201,8 @@
       sb.append(this.success.toString());
       sb.append(",io:");
       sb.append(this.io.toString());
+      sb.append(",nf:");
+      sb.append(this.nf.toString());
       sb.append(")");
       return sb.toString();
     }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/thrift/DisabledTestThriftServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/thrift/DisabledTestThriftServer.java?rev=768044&r1=768043&r2=768044&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/thrift/DisabledTestThriftServer.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/thrift/DisabledTestThriftServer.java Thu Apr 23 20:36:00 2009
@@ -166,7 +166,13 @@
       failed2 = true;
     }
     assertTrue(failed2);
-    assertNull(handler.getRow(tableAname, rowBname));
+    boolean failed3 = false;
+    try {
+      handler.getRow(tableAname, rowBname);
+    } catch (NotFound nf) {
+      failed3 = true;
+    }
+    assertTrue(failed3);
 
     // Teardown
     handler.disableTable(tableAname);
@@ -236,7 +242,13 @@
     }
     assertTrue(failed);
     assertTrue(Bytes.equals(handler.get(tableAname, rowAname, columnBname).value, valueCname));
-    assertNull(handler.getRow(tableAname, rowBname));
+    boolean failed2 = false;
+    try {
+      handler.getRow(tableAname, rowBname);
+    } catch (NotFound nf) {
+      failed2 = true;
+    }
+    assertTrue(failed2);
 
     // Teardown
     handler.disableTable(tableAname);