hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r618347 [1/2] - in /hadoop/core/trunk: ./ src/contrib/hbase/conf/ src/contrib/hbase/src/java/org/apache/hadoop/hbase/ src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/ src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/ ...
Date Mon, 04 Feb 2008 17:54:38 GMT
Author: tomwhite
Date: Mon Feb  4 09:54:35 2008
New Revision: 618347

URL: http://svn.apache.org/viewvc?rev=618347&view=rev
Log:
HADOOP-1398.  Add HBase in-memory block cache.  Contributed by Tom White.

Added:
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/io/BlockFSInputStream.java
    hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/io/TestBlockFSInputStream.java
Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/contrib/hbase/conf/hbase-default.xml
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/AlterCommand.java
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/HQLParser.jj
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/SchemaModificationCommand.java
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParser.java
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserConstants.java
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserTokenManager.java
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java
    hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
    hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
    hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestBloomFilters.java
    hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestTimestamp.java
    hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestToString.java
    hadoop/core/trunk/src/java/org/apache/hadoop/io/MapFile.java
    hadoop/core/trunk/src/java/org/apache/hadoop/io/SequenceFile.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Feb  4 09:54:35 2008
@@ -7,6 +7,8 @@
 
   NEW FEATURES
 
+    HADOOP-1398.  Add HBase in-memory block cache.  (tomwhite)
+
   OPTIMIZATIONS
 
   BUG FIXES

Modified: hadoop/core/trunk/src/contrib/hbase/conf/hbase-default.xml
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/conf/hbase-default.xml?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/conf/hbase-default.xml (original)
+++ hadoop/core/trunk/src/contrib/hbase/conf/hbase-default.xml Mon Feb  4 09:54:35 2008
@@ -221,6 +221,12 @@
     such as hlog.
     </description>
   </property>
+  <property>
+    <name>hbase.hstore.blockCache.blockSize</name>
+    <value>65536</value>
+    <description>The size of each block in any block caches.
+    </description>
+  </property>
 
   <!-- HbaseShell Configurations -->
   <property>

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java Mon Feb  4 09:54:35 2008
@@ -42,7 +42,7 @@
 public class HColumnDescriptor implements WritableComparable {
   
   // For future backward compatibility
-  private static final byte COLUMN_DESCRIPTOR_VERSION = (byte)1;
+  private static final byte COLUMN_DESCRIPTOR_VERSION = (byte)2;
   
   /** Legal family names can only contain 'word characters' and end in a colon. */
   public static final Pattern LEGAL_FAMILY_NAME = Pattern.compile("\\w+:");
@@ -77,6 +77,11 @@
   public static final boolean DEFAULT_IN_MEMORY = false;
   
   /**
+   * Default setting for whether to use a block cache or not.
+   */
+  public static final boolean DEFAULT_BLOCK_CACHE_ENABLED = false;
+  
+  /**
    * Default maximum length of cell contents.
    */
   public static final int DEFAULT_MAX_VALUE_LENGTH = Integer.MAX_VALUE;
@@ -95,6 +100,8 @@
   private CompressionType compressionType;
   // Serve reads from in-memory cache
   private boolean inMemory;
+  // Serve reads from in-memory block cache
+  private boolean blockCacheEnabled;
   // Maximum value size
   private int maxValueLength;
   // True if bloom filter was specified
@@ -123,6 +130,7 @@
     this(columnName == null || columnName.length() <= 0?
       new Text(): new Text(columnName),
       DEFAULT_N_VERSIONS, DEFAULT_COMPRESSION_TYPE, DEFAULT_IN_MEMORY,
+      DEFAULT_BLOCK_CACHE_ENABLED, 
       Integer.MAX_VALUE, DEFAULT_BLOOM_FILTER_DESCRIPTOR);
   }
   
@@ -134,6 +142,7 @@
    * @param compression Compression type
    * @param inMemory If true, column data should be kept in an HRegionServer's
    * cache
+   * @param blockCacheEnabled If true, MapFile blocks should be cached
    * @param maxValueLength Restrict values to &lt;= this value
    * @param bloomFilter Enable the specified bloom filter for this column
    * 
@@ -144,6 +153,7 @@
    */
   public HColumnDescriptor(final Text name, final int maxVersions,
       final CompressionType compression, final boolean inMemory,
+      final boolean blockCacheEnabled,
       final int maxValueLength, final BloomFilterDescriptor bloomFilter) {
     String familyStr = name.toString();
     // Test name if not null (It can be null when deserializing after
@@ -165,6 +175,7 @@
     }
     this.maxVersions = maxVersions;
     this.inMemory = inMemory;
+    this.blockCacheEnabled = blockCacheEnabled;
     this.maxValueLength = maxValueLength;
     this.bloomFilter = bloomFilter;
     this.bloomFilterSpecified = this.bloomFilter == null ? false : true;
@@ -211,6 +222,13 @@
   public boolean isInMemory() {
     return this.inMemory;
   }
+  
+  /**
+   * @return True if MapFile blocks should be cached.
+   */
+  public boolean isBlockCacheEnabled() {
+    return blockCacheEnabled;
+  }
 
   /**
    * @return Maximum value length.
@@ -234,6 +252,7 @@
     return "{name: " + tmp.substring(0, tmp.length() - 1) +
       ", max versions: " + maxVersions +
       ", compression: " + this.compressionType + ", in memory: " + inMemory +
+      ", block cache enabled: " + blockCacheEnabled +
       ", max length: " + maxValueLength + ", bloom filter: " +
       (bloomFilterSpecified ? bloomFilter.toString() : "none") + "}";
   }
@@ -251,6 +270,7 @@
     result ^= Integer.valueOf(this.maxVersions).hashCode();
     result ^= this.compressionType.hashCode();
     result ^= Boolean.valueOf(this.inMemory).hashCode();
+    result ^= Boolean.valueOf(this.blockCacheEnabled).hashCode();
     result ^= Integer.valueOf(this.maxValueLength).hashCode();
     result ^= Boolean.valueOf(this.bloomFilterSpecified).hashCode();
     result ^= Byte.valueOf(this.versionNumber).hashCode();
@@ -277,6 +297,10 @@
       bloomFilter = new BloomFilterDescriptor();
       bloomFilter.readFields(in);
     }
+    
+    if (this.versionNumber > 1) {
+      this.blockCacheEnabled = in.readBoolean();
+    }
   }
 
   /** {@inheritDoc} */
@@ -292,6 +316,8 @@
     if(bloomFilterSpecified) {
       bloomFilter.write(out);
     }
+
+    out.writeBoolean(this.blockCacheEnabled);
   }
 
   // Comparable
@@ -320,6 +346,18 @@
         result = 0;
         
       } else if(this.inMemory) {
+        result = -1;
+        
+      } else {
+        result = 1;
+      }
+    }
+    
+    if(result == 0) {
+      if(this.blockCacheEnabled == other.blockCacheEnabled) {
+        result = 0;
+        
+      } else if(this.blockCacheEnabled) {
         result = -1;
         
       } else {

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java Mon Feb  4 09:54:35 2008
@@ -739,11 +739,21 @@
     // Move maxSeqId on by one. Why here?  And not in HRegion?
     this.maxSeqId += 1;
     
-    // Finally, start up all the map readers! (There should be just one at this 
-    // point, as we've compacted them all.)
+    // Finally, start up all the map readers! (There could be more than one
+    // since we haven't compacted yet.)
+    boolean first = true;
     for(Map.Entry<Long, HStoreFile> e: this.storefiles.entrySet()) {
-      this.readers.put(e.getKey(),
-        e.getValue().getReader(this.fs, this.bloomFilter));
+      if (first) {
+        // Use a block cache (if configured) for the first reader only
+        // so as to control memory usage.
+        this.readers.put(e.getKey(),
+            e.getValue().getReader(this.fs, this.bloomFilter,
+                family.isBlockCacheEnabled()));
+        first = false;
+      } else {
+        this.readers.put(e.getKey(),
+          e.getValue().getReader(this.fs, this.bloomFilter));
+      }
     }
   }
   
@@ -1560,7 +1570,10 @@
           // 6. Loading the new TreeMap.
           Long orderVal = Long.valueOf(finalCompactedFile.loadInfo(fs));
           this.readers.put(orderVal,
-            finalCompactedFile.getReader(this.fs, this.bloomFilter));
+            // Use a block cache (if configured) for this reader since
+            // it is the only one.
+            finalCompactedFile.getReader(this.fs, this.bloomFilter,
+                family.isBlockCacheEnabled()));
           this.storefiles.put(orderVal, finalCompactedFile);
         } catch (IOException e) {
           e = RemoteExceptionHandler.checkIOException(e);

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java Mon Feb  4 09:54:35 2008
@@ -31,9 +31,11 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.io.BlockFSInputStream;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Writables;
 import org.apache.hadoop.io.MapFile;
@@ -422,6 +424,29 @@
       new BloomFilterMapFile.Reader(fs, getMapFilePath().toString(),
         conf, bloomFilter);
   }
+  
+  /**
+   * Get reader for the store file map file.
+   * Client is responsible for closing file when done.
+   * @param fs
+   * @param bloomFilter If null, no filtering is done.
+   * @param blockCacheEnabled If true, MapFile blocks should be cached.
+   * @return MapFile.Reader
+   * @throws IOException
+   */
+  public synchronized MapFile.Reader getReader(final FileSystem fs,
+      final Filter bloomFilter, final boolean blockCacheEnabled)
+  throws IOException {
+    
+    if (isReference()) {
+      return new HStoreFile.HalfMapFileReader(fs,
+          getMapFilePath(reference).toString(), conf, 
+          reference.getFileRegion(), reference.getMidkey(), bloomFilter,
+          blockCacheEnabled);
+    }
+    return new BloomFilterMapFile.Reader(fs, getMapFilePath().toString(),
+        conf, bloomFilter, blockCacheEnabled);
+  }
 
   /**
    * Get a store file writer.
@@ -581,7 +606,13 @@
    */
   static class HbaseMapFile extends MapFile {
 
+    /**
+     * A reader capable of reading and caching blocks of the data file.
+     */
     static class HbaseReader extends MapFile.Reader {
+      
+      private final boolean blockCacheEnabled;
+      
       /**
        * @param fs
        * @param dirName
@@ -590,7 +621,23 @@
        */
       public HbaseReader(FileSystem fs, String dirName, Configuration conf)
       throws IOException {
-        super(fs, dirName, conf);
+        this(fs, dirName, conf, false);
+      }
+      
+      /**
+       * @param fs
+       * @param dirName
+       * @param conf
+       * @param blockCacheEnabled
+       * @throws IOException
+       */
+      public HbaseReader(FileSystem fs, String dirName, Configuration conf,
+          boolean blockCacheEnabled)
+      throws IOException {
+        super(fs, dirName, null, conf, false); // defer opening streams
+        this.blockCacheEnabled = blockCacheEnabled;
+        open(fs, dirName, null, conf);
+        
         // Force reading of the mapfile index by calling midKey.
         // Reading the index will bring the index into memory over
         // here on the client and then close the index file freeing
@@ -601,6 +648,28 @@
         // using up datanode resources.  See HADOOP-2341.
         midKey();
       }
+
+      @Override
+      protected org.apache.hadoop.io.SequenceFile.Reader createDataFileReader(
+          FileSystem fs, Path dataFile, Configuration conf)
+      throws IOException {
+        if (!blockCacheEnabled) {
+          return super.createDataFileReader(fs, dataFile, conf);
+        }
+        LOG.info("Block Cache enabled");
+        final int blockSize = conf.getInt("hbase.hstore.blockCache.blockSize",
+            64 * 1024);
+        return new SequenceFile.Reader(fs, dataFile,  conf) {
+          @Override
+          protected FSDataInputStream openFile(FileSystem fs, Path file,
+              int bufferSize, long length) throws IOException {
+            
+            return new FSDataInputStream(new BlockFSInputStream(
+                    super.openFile(fs, file, bufferSize, length), length,
+                    blockSize));
+          }
+        };
+      }
     }
     
     static class HbaseWriter extends MapFile.Writer {
@@ -648,6 +717,13 @@
         super(fs, dirName, conf);
         bloomFilter = filter;
       }
+
+      public Reader(FileSystem fs, String dirName, Configuration conf,
+          final Filter filter, final boolean blockCacheEnabled)
+      throws IOException {
+        super(fs, dirName, conf, blockCacheEnabled);
+        bloomFilter = filter;
+      }
       
       /** {@inheritDoc} */
       @Override
@@ -741,7 +817,7 @@
         final Configuration conf, final Range r,
         final WritableComparable midKey)
     throws IOException {
-      this(fs, dirName, conf, r, midKey, null);
+      this(fs, dirName, conf, r, midKey, null, false);
     }
     
     HalfMapFileReader(final FileSystem fs, final String dirName, 
@@ -749,6 +825,16 @@
         final WritableComparable midKey, final Filter filter)
     throws IOException {
       super(fs, dirName, conf, filter);
+      top = isTopFileRegion(r);
+      midkey = midKey;
+    }
+    
+    HalfMapFileReader(final FileSystem fs, final String dirName, 
+        final Configuration conf, final Range r,
+        final WritableComparable midKey, final Filter filter,
+        final boolean blockCacheEnabled)
+    throws IOException {
+      super(fs, dirName, conf, filter, blockCacheEnabled);
       top = isTopFileRegion(r);
       midkey = midKey;
     }

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTableDescriptor.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTableDescriptor.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTableDescriptor.java Mon Feb  4 09:54:35 2008
@@ -43,15 +43,15 @@
   public static final HTableDescriptor rootTableDesc =
     new HTableDescriptor(HConstants.ROOT_TABLE_NAME,
         new HColumnDescriptor(HConstants.COLUMN_FAMILY, 1,
-            HColumnDescriptor.CompressionType.NONE, false, Integer.MAX_VALUE,
-            null));
+            HColumnDescriptor.CompressionType.NONE, false, false,
+            Integer.MAX_VALUE, null));
   
   /** table descriptor for meta table */
   public static final HTableDescriptor metaTableDesc =
     new HTableDescriptor(HConstants.META_TABLE_NAME,
         new HColumnDescriptor(HConstants.COLUMN_FAMILY, 1,
-            HColumnDescriptor.CompressionType.NONE, false, Integer.MAX_VALUE,
-            null));
+            HColumnDescriptor.CompressionType.NONE, false, false,
+            Integer.MAX_VALUE, null));
   
   private boolean rootregion;
   private boolean metaregion;

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/AlterCommand.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/AlterCommand.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/AlterCommand.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/AlterCommand.java Mon Feb  4 09:54:35 2008
@@ -202,6 +202,8 @@
             .get(spec)).toUpperCase());
       } else if (spec.equals("IN_MEMORY")) {
         inMemory = (Boolean) columnSpec.get(spec);
+      } else if (spec.equals("BLOCK_CACHE_ENABLED")) {
+        blockCacheEnabled = (Boolean) columnSpec.get(spec);
       } else if (spec.equals("BLOOMFILTER")) {
         bloomFilterType = BloomFilterType.valueOf(((String) columnSpec.get(spec))
             .toUpperCase());
@@ -229,7 +231,8 @@
     column = appendDelimiter(column);
 
     HColumnDescriptor columnDesc = new HColumnDescriptor(new Text(column),
-        maxVersions, compression, inMemory, maxLength, bloomFilterDesc);
+        maxVersions, compression, inMemory, blockCacheEnabled,
+        maxLength, bloomFilterDesc);
 
     return columnDesc;
   }
@@ -243,6 +246,7 @@
     maxLength = original.getMaxValueLength();
     compression = original.getCompression();
     inMemory = original.isInMemory();
+    blockCacheEnabled = original.isBlockCacheEnabled();
     bloomFilterDesc = original.getBloomFilter();
   }
 }

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/HQLParser.jj
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/HQLParser.jj?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/HQLParser.jj (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/HQLParser.jj Mon Feb  4 09:54:35 2008
@@ -118,6 +118,7 @@
    | <BLOCK: "block">
    | <RECORD: "record">
    | <IN_MEMORY: "in_memory">
+   | <BLOCK_CACHE_ENABLED: "block_cache_enabled">
    | <BLOOMFILTER: "bloomfilter">
    | <COUNTING_BLOOMFILTER: "counting_bloomfilter">
    | <RETOUCHED_BLOOMFILTER: "retouched_bloomfilter">
@@ -352,6 +353,11 @@
     <IN_MEMORY> 
     { 
       columnSpec.put("IN_MEMORY", true); 
+    } 
+   |  
+    <BLOCK_CACHE_ENABLED> 
+    { 
+      columnSpec.put("BLOCK_CACHE_ENABLED", true); 
     } 
    |  
     <BLOOMFILTER>

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/SchemaModificationCommand.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/SchemaModificationCommand.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/SchemaModificationCommand.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/SchemaModificationCommand.java Mon Feb  4 09:54:35 2008
@@ -37,6 +37,7 @@
   protected int maxLength;
   protected HColumnDescriptor.CompressionType compression;
   protected boolean inMemory;
+  protected boolean blockCacheEnabled;
   protected BloomFilterDescriptor bloomFilterDesc;
   protected BloomFilterType bloomFilterType;
   protected int vectorSize;
@@ -52,6 +53,7 @@
     maxLength = HColumnDescriptor.DEFAULT_MAX_VALUE_LENGTH;
     compression = HColumnDescriptor.DEFAULT_COMPRESSION_TYPE;
     inMemory = HColumnDescriptor.DEFAULT_IN_MEMORY;
+    blockCacheEnabled = HColumnDescriptor.DEFAULT_BLOCK_CACHE_ENABLED;
     bloomFilterDesc = HColumnDescriptor.DEFAULT_BLOOM_FILTER_DESCRIPTOR;
   }
 
@@ -76,6 +78,8 @@
             .valueOf(((String) columnSpec.get(spec)).toUpperCase());
       } else if (spec.equals("IN_MEMORY")) {
         inMemory = (Boolean) columnSpec.get(spec);
+      } else if (spec.equals("BLOCK_CACHE_ENABLED")) {
+        blockCacheEnabled = (Boolean) columnSpec.get(spec);
       } else if (spec.equals("BLOOMFILTER")) {
         bloomFilterType = BloomFilterType.valueOf(((String) columnSpec.get(spec))
             .toUpperCase());
@@ -103,7 +107,8 @@
     column = appendDelimiter(column);
 
     HColumnDescriptor columnDesc = new HColumnDescriptor(new Text(column),
-        maxVersions, compression, inMemory, maxLength, bloomFilterDesc);
+        maxVersions, compression, inMemory, blockCacheEnabled,
+        maxLength, bloomFilterDesc);
 
     return columnDesc;
   }

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParser.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParser.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParser.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParser.java Mon Feb  4 09:54:35 2008
@@ -75,7 +75,7 @@
     case SELECT:
     case ENABLE:
     case DISABLE:
-    case 68:
+    case 69:
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case HELP:
       case ALTER:
@@ -100,7 +100,7 @@
         jj_la1[0] = jj_gen;
         ;
       }
-      jj_consume_token(68);
+      jj_consume_token(69);
       break;
     case 0:
       jj_consume_token(0);
@@ -390,6 +390,7 @@
       case MAX_LENGTH:
       case COMPRESSION:
       case IN_MEMORY:
+      case BLOCK_CACHE_ENABLED:
       case BLOOMFILTER:
       case VECTOR_SIZE:
       case NUM_HASH:
@@ -440,6 +441,10 @@
         jj_consume_token(IN_MEMORY);
       columnSpec.put("IN_MEMORY", true);
         break;
+      case BLOCK_CACHE_ENABLED:
+        jj_consume_token(BLOCK_CACHE_ENABLED);
+      columnSpec.put("BLOCK_CACHE_ENABLED", true);
+        break;
       case BLOOMFILTER:
         jj_consume_token(BLOOMFILTER);
         jj_consume_token(EQUALS);
@@ -1080,33 +1085,33 @@
     finally { jj_save(0, xla); }
   }
 
-  final private boolean jj_3R_11() {
-    if (jj_scan_token(ID)) return true;
+  final private boolean jj_3_1() {
+    if (jj_scan_token(ADD)) return true;
+    if (jj_3R_10()) return true;
     return false;
   }
 
-  final private boolean jj_3R_10() {
+  final private boolean jj_3R_12() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_11()) {
+    if (jj_scan_token(67)) {
     jj_scanpos = xsp;
-    if (jj_3R_12()) return true;
+    if (jj_scan_token(68)) return true;
     }
     return false;
   }
 
-  final private boolean jj_3_1() {
-    if (jj_scan_token(ADD)) return true;
-    if (jj_3R_10()) return true;
+  final private boolean jj_3R_11() {
+    if (jj_scan_token(ID)) return true;
     return false;
   }
 
-  final private boolean jj_3R_12() {
+  final private boolean jj_3R_10() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(66)) {
+    if (jj_3R_11()) {
     jj_scanpos = xsp;
-    if (jj_scan_token(67)) return true;
+    if (jj_3R_12()) return true;
     }
     return false;
   }
@@ -1133,10 +1138,10 @@
       jj_la1_0 = new int[] {0xf3ffe0,0xf3ffe1,0xf3ffe0,0x0,0x0,0x0,0x0,0x33dbc0,0x33dbc0,0x0,0x600,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x80000000,0x0,0x2000000,0x0,0x3000000,0x8000000,0x3000000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
    }
    private static void jj_la1_1() {
-      jj_la1_1 = new int[] {0x0,0x0,0x0,0x40000000,0xc0000000,0xc0000000,0x40000000,0x40000000,0x40000000,0x40000000,0x0,0x731c000,0xe0000,0xe00000,0x731c000,0x10,0x10,0x18000000,0x0,0x0,0x0,0x0,0xe0002000,0x0,0x0,0x0,0x0,0x1,0x2,0x10,0x0,0xc0002000,0xc0002000,0xc0002000,0x0,0xc0002000,0x10,0x10,0x10,0xc0000000,0x0,0x40000000,};
+      jj_la1_1 = new int[] {0x0,0x0,0x0,0x80000000,0x80000000,0x80000000,0x80000000,0x80000000,0x80000000,0x80000000,0x0,0xe71c000,0xe0000,0x1c00000,0xe71c000,0x10,0x10,0x30000000,0x0,0x0,0x0,0x0,0xc0002000,0x0,0x0,0x0,0x0,0x1,0x2,0x10,0x0,0x80002000,0x80002000,0x80002000,0x0,0x80002000,0x10,0x10,0x10,0x80000000,0x0,0x80000000,};
    }
    private static void jj_la1_2() {
-      jj_la1_2 = new int[] {0x0,0x10,0x0,0x0,0x1,0x1,0xc,0x0,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0xc,0x0,0xc,0xc,0x0,0x0,0x0,0x0,0xc,0xc,};
+      jj_la1_2 = new int[] {0x0,0x20,0x0,0x0,0x3,0x3,0x18,0x0,0x0,0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0x18,0x0,0x19,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x1,0x19,0x1,0x18,0x19,0x0,0x0,0x0,0x1,0x18,0x18,};
    }
   final private JJCalls[] jj_2_rtns = new JJCalls[1];
   private boolean jj_rescan = false;
@@ -1313,8 +1318,8 @@
 
   public ParseException generateParseException() {
     jj_expentries.removeAllElements();
-    boolean[] la1tokens = new boolean[69];
-    for (int i = 0; i < 69; i++) {
+    boolean[] la1tokens = new boolean[70];
+    for (int i = 0; i < 70; i++) {
       la1tokens[i] = false;
     }
     if (jj_kind >= 0) {
@@ -1336,7 +1341,7 @@
         }
       }
     }
-    for (int i = 0; i < 69; i++) {
+    for (int i = 0; i < 70; i++) {
       if (la1tokens[i]) {
         jj_expentry = new int[1];
         jj_expentry[0] = i;

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserConstants.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserConstants.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserConstants.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserConstants.java Mon Feb  4 09:54:35 2008
@@ -52,21 +52,22 @@
   int BLOCK = 50;
   int RECORD = 51;
   int IN_MEMORY = 52;
-  int BLOOMFILTER = 53;
-  int COUNTING_BLOOMFILTER = 54;
-  int RETOUCHED_BLOOMFILTER = 55;
-  int VECTOR_SIZE = 56;
-  int NUM_HASH = 57;
-  int NUM_ENTRIES = 58;
-  int ADD = 59;
-  int CHANGE = 60;
-  int COUNT = 61;
-  int ID = 62;
-  int INTEGER_LITERAL = 63;
-  int FLOATING_POINT_LITERAL = 64;
-  int EXPONENT = 65;
-  int QUOTED_IDENTIFIER = 66;
-  int STRING_LITERAL = 67;
+  int BLOCK_CACHE_ENABLED = 53;
+  int BLOOMFILTER = 54;
+  int COUNTING_BLOOMFILTER = 55;
+  int RETOUCHED_BLOOMFILTER = 56;
+  int VECTOR_SIZE = 57;
+  int NUM_HASH = 58;
+  int NUM_ENTRIES = 59;
+  int ADD = 60;
+  int CHANGE = 61;
+  int COUNT = 62;
+  int ID = 63;
+  int INTEGER_LITERAL = 64;
+  int FLOATING_POINT_LITERAL = 65;
+  int EXPONENT = 66;
+  int QUOTED_IDENTIFIER = 67;
+  int STRING_LITERAL = 68;
 
   int DEFAULT = 0;
 
@@ -124,6 +125,7 @@
     "\"block\"",
     "\"record\"",
     "\"in_memory\"",
+    "\"block_cache_enabled\"",
     "\"bloomfilter\"",
     "\"counting_bloomfilter\"",
     "\"retouched_bloomfilter\"",

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserTokenManager.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserTokenManager.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserTokenManager.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserTokenManager.java Mon Feb  4 09:54:35 2008
@@ -40,41 +40,41 @@
    switch (pos)
    {
       case 0:
-         if ((active0 & 0x3fffcc0fffffffe0L) != 0L)
+         if ((active0 & 0x7fffcc0fffffffe0L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             return 1;
          }
          return -1;
       case 1:
-         if ((active0 & 0x3fefc407fff9bfe0L) != 0L)
+         if ((active0 & 0x10080800064000L) != 0L)
+            return 1;
+         if ((active0 & 0x7fefc407fff9bfe0L) != 0L)
          {
             if (jjmatchedPos != 1)
             {
-               jjmatchedKind = 62;
+               jjmatchedKind = 63;
                jjmatchedPos = 1;
             }
             return 1;
          }
-         if ((active0 & 0x10080800064000L) != 0L)
-            return 1;
          return -1;
       case 2:
-         if ((active0 & 0x37ffc003efff3fe0L) != 0L)
+         if ((active0 & 0x1000040410008000L) != 0L)
+            return 1;
+         if ((active0 & 0x6fffc003efff3fe0L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 2;
             return 1;
          }
-         if ((active0 & 0x800040410008000L) != 0L)
-            return 1;
          return -1;
       case 3:
-         if ((active0 & 0x37fdc003ebfa28c0L) != 0L)
+         if ((active0 & 0x6ffdc003ebfa28c0L) != 0L)
          {
             if (jjmatchedPos != 3)
             {
-               jjmatchedKind = 62;
+               jjmatchedKind = 63;
                jjmatchedPos = 3;
             }
             return 1;
@@ -83,74 +83,74 @@
             return 1;
          return -1;
       case 4:
-         if ((active0 & 0x17b9c001e1f22a00L) != 0L)
+         if ((active0 & 0x2f59c001e1f22a00L) != 0L)
          {
             if (jjmatchedPos != 4)
             {
-               jjmatchedKind = 62;
+               jjmatchedKind = 63;
                jjmatchedPos = 4;
             }
             return 1;
          }
-         if ((active0 & 0x204400020a0800c0L) != 0L)
+         if ((active0 & 0x40a400020a0800c0L) != 0L)
             return 1;
          return -1;
       case 5:
-         if ((active0 & 0x1008000020720800L) != 0L)
-            return 1;
-         if ((active0 & 0x7f1c001c1802200L) != 0L)
+         if ((active0 & 0xff1c001c1802200L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 5;
             return 1;
          }
+         if ((active0 & 0x2008000020720800L) != 0L)
+            return 1;
          return -1;
       case 6:
-         if ((active0 & 0x800000L) != 0L)
-            return 1;
-         if ((active0 & 0x7f1c001c1002200L) != 0L)
+         if ((active0 & 0xff1c001c1002200L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 6;
             return 1;
          }
+         if ((active0 & 0x800000L) != 0L)
+            return 1;
          return -1;
       case 7:
-         if ((active0 & 0x200000001002200L) != 0L)
-            return 1;
-         if ((active0 & 0x5f1c001c0000000L) != 0L)
+         if ((active0 & 0xbf1c001c0000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 7;
             return 1;
          }
+         if ((active0 & 0x400000001002200L) != 0L)
+            return 1;
          return -1;
       case 8:
-         if ((active0 & 0x10000080000000L) != 0L)
-            return 1;
-         if ((active0 & 0x5e1c00140000000L) != 0L)
+         if ((active0 & 0xbe1c00140000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 8;
             return 1;
          }
+         if ((active0 & 0x10000080000000L) != 0L)
+            return 1;
          return -1;
       case 9:
          if ((active0 & 0x800000000000L) != 0L)
             return 1;
-         if ((active0 & 0x5e1400140000000L) != 0L)
+         if ((active0 & 0xbe1400140000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 9;
             return 1;
          }
          return -1;
       case 10:
-         if ((active0 & 0x521000000000000L) != 0L)
+         if ((active0 & 0xa41000000000000L) != 0L)
             return 1;
-         if ((active0 & 0xc0400140000000L) != 0L)
+         if ((active0 & 0x1a0400140000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 10;
             return 1;
          }
@@ -158,17 +158,17 @@
       case 11:
          if ((active0 & 0x400100000000L) != 0L)
             return 1;
-         if ((active0 & 0xc0000040000000L) != 0L)
+         if ((active0 & 0x1a0000040000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 11;
             return 1;
          }
          return -1;
       case 12:
-         if ((active0 & 0xc0000040000000L) != 0L)
+         if ((active0 & 0x1a0000040000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 12;
             return 1;
          }
@@ -176,61 +176,63 @@
       case 13:
          if ((active0 & 0x40000000L) != 0L)
             return 1;
-         if ((active0 & 0xc0000000000000L) != 0L)
+         if ((active0 & 0x1a0000000000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 13;
             return 1;
          }
          return -1;
       case 14:
-         if ((active0 & 0xc0000000000000L) != 0L)
+         if ((active0 & 0x1a0000000000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 14;
             return 1;
          }
          return -1;
       case 15:
-         if ((active0 & 0xc0000000000000L) != 0L)
+         if ((active0 & 0x1a0000000000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 15;
             return 1;
          }
          return -1;
       case 16:
-         if ((active0 & 0xc0000000000000L) != 0L)
+         if ((active0 & 0x1a0000000000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 16;
             return 1;
          }
          return -1;
       case 17:
-         if ((active0 & 0xc0000000000000L) != 0L)
+         if ((active0 & 0x1a0000000000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 17;
             return 1;
          }
          return -1;
       case 18:
-         if ((active0 & 0xc0000000000000L) != 0L)
+         if ((active0 & 0x180000000000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 18;
             return 1;
          }
+         if ((active0 & 0x20000000000000L) != 0L)
+            return 1;
          return -1;
       case 19:
-         if ((active0 & 0x80000000000000L) != 0L)
+         if ((active0 & 0x100000000000000L) != 0L)
          {
-            jjmatchedKind = 62;
+            jjmatchedKind = 63;
             jjmatchedPos = 19;
             return 1;
          }
-         if ((active0 & 0x40000000000000L) != 0L)
+         if ((active0 & 0x80000000000000L) != 0L)
             return 1;
          return -1;
       default :
@@ -270,7 +272,7 @@
       case 44:
          return jjStopAtPos(0, 36);
       case 59:
-         return jjStopAtPos(0, 68);
+         return jjStopAtPos(0, 69);
       case 60:
          return jjStopAtPos(0, 41);
       case 61:
@@ -279,13 +281,13 @@
          return jjStopAtPos(0, 40);
       case 65:
       case 97:
-         return jjMoveStringLiteralDfa1_0(0x800000400000040L);
+         return jjMoveStringLiteralDfa1_0(0x1000000400000040L);
       case 66:
       case 98:
-         return jjMoveStringLiteralDfa1_0(0x24000000000000L);
+         return jjMoveStringLiteralDfa1_0(0x64000000000000L);
       case 67:
       case 99:
-         return jjMoveStringLiteralDfa1_0(0x3041000040000880L);
+         return jjMoveStringLiteralDfa1_0(0x6081000040000880L);
       case 68:
       case 100:
          return jjMoveStringLiteralDfa1_0(0x901600L);
@@ -312,13 +314,13 @@
          return jjMoveStringLiteralDfa1_0(0xc00000000000L);
       case 78:
       case 110:
-         return jjMoveStringLiteralDfa1_0(0x602040100000000L);
+         return jjMoveStringLiteralDfa1_0(0xc02040100000000L);
       case 79:
       case 111:
          return jjMoveStringLiteralDfa1_0(0x800000000L);
       case 82:
       case 114:
-         return jjMoveStringLiteralDfa1_0(0x88000010000000L);
+         return jjMoveStringLiteralDfa1_0(0x108000010000000L);
       case 83:
       case 115:
          return jjMoveStringLiteralDfa1_0(0x1200100L);
@@ -330,7 +332,7 @@
          return jjMoveStringLiteralDfa1_0(0x8000000L);
       case 86:
       case 118:
-         return jjMoveStringLiteralDfa1_0(0x100000020000000L);
+         return jjMoveStringLiteralDfa1_0(0x200000020000000L);
       case 87:
       case 119:
          return jjMoveStringLiteralDfa1_0(0x2000000L);
@@ -356,19 +358,19 @@
          return jjMoveStringLiteralDfa2_0(active0, 0xc00020088000L);
       case 68:
       case 100:
-         return jjMoveStringLiteralDfa2_0(active0, 0x800000000000000L);
+         return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000000L);
       case 69:
       case 101:
-         return jjMoveStringLiteralDfa2_0(active0, 0x188000000300620L);
+         return jjMoveStringLiteralDfa2_0(active0, 0x308000000300620L);
       case 72:
       case 104:
-         return jjMoveStringLiteralDfa2_0(active0, 0x1000000002000100L);
+         return jjMoveStringLiteralDfa2_0(active0, 0x2000000002000100L);
       case 73:
       case 105:
          return jjMoveStringLiteralDfa2_0(active0, 0x280800000L);
       case 76:
       case 108:
-         return jjMoveStringLiteralDfa2_0(active0, 0x240000000000c0L);
+         return jjMoveStringLiteralDfa2_0(active0, 0x640000000000c0L);
       case 78:
       case 110:
          if ((active0 & 0x80000000000L) != 0L)
@@ -379,7 +381,7 @@
          return jjMoveStringLiteralDfa2_0(active0, 0x10000408460000L);
       case 79:
       case 111:
-         return jjMoveStringLiteralDfa2_0(active0, 0x2043040050000000L);
+         return jjMoveStringLiteralDfa2_0(active0, 0x4083040050000000L);
       case 82:
       case 114:
          if ((active0 & 0x800000000L) != 0L)
@@ -395,7 +397,7 @@
          return jjMoveStringLiteralDfa2_0(active0, 0x1000000L);
       case 85:
       case 117:
-         return jjMoveStringLiteralDfa2_0(active0, 0x600000100000000L);
+         return jjMoveStringLiteralDfa2_0(active0, 0xc00000100000000L);
       case 88:
       case 120:
          return jjMoveStringLiteralDfa2_0(active0, 0x10000L);
@@ -419,19 +421,19 @@
          return jjMoveStringLiteralDfa3_0(active0, 0x10000000000000L);
       case 65:
       case 97:
-         return jjMoveStringLiteralDfa3_0(active0, 0x1000000001400000L);
+         return jjMoveStringLiteralDfa3_0(active0, 0x2000000001400000L);
       case 66:
       case 98:
          return jjMoveStringLiteralDfa3_0(active0, 0x80000L);
       case 67:
       case 99:
-         return jjMoveStringLiteralDfa3_0(active0, 0x108000000000000L);
+         return jjMoveStringLiteralDfa3_0(active0, 0x208000000000000L);
       case 68:
       case 100:
          if ((active0 & 0x400000000L) != 0L)
             return jjStartNfaWithStates_0(2, 34, 1);
-         else if ((active0 & 0x800000000000000L) != 0L)
-            return jjStartNfaWithStates_0(2, 59, 1);
+         else if ((active0 & 0x1000000000000000L) != 0L)
+            return jjStartNfaWithStates_0(2, 60, 1);
          break;
       case 69:
       case 101:
@@ -444,13 +446,13 @@
          return jjMoveStringLiteralDfa3_0(active0, 0x60300020L);
       case 77:
       case 109:
-         return jjMoveStringLiteralDfa3_0(active0, 0x601000380000000L);
+         return jjMoveStringLiteralDfa3_0(active0, 0xc01000380000000L);
       case 78:
       case 110:
          return jjMoveStringLiteralDfa3_0(active0, 0x2000000000000L);
       case 79:
       case 111:
-         return jjMoveStringLiteralDfa3_0(active0, 0x24000004001100L);
+         return jjMoveStringLiteralDfa3_0(active0, 0x64000004001100L);
       case 82:
       case 114:
          if ((active0 & 0x8000L) != 0L)
@@ -463,10 +465,10 @@
       case 116:
          if ((active0 & 0x40000000000L) != 0L)
             return jjStartNfaWithStates_0(2, 42, 1);
-         return jjMoveStringLiteralDfa3_0(active0, 0x80000008040040L);
+         return jjMoveStringLiteralDfa3_0(active0, 0x100000008040040L);
       case 85:
       case 117:
-         return jjMoveStringLiteralDfa3_0(active0, 0x2040000000002000L);
+         return jjMoveStringLiteralDfa3_0(active0, 0x4080000000002000L);
       case 87:
       case 119:
          if ((active0 & 0x10000000L) != 0L)
@@ -492,7 +494,7 @@
    switch(curChar)
    {
       case 95:
-         return jjMoveStringLiteralDfa4_0(active0, 0x600c00100000000L);
+         return jjMoveStringLiteralDfa4_0(active0, 0xc00c00100000000L);
       case 65:
       case 97:
          return jjMoveStringLiteralDfa4_0(active0, 0x800880L);
@@ -506,7 +508,7 @@
             jjmatchedKind = 10;
             jjmatchedPos = 3;
          }
-         return jjMoveStringLiteralDfa4_0(active0, 0x4000000000200L);
+         return jjMoveStringLiteralDfa4_0(active0, 0x24000000000200L);
       case 69:
       case 101:
          if ((active0 & 0x2000000000000L) != 0L)
@@ -525,12 +527,12 @@
          return jjMoveStringLiteralDfa4_0(active0, 0x10000000000000L);
       case 78:
       case 110:
-         return jjMoveStringLiteralDfa4_0(active0, 0x3040000000002000L);
+         return jjMoveStringLiteralDfa4_0(active0, 0x6080000000002000L);
       case 79:
       case 111:
          if ((active0 & 0x40000L) != 0L)
             return jjStartNfaWithStates_0(3, 18, 1);
-         return jjMoveStringLiteralDfa4_0(active0, 0xa8000000000000L);
+         return jjMoveStringLiteralDfa4_0(active0, 0x148000000000000L);
       case 80:
       case 112:
          if ((active0 & 0x20L) != 0L)
@@ -545,7 +547,7 @@
       case 116:
          if ((active0 & 0x10000L) != 0L)
             return jjStartNfaWithStates_0(3, 16, 1);
-         return jjMoveStringLiteralDfa4_0(active0, 0x100000000000000L);
+         return jjMoveStringLiteralDfa4_0(active0, 0x200000000000000L);
       case 85:
       case 117:
          return jjMoveStringLiteralDfa4_0(active0, 0x60000000L);
@@ -582,18 +584,21 @@
             return jjStartNfaWithStates_0(4, 19, 1);
          else if ((active0 & 0x2000000L) != 0L)
             return jjStartNfaWithStates_0(4, 25, 1);
-         return jjMoveStringLiteralDfa5_0(active0, 0x410000020000000L);
+         return jjMoveStringLiteralDfa5_0(active0, 0x810000020000000L);
       case 71:
       case 103:
-         return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000000L);
+         return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000000L);
       case 72:
       case 104:
-         return jjMoveStringLiteralDfa5_0(active0, 0x200000000000000L);
+         return jjMoveStringLiteralDfa5_0(active0, 0x400000000000000L);
       case 75:
       case 107:
          if ((active0 & 0x4000000000000L) != 0L)
-            return jjStartNfaWithStates_0(4, 50, 1);
-         break;
+         {
+            jjmatchedKind = 50;
+            jjmatchedPos = 4;
+         }
+         return jjMoveStringLiteralDfa5_0(active0, 0x20000000000000L);
       case 76:
       case 108:
          if ((active0 & 0x8000000L) != 0L)
@@ -601,10 +606,10 @@
          return jjMoveStringLiteralDfa5_0(active0, 0x800000400000L);
       case 77:
       case 109:
-         return jjMoveStringLiteralDfa5_0(active0, 0x20000040000000L);
+         return jjMoveStringLiteralDfa5_0(active0, 0x40000040000000L);
       case 79:
       case 111:
-         return jjMoveStringLiteralDfa5_0(active0, 0x100000000000000L);
+         return jjMoveStringLiteralDfa5_0(active0, 0x200000000000000L);
       case 82:
       case 114:
          if ((active0 & 0x40L) != 0L)
@@ -619,15 +624,15 @@
       case 116:
          if ((active0 & 0x200000000L) != 0L)
             return jjStartNfaWithStates_0(4, 33, 1);
-         else if ((active0 & 0x2000000000000000L) != 0L)
+         else if ((active0 & 0x4000000000000000L) != 0L)
          {
-            jjmatchedKind = 61;
+            jjmatchedKind = 62;
             jjmatchedPos = 4;
          }
-         return jjMoveStringLiteralDfa5_0(active0, 0x40000001100800L);
+         return jjMoveStringLiteralDfa5_0(active0, 0x80000001100800L);
       case 85:
       case 117:
-         return jjMoveStringLiteralDfa5_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa5_0(active0, 0x100000000000000L);
       case 86:
       case 118:
          return jjMoveStringLiteralDfa5_0(active0, 0x400100000000L);
@@ -647,12 +652,14 @@
    }
    switch(curChar)
    {
+      case 95:
+         return jjMoveStringLiteralDfa6_0(active0, 0x20000000000000L);
       case 65:
       case 97:
-         return jjMoveStringLiteralDfa6_0(active0, 0x200000000002000L);
+         return jjMoveStringLiteralDfa6_0(active0, 0x400000000002000L);
       case 67:
       case 99:
-         return jjMoveStringLiteralDfa6_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa6_0(active0, 0x100000000000000L);
       case 68:
       case 100:
          if ((active0 & 0x8000000000000L) != 0L)
@@ -666,15 +673,15 @@
             return jjStartNfaWithStates_0(5, 20, 1);
          else if ((active0 & 0x400000L) != 0L)
             return jjStartNfaWithStates_0(5, 22, 1);
-         else if ((active0 & 0x1000000000000000L) != 0L)
-            return jjStartNfaWithStates_0(5, 60, 1);
+         else if ((active0 & 0x2000000000000000L) != 0L)
+            return jjStartNfaWithStates_0(5, 61, 1);
          return jjMoveStringLiteralDfa6_0(active0, 0x1c00100000000L);
       case 70:
       case 102:
-         return jjMoveStringLiteralDfa6_0(active0, 0x20000000000000L);
+         return jjMoveStringLiteralDfa6_0(active0, 0x40000000000000L);
       case 73:
       case 105:
-         return jjMoveStringLiteralDfa6_0(active0, 0x40000001000200L);
+         return jjMoveStringLiteralDfa6_0(active0, 0x80000001000200L);
       case 76:
       case 108:
          return jjMoveStringLiteralDfa6_0(active0, 0x800000L);
@@ -683,10 +690,10 @@
          return jjMoveStringLiteralDfa6_0(active0, 0x10000000000000L);
       case 78:
       case 110:
-         return jjMoveStringLiteralDfa6_0(active0, 0x400000040000000L);
+         return jjMoveStringLiteralDfa6_0(active0, 0x800000040000000L);
       case 82:
       case 114:
-         return jjMoveStringLiteralDfa6_0(active0, 0x100000000000000L);
+         return jjMoveStringLiteralDfa6_0(active0, 0x200000000000000L);
       case 83:
       case 115:
          if ((active0 & 0x20000000L) != 0L)
@@ -716,13 +723,16 @@
    switch(curChar)
    {
       case 95:
-         return jjMoveStringLiteralDfa7_0(active0, 0x100000000000000L);
+         return jjMoveStringLiteralDfa7_0(active0, 0x200000000000000L);
       case 65:
       case 97:
          return jjMoveStringLiteralDfa7_0(active0, 0x80000000L);
       case 66:
       case 98:
          return jjMoveStringLiteralDfa7_0(active0, 0x200L);
+      case 67:
+      case 99:
+         return jjMoveStringLiteralDfa7_0(active0, 0x20000000000000L);
       case 69:
       case 101:
          if ((active0 & 0x800000L) != 0L)
@@ -733,13 +743,13 @@
          return jjMoveStringLiteralDfa7_0(active0, 0x40000000L);
       case 72:
       case 104:
-         return jjMoveStringLiteralDfa7_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa7_0(active0, 0x100000000000000L);
       case 73:
       case 105:
-         return jjMoveStringLiteralDfa7_0(active0, 0x20000000000000L);
+         return jjMoveStringLiteralDfa7_0(active0, 0x40000000000000L);
       case 78:
       case 110:
-         return jjMoveStringLiteralDfa7_0(active0, 0x40800001000000L);
+         return jjMoveStringLiteralDfa7_0(active0, 0x80800001000000L);
       case 79:
       case 111:
          return jjMoveStringLiteralDfa7_0(active0, 0x10000000000000L);
@@ -748,10 +758,10 @@
          return jjMoveStringLiteralDfa7_0(active0, 0x400100000000L);
       case 83:
       case 115:
-         return jjMoveStringLiteralDfa7_0(active0, 0x201000000000000L);
+         return jjMoveStringLiteralDfa7_0(active0, 0x401000000000000L);
       case 84:
       case 116:
-         return jjMoveStringLiteralDfa7_0(active0, 0x400000000002000L);
+         return jjMoveStringLiteralDfa7_0(active0, 0x800000000002000L);
       default :
          break;
    }
@@ -770,36 +780,36 @@
    {
       case 65:
       case 97:
-         return jjMoveStringLiteralDfa8_0(active0, 0x40000000L);
+         return jjMoveStringLiteralDfa8_0(active0, 0x20000040000000L);
       case 69:
       case 101:
          if ((active0 & 0x200L) != 0L)
             return jjStartNfaWithStates_0(7, 9, 1);
          else if ((active0 & 0x2000L) != 0L)
             return jjStartNfaWithStates_0(7, 13, 1);
-         return jjMoveStringLiteralDfa8_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa8_0(active0, 0x100000000000000L);
       case 71:
       case 103:
          if ((active0 & 0x1000000L) != 0L)
             return jjStartNfaWithStates_0(7, 24, 1);
-         return jjMoveStringLiteralDfa8_0(active0, 0x40800000000000L);
+         return jjMoveStringLiteralDfa8_0(active0, 0x80800000000000L);
       case 72:
       case 104:
-         if ((active0 & 0x200000000000000L) != 0L)
-            return jjStartNfaWithStates_0(7, 57, 1);
+         if ((active0 & 0x400000000000000L) != 0L)
+            return jjStartNfaWithStates_0(7, 58, 1);
          break;
       case 76:
       case 108:
-         return jjMoveStringLiteralDfa8_0(active0, 0x20000000000000L);
+         return jjMoveStringLiteralDfa8_0(active0, 0x40000000000000L);
       case 77:
       case 109:
          return jjMoveStringLiteralDfa8_0(active0, 0x80000000L);
       case 82:
       case 114:
-         return jjMoveStringLiteralDfa8_0(active0, 0x410000000000000L);
+         return jjMoveStringLiteralDfa8_0(active0, 0x810000000000000L);
       case 83:
       case 115:
-         return jjMoveStringLiteralDfa8_0(active0, 0x101400100000000L);
+         return jjMoveStringLiteralDfa8_0(active0, 0x201400100000000L);
       default :
          break;
    }
@@ -817,13 +827,16 @@
    switch(curChar)
    {
       case 95:
-         return jjMoveStringLiteralDfa9_0(active0, 0x40000000000000L);
+         return jjMoveStringLiteralDfa9_0(active0, 0x80000000000000L);
+      case 67:
+      case 99:
+         return jjMoveStringLiteralDfa9_0(active0, 0x20000000000000L);
       case 68:
       case 100:
-         return jjMoveStringLiteralDfa9_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa9_0(active0, 0x100000000000000L);
       case 73:
       case 105:
-         return jjMoveStringLiteralDfa9_0(active0, 0x501400100000000L);
+         return jjMoveStringLiteralDfa9_0(active0, 0xa01400100000000L);
       case 77:
       case 109:
          return jjMoveStringLiteralDfa9_0(active0, 0x40000000L);
@@ -834,7 +847,7 @@
          break;
       case 84:
       case 116:
-         return jjMoveStringLiteralDfa9_0(active0, 0x20800000000000L);
+         return jjMoveStringLiteralDfa9_0(active0, 0x40800000000000L);
       case 89:
       case 121:
          if ((active0 & 0x10000000000000L) != 0L)
@@ -857,18 +870,18 @@
    switch(curChar)
    {
       case 95:
-         return jjMoveStringLiteralDfa10_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa10_0(active0, 0x100000000000000L);
       case 66:
       case 98:
-         return jjMoveStringLiteralDfa10_0(active0, 0x40000000000000L);
+         return jjMoveStringLiteralDfa10_0(active0, 0x80000000000000L);
       case 69:
       case 101:
-         return jjMoveStringLiteralDfa10_0(active0, 0x420000000000000L);
+         return jjMoveStringLiteralDfa10_0(active0, 0x840000000000000L);
       case 72:
       case 104:
          if ((active0 & 0x800000000000L) != 0L)
             return jjStartNfaWithStates_0(9, 47, 1);
-         break;
+         return jjMoveStringLiteralDfa10_0(active0, 0x20000000000000L);
       case 73:
       case 105:
          return jjMoveStringLiteralDfa10_0(active0, 0x40000000L);
@@ -877,7 +890,7 @@
          return jjMoveStringLiteralDfa10_0(active0, 0x1400100000000L);
       case 90:
       case 122:
-         return jjMoveStringLiteralDfa10_0(active0, 0x100000000000000L);
+         return jjMoveStringLiteralDfa10_0(active0, 0x200000000000000L);
       default :
          break;
    }
@@ -896,15 +909,15 @@
    {
       case 66:
       case 98:
-         return jjMoveStringLiteralDfa11_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa11_0(active0, 0x100000000000000L);
       case 69:
       case 101:
-         if ((active0 & 0x100000000000000L) != 0L)
-            return jjStartNfaWithStates_0(10, 56, 1);
-         break;
+         if ((active0 & 0x200000000000000L) != 0L)
+            return jjStartNfaWithStates_0(10, 57, 1);
+         return jjMoveStringLiteralDfa11_0(active0, 0x20000000000000L);
       case 76:
       case 108:
-         return jjMoveStringLiteralDfa11_0(active0, 0x40000040000000L);
+         return jjMoveStringLiteralDfa11_0(active0, 0x80000040000000L);
       case 78:
       case 110:
          if ((active0 & 0x1000000000000L) != 0L)
@@ -912,13 +925,13 @@
          return jjMoveStringLiteralDfa11_0(active0, 0x400100000000L);
       case 82:
       case 114:
-         if ((active0 & 0x20000000000000L) != 0L)
-            return jjStartNfaWithStates_0(10, 53, 1);
+         if ((active0 & 0x40000000000000L) != 0L)
+            return jjStartNfaWithStates_0(10, 54, 1);
          break;
       case 83:
       case 115:
-         if ((active0 & 0x400000000000000L) != 0L)
-            return jjStartNfaWithStates_0(10, 58, 1);
+         if ((active0 & 0x800000000000000L) != 0L)
+            return jjStartNfaWithStates_0(10, 59, 1);
          break;
       default :
          break;
@@ -936,15 +949,17 @@
    }
    switch(curChar)
    {
+      case 95:
+         return jjMoveStringLiteralDfa12_0(active0, 0x20000000000000L);
       case 73:
       case 105:
          return jjMoveStringLiteralDfa12_0(active0, 0x40000000L);
       case 76:
       case 108:
-         return jjMoveStringLiteralDfa12_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa12_0(active0, 0x100000000000000L);
       case 79:
       case 111:
-         return jjMoveStringLiteralDfa12_0(active0, 0x40000000000000L);
+         return jjMoveStringLiteralDfa12_0(active0, 0x80000000000000L);
       case 83:
       case 115:
          if ((active0 & 0x100000000L) != 0L)
@@ -970,10 +985,10 @@
    {
       case 69:
       case 101:
-         return jjMoveStringLiteralDfa13_0(active0, 0x40000000L);
+         return jjMoveStringLiteralDfa13_0(active0, 0x20000040000000L);
       case 79:
       case 111:
-         return jjMoveStringLiteralDfa13_0(active0, 0xc0000000000000L);
+         return jjMoveStringLiteralDfa13_0(active0, 0x180000000000000L);
       default :
          break;
    }
@@ -992,10 +1007,13 @@
    {
       case 77:
       case 109:
-         return jjMoveStringLiteralDfa14_0(active0, 0x40000000000000L);
+         return jjMoveStringLiteralDfa14_0(active0, 0x80000000000000L);
+      case 78:
+      case 110:
+         return jjMoveStringLiteralDfa14_0(active0, 0x20000000000000L);
       case 79:
       case 111:
-         return jjMoveStringLiteralDfa14_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa14_0(active0, 0x100000000000000L);
       case 83:
       case 115:
          if ((active0 & 0x40000000L) != 0L)
@@ -1017,12 +1035,15 @@
    }
    switch(curChar)
    {
+      case 65:
+      case 97:
+         return jjMoveStringLiteralDfa15_0(active0, 0x20000000000000L);
       case 70:
       case 102:
-         return jjMoveStringLiteralDfa15_0(active0, 0x40000000000000L);
+         return jjMoveStringLiteralDfa15_0(active0, 0x80000000000000L);
       case 77:
       case 109:
-         return jjMoveStringLiteralDfa15_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa15_0(active0, 0x100000000000000L);
       default :
          break;
    }
@@ -1039,12 +1060,15 @@
    }
    switch(curChar)
    {
+      case 66:
+      case 98:
+         return jjMoveStringLiteralDfa16_0(active0, 0x20000000000000L);
       case 70:
       case 102:
-         return jjMoveStringLiteralDfa16_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa16_0(active0, 0x100000000000000L);
       case 73:
       case 105:
-         return jjMoveStringLiteralDfa16_0(active0, 0x40000000000000L);
+         return jjMoveStringLiteralDfa16_0(active0, 0x80000000000000L);
       default :
          break;
    }
@@ -1063,10 +1087,10 @@
    {
       case 73:
       case 105:
-         return jjMoveStringLiteralDfa17_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa17_0(active0, 0x100000000000000L);
       case 76:
       case 108:
-         return jjMoveStringLiteralDfa17_0(active0, 0x40000000000000L);
+         return jjMoveStringLiteralDfa17_0(active0, 0xa0000000000000L);
       default :
          break;
    }
@@ -1083,12 +1107,15 @@
    }
    switch(curChar)
    {
+      case 69:
+      case 101:
+         return jjMoveStringLiteralDfa18_0(active0, 0x20000000000000L);
       case 76:
       case 108:
-         return jjMoveStringLiteralDfa18_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa18_0(active0, 0x100000000000000L);
       case 84:
       case 116:
-         return jjMoveStringLiteralDfa18_0(active0, 0x40000000000000L);
+         return jjMoveStringLiteralDfa18_0(active0, 0x80000000000000L);
       default :
          break;
    }
@@ -1105,12 +1132,17 @@
    }
    switch(curChar)
    {
+      case 68:
+      case 100:
+         if ((active0 & 0x20000000000000L) != 0L)
+            return jjStartNfaWithStates_0(18, 53, 1);
+         break;
       case 69:
       case 101:
-         return jjMoveStringLiteralDfa19_0(active0, 0x40000000000000L);
+         return jjMoveStringLiteralDfa19_0(active0, 0x80000000000000L);
       case 84:
       case 116:
-         return jjMoveStringLiteralDfa19_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa19_0(active0, 0x100000000000000L);
       default :
          break;
    }
@@ -1129,11 +1161,11 @@
    {
       case 69:
       case 101:
-         return jjMoveStringLiteralDfa20_0(active0, 0x80000000000000L);
+         return jjMoveStringLiteralDfa20_0(active0, 0x100000000000000L);
       case 82:
       case 114:
-         if ((active0 & 0x40000000000000L) != 0L)
-            return jjStartNfaWithStates_0(19, 54, 1);
+         if ((active0 & 0x80000000000000L) != 0L)
+            return jjStartNfaWithStates_0(19, 55, 1);
          break;
       default :
          break;
@@ -1153,8 +1185,8 @@
    {
       case 82:
       case 114:
-         if ((active0 & 0x80000000000000L) != 0L)
-            return jjStartNfaWithStates_0(20, 55, 1);
+         if ((active0 & 0x100000000000000L) != 0L)
+            return jjStartNfaWithStates_0(20, 56, 1);
          break;
       default :
          break;
@@ -1216,14 +1248,14 @@
                case 0:
                   if ((0x3ff000000000000L & l) != 0L)
                   {
-                     if (kind > 63)
-                        kind = 63;
+                     if (kind > 64)
+                        kind = 64;
                      jjCheckNAddStates(0, 6);
                   }
                   else if ((0x400e00000000000L & l) != 0L)
                   {
-                     if (kind > 62)
-                        kind = 62;
+                     if (kind > 63)
+                        kind = 63;
                      jjCheckNAdd(1);
                   }
                   else if (curChar == 39)
@@ -1236,8 +1268,8 @@
                case 1:
                   if ((0x7ffe00000000000L & l) == 0L)
                      break;
-                  if (kind > 62)
-                     kind = 62;
+                  if (kind > 63)
+                     kind = 63;
                   jjCheckNAdd(1);
                   break;
                case 2:
@@ -1247,8 +1279,8 @@
                case 3:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
-                  if (kind > 64)
-                     kind = 64;
+                  if (kind > 65)
+                     kind = 65;
                   jjCheckNAddTwoStates(3, 4);
                   break;
                case 5:
@@ -1258,8 +1290,8 @@
                case 6:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
-                  if (kind > 64)
-                     kind = 64;
+                  if (kind > 65)
+                     kind = 65;
                   jjCheckNAdd(6);
                   break;
                case 7:
@@ -1271,8 +1303,8 @@
                      jjCheckNAddTwoStates(8, 9);
                   break;
                case 9:
-                  if (curChar == 34 && kind > 66)
-                     kind = 66;
+                  if (curChar == 34 && kind > 67)
+                     kind = 67;
                   break;
                case 10:
                   if (curChar == 39)
@@ -1295,21 +1327,21 @@
                      jjCheckNAddStates(10, 12);
                   break;
                case 15:
-                  if (curChar == 39 && kind > 67)
-                     kind = 67;
+                  if (curChar == 39 && kind > 68)
+                     kind = 68;
                   break;
                case 16:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
-                  if (kind > 63)
-                     kind = 63;
+                  if (kind > 64)
+                     kind = 64;
                   jjCheckNAddStates(0, 6);
                   break;
                case 17:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
-                  if (kind > 63)
-                     kind = 63;
+                  if (kind > 64)
+                     kind = 64;
                   jjCheckNAdd(17);
                   break;
                case 18:
@@ -1323,8 +1355,8 @@
                case 20:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
-                  if (kind > 64)
-                     kind = 64;
+                  if (kind > 65)
+                     kind = 65;
                   jjCheckNAddTwoStates(20, 21);
                   break;
                case 22:
@@ -1334,8 +1366,8 @@
                case 23:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
-                  if (kind > 64)
-                     kind = 64;
+                  if (kind > 65)
+                     kind = 65;
                   jjCheckNAdd(23);
                   break;
                case 24:
@@ -1349,15 +1381,15 @@
                case 27:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
-                  if (kind > 64)
-                     kind = 64;
+                  if (kind > 65)
+                     kind = 65;
                   jjCheckNAdd(27);
                   break;
                case 28:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
-                  if (kind > 64)
-                     kind = 64;
+                  if (kind > 65)
+                     kind = 65;
                   jjCheckNAddTwoStates(28, 29);
                   break;
                case 30:
@@ -1367,8 +1399,8 @@
                case 31:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
-                  if (kind > 64)
-                     kind = 64;
+                  if (kind > 65)
+                     kind = 65;
                   jjCheckNAdd(31);
                   break;
                default : break;
@@ -1386,8 +1418,8 @@
                case 1:
                   if ((0x47fffffe87fffffeL & l) == 0L)
                      break;
-                  if (kind > 62)
-                     kind = 62;
+                  if (kind > 63)
+                     kind = 63;
                   jjCheckNAdd(1);
                   break;
                case 4:
@@ -1466,12 +1498,12 @@
 null, null, null, null, null, null, null, null, null, "\54", "\50", "\51", "\75", 
 "\76", "\74", null, null, "\41\75", "\52", null, null, null, null, null, null, null, 
 null, null, null, null, null, null, null, null, null, null, null, null, null, null, 
-null, "\73", };
+null, null, "\73", };
 public static final String[] lexStateNames = {
    "DEFAULT", 
 };
 static final long[] jjtoToken = {
-   0xffffffffffffffe1L, 0x1dL, 
+   0xffffffffffffffe1L, 0x3bL, 
 };
 static final long[] jjtoSkip = {
    0x1eL, 0x0L, 

Added: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/io/BlockFSInputStream.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/io/BlockFSInputStream.java?rev=618347&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/io/BlockFSInputStream.java (added)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/io/BlockFSInputStream.java Mon Feb  4 09:54:35 2008
@@ -0,0 +1,206 @@
+/**
+ * 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.io;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+
+import org.apache.commons.collections.map.ReferenceMap;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.fs.FSInputStream;
+import org.apache.hadoop.fs.PositionedReadable;
+import org.apache.hadoop.fs.Seekable;
+import org.apache.hadoop.io.DataInputBuffer;
+
+/**
+ * An implementation of {@link FSInputStream} that reads the stream in blocks
+ * of a fixed, configurable size. The blocks are stored in a memory-sensitive cache.
+ */
+public class BlockFSInputStream extends FSInputStream {
+  
+  static final Log LOG = LogFactory.getLog(BlockFSInputStream.class);
+  
+  private final InputStream in;
+
+  private final long fileLength;
+
+  private final int blockSize;
+  private final Map<Long, byte[]> blocks;
+
+  private boolean closed;
+
+  private DataInputBuffer blockStream = new DataInputBuffer();
+
+  private long blockEnd = -1;
+
+  private long pos = 0;
+
+  /**
+   * @param in
+   * @param fileLength
+   * @param blockSize the size of each block in bytes.
+   */
+  @SuppressWarnings("unchecked")
+  public BlockFSInputStream(InputStream in, long fileLength, int blockSize) {
+    this.in = in;
+    if (!(in instanceof Seekable) || !(in instanceof PositionedReadable)) {
+      throw new IllegalArgumentException(
+          "In is not an instance of Seekable or PositionedReadable");
+    }
+    this.fileLength = fileLength;
+    this.blockSize = blockSize;
+    // a memory-sensitive map that has soft references to values
+    this.blocks = new ReferenceMap() {
+      private long hits, misses;
+      @Override
+      public Object get(Object key) {
+        Object value = super.get(key);
+        if (value == null) {
+          misses++;
+        } else {
+          hits++;
+        }
+        if (LOG.isDebugEnabled() && ((hits + misses) % 10000) == 0) {
+          long hitRate = (100 * hits) / (hits + misses);
+          LOG.info("Hit rate for cache " + hashCode() + ": " + hitRate + "%");
+        }
+        return value;
+      }
+    };
+  }
+
+  @Override
+  public synchronized long getPos() throws IOException {
+    return pos;
+  }
+
+  @Override
+  public synchronized int available() throws IOException {
+    return (int) (fileLength - pos);
+  }
+
+  @Override
+  public synchronized void seek(long targetPos) throws IOException {
+    if (targetPos > fileLength) {
+      throw new IOException("Cannot seek after EOF");
+    }
+    pos = targetPos;
+    blockEnd = -1;
+  }
+
+  @Override
+  public synchronized boolean seekToNewSource(long targetPos)
+      throws IOException {
+    return false;
+  }
+
+  @Override
+  public synchronized int read() throws IOException {
+    if (closed) {
+      throw new IOException("Stream closed");
+    }
+    int result = -1;
+    if (pos < fileLength) {
+      if (pos > blockEnd) {
+        blockSeekTo(pos);
+      }
+      result = blockStream.read();
+      if (result >= 0) {
+        pos++;
+      }
+    }
+    return result;
+  }
+
+  @Override
+  public synchronized int read(byte buf[], int off, int len) throws IOException {
+    if (closed) {
+      throw new IOException("Stream closed");
+    }
+    if (pos < fileLength) {
+      if (pos > blockEnd) {
+        blockSeekTo(pos);
+      }
+      int realLen = Math.min(len, (int) (blockEnd - pos + 1));
+      int result = blockStream.read(buf, off, realLen);
+      if (result >= 0) {
+        pos += result;
+      }
+      return result;
+    }
+    return -1;
+  }
+
+  private synchronized void blockSeekTo(long target) throws IOException {
+    int targetBlock = (int) (target / blockSize);
+    long targetBlockStart = targetBlock * blockSize;
+    long targetBlockEnd = Math.min(targetBlockStart + blockSize, fileLength) - 1;
+    long blockLength = targetBlockEnd - targetBlockStart + 1;
+    long offsetIntoBlock = target - targetBlockStart;
+
+    byte[] block = blocks.get(targetBlockStart);
+    if (block == null) {
+      block = new byte[blockSize];
+      ((PositionedReadable) in).readFully(targetBlockStart, block, 0,
+          (int) blockLength);
+      blocks.put(targetBlockStart, block);
+    }
+    
+    this.pos = target;
+    this.blockEnd = targetBlockEnd;
+    this.blockStream.reset(block, (int) offsetIntoBlock,
+        (int) (blockLength - offsetIntoBlock));
+
+  }
+
+  @Override
+  public void close() throws IOException {
+    if (closed) {
+      throw new IOException("Stream closed");
+    }
+    if (blockStream != null) {
+      blockStream.close();
+      blockStream = null;
+    }
+    super.close();
+    closed = true;
+  }
+
+  /**
+   * We don't support marks.
+   */
+  @Override
+  public boolean markSupported() {
+    return false;
+  }
+
+  @Override
+  public void mark(int readLimit) {
+    // Do nothing
+  }
+
+  @Override
+  public void reset() throws IOException {
+    throw new IOException("Mark not supported");
+  }
+
+}

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift Mon Feb  4 09:54:35 2008
@@ -64,7 +64,8 @@
   5:i32 maxValueLength = 2147483647,
   6:string bloomFilterType = "NONE",
   7:i32 bloomFilterVectorSize = 0,
-  8:i32 bloomFilterNbHashes = 0
+  8:i32 bloomFilterNbHashes = 0,
+  9:bool blockCacheEnabled = 0
 }
 
 /**

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java Mon Feb  4 09:54:35 2008
@@ -58,7 +58,8 @@
       throw new IllegalArgument("column name is empty");
     }
     HColumnDescriptor col = new HColumnDescriptor(new Text(in.name),
-        in.maxVersions, comp, in.inMemory, in.maxValueLength, bloom);
+        in.maxVersions, comp, in.inMemory, in.blockCacheEnabled,
+        in.maxValueLength, bloom);
     return col;
   }
   
@@ -76,6 +77,7 @@
     col.maxVersions = in.getMaxVersions();
     col.compression = in.getCompression().toString();
     col.inMemory = in.isInMemory();
+    col.blockCacheEnabled = in.isBlockCacheEnabled();
     col.maxValueLength = in.getMaxValueLength();
     BloomFilterDescriptor bloom = in.getBloomFilter();
     if (bloom != null) {

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java Mon Feb  4 09:54:35 2008
@@ -46,6 +46,7 @@
   public String bloomFilterType;
   public int bloomFilterVectorSize;
   public int bloomFilterNbHashes;
+  public boolean blockCacheEnabled;
 
   public final Isset __isset = new Isset();
   public static final class Isset {
@@ -57,6 +58,7 @@
     public boolean bloomFilterType = false;
     public boolean bloomFilterVectorSize = false;
     public boolean bloomFilterNbHashes = false;
+    public boolean blockCacheEnabled = false;
   }
 
   public ColumnDescriptor() {
@@ -74,6 +76,8 @@
 
     this.bloomFilterNbHashes = 0;
 
+    this.blockCacheEnabled = false;
+
   }
 
   public ColumnDescriptor(
@@ -84,7 +88,8 @@
     int maxValueLength,
     String bloomFilterType,
     int bloomFilterVectorSize,
-    int bloomFilterNbHashes)
+    int bloomFilterNbHashes,
+    boolean blockCacheEnabled)
   {
     this();
     this.name = name;
@@ -103,6 +108,8 @@
     this.__isset.bloomFilterVectorSize = true;
     this.bloomFilterNbHashes = bloomFilterNbHashes;
     this.__isset.bloomFilterNbHashes = true;
+    this.blockCacheEnabled = blockCacheEnabled;
+    this.__isset.blockCacheEnabled = true;
   }
 
   public void read(TProtocol iprot) throws TException {
@@ -180,6 +187,14 @@
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
+        case 9:
+          if (field.type == TType.BOOL) {
+            this.blockCacheEnabled = iprot.readBool();
+            this.__isset.blockCacheEnabled = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
         default:
           TProtocolUtil.skip(iprot, field.type);
           break;
@@ -247,6 +262,12 @@
     oprot.writeFieldBegin(field);
     oprot.writeI32(this.bloomFilterNbHashes);
     oprot.writeFieldEnd();
+    field.name = "blockCacheEnabled";
+    field.type = TType.BOOL;
+    field.id = 9;
+    oprot.writeFieldBegin(field);
+    oprot.writeBool(this.blockCacheEnabled);
+    oprot.writeFieldEnd();
     oprot.writeFieldStop();
     oprot.writeStructEnd();
   }
@@ -269,6 +290,8 @@
     sb.append(this.bloomFilterVectorSize);
     sb.append(",bloomFilterNbHashes:");
     sb.append(this.bloomFilterNbHashes);
+    sb.append(",blockCacheEnabled:");
+    sb.append(this.blockCacheEnabled);
     sb.append(")");
     return sb.toString();
   }

Modified: hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseTestCase.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseTestCase.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseTestCase.java Mon Feb  4 09:54:35 2008
@@ -184,11 +184,11 @@
       final int versions) {
     HTableDescriptor htd = new HTableDescriptor(name);
     htd.addFamily(new HColumnDescriptor(new Text(COLFAMILY_NAME1), versions,
-      CompressionType.NONE, false, Integer.MAX_VALUE, null));
+      CompressionType.NONE, false, false, Integer.MAX_VALUE, null));
     htd.addFamily(new HColumnDescriptor(new Text(COLFAMILY_NAME2), versions,
-      CompressionType.NONE, false, Integer.MAX_VALUE, null));
+      CompressionType.NONE, false, false, Integer.MAX_VALUE, null));
     htd.addFamily(new HColumnDescriptor(new Text(COLFAMILY_NAME3), versions,
-      CompressionType.NONE, false, Integer.MAX_VALUE, null));
+      CompressionType.NONE, false, false, Integer.MAX_VALUE, null));
     return htd;
   }
   

Modified: hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestBloomFilters.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestBloomFilters.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestBloomFilters.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestBloomFilters.java Mon Feb  4 09:54:35 2008
@@ -169,6 +169,7 @@
             1,                                        // Max versions
             HColumnDescriptor.CompressionType.NONE,   // no compression
             HColumnDescriptor.DEFAULT_IN_MEMORY,      // not in memory
+            HColumnDescriptor.DEFAULT_BLOCK_CACHE_ENABLED,
             HColumnDescriptor.DEFAULT_MAX_VALUE_LENGTH,
             bloomFilter
         )
@@ -234,6 +235,7 @@
             1,                                        // Max versions
             HColumnDescriptor.CompressionType.NONE,   // no compression
             HColumnDescriptor.DEFAULT_IN_MEMORY,      // not in memory
+            HColumnDescriptor.DEFAULT_BLOCK_CACHE_ENABLED,
             HColumnDescriptor.DEFAULT_MAX_VALUE_LENGTH,
             bloomFilter
         )

Modified: hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestTimestamp.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestTimestamp.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestTimestamp.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestTimestamp.java Mon Feb  4 09:54:35 2008
@@ -337,7 +337,7 @@
   private HRegion createRegion() throws IOException {
     HTableDescriptor htd = createTableDescriptor(getName());
     htd.addFamily(new HColumnDescriptor(COLUMN, VERSIONS,
-      CompressionType.NONE, false, Integer.MAX_VALUE, null));
+      CompressionType.NONE, false, false, Integer.MAX_VALUE, null));
     return createNewHRegion(htd, null, null);
   }
 }

Modified: hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestToString.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestToString.java?rev=618347&r1=618346&r2=618347&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestToString.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestToString.java Mon Feb  4 09:54:35 2008
@@ -44,8 +44,9 @@
     HTableDescriptor htd = HTableDescriptor.rootTableDesc;
     System. out.println(htd.toString());
     assertEquals("Table descriptor", "name: -ROOT-, families: {info:={name: " +
-        "info, max versions: 1, compression: NONE, in memory: false, max " +
-        "length: 2147483647, bloom filter: none}}", htd.toString());
+        "info, max versions: 1, compression: NONE, in memory: false, " +
+        "block cache enabled: false, max length: 2147483647, " +
+        "bloom filter: none}}", htd.toString());
   }
   
   /**
@@ -57,7 +58,7 @@
     assertEquals("HRegionInfo", 
       "regionname: -ROOT-,,0, startKey: <>, endKey: <>, encodedName: 70236052, tableDesc: " +
       "{name: -ROOT-, families: {info:={name: info, max versions: 1, " +
-      "compression: NONE, in memory: false, max length: 2147483647, bloom " +
-      "filter: none}}}", hri.toString());
+      "compression: NONE, in memory: false, block cache enabled: false, " +
+      "max length: 2147483647, bloom filter: none}}}", hri.toString());
   }
 }

Added: hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/io/TestBlockFSInputStream.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/io/TestBlockFSInputStream.java?rev=618347&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/io/TestBlockFSInputStream.java (added)
+++ hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/io/TestBlockFSInputStream.java Mon Feb  4 09:54:35 2008
@@ -0,0 +1,121 @@
+/**
+ * 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.io;
+
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+import org.apache.hadoop.fs.FSInputStream;
+import org.apache.hadoop.io.DataInputBuffer;
+
+public class TestBlockFSInputStream extends TestCase {
+  
+  static class InMemoryFSInputStream extends FSInputStream {
+
+    private byte[] data;
+    private DataInputBuffer din = new DataInputBuffer();
+    
+    public InMemoryFSInputStream(byte[] data) {
+      this.data = data;
+      din.reset(data, data.length);
+    }
+    
+    @Override
+    public long getPos() throws IOException {
+      return din.getPosition();
+    }
+
+    @Override
+    public void seek(long pos) throws IOException {
+      if (pos > data.length) {
+        throw new IOException("Cannot seek after EOF");
+      }
+      din.reset(data, (int) pos, data.length - (int) pos);
+    }
+
+    @Override
+    public boolean seekToNewSource(long targetPos) throws IOException {
+      return false;
+    }
+
+    @Override
+    public int read() throws IOException {
+      return din.read();
+    }
+    
+  }
+  
+  private byte[] data;
+  private BlockFSInputStream stream;
+  
+  @Override
+  protected void setUp() throws Exception {
+    data = new byte[34];
+    for (int i = 0; i < data.length; i++) {
+      data[i] = (byte) i;
+    }
+    FSInputStream byteStream = new InMemoryFSInputStream(data);
+    stream = new BlockFSInputStream(byteStream, 34, 10);
+  }
+
+  public void testReadForwards() throws IOException {
+    for (int i = 0; i < data.length; i++) {
+      assertEquals(i, stream.getPos());
+      assertEquals(i, stream.read());
+    }
+
+  }
+  
+  public void testReadBackwards() throws IOException {
+    for (int i = data.length - 1; i >= 0; i--) {
+      stream.seek(i);
+      assertEquals(i, stream.getPos());
+      assertEquals(i, stream.read());
+    }
+  }
+  
+  public void testReadInChunks() throws IOException {
+    
+    byte[] buf = new byte[data.length];
+    int chunkLength = 6;
+    
+    assertEquals(6, stream.read(buf, 0, chunkLength));
+    assertEquals(4, stream.read(buf, 6, chunkLength));
+    
+    assertEquals(6, stream.read(buf, 10, chunkLength));
+    assertEquals(4, stream.read(buf, 16, chunkLength));
+    
+    assertEquals(6, stream.read(buf, 20, chunkLength));
+    assertEquals(4, stream.read(buf, 26, chunkLength));
+
+    assertEquals(4, stream.read(buf, 30, chunkLength));
+    
+    assertEquals(0, stream.available());
+    
+    assertEquals(-1, stream.read());
+    
+    for (int i = 0; i < buf.length; i++) {
+      assertEquals(i, buf[i]);
+    }
+
+
+  }
+}



Mime
View raw message