hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r661512 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/HRegion.java src/java/org/apache/hadoop/hbase/regionserver/NoSuchColumnFamilyException.java
Date Thu, 29 May 2008 22:35:37 GMT
Author: stack
Date: Thu May 29 15:35:36 2008
New Revision: 661512

URL: http://svn.apache.org/viewvc?rev=661512&view=rev
Log:
HBASE-651  table.commit should throw NoSuchColumnFamilyException if column family doesn't
exist

Added:
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/NoSuchColumnFamilyException.java
Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=661512&r1=661511&r2=661512&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Thu May 29 15:35:36 2008
@@ -29,6 +29,8 @@
    HBASE-646   EOFException opening HStoreFile info file (spin on HBASE-645and 550)
    HBASE-648   If mapfile index is empty, run repair
    HBASE-640   TestMigrate failing on hudson
+   HASE-651    Table.commit should throw NoSuchColumnFamilyException if column
+               family doesn't exist
 
   IMPROVEMENTS
    HBASE-559   MR example job to count table rows

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=661512&r1=661511&r2=661512&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java Thu May
29 15:35:36 2008
@@ -1556,17 +1556,18 @@
     }
   }
   
-  /**
+  /*
    * Make sure this is a valid column for the current table
    * @param columnName
-   * @throws IOException
+   * @throws NoSuchColumnFamilyException
    */
-  private void checkColumn(final byte [] columnName) throws IOException {
+  private void checkColumn(final byte [] columnName)
+  throws NoSuchColumnFamilyException {
     if (columnName == null) {
       return;
     }
     if (!regionInfo.getTableDesc().hasFamily(columnName)) {
-      throw new IOException("Column family on " +
+      throw new NoSuchColumnFamilyException("Column family on " +
         Bytes.toString(columnName) + " does not exist in region " + this
           + " in table " + regionInfo.getTableDesc());
     }

Added: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/NoSuchColumnFamilyException.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/NoSuchColumnFamilyException.java?rev=661512&view=auto
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/NoSuchColumnFamilyException.java
(added)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/NoSuchColumnFamilyException.java
Thu May 29 15:35:36 2008
@@ -0,0 +1,35 @@
+/**
+ * Copyright 2008 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver;
+
+import java.io.IOException;
+
+/**
+ * Thrown if request for nonexistent column family.
+ */
+public class NoSuchColumnFamilyException extends IOException {
+  public NoSuchColumnFamilyException() {
+    super();
+  }
+
+  public NoSuchColumnFamilyException(String message) {
+    super(message);
+  }
+}
\ No newline at end of file



Mime
View raw message