[ 
https://issues.apache.org/jira/browse/HBASE-2514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902584#action_12902584
 ] 

HBase Review Board commented on HBASE-2514:
-------------------------------------------

Message from: "Jean-Daniel Cryans" <[email protected]>

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/719/
-----------------------------------------------------------

Review request for hbase.


Summary
-------

Trying to make some progress on this issue, here's an untested patch that adds 
testing of codecs when the region server starts, then uses that to check the 
schema of regions it tries to open. That's basically what this jira's scope is 
about.

Some things I don't like the way I did it:
 - For all the users that don't do LZO, they will have a WARN every time a RS 
starts (in its log)
 - Does not cover cases where the files are LZOed, but the schema is NONE or GZ

Finally, there's no way to let user know about the errors unless he checks the 
logs, but a least we won't throw ugly exceptions.


This addresses bug HBASE-2514.
    http://issues.apache.org/jira/browse/HBASE-2514


Diffs
-----

  /trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 
989204 
  /trunk/src/main/java/org/apache/hadoop/hbase/util/CompressionTest.java 989204 

Diff: http://review.cloudera.org/r/719/diff


Testing
-------


Thanks,

Jean-Daniel




> RegionServer should refuse to be assigned a region that use LZO when LZO 
> isn't available
> ----------------------------------------------------------------------------------------
>
>                 Key: HBASE-2514
>                 URL: https://issues.apache.org/jira/browse/HBASE-2514
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.20.1, 0.20.2, 0.20.3, 0.20.4, 0.20.5, 0.20.6, 
> 0.89.20100621
>            Reporter: Benoit Sigoure
>            Priority: Critical
>             Fix For: 0.90.0
>
>
> If a RegionServer is assigned a region that uses LZO but the required 
> libraries aren't installed on that RegionServer, the server will fail 
> unexpectedly after throwing a {{java.lang.ClassNotFoundException: 
> com.hadoop.compression.lzo.LzoCodec}}
> {code}
> 2010-05-04 16:57:27,258 FATAL 
> org.apache.hadoop.hbase.regionserver.MemStoreFlusher: Replay of hlog 
> required. Forcing server shutdown
> org.apache.hadoop.hbase.DroppedSnapshotException: region: tsdb,,1273011287339
>         at 
> org.apache.hadoop.hbase.regionserver.HRegion.internalFlushcache(HRegion.java:994)
>         at 
> org.apache.hadoop.hbase.regionserver.HRegion.flushcache(HRegion.java:887)
>         at 
> org.apache.hadoop.hbase.regionserver.MemStoreFlusher.flushRegion(MemStoreFlusher.java:255)
>         at 
> org.apache.hadoop.hbase.regionserver.MemStoreFlusher.run(MemStoreFlusher.java:142)
> Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: 
> com.hadoop.compression.lzo.LzoCodec
>         at 
> org.apache.hadoop.hbase.io.hfile.Compression$Algorithm$1.getCodec(Compression.java:91)
>         at 
> org.apache.hadoop.hbase.io.hfile.Compression$Algorithm.getCompressor(Compression.java:196)
>         at 
> org.apache.hadoop.hbase.io.hfile.HFile$Writer.getCompressingStream(HFile.java:388)
>         at 
> org.apache.hadoop.hbase.io.hfile.HFile$Writer.newBlock(HFile.java:374)
>         at 
> org.apache.hadoop.hbase.io.hfile.HFile$Writer.checkBlockBoundary(HFile.java:345)
>         at 
> org.apache.hadoop.hbase.io.hfile.HFile$Writer.append(HFile.java:517)
>         at 
> org.apache.hadoop.hbase.io.hfile.HFile$Writer.append(HFile.java:482)
>         at 
> org.apache.hadoop.hbase.regionserver.Store.internalFlushCache(Store.java:558)
>         at 
> org.apache.hadoop.hbase.regionserver.Store.flushCache(Store.java:522)
>         at 
> org.apache.hadoop.hbase.regionserver.HRegion.internalFlushcache(HRegion.java:979)
>         ... 3 more
> Caused by: java.lang.ClassNotFoundException: 
> com.hadoop.compression.lzo.LzoCodec
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
>         at 
> org.apache.hadoop.hbase.io.hfile.Compression$Algorithm$1.getCodec(Compression.java:87)
>         ... 12 more
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to