hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elsif <elsif.t...@gmail.com>
Subject Table recovery options
Date Wed, 23 Sep 2009 23:15:47 GMT

We have a couple clusters running with lzo compression.  When testing
the new 0.20.1 release I setup a single node cluster and reused the
compression jar and native libraries from the 0.20.0 release.  The
following session log shows a table being created with the lzo option
and some rows being added.  After hbase is restarted the table is no
longer accessible - the region server crashed during the flush operation
due to a SIGFPE.

Would it be possible to add a check to verify the compression feature
before it is used in a table to avoid corruption?  A simple shell or cli
option would be great.

In general, once hbase tables are corrupted is there anyway to repair
them?  - In this test case the table is never written to disk.

Is it possible to regenerate an hbase table from the data files stored
in hdfs?

Are there any preventative measures we can take to make it easier to
roll back to a valid state?

--

# bin/start-hbase.sh
starting master, logging to /opt/hbase/logs/hbase-root-master-laptop.out
localhost: starting regionserver, logging to
/opt/hbase/logs/hbase-root-regionserver-laptop.out
# bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Version: 0.20.1-dev, r817955, Wed Sep 23 09:39:29 PDT 2009
hbase(main):001:0> create 'test', {NAME => 'data', VERSIONS =>1,
COMPRESSION => 'lzo'}
0 row(s) in 6.5830 seconds
hbase(main):002:0> put 'test', 'one', 'data', 'testing 1'
0 row(s) in 0.0050 seconds
hbase(main):003:0> put 'test', 'two', 'data', 'testing 2'
0 row(s) in 0.0100 seconds
hbase(main):004:0> put 'test', 'three', 'data', 'testing 3'
0 row(s) in 0.0030 seconds
hbase(main):005:0> scan 'test'
ROW                         
COLUMN+CELL                                        
 one                         column=data:, timestamp=1253744550382,
value=testing 1
 three                       column=data:, timestamp=1253744566238,
value=testing 3
 two                         column=data:, timestamp=1253744558322,
value=testing 2
3 row(s) in 0.0790 seconds
hbase(main):006:0> exit
# bin/stop-hbase.sh
stopping master................
# bin/start-hbase.sh
starting master, logging to /opt/hbase/logs/hbase-root-master-laptop.out
localhost: starting regionserver, logging to
/opt/hbase/logs/hbase-root-regionserver-laptop.out
# bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Version: 0.20.1-dev, r817955, Wed Sep 23 09:39:29 PDT 2009
hbase(main):001:0> scan 'test'
NativeException: org.apache.hadoop.hbase.TableNotFoundException: test
        from
org/apache/hadoop/hbase/client/HConnectionManager.java:637:in
`locateRegionInMeta'
        from
org/apache/hadoop/hbase/client/HConnectionManager.java:591:in `locateRegion'
        from
org/apache/hadoop/hbase/client/HConnectionManager.java:554:in `locateRegion'
        from org/apache/hadoop/hbase/client/HTable.java:127:in `<init>'
        from org/apache/hadoop/hbase/client/HTable.java:105:in `<init>'
        from sun/reflect/NativeConstructorAccessorImpl.java:-2:in
`newInstance0'
        from sun/reflect/NativeConstructorAccessorImpl.java:39:in
`newInstance'
        from sun/reflect/DelegatingConstructorAccessorImpl.java:27:in
`newInstance'
        from java/lang/reflect/Constructor.java:513:in `newInstance'
        from org/jruby/javasupport/JavaConstructor.java:226:in
`new_instance'
        from org/jruby/java/invokers/ConstructorInvoker.java:112:in `call'
        from org/jruby/java/invokers/ConstructorInvoker.java:199:in `call'
        from org/jruby/RubyClass.java:391:in `finvoke'
        from org/jruby/javasupport/util/RuntimeHelpers.java:379:in `invoke'
        from org/jruby/java/proxies/ConcreteJavaProxy.java:52:in `call'
        from org/jruby/runtime/callsite/CachingCallSite.java:303:in
`cacheAndCall'
... 137 levels...
        from
org/jruby/internal/runtime/methods/DynamicMethod.java:226:in `call'
        from
org/jruby/internal/runtime/methods/CompiledMethod.java:211:in `call'
        from
org/jruby/internal/runtime/methods/CompiledMethod.java:71:in `call'
        from org/jruby/runtime/callsite/CachingCallSite.java:253:in
`cacheAndCall'
        from org/jruby/runtime/callsite/CachingCallSite.java:72:in `call'
        from opt/hbase/bin/hirb.rb:485:in `__file__'
        from opt/hbase/bin/hirb.rb:-1:in `load'
        from org/jruby/Ruby.java:577:in `runScript'
        from org/jruby/Ruby.java:480:in `runNormally'
        from org/jruby/Ruby.java:354:in `runFromMain'
        from org/jruby/Main.java:229:in `run'
        from org/jruby/Main.java:110:in `run'
        from org/jruby/Main.java:94:in `main'
        from /opt/hbase/bin/hirb.rb:314:in `table'
        from /opt/hbase/bin/hirb.rb:390:in `scan'
        from (hbase):2


Mime
View raw message