Tabnine Logo
VolumeScanner.calculateShouldScan
Code IndexAdd Tabnine to your IDE (free)

How to use
calculateShouldScan
method
in
org.apache.hadoop.hdfs.server.datanode.VolumeScanner

Best Java code snippets using org.apache.hadoop.hdfs.server.datanode.VolumeScanner.calculateShouldScan (Showing top 4 results out of 315)

origin: org.apache.hadoop/hadoop-hdfs

expireOldScannedBytesRecords(monotonicMs);
if (!calculateShouldScan(volume.getStorageID(), conf.targetBytesPerSec,
  scannedBytesSum, startMinute, curMinute)) {
origin: ch.cern.hadoop/hadoop-hdfs

@Test(timeout=120000)
public void testCalculateNeededBytesPerSec() throws Exception {
 // If we didn't check anything the last hour, we should scan now.
 Assert.assertTrue(
   VolumeScanner.calculateShouldScan("test", 100, 0, 0, 60));
 // If, on average, we checked 101 bytes/s checked during the last hour,
 // stop checking now.
 Assert.assertFalse(VolumeScanner.
   calculateShouldScan("test", 100, 101 * 3600, 1000, 5000));
 // Target is 1 byte / s, but we didn't scan anything in the last minute.
 // Should scan now.
 Assert.assertTrue(VolumeScanner.
   calculateShouldScan("test", 1, 3540, 0, 60));
 // Target is 1000000 byte / s, but we didn't scan anything in the last
 // minute.  Should scan now.
 Assert.assertTrue(VolumeScanner.
   calculateShouldScan("test", 100000L, 354000000L, 0, 60));
 Assert.assertFalse(VolumeScanner.
   calculateShouldScan("test", 100000L, 365000000L, 0, 60));
}
origin: ch.cern.hadoop/hadoop-hdfs

expireOldScannedBytesRecords(monotonicMs);
if (!calculateShouldScan(volume.getStorageID(), conf.targetBytesPerSec,
  scannedBytesSum, startMinute, curMinute)) {
origin: io.prestosql.hadoop/hadoop-apache

expireOldScannedBytesRecords(monotonicMs);
if (!calculateShouldScan(volume.getStorageID(), conf.targetBytesPerSec,
  scannedBytesSum, startMinute, curMinute)) {
org.apache.hadoop.hdfs.server.datanodeVolumeScannercalculateShouldScan

Popular methods of VolumeScanner

  • <init>
  • disableBlockPoolId
    Disallow the scanner from scanning the given block pool.
  • enableBlockPoolId
    Allow the scanner to scan the given block pool.
  • expireOldScannedBytesRecords
  • findNextUsableBlockIter
    Find a usable block iterator. We will consider available block iterators in order. This property is
  • getStatistics
  • interrupt
  • markSuspectBlock
  • popNextSuspectBlock
    If there are elements in the suspectBlocks list, removes and returns the first one. Otherwise, retur
  • positiveMsToHours
  • printStats
  • runLoop
    Run an iteration of the VolumeScanner loop.
  • printStats,
  • runLoop,
  • saveBlockIterator,
  • scanBlock,
  • setConf,
  • setDaemon,
  • setName,
  • shutdown,
  • start

Popular in Java

  • Finding current android device location
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top Vim 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