HBASE-26567 Remove IndexType from ChunkCreator (#3947)
[hbase.git] / hbase-server / src / test / java / org / apache / hadoop / hbase / client / TestMobSnapshotFromClient.java
blob0695be12d0c4dcf3d53ecdb0c4a54c3aaf4bea80
1 /**
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 package org.apache.hadoop.hbase.client;
20 import org.apache.hadoop.conf.Configuration;
21 import org.apache.hadoop.hbase.HBaseClassTestRule;
22 import org.apache.hadoop.hbase.mob.MobConstants;
23 import org.apache.hadoop.hbase.snapshot.MobSnapshotTestingUtils;
24 import org.apache.hadoop.hbase.testclassification.ClientTests;
25 import org.apache.hadoop.hbase.testclassification.LargeTests;
26 import org.junit.BeforeClass;
27 import org.junit.ClassRule;
28 import org.junit.experimental.categories.Category;
30 /**
31 * Test create/using/deleting snapshots from the client
32 * <p>
33 * This is an end-to-end test for the snapshot utility
35 @Category({LargeTests.class, ClientTests.class})
36 public class TestMobSnapshotFromClient extends TestSnapshotFromClient {
38 @ClassRule
39 public static final HBaseClassTestRule CLASS_RULE =
40 HBaseClassTestRule.forClass(TestMobSnapshotFromClient.class);
42 /**
43 * Setup the config for the cluster
44 * @throws Exception on failure
46 @BeforeClass
47 public static void setupCluster() throws Exception {
48 setupConf(UTIL.getConfiguration());
49 UTIL.startMiniCluster(NUM_RS);
52 protected static void setupConf(Configuration conf) {
53 TestSnapshotFromClient.setupConf(conf);
54 conf.setInt(MobConstants.MOB_FILE_CACHE_SIZE_KEY, 0);
57 @Override
58 protected void createTable() throws Exception {
59 MobSnapshotTestingUtils.createMobTable(UTIL, TABLE_NAME, getNumReplicas(), trackerImpl.name(),
60 TEST_FAM);