hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yan Liu (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-643) Rename tables
Date Wed, 18 Feb 2009 18:44:02 GMT

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

Yan Liu commented on HBASE-643:
-------------------------------

I am running hbase-0.19.0 on EC2, when I tried to use that "rename_table.rb", I hit the following
problem:

bin/hbase org.jruby.Main /mnt/rename_table.rb 1001_profiles 1001_profiles_backup

09/02/18 13:19:27 INFO regionserver.HLog: New log writer: /user/root/log_1234981167000/hlog.dat.1234981167004
09/02/18 13:19:27 INFO util.NativeCodeLoader: Loaded the native-hadoop library
09/02/18 13:19:27 INFO zlib.ZlibFactory: Successfully loaded & initialized native-zlib
library
09/02/18 13:19:27 INFO compress.CodecPool: Got brand-new decompressor
09/02/18 13:19:27 INFO compress.CodecPool: Got brand-new decompressor
09/02/18 13:19:27 INFO compress.CodecPool: Got brand-new decompressor
09/02/18 13:19:27 INFO compress.CodecPool: Got brand-new decompressor
09/02/18 13:19:27 INFO regionserver.HRegion: region -ROOT-,,0/70236052 available
09/02/18 13:19:27 INFO regionserver.HRegion: starting  compaction on region -ROOT-,,0
09/02/18 13:19:27 INFO compress.CodecPool: Got brand-new compressor
09/02/18 13:19:27 INFO regionserver.HRegion: compaction completed on region -ROOT-,,0 in 0sec
09/02/18 13:19:27 INFO rename_table: Scanning .META.,,1
09/02/18 13:19:27 INFO regionserver.HRegion: region .META.,,1/1028785192 available
09/02/18 13:19:27 INFO regionserver.HRegion: starting  compaction on region .META.,,1
09/02/18 13:19:28 INFO regionserver.HRegion: compaction completed on region .META.,,1 in 0sec
09/02/18 13:19:28 INFO rename_table: Renaming hdfs://domU-12-31-39-03-BD-A7.compute-1.internal:50001/hbase/1001_profiles/1153297718
as hdfs://domU-12-31-39-03-BD-A7.compute-1.internal:50001/hbase/1001_profiles_backup/1047320069
09/02/18 13:19:28 INFO rename_table: Removing 1001_profiles,,1234593264387 from .META.
09/02/18 13:19:28 INFO regionserver.HRegion: Closed -ROOT-,,0
09/02/18 13:19:28 INFO regionserver.HRegion: Closed .META.,,1
09/02/18 13:19:28 INFO regionserver.HLog: Closed hdfs://domU-12-31-39-03-BD-A7.compute-1.internal:50001/user/root/log_1234981167000/hlog.dat.0,
entries=0. New log writer: /user/root/log_1234981167000/hlog.dat.1234981168417
09/02/18 13:19:28 INFO regionserver.HLog: removing old log file /user/root/log_1234981167000/hlog.dat.0
whose highest sequence/edit id is 75001755
file:/usr/local/hbase-0.19.0/lib/jruby-complete-1.1.2.jar!/builtin/java/collections.rb:29:
no deleteAll with arguments matching [class [B, class java.lang.Long] on object #<Java::OrgApacheHadoopHbaseRegionserver::HRegion:0xa8a314
@java_object=.META.,,1> (NameError)
	from file:/usr/local/hbase-0.19.0/lib/jruby-complete-1.1.2.jar!/builtin/java/collections.rb:29:in
`call'
	from file:/usr/local/hbase-0.19.0/lib/jruby-complete-1.1.2.jar!/builtin/java/collections.rb:29:in
`each'
	from /mnt/rename_table.rb:100

After that, I can't even do a "list" command in HBase shell :-( When I issued "list" in the
shell, I see the following dump:

hbase(main):001:0> list
NativeException: org.apache.hadoop.hbase.client.RetriesExhaustedException: Trying to contact
region server 10.249.190.85:60020 for region .META.,,1, row '', but failed after 5 attempts.
Exceptions:
java.io.IOException: java.io.IOException: HStoreScanner failed construction
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.<init>(StoreFileScanner.java:70)
	at org.apache.hadoop.hbase.regionserver.HStoreScanner.<init>(HStoreScanner.java:88)
	at org.apache.hadoop.hbase.regionserver.HStore.getScanner(HStore.java:2125)
	at org.apache.hadoop.hbase.regionserver.HRegion$HScanner.<init>(HRegion.java:1989)
	at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:1180)
	at org.apache.hadoop.hbase.regionserver.HRegionServer.openScanner(HRegionServer.java:1700)
	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:632)
	at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:895)
Caused by: java.io.FileNotFoundException: File does not exist: hdfs://domU-12-31-39-03-BD-A7.compute-1.internal:50001/hbase/.META./1028785192/info/mapfiles/1397620458287085628/data
	at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:394)
	at org.apache.hadoop.fs.FileSystem.getLength(FileSystem.java:679)
	at org.apache.hadoop.hbase.io.SequenceFile$Reader.<init>(SequenceFile.java:1431)
	at org.apache.hadoop.hbase.io.SequenceFile$Reader.<init>(SequenceFile.java:1426)
	at org.apache.hadoop.hbase.io.MapFile$Reader.createDataFileReader(MapFile.java:310)
	at org.apache.hadoop.hbase.io.HBaseMapFile$HBaseReader.createDataFileReader(HBaseMapFile.java:96)
	at org.apache.hadoop.hbase.io.MapFile$Reader.open(MapFile.java:292)
	at org.apache.hadoop.hbase.io.HBaseMapFile$HBaseReader.<init>(HBaseMapFile.java:79)
	at org.apache.hadoop.hbase.io.BloomFilterMapFile$Reader.<init>(BloomFilterMapFile.java:65)
	at org.apache.hadoop.hbase.regionserver.HStoreFile.getReader(HStoreFile.java:443)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.openReaders(StoreFileScanner.java:96)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.<init>(StoreFileScanner.java:67)
	... 10 more

java.io.IOException: java.io.IOException: HStoreScanner failed construction
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.<init>(StoreFileScanner.java:70)
	at org.apache.hadoop.hbase.regionserver.HStoreScanner.<init>(HStoreScanner.java:88)
	at org.apache.hadoop.hbase.regionserver.HStore.getScanner(HStore.java:2125)
	at org.apache.hadoop.hbase.regionserver.HRegion$HScanner.<init>(HRegion.java:1989)
	at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:1180)
	at org.apache.hadoop.hbase.regionserver.HRegionServer.openScanner(HRegionServer.java:1700)
	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:632)
	at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:895)
Caused by: java.io.FileNotFoundException: File does not exist: hdfs://domU-12-31-39-03-BD-A7.compute-1.internal:50001/hbase/.META./1028785192/info/mapfiles/1397620458287085628/data
	at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:394)
	at org.apache.hadoop.fs.FileSystem.getLength(FileSystem.java:679)
	at org.apache.hadoop.hbase.io.SequenceFile$Reader.<init>(SequenceFile.java:1431)
	at org.apache.hadoop.hbase.io.SequenceFile$Reader.<init>(SequenceFile.java:1426)
	at org.apache.hadoop.hbase.io.MapFile$Reader.createDataFileReader(MapFile.java:310)
	at org.apache.hadoop.hbase.io.HBaseMapFile$HBaseReader.createDataFileReader(HBaseMapFile.java:96)
	at org.apache.hadoop.hbase.io.MapFile$Reader.open(MapFile.java:292)
	at org.apache.hadoop.hbase.io.HBaseMapFile$HBaseReader.<init>(HBaseMapFile.java:79)
	at org.apache.hadoop.hbase.io.BloomFilterMapFile$Reader.<init>(BloomFilterMapFile.java:65)
	at org.apache.hadoop.hbase.regionserver.HStoreFile.getReader(HStoreFile.java:443)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.openReaders(StoreFileScanner.java:96)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.<init>(StoreFileScanner.java:67)
	... 10 more

java.io.IOException: java.io.IOException: HStoreScanner failed construction
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.<init>(StoreFileScanner.java:70)
	at org.apache.hadoop.hbase.regionserver.HStoreScanner.<init>(HStoreScanner.java:88)
	at org.apache.hadoop.hbase.regionserver.HStore.getScanner(HStore.java:2125)
	at org.apache.hadoop.hbase.regionserver.HRegion$HScanner.<init>(HRegion.java:1989)
	at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:1180)
	at org.apache.hadoop.hbase.regionserver.HRegionServer.openScanner(HRegionServer.java:1700)
	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:632)
	at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:895)
Caused by: java.io.FileNotFoundException: File does not exist: hdfs://domU-12-31-39-03-BD-A7.compute-1.internal:50001/hbase/.META./1028785192/info/mapfiles/1397620458287085628/data
	at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:394)
	at org.apache.hadoop.fs.FileSystem.getLength(FileSystem.java:679)
	at org.apache.hadoop.hbase.io.SequenceFile$Reader.<init>(SequenceFile.java:1431)
	at org.apache.hadoop.hbase.io.SequenceFile$Reader.<init>(SequenceFile.java:1426)
	at org.apache.hadoop.hbase.io.MapFile$Reader.createDataFileReader(MapFile.java:310)
	at org.apache.hadoop.hbase.io.HBaseMapFile$HBaseReader.createDataFileReader(HBaseMapFile.java:96)
	at org.apache.hadoop.hbase.io.MapFile$Reader.open(MapFile.java:292)
	at org.apache.hadoop.hbase.io.HBaseMapFile$HBaseReader.<init>(HBaseMapFile.java:79)
	at org.apache.hadoop.hbase.io.BloomFilterMapFile$Reader.<init>(BloomFilterMapFile.java:65)
	at org.apache.hadoop.hbase.regionserver.HStoreFile.getReader(HStoreFile.java:443)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.openReaders(StoreFileScanner.java:96)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.<init>(StoreFileScanner.java:67)
	... 10 more

java.io.IOException: java.io.IOException: HStoreScanner failed construction
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.<init>(StoreFileScanner.java:70)
	at org.apache.hadoop.hbase.regionserver.HStoreScanner.<init>(HStoreScanner.java:88)
	at org.apache.hadoop.hbase.regionserver.HStore.getScanner(HStore.java:2125)
	at org.apache.hadoop.hbase.regionserver.HRegion$HScanner.<init>(HRegion.java:1989)
	at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:1180)
	at org.apache.hadoop.hbase.regionserver.HRegionServer.openScanner(HRegionServer.java:1700)
	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:632)
	at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:895)
Caused by: java.io.FileNotFoundException: File does not exist: hdfs://domU-12-31-39-03-BD-A7.compute-1.internal:50001/hbase/.META./1028785192/info/mapfiles/1397620458287085628/data
	at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:394)
	at org.apache.hadoop.fs.FileSystem.getLength(FileSystem.java:679)
	at org.apache.hadoop.hbase.io.SequenceFile$Reader.<init>(SequenceFile.java:1431)
	at org.apache.hadoop.hbase.io.SequenceFile$Reader.<init>(SequenceFile.java:1426)
	at org.apache.hadoop.hbase.io.MapFile$Reader.createDataFileReader(MapFile.java:310)
	at org.apache.hadoop.hbase.io.HBaseMapFile$HBaseReader.createDataFileReader(HBaseMapFile.java:96)
	at org.apache.hadoop.hbase.io.MapFile$Reader.open(MapFile.java:292)
	at org.apache.hadoop.hbase.io.HBaseMapFile$HBaseReader.<init>(HBaseMapFile.java:79)
	at org.apache.hadoop.hbase.io.BloomFilterMapFile$Reader.<init>(BloomFilterMapFile.java:65)
	at org.apache.hadoop.hbase.regionserver.HStoreFile.getReader(HStoreFile.java:443)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.openReaders(StoreFileScanner.java:96)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.<init>(StoreFileScanner.java:67)
	... 10 more

java.io.IOException: java.io.IOException: HStoreScanner failed construction
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.<init>(StoreFileScanner.java:70)
	at org.apache.hadoop.hbase.regionserver.HStoreScanner.<init>(HStoreScanner.java:88)
	at org.apache.hadoop.hbase.regionserver.HStore.getScanner(HStore.java:2125)
	at org.apache.hadoop.hbase.regionserver.HRegion$HScanner.<init>(HRegion.java:1989)
	at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:1180)
	at org.apache.hadoop.hbase.regionserver.HRegionServer.openScanner(HRegionServer.java:1700)
	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:632)
	at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:895)
Caused by: java.io.FileNotFoundException: File does not exist: hdfs://domU-12-31-39-03-BD-A7.compute-1.internal:50001/hbase/.META./1028785192/info/mapfiles/1397620458287085628/data
	at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:394)
	at org.apache.hadoop.fs.FileSystem.getLength(FileSystem.java:679)
	at org.apache.hadoop.hbase.io.SequenceFile$Reader.<init>(SequenceFile.java:1431)
	at org.apache.hadoop.hbase.io.SequenceFile$Reader.<init>(SequenceFile.java:1426)
	at org.apache.hadoop.hbase.io.MapFile$Reader.createDataFileReader(MapFile.java:310)
	at org.apache.hadoop.hbase.io.HBaseMapFile$HBaseReader.createDataFileReader(HBaseMapFile.java:96)
	at org.apache.hadoop.hbase.io.MapFile$Reader.open(MapFile.java:292)
	at org.apache.hadoop.hbase.io.HBaseMapFile$HBaseReader.<init>(HBaseMapFile.java:79)
	at org.apache.hadoop.hbase.io.BloomFilterMapFile$Reader.<init>(BloomFilterMapFile.java:65)
	at org.apache.hadoop.hbase.regionserver.HStoreFile.getReader(HStoreFile.java:443)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.openReaders(StoreFileScanner.java:96)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.<init>(StoreFileScanner.java:67)
	... 10 more


	from org/apache/hadoop/hbase/client/HConnectionManager.java:841:in `getRegionServerWithRetries'
	from org/apache/hadoop/hbase/client/MetaScanner.java:56:in `metaScan'
	from org/apache/hadoop/hbase/client/MetaScanner.java:30:in `metaScan'
	from org/apache/hadoop/hbase/client/HConnectionManager.java:311:in `listTables'
	from org/apache/hadoop/hbase/client/HBaseAdmin.java:122:in `listTables'
	from sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0'
	from sun/reflect/NativeMethodAccessorImpl.java:39:in `invoke'
	from sun/reflect/DelegatingMethodAccessorImpl.java:25:in `invoke'
	from java/lang/reflect/Method.java:597:in `invoke'
	from org/jruby/javasupport/JavaMethod.java:250:in `invokeWithExceptionHandling'
	from org/jruby/javasupport/JavaMethod.java:219:in `invoke'
	from org/jruby/javasupport/JavaClass.java:416:in `execute'
	from org/jruby/internal/runtime/methods/SimpleCallbackMethod.java:67:in `call'
	from org/jruby/internal/runtime/methods/DynamicMethod.java:70:in `call'
	from org/jruby/runtime/CallSite.java:123:in `cacheAndCall'
	from org/jruby/runtime/CallSite.java:298:in `call'
... 130 levels...
	from ruby.usr.local.hbase_minus_0_dot_19_dot_0.bin.hirbInvokermethod__32$RUBY$startOpt:-1:in
`call'
	from org/jruby/internal/runtime/methods/DynamicMethod.java:74:in `call'
	from org/jruby/internal/runtime/methods/CompiledMethod.java:48:in `call'
	from org/jruby/runtime/CallSite.java:123:in `cacheAndCall'
	from org/jruby/runtime/CallSite.java:298:in `call'
	from ruby/usr/local/hbase_minus_0_dot_19_dot_0/bin//usr/local/hbase-0.19.0/bin/../bin/hirb.rb:429:in
`__file__'
	from ruby/usr/local/hbase_minus_0_dot_19_dot_0/bin//usr/local/hbase-0.19.0/bin/../bin/hirb.rb:-1:in
`__file__'
	from ruby/usr/local/hbase_minus_0_dot_19_dot_0/bin//usr/local/hbase-0.19.0/bin/../bin/hirb.rb:-1:in
`load'
	from org/jruby/Ruby.java:512:in `runScript'
	from org/jruby/Ruby.java:432:in `runNormally'
	from org/jruby/Ruby.java:312:in `runFromMain'
	from org/jruby/Main.java:144:in `run'
	from org/jruby/Main.java:89:in `run'
	from org/jruby/Main.java:80:in `main'
	from /usr/local/hbase-0.19.0/bin/../bin/hirb.rb:288:in `list'


> Rename tables
> -------------
>
>                 Key: HBASE-643
>                 URL: https://issues.apache.org/jira/browse/HBASE-643
>             Project: Hadoop HBase
>          Issue Type: New Feature
>            Reporter: Michael Bieniosek
>         Attachments: copy_table.rb, rename_table.rb
>
>
> It would be nice to be able to rename tables, if this is possible.  Some of our internal
users are doing things like: upload table mytable -> realize they screwed up -> upload
table mytable_2 -> decide mytable_2 looks better -> have to go on using mytable_2 instead
of originally desired table name.

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


Mime
View raw message