Codota Logo
BlockPoolSlice.selectReplicaToDelete
Code IndexAdd Codota to your IDE (free)

How to use
selectReplicaToDelete
method
in
org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.BlockPoolSlice

Best Java code snippets using org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.BlockPoolSlice.selectReplicaToDelete (Showing top 4 results out of 315)

  • Common ways to obtain BlockPoolSlice
private void myMethod () {
BlockPoolSlice b =
  • Codota IconFsVolumeImpl fsVolumeImpl;ExtendedBlock extendedBlock;fsVolumeImpl.getBlockPoolSlice(extendedBlock.getBlockPoolId())
  • Smart code suggestions by Codota
}
origin: org.apache.hadoop/hadoop-hdfs

  selectReplicaToDelete(replica1, replica2);
final ReplicaInfo replicaToKeep =
  (replicaToDelete != replica1) ? replica1 : replica2;
origin: ch.cern.hadoop/hadoop-hdfs

  selectReplicaToDelete(replica1, replica2);
final ReplicaInfo replicaToKeep =
  (replicaToDelete != replica1) ? replica1 : replica2;
origin: io.prestosql.hadoop/hadoop-apache

  selectReplicaToDelete(replica1, replica2);
final ReplicaInfo replicaToKeep =
  (replicaToDelete != replica1) ? replica1 : replica2;
origin: ch.cern.hadoop/hadoop-hdfs

@Test
public void testDuplicateReplicaResolution() throws IOException {
 FsVolumeImpl fsv1 = Mockito.mock(FsVolumeImpl.class);
 FsVolumeImpl fsv2 = Mockito.mock(FsVolumeImpl.class);
 File f1 = new File("d1/block");
 File f2 = new File("d2/block");
 ReplicaInfo replicaOlder = new FinalizedReplica(1,1,1,fsv1,f1);
 ReplicaInfo replica = new FinalizedReplica(1,2,2,fsv1,f1);
 ReplicaInfo replicaSame = new FinalizedReplica(1,2,2,fsv1,f1);
 ReplicaInfo replicaNewer = new FinalizedReplica(1,3,3,fsv1,f1);
 ReplicaInfo replicaOtherOlder = new FinalizedReplica(1,1,1,fsv2,f2);
 ReplicaInfo replicaOtherSame = new FinalizedReplica(1,2,2,fsv2,f2);
 ReplicaInfo replicaOtherNewer = new FinalizedReplica(1,3,3,fsv2,f2);
 // equivalent path so don't remove either
 assertNull(BlockPoolSlice.selectReplicaToDelete(replicaSame, replica));
 assertNull(BlockPoolSlice.selectReplicaToDelete(replicaOlder, replica));
 assertNull(BlockPoolSlice.selectReplicaToDelete(replicaNewer, replica));
 // keep latest found replica
 assertSame(replica,
   BlockPoolSlice.selectReplicaToDelete(replicaOtherSame, replica));
 assertSame(replicaOtherOlder,
   BlockPoolSlice.selectReplicaToDelete(replicaOtherOlder, replica));
 assertSame(replica,
   BlockPoolSlice.selectReplicaToDelete(replicaOtherNewer, replica));
}
org.apache.hadoop.hdfs.server.datanode.fsdataset.implBlockPoolSliceselectReplicaToDelete

Popular methods of BlockPoolSlice

  • createRbwFile
    RBW files. They get moved to the finalized block directory when the block is finalized.
  • getFinalizedDir
  • getLazypersistDir
  • <init>
    Create a blook pool slice
  • activateSavedReplica
    Move a persisted replica from lazypersist directory to a subdirectory under finalized.
  • addToReplicasMap
    Add replicas under the given directory to the volume map
  • checkDirs
  • createTmpFile
    Temporary files. They get moved to the finalized block directory when the block is finalized.
  • decDfsUsed
    Run DU on local drives. It must be synchronized from caller.
  • deleteReplica
  • getDfsUsed
  • getRbwDir
  • getDfsUsed,
  • getRbwDir,
  • getTmpDir,
  • getVolumeMap,
  • incDfsUsed,
  • loadDfsUsed,
  • moveLazyPersistReplicasToFinalized,
  • recoverTempUnlinkedBlock,
  • resolveDuplicateReplicas

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now