Tabnine Logo
DataXceiver.writeResponse
Code IndexAdd Tabnine to your IDE (free)

How to use
writeResponse
method
in
org.apache.hadoop.hdfs.server.datanode.DataXceiver

Best Java code snippets using org.apache.hadoop.hdfs.server.datanode.DataXceiver.writeResponse (Showing top 9 results out of 315)

origin: org.apache.hadoop/hadoop-hdfs

/**
 * Utility function for sending a response.
 * 
 * @param status status message to write
 * @param message message to send to the client or other DN
 */
private void sendResponse(Status status,
  String message) throws IOException {
 writeResponse(status, message, getOutputStream());
}
origin: org.apache.hadoop/hadoop-hdfs

@Override
public void transferBlock(final ExtendedBlock blk,
  final Token<BlockTokenIdentifier> blockToken,
  final String clientName,
  final DatanodeInfo[] targets,
  final StorageType[] targetStorageTypes,
  final String[] targetStorageIds) throws IOException {
 previousOpClientName = clientName;
 updateCurrentThreadName(Op.TRANSFER_BLOCK + " " + blk);
 final DataOutputStream out = new DataOutputStream(
   getOutputStream());
 checkAccess(out, true, blk, blockToken, Op.TRANSFER_BLOCK,
   BlockTokenIdentifier.AccessMode.COPY, targetStorageTypes,
   targetStorageIds);
 try {
  datanode.transferReplicaForPipelineRecovery(blk, targets,
    targetStorageTypes, targetStorageIds, clientName);
  writeResponse(Status.SUCCESS, null, out);
 } catch (IOException ioe) {
  LOG.info("transferBlock {} received exception {}",
    blk, ioe.toString());
  incrDatanodeNetworkErrors();
  throw ioe;
 } finally {
  IOUtils.closeStream(out);
 }
}
origin: org.apache.hadoop/hadoop-hdfs

writeResponse(SUCCESS, null, replyOut);
origin: ch.cern.hadoop/hadoop-hdfs

/**
 * Utility function for sending a response.
 * 
 * @param status status message to write
 * @param message message to send to the client or other DN
 */
private void sendResponse(Status status,
  String message) throws IOException {
 writeResponse(status, message, getOutputStream());
}
origin: io.prestosql.hadoop/hadoop-apache

/**
 * Utility function for sending a response.
 * 
 * @param status status message to write
 * @param message message to send to the client or other DN
 */
private void sendResponse(Status status,
  String message) throws IOException {
 writeResponse(status, message, getOutputStream());
}
origin: ch.cern.hadoop/hadoop-hdfs

@Override
public void transferBlock(final ExtendedBlock blk,
  final Token<BlockTokenIdentifier> blockToken,
  final String clientName,
  final DatanodeInfo[] targets,
  final StorageType[] targetStorageTypes) throws IOException {
 previousOpClientName = clientName;
 updateCurrentThreadName(Op.TRANSFER_BLOCK + " " + blk);
 final DataOutputStream out = new DataOutputStream(
   getOutputStream());
 checkAccess(out, true, blk, blockToken,
   Op.TRANSFER_BLOCK, BlockTokenSecretManager.AccessMode.COPY);
 try {
  datanode.transferReplicaForPipelineRecovery(blk, targets,
    targetStorageTypes, clientName);
  writeResponse(Status.SUCCESS, null, out);
 } catch (IOException ioe) {
  LOG.info("transferBlock " + blk + " received exception " + ioe);
  incrDatanodeNetworkErrors();
  throw ioe;
 } finally {
  IOUtils.closeStream(out);
 }
}
origin: io.prestosql.hadoop/hadoop-apache

@Override
public void transferBlock(final ExtendedBlock blk,
  final Token<BlockTokenIdentifier> blockToken,
  final String clientName,
  final DatanodeInfo[] targets,
  final StorageType[] targetStorageTypes) throws IOException {
 previousOpClientName = clientName;
 updateCurrentThreadName(Op.TRANSFER_BLOCK + " " + blk);
 final DataOutputStream out = new DataOutputStream(
   getOutputStream());
 checkAccess(out, true, blk, blockToken,
   Op.TRANSFER_BLOCK, BlockTokenSecretManager.AccessMode.COPY);
 try {
  datanode.transferReplicaForPipelineRecovery(blk, targets,
    targetStorageTypes, clientName);
  writeResponse(Status.SUCCESS, null, out);
 } catch (IOException ioe) {
  LOG.info("transferBlock " + blk + " received exception " + ioe);
  incrDatanodeNetworkErrors();
  throw ioe;
 } finally {
  IOUtils.closeStream(out);
 }
}
origin: ch.cern.hadoop/hadoop-hdfs

 LOG.trace("TRANSFER: send close-ack");
writeResponse(SUCCESS, null, replyOut);
origin: io.prestosql.hadoop/hadoop-apache

 LOG.trace("TRANSFER: send close-ack");
writeResponse(SUCCESS, null, replyOut);
org.apache.hadoop.hdfs.server.datanodeDataXceiverwriteResponse

Popular methods of DataXceiver

  • <init>
  • sendResponse
    Utility function for sending a response.
  • updateCurrentThreadName
    Update the current thread's name to contain the current status. Use this only after this receiver ha
  • checkAccess
  • checkAndWaitForBP
    Wait until the BP is registered, upto the configured amount of time. Throws an exception if times ou
  • create
  • elapsed
  • getBufferedOutputStream
    Separated for testing.
  • getOutputStream
  • incrDatanodeNetworkErrors
  • processOp
  • readOp
  • processOp,
  • readOp,
  • releaseSocket,
  • sendOOB,
  • sendShmErrorResponse,
  • sendShmSuccessResponse,
  • writeSuccessWithChecksumInfo,
  • calcPartialBlockChecksum,
  • copyBlock

Popular in Java

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • setRequestProperty (URLConnection)
  • notifyDataSetChanged (ArrayAdapter)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • 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