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

Enis Soztutar commented on HBASE-16573:
---------------------------------------

We can re-use HTableDescriptor.READONLY as a way to achieve read-only behavior 
for tables that are in the process of restoring. However, this will not 
prevents reads coming to the table, and also it will also reject bulk load 
requests coming from the restore operation itself. Maybe we can put a RESTORE 
mode in the table descriptor, where we will only allow operations (read / write 
/ bulk load) coming with a specific flag. The restore operation always makes 
sure to set this flag in every operation. 

> Backup restore into disabled table support
> ------------------------------------------
>
>                 Key: HBASE-16573
>                 URL: https://issues.apache.org/jira/browse/HBASE-16573
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Vladimir Rodionov
>            Assignee: Vladimir Rodionov
>
> If we restore into existing table, table must be disabled to avoid and block 
> any incoming requests.
> {code}
> java.lang.IllegalStateException: Cannot restore hbase table
>         at 
> org.apache.hadoop.hbase.backup.util.RestoreServerUtil.restoreTableAndCreate(RestoreServerUtil.java:492)
>         at 
> org.apache.hadoop.hbase.backup.util.RestoreServerUtil.fullRestoreTable(RestoreServerUtil.java:264)
>         at 
> org.apache.hadoop.hbase.backup.impl.RestoreClientImpl.restoreImages(RestoreClientImpl.java:321)
>         at 
> org.apache.hadoop.hbase.backup.impl.RestoreClientImpl.restore(RestoreClientImpl.java:219)
>         at 
> org.apache.hadoop.hbase.backup.impl.RestoreClientImpl.restore(RestoreClientImpl.java:107)
>         at 
> org.apache.hadoop.hbase.client.HBaseBackupAdmin.restore(HBaseBackupAdmin.java:411)
>         at 
> org.apache.hadoop.hbase.backup.TestIncrementalBackup.TestIncBackupRestore(TestIncrementalBackup.java:171)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>         at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>         at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>         at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>         at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>         at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>         at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>         at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> Caused by: org.apache.hadoop.hbase.TableNotFoundException: Table 
> ns1:table1_restore is not currently available.
>         at 
> org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.doBulkLoad(LoadIncrementalHFiles.java:347)
>         at 
> org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.run(LoadIncrementalHFiles.java:1097)
>         at 
> org.apache.hadoop.hbase.backup.util.RestoreServerUtil.restoreTableAndCreate(RestoreServerUtil.java:487)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to