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

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

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

origin: apache/hbase

private void verifyReplicasCameOnline(TableName tableName) throws IOException {
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
}
origin: apache/hbase

@Test
public void testCloneSnapshotOfCloned() throws IOException, InterruptedException {
 TableName clonedTableName =
  TableName.valueOf(getValidMethodName() + "-" + System.currentTimeMillis());
 admin.cloneSnapshot(snapshotName0, clonedTableName);
 verifyRowCount(TEST_UTIL, clonedTableName, snapshot0Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(clonedTableName, admin, getNumReplicas());
 admin.disableTable(clonedTableName);
 admin.snapshot(snapshotName2, clonedTableName);
 TEST_UTIL.deleteTable(clonedTableName);
 waitCleanerRun();
 admin.cloneSnapshot(snapshotName2, clonedTableName);
 verifyRowCount(TEST_UTIL, clonedTableName, snapshot0Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(clonedTableName, admin, getNumReplicas());
 TEST_UTIL.deleteTable(clonedTableName);
}
origin: apache/hbase

@Test
public void testCloneAndRestoreSnapshot() throws IOException, InterruptedException {
 TEST_UTIL.deleteTable(tableName);
 waitCleanerRun();
 admin.cloneSnapshot(snapshotName0, tableName);
 verifyRowCount(TEST_UTIL, tableName, snapshot0Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
 waitCleanerRun();
 admin.disableTable(tableName);
 admin.restoreSnapshot(snapshotName0);
 admin.enableTable(tableName);
 verifyRowCount(TEST_UTIL, tableName, snapshot0Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
}
origin: apache/hbase

@Test
public void testRestoreSnapshot() throws IOException {
 verifyRowCount(TEST_UTIL, tableName, snapshot1Rows);
 admin.disableTable(tableName);
 admin.snapshot(snapshotName1, tableName);
 // Restore from snapshot-0
 admin.restoreSnapshot(snapshotName0);
 admin.enableTable(tableName);
 verifyRowCount(TEST_UTIL, tableName, snapshot0Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
 // Restore from emptySnapshot
 admin.disableTable(tableName);
 admin.restoreSnapshot(emptySnapshot);
 admin.enableTable(tableName);
 verifyRowCount(TEST_UTIL, tableName, 0);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
 // Restore from snapshot-1
 admin.disableTable(tableName);
 admin.restoreSnapshot(snapshotName1);
 admin.enableTable(tableName);
 verifyRowCount(TEST_UTIL, tableName, snapshot1Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
 // Restore from snapshot-1
 TEST_UTIL.deleteTable(tableName);
 admin.restoreSnapshot(snapshotName1);
 verifyRowCount(TEST_UTIL, tableName, snapshot1Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
}
origin: apache/hbase

admin.enableTable(tableName);
SnapshotTestingUtils.verifyRowCount(UTIL, tableName, snapshot0Rows);
SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
admin.enableTable(tableName);
SnapshotTestingUtils.verifyRowCount(UTIL, tableName, 0);
SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
admin.enableTable(tableName);
SnapshotTestingUtils.verifyRowCount(UTIL, tableName, snapshot1Rows);
SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
admin.restoreSnapshot(snapshotName1);
SnapshotTestingUtils.verifyRowCount(UTIL, tableName, snapshot1Rows);
SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
origin: apache/hbase

admin.enableTable(tableName);
SnapshotTestingUtils.verifyRowCount(UTIL, tableName, snapshot0Rows);
SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
admin.enableTable(tableName);
SnapshotTestingUtils.verifyRowCount(UTIL, tableName, 0);
SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
admin.enableTable(tableName);
SnapshotTestingUtils.verifyRowCount(UTIL, tableName, snapshot1Rows);
SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
admin.restoreSnapshot(snapshotName1);
SnapshotTestingUtils.verifyRowCount(UTIL, tableName, snapshot1Rows);
SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
origin: apache/hbase

 @Test
 public void testRestoreSnapshotAfterTruncate() throws Exception {
  TableName tableName = TableName.valueOf(getValidMethodName());
  SnapshotTestingUtils.createTable(TEST_UTIL, tableName, getNumReplicas(), FAMILY);
  SnapshotTestingUtils.loadData(TEST_UTIL, tableName, 500, FAMILY);
  int numOfRows = 0;

  try (Table table = TEST_UTIL.getConnection().getTable(tableName)) {
   numOfRows = countRows(table);
  }
  // take snapshot
  admin.snapshot("snap", tableName);
  admin.disableTable(tableName);
  admin.truncateTable(tableName, false);
  admin.disableTable(tableName);
  admin.restoreSnapshot("snap");

  admin.enableTable(tableName);
  verifyRowCount(TEST_UTIL, tableName, numOfRows);
  SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
 }
}
origin: org.apache.hbase/hbase-server

private void verifyReplicasCameOnline(TableName tableName) throws IOException {
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
}
origin: org.apache.hbase/hbase-server

@Test
public void testCloneSnapshotOfCloned() throws IOException, InterruptedException {
 TableName clonedTableName =
  TableName.valueOf(getValidMethodName() + "-" + System.currentTimeMillis());
 admin.cloneSnapshot(snapshotName0, clonedTableName);
 verifyRowCount(TEST_UTIL, clonedTableName, snapshot0Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(clonedTableName, admin, getNumReplicas());
 admin.disableTable(clonedTableName);
 admin.snapshot(snapshotName2, clonedTableName);
 TEST_UTIL.deleteTable(clonedTableName);
 waitCleanerRun();
 admin.cloneSnapshot(snapshotName2, clonedTableName);
 verifyRowCount(TEST_UTIL, clonedTableName, snapshot0Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(clonedTableName, admin, getNumReplicas());
 TEST_UTIL.deleteTable(clonedTableName);
}
origin: org.apache.hbase/hbase-server

@Test
public void testCloneAndRestoreSnapshot() throws IOException, InterruptedException {
 TEST_UTIL.deleteTable(tableName);
 waitCleanerRun();
 admin.cloneSnapshot(snapshotName0, tableName);
 verifyRowCount(TEST_UTIL, tableName, snapshot0Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
 waitCleanerRun();
 admin.disableTable(tableName);
 admin.restoreSnapshot(snapshotName0);
 admin.enableTable(tableName);
 verifyRowCount(TEST_UTIL, tableName, snapshot0Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
}
origin: org.apache.hbase/hbase-server

@Test
public void testRestoreSnapshot() throws IOException {
 verifyRowCount(TEST_UTIL, tableName, snapshot1Rows);
 admin.disableTable(tableName);
 admin.snapshot(snapshotName1, tableName);
 // Restore from snapshot-0
 admin.restoreSnapshot(snapshotName0);
 admin.enableTable(tableName);
 verifyRowCount(TEST_UTIL, tableName, snapshot0Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
 // Restore from emptySnapshot
 admin.disableTable(tableName);
 admin.restoreSnapshot(emptySnapshot);
 admin.enableTable(tableName);
 verifyRowCount(TEST_UTIL, tableName, 0);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
 // Restore from snapshot-1
 admin.disableTable(tableName);
 admin.restoreSnapshot(snapshotName1);
 admin.enableTable(tableName);
 verifyRowCount(TEST_UTIL, tableName, snapshot1Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
 // Restore from snapshot-1
 TEST_UTIL.deleteTable(tableName);
 admin.restoreSnapshot(snapshotName1);
 verifyRowCount(TEST_UTIL, tableName, snapshot1Rows);
 SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas());
}
org.apache.hadoop.hbase.snapshotSnapshotTestingUtilsverifyReplicasCameOnline

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
  • assertOneSnapshotThatMatches
    Make sure that there is only one snapshot returned from the master and its name and table match the
  • 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.
  • confirmSnapshotValid,
  • corruptSnapshot,
  • createPut,
  • createTable,
  • expectSnapshotDoneException,
  • getSplitKeys,
  • listHFileNames,
  • snapshot,
  • 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
  • Best plugins for Eclipse
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