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

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

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

origin: apache/hbase

/**
 * @return all the HFiles for a given table in the specified dir
 * @throws IOException on expected failure
 */
private final Collection<String> getHFiles(Path dir, FileSystem fs, TableName tableName) throws IOException {
 Path tableDir = FSUtils.getTableDir(dir, tableName);
 return SnapshotTestingUtils.listHFileNames(fs, tableDir);
}
origin: apache/hbase

private void verifyRestore(final Path rootDir, final TableDescriptor sourceHtd,
  final TableDescriptor htdClone) throws IOException {
 List<String> files = SnapshotTestingUtils.listHFileNames(fs,
  FSUtils.getTableDir(rootDir, htdClone.getTableName()));
 assertEquals(12, files.size());
 for (int i = 0; i < files.size(); i += 2) {
  String linkFile = files.get(i);
  String refFile = files.get(i+1);
  assertTrue(linkFile + " should be a HFileLink", HFileLink.isHFileLink(linkFile));
  assertTrue(refFile + " should be a Referene", StoreFileInfo.isReference(refFile));
  assertEquals(sourceHtd.getTableName(), HFileLink.getReferencedTableName(linkFile));
  Path refPath = getReferredToFile(refFile);
  LOG.debug("get reference name for file " + refFile + " = " + refPath);
  assertTrue(refPath.getName() + " should be a HFileLink", HFileLink.isHFileLink(refPath.getName()));
  assertEquals(linkFile, refPath.getName());
 }
}
origin: apache/hbase

 @Test
 public void testFlushWithTableCompactionDisabled() throws Exception {
  HTableDescriptor htd = new HTableDescriptor(tableName);
  htd.setCompactionEnabled(false);
  TEST_UTIL.createTable(htd, new byte[][] { family }, null);

  // load the table
  for (int i = 0; i < blockingStoreFiles + 1; i ++) {
   TEST_UTIL.loadTable(TEST_UTIL.getConnection().getTable(tableName), family);
   TEST_UTIL.flush(tableName);
  }

  // Make sure that store file number is greater than blockingStoreFiles + 1
  Path tableDir = FSUtils.getTableDir(rootDir, tableName);
  Collection<String> hfiles =  SnapshotTestingUtils.listHFileNames(fs, tableDir);
  assert(hfiles.size() > blockingStoreFiles + 1);
 }
}
origin: org.apache.hbase/hbase-server

/**
 * @return all the HFiles for a given table in the specified dir
 * @throws IOException on expected failure
 */
private final Collection<String> getHFiles(Path dir, FileSystem fs, TableName tableName) throws IOException {
 Path tableDir = FSUtils.getTableDir(dir, tableName);
 return SnapshotTestingUtils.listHFileNames(fs, tableDir);
}
origin: org.apache.hbase/hbase-server

private void verifyRestore(final Path rootDir, final TableDescriptor sourceHtd,
  final TableDescriptor htdClone) throws IOException {
 List<String> files = SnapshotTestingUtils.listHFileNames(fs,
  FSUtils.getTableDir(rootDir, htdClone.getTableName()));
 assertEquals(12, files.size());
 for (int i = 0; i < files.size(); i += 2) {
  String linkFile = files.get(i);
  String refFile = files.get(i+1);
  assertTrue(linkFile + " should be a HFileLink", HFileLink.isHFileLink(linkFile));
  assertTrue(refFile + " should be a Referene", StoreFileInfo.isReference(refFile));
  assertEquals(sourceHtd.getTableName(), HFileLink.getReferencedTableName(linkFile));
  Path refPath = getReferredToFile(refFile);
  LOG.debug("get reference name for file " + refFile + " = " + refPath);
  assertTrue(refPath.getName() + " should be a HFileLink", HFileLink.isHFileLink(refPath.getName()));
  assertEquals(linkFile, refPath.getName());
 }
}
origin: org.apache.hbase/hbase-server

 @Test
 public void testFlushWithTableCompactionDisabled() throws Exception {
  HTableDescriptor htd = new HTableDescriptor(tableName);
  htd.setCompactionEnabled(false);
  TEST_UTIL.createTable(htd, new byte[][] { family }, null);

  // load the table
  for (int i = 0; i < blockingStoreFiles + 1; i ++) {
   TEST_UTIL.loadTable(TEST_UTIL.getConnection().getTable(tableName), family);
   TEST_UTIL.flush(tableName);
  }

  // Make sure that store file number is greater than blockingStoreFiles + 1
  Path tableDir = FSUtils.getTableDir(rootDir, tableName);
  Collection<String> hfiles =  SnapshotTestingUtils.listHFileNames(fs, tableDir);
  assert(hfiles.size() > blockingStoreFiles + 1);
 }
}
org.apache.hadoop.hbase.snapshotSnapshotTestingUtilslistHFileNames

Javadoc

List all the HFiles in the given table

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,
  • snapshot,
  • verifyReplicasCameOnline,
  • verifyRowCount

Popular in Java

  • Reading from database using SQL prepared statement
  • 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 Sublime Text 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