congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ReplicaInfo.setUnlinked
Code IndexAdd Tabnine to your IDE (free)

How to use
setUnlinked
method
in
org.apache.hadoop.hdfs.server.datanode.ReplicaInfo

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

origin: io.prestosql.hadoop/hadoop-apache

@Override //ReplicaInfo
public void setUnlinked() {
 original.setUnlinked();
}

origin: ch.cern.hadoop/hadoop-hdfs

@Override //ReplicaInfo
public void setUnlinked() {
 original.setUnlinked();
}

origin: ch.cern.hadoop/hadoop-hdfs

/**
 * Remove a hard link by copying the block to a temporary place and 
 * then moving it back
 * @param numLinks number of hard links
 * @return true if copy is successful; 
 *         false if it is already detached or no need to be detached
 * @throws IOException if there is any copy error
 */
public boolean unlinkBlock(int numLinks) throws IOException {
 if (isUnlinked()) {
  return false;
 }
 File file = getBlockFile();
 if (file == null || getVolume() == null) {
  throw new IOException("detachBlock:Block not found. " + this);
 }
 File meta = getMetaFile();
 if (HardLink.getLinkCount(file) > numLinks) {
  DataNode.LOG.info("CopyOnWrite for block " + this);
  unlinkFile(file, this);
 }
 if (HardLink.getLinkCount(meta) > numLinks) {
  unlinkFile(meta, this);
 }
 setUnlinked();
 return true;
}
origin: io.prestosql.hadoop/hadoop-apache

/**
 * Remove a hard link by copying the block to a temporary place and 
 * then moving it back
 * @param numLinks number of hard links
 * @return true if copy is successful; 
 *         false if it is already detached or no need to be detached
 * @throws IOException if there is any copy error
 */
public boolean unlinkBlock(int numLinks) throws IOException {
 if (isUnlinked()) {
  return false;
 }
 File file = getBlockFile();
 if (file == null || getVolume() == null) {
  throw new IOException("detachBlock:Block not found. " + this);
 }
 File meta = getMetaFile();
 if (HardLink.getLinkCount(file) > numLinks) {
  DataNode.LOG.info("CopyOnWrite for block " + this);
  unlinkFile(file, this);
 }
 if (HardLink.getLinkCount(meta) > numLinks) {
  unlinkFile(meta, this);
 }
 setUnlinked();
 return true;
}
org.apache.hadoop.hdfs.server.datanodeReplicaInfosetUnlinked

Javadoc

set that this replica is unlinked

Popular methods of ReplicaInfo

  • getBlockId
  • getBytesOnDisk
  • getGenerationStamp
  • getNumBytes
  • getState
  • getVolume
    Get the volume where this replica is located on disk
  • getBlockFile
    Get the full path of this replica's data file
  • getMetaFile
    Get the full path of this replica's meta file
  • getBlockName
  • getBytesReserved
    Number of bytes reserved for this replica on disk.
  • getStorageUuid
    Get the storageUuid of the volume that stores this replica.
  • getVisibleLength
  • getStorageUuid,
  • getVisibleLength,
  • isOnTransientStorage,
  • setGenerationStamp,
  • setNumBytes,
  • equals,
  • getDir,
  • hashCode,
  • isUnlinked,
  • parseBaseDir

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Path (java.nio.file)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • From CI to AI: The AI layer in your organization
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