hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r680215 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/HTableDescriptor.java src/java/org/apache/hadoop/hbase/client/UnmodifyableHTableDescriptor.java
Date Mon, 28 Jul 2008 00:23:16 GMT
Author: stack
Date: Sun Jul 27 17:23:15 2008
New Revision: 680215

URL: http://svn.apache.org/viewvc?rev=680215&view=rev
Log:
HBASE-780 Can't scan '.META.' from new shell

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/UnmodifyableHTableDescriptor.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=680215&r1=680214&r2=680215&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Sun Jul 27 17:23:15 2008
@@ -216,6 +216,7 @@
                expecting IllegalStateException
    HBASE-766   FileNotFoundException trying to load HStoreFile 'data'
    HBASE-770   Update HBaseRPC to match hadoop 0.17 RPC
+   HBASE-780   Can't scan '.META.' from new shell
    
   IMPROVEMENTS
    HBASE-559   MR example job to count table rows

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java?rev=680215&r1=680214&r2=680215&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java Sun Jul 27 17:23:15
2008
@@ -88,7 +88,7 @@
    * Private constructor used internally creating table descriptors for 
    * catalog tables: e.g. .META. and -ROOT-.
    */
-  private HTableDescriptor(final byte [] name, HColumnDescriptor[] families) {
+  protected HTableDescriptor(final byte [] name, HColumnDescriptor[] families) {
     this.name = name.clone();
     setMetaFlags(name);
     for(HColumnDescriptor descriptor : families) {

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/UnmodifyableHTableDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/UnmodifyableHTableDescriptor.java?rev=680215&r1=680214&r2=680215&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/UnmodifyableHTableDescriptor.java
(original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/UnmodifyableHTableDescriptor.java
Sun Jul 27 17:23:15 2008
@@ -36,10 +36,21 @@
    * @param desc
    */
   UnmodifyableHTableDescriptor(final HTableDescriptor desc) {
-    super(desc.getName());
+    super(desc.getName(), getUnmodifyableFamilies(desc));
+  }
+  
+  /*
+   * @param desc
+   * @return Families as unmodifiable array.
+   */
+  private static HColumnDescriptor[] getUnmodifyableFamilies(
+      final HTableDescriptor desc) {
+    HColumnDescriptor [] f = new HColumnDescriptor[desc.getFamilies().size()];
+    int i = 0;
     for (HColumnDescriptor c: desc.getFamilies()) {
-      super.addFamily(new UnmodifyableHColumnDescriptor(c));
+      f[i++] = c;
     }
+    return f;
   }
 
   /**



Mime
View raw message