Tabnine Logo
ReplicaInfo.isUnlinked
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: io.prestosql.hadoop/hadoop-apache

@Override //ReplicaInfo
public boolean isUnlinked() {
 return original.isUnlinked();
}
origin: ch.cern.hadoop/hadoop-hdfs

@Override //ReplicaInfo
public boolean isUnlinked() {
 return original.isUnlinked();
}
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.datanodeReplicaInfoisUnlinked

Javadoc

check if this replica has already been 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,
  • parseBaseDir

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Socket (java.net)
    Provides a client-side TCP socket.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • BoxLayout (javax.swing)
  • Top 12 Jupyter Notebook extensions
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