1 /**
2 * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work for additional information regarding
4 * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
5 * "License"); you may not use this file except in compliance with the License. You may obtain a
6 * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
7 * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
8 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
9 * for the specific language governing permissions and limitations under the License.
10 */
11
12 package org.apache.hadoop.hbase.backup;
13
14 import static org.junit.Assert.assertTrue;
15
16 import org.apache.commons.logging.Log;
17 import org.apache.commons.logging.LogFactory;
18 import org.apache.hadoop.hbase.testclassification.LargeTests;
19 import org.junit.Test;
20 import org.junit.experimental.categories.Category;
21
22 import com.google.common.collect.Lists;
23
24 @Category(LargeTests.class)
25 public class TestRemoteBackup extends TestBackupBase {
26
27 private static final Log LOG = LogFactory.getLog(TestRemoteBackup.class);
28
29 /**
30 * Verify that a remote full backup is created on a single table with data correctly.
31 * @throws Exception
32 */
33 @Test
34 public void testFullBackupRemote() throws Exception {
35
36 LOG.info("test remote full backup on a single table");
37
38 String backupId = backupTables(BackupType.FULL,
39 Lists.newArrayList(table1), BACKUP_REMOTE_ROOT_DIR);
40 assertTrue(checkSucceeded(backupId));
41
42 LOG.info("backup complete " + backupId);
43 }
44
45 }