Tabnine Logo
ReplicaOutputStreams.getChecksumOut
Code IndexAdd Tabnine to your IDE (free)

How to use
getChecksumOut
method
in
org.apache.hadoop.hdfs.server.datanode.fsdataset.ReplicaOutputStreams

Best Java code snippets using org.apache.hadoop.hdfs.server.datanode.fsdataset.ReplicaOutputStreams.getChecksumOut (Showing top 7 results out of 315)

origin: org.apache.hadoop/hadoop-hdfs

/**
 * Sets the offset in the meta file so that the
 * last checksum will be overwritten.
 */
@Override // FsDatasetSpi
public void adjustCrcChannelPosition(ExtendedBlock b, ReplicaOutputStreams streams, 
  int checksumSize) throws IOException {
 FileOutputStream file = (FileOutputStream)streams.getChecksumOut();
 FileChannel channel = file.getChannel();
 long oldPos = channel.position();
 long newPos = oldPos - checksumSize;
 if (LOG.isDebugEnabled()) {
  LOG.debug("Changing meta file offset of block " + b + " from " +
    oldPos + " to " + newPos);
 }
 channel.position(newPos);
}
origin: org.apache.hadoop/hadoop-hdfs

streams.getChecksumOut(), DFSUtilClient.getSmallBufferSize(
datanode.getConf())));
origin: ch.cern.hadoop/hadoop-hdfs

/**
 * Sets the offset in the meta file so that the
 * last checksum will be overwritten.
 */
@Override // FsDatasetSpi
public void adjustCrcChannelPosition(ExtendedBlock b, ReplicaOutputStreams streams, 
  int checksumSize) throws IOException {
 FileOutputStream file = (FileOutputStream)streams.getChecksumOut();
 FileChannel channel = file.getChannel();
 long oldPos = channel.position();
 long newPos = oldPos - checksumSize;
 if (LOG.isDebugEnabled()) {
  LOG.debug("Changing meta file offset of block " + b + " from " +
    oldPos + " to " + newPos);
 }
 channel.position(newPos);
}
origin: io.prestosql.hadoop/hadoop-apache

/**
 * Sets the offset in the meta file so that the
 * last checksum will be overwritten.
 */
@Override // FsDatasetSpi
public void adjustCrcChannelPosition(ExtendedBlock b, ReplicaOutputStreams streams, 
  int checksumSize) throws IOException {
 FileOutputStream file = (FileOutputStream)streams.getChecksumOut();
 FileChannel channel = file.getChannel();
 long oldPos = channel.position();
 long newPos = oldPos - checksumSize;
 if (LOG.isDebugEnabled()) {
  LOG.debug("Changing meta file offset of block " + b + " from " +
    oldPos + " to " + newPos);
 }
 channel.position(newPos);
}
origin: ch.cern.hadoop/hadoop-hdfs

streams.getChecksumOut(), HdfsConstants.SMALL_BUFFER_SIZE));
origin: ch.cern.hadoop/hadoop-hdfs

streams = replicaInfo.createStreams(true,
  DataChecksum.newDataChecksum(DataChecksum.Type.CRC32, 512));
streams.getChecksumOut().write('a');
dn.data.initReplicaRecovery(new RecoveringBlock(block, null, RECOVERY_ID+1));
try {
origin: io.prestosql.hadoop/hadoop-apache

streams.getChecksumOut(), HdfsConstants.SMALL_BUFFER_SIZE));
org.apache.hadoop.hdfs.server.datanode.fsdatasetReplicaOutputStreamsgetChecksumOut

Popular methods of ReplicaOutputStreams

  • <init>
    Create an object with a data output stream, a checksum output stream and a checksum.
  • getDataOut
  • getChecksum
  • isTransientStorage
  • syncChecksumOut
    Sync the checksum stream if it supports it.
  • syncDataOut
    Sync the data stream if it supports it.
  • close
  • closeDataStream
  • dropCacheBehindWrites
  • flushDataOut
    Flush the data stream if it supports it.
  • getOutFd
  • syncFileRangeIfPossible
  • getOutFd,
  • syncFileRangeIfPossible,
  • writeDataToDisk

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • BoxLayout (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top PhpStorm 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