Tabnine Logo
SnapshotTestingUtils.assertOneSnapshotThatMatches
Code IndexAdd Tabnine to your IDE (free)

How to use
assertOneSnapshotThatMatches
method
in
org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils

Best Java code snippets using org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils.assertOneSnapshotThatMatches (Showing top 20 results out of 315)

origin: apache/hbase

/**
 * Make sure that there is only one snapshot returned from the master and its
 * name and table match the passed in parameters.
 */
public static List<SnapshotDescription> assertOneSnapshotThatMatches(
  Admin admin, byte[] snapshot, TableName tableName) throws IOException {
 return assertOneSnapshotThatMatches(admin, Bytes.toString(snapshot),
   tableName);
}
origin: apache/hbase

/**
 * Make sure that there is only one snapshot returned from the master
 */
public static void assertOneSnapshotThatMatches(Admin admin,
  SnapshotProtos.SnapshotDescription snapshot) throws IOException {
 assertOneSnapshotThatMatches(admin, snapshot.getName(), TableName.valueOf(snapshot.getTable()));
}
origin: apache/hbase

/**
 * Test simple flush snapshotting a table that is online
 * @throws Exception
 */
@Test
public void testFlushTableSnapshotWithProcedure() throws Exception {
 // make sure we don't fail on listing snapshots
 SnapshotTestingUtils.assertNoSnapshots(admin);
 // put some stuff in the table
 SnapshotTestingUtils.loadData(UTIL, TABLE_NAME, DEFAULT_NUM_ROWS, TEST_FAM);
 LOG.debug("FS state before snapshot:");
 UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
 // take a snapshot of the enabled table
 String snapshotString = "offlineTableSnapshot";
 byte[] snapshot = Bytes.toBytes(snapshotString);
 Map<String, String> props = new HashMap<>();
 props.put("table", TABLE_NAME.getNameAsString());
 admin.execProcedure(SnapshotManager.ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION,
   snapshotString, props);
 LOG.debug("Snapshot completed.");
 // make sure we have the snapshot
 List<SnapshotDescription> snapshots = SnapshotTestingUtils.assertOneSnapshotThatMatches(admin,
  snapshot, TABLE_NAME);
 // make sure its a valid snapshot
 LOG.debug("FS state after snapshot:");
 UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
 SnapshotTestingUtils.confirmSnapshotValid(UTIL,
  ProtobufUtil.createHBaseProtosSnapshotDesc(snapshots.get(0)), TABLE_NAME, TEST_FAM);
}
origin: apache/hbase

/**
 * Test simple flush snapshotting a table that is online
 * @throws Exception
 */
@Test
public void testFlushTableSnapshot() throws Exception {
 // make sure we don't fail on listing snapshots
 SnapshotTestingUtils.assertNoSnapshots(admin);
 // put some stuff in the table
 SnapshotTestingUtils.loadData(UTIL, TABLE_NAME, DEFAULT_NUM_ROWS, TEST_FAM);
 LOG.debug("FS state before snapshot:");
 UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
 // take a snapshot of the enabled table
 String snapshotString = "offlineTableSnapshot";
 byte[] snapshot = Bytes.toBytes(snapshotString);
 admin.snapshot(snapshotString, TABLE_NAME, SnapshotType.FLUSH);
 LOG.debug("Snapshot completed.");
 // make sure we have the snapshot
 List<SnapshotDescription> snapshots =
   SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot, TABLE_NAME);
 // make sure its a valid snapshot
 LOG.debug("FS state after snapshot:");
 UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
 SnapshotTestingUtils.confirmSnapshotValid(UTIL,
  ProtobufUtil.createHBaseProtosSnapshotDesc(snapshots.get(0)), TABLE_NAME, TEST_FAM);
}
origin: apache/hbase

SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot, TABLE_NAME);
origin: apache/hbase

SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot, TABLE_NAME);
origin: apache/hbase

@Test
public void testAsyncFlushSnapshot() throws Exception {
 SnapshotProtos.SnapshotDescription snapshot = SnapshotProtos.SnapshotDescription.newBuilder()
   .setName("asyncSnapshot").setTable(TABLE_NAME.getNameAsString())
   .setType(SnapshotProtos.SnapshotDescription.Type.FLUSH).build();
 // take the snapshot async
 admin.takeSnapshotAsync(
  new SnapshotDescription("asyncSnapshot", TABLE_NAME, SnapshotType.FLUSH));
 // constantly loop, looking for the snapshot to complete
 HMaster master = UTIL.getMiniHBaseCluster().getMaster();
 SnapshotTestingUtils.waitForSnapshotToComplete(master, snapshot, 200);
 LOG.info(" === Async Snapshot Completed ===");
 UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
 // make sure we get the snapshot
 SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot);
}
origin: apache/hbase

SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot, TABLE_NAME);
origin: apache/hbase

SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot, TABLE_NAME);
origin: apache/hbase

SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot, TABLE_NAME);
origin: apache/hbase

SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshotNameBytes, TABLE_NAME);
origin: org.apache.hbase/hbase-server

/**
 * Make sure that there is only one snapshot returned from the master and its
 * name and table match the passed in parameters.
 */
public static List<SnapshotDescription> assertOneSnapshotThatMatches(
  Admin admin, byte[] snapshot, TableName tableName) throws IOException {
 return assertOneSnapshotThatMatches(admin, Bytes.toString(snapshot),
   tableName);
}
origin: org.apache.hbase/hbase-server

/**
 * Make sure that there is only one snapshot returned from the master
 */
public static void assertOneSnapshotThatMatches(Admin admin,
  SnapshotProtos.SnapshotDescription snapshot) throws IOException {
 assertOneSnapshotThatMatches(admin, snapshot.getName(), TableName.valueOf(snapshot.getTable()));
}
origin: org.apache.hbase/hbase-server

/**
 * Test simple flush snapshotting a table that is online
 * @throws Exception
 */
@Test
public void testFlushTableSnapshotWithProcedure() throws Exception {
 // make sure we don't fail on listing snapshots
 SnapshotTestingUtils.assertNoSnapshots(admin);
 // put some stuff in the table
 SnapshotTestingUtils.loadData(UTIL, TABLE_NAME, DEFAULT_NUM_ROWS, TEST_FAM);
 LOG.debug("FS state before snapshot:");
 UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
 // take a snapshot of the enabled table
 String snapshotString = "offlineTableSnapshot";
 byte[] snapshot = Bytes.toBytes(snapshotString);
 Map<String, String> props = new HashMap<>();
 props.put("table", TABLE_NAME.getNameAsString());
 admin.execProcedure(SnapshotManager.ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION,
   snapshotString, props);
 LOG.debug("Snapshot completed.");
 // make sure we have the snapshot
 List<SnapshotDescription> snapshots = SnapshotTestingUtils.assertOneSnapshotThatMatches(admin,
  snapshot, TABLE_NAME);
 // make sure its a valid snapshot
 LOG.debug("FS state after snapshot:");
 UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
 SnapshotTestingUtils.confirmSnapshotValid(UTIL,
  ProtobufUtil.createHBaseProtosSnapshotDesc(snapshots.get(0)), TABLE_NAME, TEST_FAM);
}
origin: org.apache.hbase/hbase-server

/**
 * Test simple flush snapshotting a table that is online
 * @throws Exception
 */
@Test
public void testFlushTableSnapshot() throws Exception {
 // make sure we don't fail on listing snapshots
 SnapshotTestingUtils.assertNoSnapshots(admin);
 // put some stuff in the table
 SnapshotTestingUtils.loadData(UTIL, TABLE_NAME, DEFAULT_NUM_ROWS, TEST_FAM);
 LOG.debug("FS state before snapshot:");
 UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
 // take a snapshot of the enabled table
 String snapshotString = "offlineTableSnapshot";
 byte[] snapshot = Bytes.toBytes(snapshotString);
 admin.snapshot(snapshotString, TABLE_NAME, SnapshotType.FLUSH);
 LOG.debug("Snapshot completed.");
 // make sure we have the snapshot
 List<SnapshotDescription> snapshots =
   SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot, TABLE_NAME);
 // make sure its a valid snapshot
 LOG.debug("FS state after snapshot:");
 UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
 SnapshotTestingUtils.confirmSnapshotValid(UTIL,
  ProtobufUtil.createHBaseProtosSnapshotDesc(snapshots.get(0)), TABLE_NAME, TEST_FAM);
}
origin: org.apache.hbase/hbase-server

SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot, TABLE_NAME);
origin: org.apache.hbase/hbase-server

@Test
public void testAsyncFlushSnapshot() throws Exception {
 SnapshotProtos.SnapshotDescription snapshot = SnapshotProtos.SnapshotDescription.newBuilder()
   .setName("asyncSnapshot").setTable(TABLE_NAME.getNameAsString())
   .setType(SnapshotProtos.SnapshotDescription.Type.FLUSH).build();
 // take the snapshot async
 admin.takeSnapshotAsync(
  new SnapshotDescription("asyncSnapshot", TABLE_NAME, SnapshotType.FLUSH));
 // constantly loop, looking for the snapshot to complete
 HMaster master = UTIL.getMiniHBaseCluster().getMaster();
 SnapshotTestingUtils.waitForSnapshotToComplete(master, snapshot, 200);
 LOG.info(" === Async Snapshot Completed ===");
 UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
 // make sure we get the snapshot
 SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot);
}
origin: org.apache.hbase/hbase-server

SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot, TABLE_NAME);
origin: org.apache.hbase/hbase-server

SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot, TABLE_NAME);
origin: org.apache.hbase/hbase-server

SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshotNameBytes, TABLE_NAME);
org.apache.hadoop.hbase.snapshotSnapshotTestingUtilsassertOneSnapshotThatMatches

Javadoc

Make sure that there is only one snapshot returned from the master and its name and table match the passed in parameters.

Popular methods of SnapshotTestingUtils

  • deleteAllSnapshots
  • deleteArchiveDirectory
  • loadData
  • createSnapshotAndValidate
    Take a snapshot of the specified table and verify the given families. Note that this will leave the
  • createPreSplitTable
  • waitForTableToBeOnline
  • assertExistsMatchingSnapshot
    Make sure that there is only one snapshot returned from the master and its name and table match the
  • assertNoSnapshots
    Assert that we don't have any snapshots lists
  • cleanupSnapshot
  • confirmSnapshotValid
    Confirm that the snapshot contains references to all the files that should be in the snapshot.
  • corruptSnapshot
    Corrupt the specified snapshot by deleting some files.
  • createPut
  • corruptSnapshot,
  • createPut,
  • createTable,
  • expectSnapshotDoneException,
  • getSplitKeys,
  • listHFileNames,
  • snapshot,
  • verifyReplicasCameOnline,
  • verifyRowCount

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Notification (javax.management)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now