hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r678866 - in /hadoop/hbase/trunk: bin/ src/java/org/apache/hadoop/hbase/ src/test/org/apache/hadoop/hbase/regionserver/
Date Tue, 22 Jul 2008 19:22:22 GMT
Author: stack
Date: Tue Jul 22 12:22:21 2008
New Revision: 678866

URL: http://svn.apache.org/viewvc?rev=678866&view=rev
Log:
HBASE-760 brittle/broken HCD create handling in HBase.rb

Modified:
    hadoop/hbase/trunk/bin/HBase.rb
    hadoop/hbase/trunk/bin/hirb.rb
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestRegionServerExit.java

Modified: hadoop/hbase/trunk/bin/HBase.rb
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/bin/HBase.rb?rev=678866&r1=678865&r2=678866&view=diff
==============================================================================
--- hadoop/hbase/trunk/bin/HBase.rb (original)
+++ hadoop/hbase/trunk/bin/HBase.rb Tue Jul 22 12:22:21 2008
@@ -25,6 +25,7 @@
   TIMESTAMP = "TIMESTAMP"
   NAME = HConstants::NAME
   VERSIONS = HConstants::VERSIONS
+  IN_MEMORY = HConstants::IN_MEMORY
   STOPROW = "STOPROW"
   STARTROW = "STARTROW"
   ENDROW = STOPROW
@@ -158,7 +159,7 @@
         arg[VERSIONS]? arg[VERSIONS]: HColumnDescriptor::DEFAULT_VERSIONS,
         arg[HColumnDescriptor::COMPRESSION]? HColumnDescriptor::CompressionType::valueOf(arg[HColumnDescriptor::COMPRESSION]):
           HColumnDescriptor::DEFAULT_COMPRESSION,
-        arg[HColumnDescriptor::IN_MEMORY]? arg[HColumnDescriptor::IN_MEMORY]: HColumnDescriptor::DEFAULT_IN_MEMORY,
+        arg[IN_MEMORY]? arg[IN_MEMORY]: HColumnDescriptor::DEFAULT_IN_MEMORY,
         arg[HColumnDescriptor::BLOCKCACHE]? arg[HColumnDescriptor::BLOCKCACHE]: HColumnDescriptor::DEFAULT_BLOCKCACHE,
         arg[HColumnDescriptor::LENGTH]? arg[HColumnDescriptor::LENGTH]: HColumnDescriptor::DEFAULT_LENGTH,
         arg[HColumnDescriptor::TTL]? arg[HColumnDescriptor::TTL]: HColumnDescriptor::DEFAULT_TTL,

Modified: hadoop/hbase/trunk/bin/hirb.rb
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/bin/hirb.rb?rev=678866&r1=678865&r2=678866&view=diff
==============================================================================
--- hadoop/hbase/trunk/bin/hirb.rb (original)
+++ hadoop/hbase/trunk/bin/hirb.rb Tue Jul 22 12:22:21 2008
@@ -117,18 +117,14 @@
  create    Create table; pass table name, a dictionary of specifications per
            column family, and optionally a dictionary of table configuration.
            Dictionaries are described below in the GENERAL NOTES section.
-           For example, to create a table named 't1' with a single family named
-           'f1' with an alternate maximum number of cells, type:
+           Examples:
 
            hbase> create 't1', {NAME => 'f1', VERSIONS => 5}
-
-           To create a table with 'f1', 'f2', and 'f3' using all defaults:
-
            hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
-
-           or in shorthand:
-
+           hbase> # The above in shorthand would be the following:
            hbase> create 't1', 'f1', 'f2', 'f3'
+           hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000,
\
+             BLOCKCACHE => true}
 
  describe  Describe the named table: e.g. "hbase> describe 't1'"
 

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java?rev=678866&r1=678865&r2=678866&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java Tue Jul 22
12:22:21 2008
@@ -62,16 +62,13 @@
   }
 
   public static final String COMPRESSION = "COMPRESSION";
-  public static final String IN_MEMORY = "IN_MEMORY";
   public static final String BLOCKCACHE = "BLOCKCACHE";
   public static final String LENGTH = "LENGTH";
   public static final String TTL = "TTL";
-  public static final String VERSIONS = "VERSIONS";
   public static final String BLOOMFILTER = "BLOOMFILTER";
   public static final String FOREVER = "FOREVER";
   public static final String MAPFILE_INDEX_INTERVAL =
       "MAPFILE_INDEX_INTERVAL";
-  public static final String MEMCACHE_FLUSHSIZE = "MEMCACHE_FLUSHSIZE";
 
   /**
    * Default compression type.
@@ -322,7 +319,7 @@
   
   /** @return maximum number of versions */
   public int getMaxVersions() {
-    String value = getValue(VERSIONS);
+    String value = getValue(HConstants.VERSIONS);
     if (value != null)
       return Integer.valueOf(value);
     return DEFAULT_VERSIONS;
@@ -332,7 +329,7 @@
    * @param maxVersions maximum number of versions
    */
   public void setMaxVersions(int maxVersions) {
-    setValue(VERSIONS, Integer.toString(maxVersions));
+    setValue(HConstants.VERSIONS, Integer.toString(maxVersions));
   }
   
   /**
@@ -359,7 +356,7 @@
    * @return True if we are to keep all in use HRegionServer cache.
    */
   public boolean isInMemory() {
-    String value = getValue(IN_MEMORY);
+    String value = getValue(HConstants.IN_MEMORY);
     if (value != null)
       return Boolean.valueOf(value);
     return DEFAULT_IN_MEMORY;
@@ -370,7 +367,7 @@
    * cache
    */
   public void setInMemory(boolean inMemory) {
-    setValue(IN_MEMORY, Boolean.toString(inMemory));
+    setValue(HConstants.IN_MEMORY, Boolean.toString(inMemory));
   }
 
   /**

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java?rev=678866&r1=678865&r2=678866&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java Tue Jul 22 12:22:21
2008
@@ -225,4 +225,5 @@
 
   public static final String NAME = "NAME";
   public static final String VERSIONS = "VERSIONS";
+  public static final String IN_MEMORY = "IN_MEMORY";
 }
\ No newline at end of file

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=678866&r1=678865&r2=678866&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 Tue Jul 22 12:22:21
2008
@@ -69,7 +69,6 @@
   public static final String FAMILIES = "FAMILIES";
 
   public static final String MAX_FILESIZE = "MAX_FILESIZE";
-  public static final String IN_MEMORY = "IN_MEMORY";
   public static final String READONLY = "READONLY";
   public static final String MEMCACHE_FLUSHSIZE = "MEMCACHE_FLUSHSIZE";
   public static final String IS_ROOT = "IS_ROOT";
@@ -269,7 +268,7 @@
    * HRegionServer cache only
    */
   public boolean isInMemory() {
-    String value = getValue(IN_MEMORY);
+    String value = getValue(HConstants.IN_MEMORY);
     if (value != null)
       return Boolean.valueOf(value);
     return DEFAULT_IN_MEMORY;
@@ -280,7 +279,7 @@
    * the HRegionServer cache only.
    */
   public void setInMemory(boolean inMemory) {
-    setValue(IN_MEMORY, Boolean.toString(inMemory));
+    setValue(HConstants.IN_MEMORY, Boolean.toString(inMemory));
   }
 
   /**

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestRegionServerExit.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestRegionServerExit.java?rev=678866&r1=678865&r2=678866&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestRegionServerExit.java
(original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestRegionServerExit.java
Tue Jul 22 12:22:21 2008
@@ -78,6 +78,7 @@
   
   /**
    * Test abort of region server.
+   * Test is flakey up on hudson.  Needs work.
    * @throws IOException
    */
   public void disabledTestCleanExit() throws IOException {



Mime
View raw message