hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Janos Gub (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-19159) Backup should check permission for snapshot copy in advance
Date Fri, 24 Nov 2017 12:24:01 GMT

     [ https://issues.apache.org/jira/browse/HBASE-19159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Janos Gub updated HBASE-19159:
------------------------------
    Attachment: HBASE-19159-v2.patch

Updated patch by the review. Instead of passing the fsaction I changed the name of the function.
The purpose of checkBackupCanBeCreated is to check if the first existing parent of the backup
dir is writable -> subdirs can be created. I am not sure if this is usable for any other
fsaction. [~tedyu] what do you think? Also I am not sure, maybe it should check WRITE_EXECUTE
instead of WRITE...
Ran the following:
{code}
mvn clean install -Dtest=TestBackup\*
{code}

result:
{code}
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupSmallTests
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 38.641 s - in org.apache.hadoop.hbase.backup.TestBackupSmallTests
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupStatusProgress
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 64.517 s - in org.apache.hadoop.hbase.backup.TestBackupStatusProgress
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupShowHistory
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 65.36 s - in org.apache.hadoop.hbase.backup.TestBackupShowHistory
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupDeleteRestore
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 61.712 s - in org.apache.hadoop.hbase.backup.TestBackupDeleteRestore
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupCommandLineTool
[INFO] Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.672 s - in org.apache.hadoop.hbase.backup.TestBackupCommandLineTool
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupHFileCleaner
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.072 s - in org.apache.hadoop.hbase.backup.TestBackupHFileCleaner
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupDeleteWithFailures
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 103.715 s - in org.apache.hadoop.hbase.backup.TestBackupDeleteWithFailures
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupRepair
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 78.598 s - in org.apache.hadoop.hbase.backup.TestBackupRepair
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupBoundaryTests
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 72.887 s - in org.apache.hadoop.hbase.backup.TestBackupBoundaryTests
[INFO] Running org.apache.hadoop.hbase.backup.master.TestBackupLogCleaner
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 96.676 s - in org.apache.hadoop.hbase.backup.master.TestBackupLogCleaner
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupMultipleDeletes
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 153.956 s - in org.apache.hadoop.hbase.backup.TestBackupMultipleDeletes
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupDescribe
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 48.424 s - in org.apache.hadoop.hbase.backup.TestBackupDescribe
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupDelete
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 67.575 s - in org.apache.hadoop.hbase.backup.TestBackupDelete
[INFO] Running org.apache.hadoop.hbase.backup.TestBackupSystemTable
[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 66.655 s - in org.apache.hadoop.hbase.backup.TestBackupSystemTable
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 53, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
{code}

> Backup should check permission for snapshot copy in advance
> -----------------------------------------------------------
>
>                 Key: HBASE-19159
>                 URL: https://issues.apache.org/jira/browse/HBASE-19159
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Ted Yu
>            Assignee: Janos Gub
>            Priority: Minor
>         Attachments: HBASE-19159-v2.patch, HBASE-19159.patch, initial_patch.txt
>
>
> When the user running the backup doesn't have permission to copy the snapshot , he /
she would see:
> {code}
> 2017-11-02 18:21:33,654 ERROR [main] util.AbstractHBaseTool: Error running command-line
tool
> org.apache.hadoop.hbase.snapshot.ExportSnapshotException: Failed to copy the snapshot
directory: from=hdfs://ctr-e134-1499953498516-263664-01-000003.hwx.site:8020/apps/hbase/data/.hbase-snapshot/snapshot_1509646891251_default_IntegrationTestBackupRestore.table2
to=hdfs://ctr-e134-1499953498516-263664-01-000003.hwx.site:8020/user/root/test-data/fb919a6f-3cb4-4d57-bbcf-561d6e5b3ae8/backupIT/backup_1509646884252/default/IntegrationTestBackupRestore.table2/.hbase-snapshot/.tmp/snapshot_1509646891251_default_IntegrationTestBackupRestore.table2
> 	at org.apache.hadoop.hbase.snapshot.ExportSnapshot.doWork(ExportSnapshot.java:1009)
> 	at org.apache.hadoop.hbase.util.AbstractHBaseTool.run(AbstractHBaseTool.java:154)
> 	at org.apache.hadoop.hbase.backup.mapreduce.MapReduceBackupCopyJob.copy(MapReduceBackupCopyJob.java:386)
> 	at org.apache.hadoop.hbase.backup.impl.FullTableBackupClient.snapshotCopy(FullTableBackupClient.java:103)
> 	at org.apache.hadoop.hbase.backup.impl.FullTableBackupClient.execute(FullTableBackupClient.java:175)
> 	at org.apache.hadoop.hbase.backup.impl.BackupAdminImpl.backupTables(BackupAdminImpl.java:601)
> 	at org.apache.hadoop.hbase.IntegrationTestBackupRestore.runTest(IntegrationTestBackupRestore.java:180)
> 	at org.apache.hadoop.hbase.IntegrationTestBackupRestore.testBackupRestore(IntegrationTestBackupRestore.java:134)
> 	at org.apache.hadoop.hbase.IntegrationTestBackupRestore.runTestFromCommandLine(IntegrationTestBackupRestore.java:263)
> {code}
> It would be more user friendly if the permission is checked before taking the snapshot.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message