Tabnine Logo
ReplicaInputStreams.getChecksumIn
Code IndexAdd Tabnine to your IDE (free)

How to use
getChecksumIn
method
in
org.apache.hadoop.hdfs.server.datanode.fsdataset.ReplicaInputStreams

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

origin: org.apache.hadoop/hadoop-hdfs

/**
 * Read checksum into given buffer
 * @param buf buffer to read the checksum into
 * @param checksumOffset offset at which to write the checksum into buf
 * @param checksumLen length of checksum to write
 * @throws IOException on error
 */
private void readChecksum(byte[] buf, final int checksumOffset,
  final int checksumLen) throws IOException {
 if (checksumSize <= 0 && ris.getChecksumIn() == null) {
  return;
 }
 try {
  ris.readChecksumFully(buf, checksumOffset, checksumLen);
 } catch (IOException e) {
  LOG.warn(" Could not read or failed to verify checksum for data"
    + " at offset " + offset + " for block " + block, e);
  ris.closeChecksumStream();
  if (corruptChecksumOk) {
   if (checksumLen > 0) {
    // Just fill the array with zeros.
    Arrays.fill(buf, checksumOffset, checksumOffset + checksumLen,
      (byte) 0);
   }
  } else {
   throw e;
  }
 }
}
origin: org.apache.hadoop/hadoop-hdfs

byte[] buf = pkt.array();
if (checksumSize > 0 && ris.getChecksumIn() != null) {
 readChecksum(buf, checksumOff, checksumDataLen);
origin: ch.cern.hadoop/hadoop-hdfs

IOUtils.readFully(instr.getChecksumIn(), crcbuf, 0, crcbuf.length);
origin: io.prestosql.hadoop/hadoop-apache

IOUtils.readFully(instr.getChecksumIn(), crcbuf, 0, crcbuf.length);
org.apache.hadoop.hdfs.server.datanode.fsdatasetReplicaInputStreamsgetChecksumIn

Popular methods of ReplicaInputStreams

  • <init>
    Create an object with a data input stream and a checksum input stream.
  • getDataIn
  • closeChecksumStream
  • closeStreams
  • dropCacheBehindReads
  • getDataInFd
  • getVolumeRef
  • readChecksumFully
  • readDataFully
  • skipChecksumFully
  • skipDataFully
  • skipDataFully

Popular in Java

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Best plugins for Eclipse
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