Tabnine Logo
FSEditLogOp$DeleteOp
Code IndexAdd Tabnine to your IDE (free)

How to use
FSEditLogOp$DeleteOp
in
org.apache.hadoop.hdfs.server.namenode

Best Java code snippets using org.apache.hadoop.hdfs.server.namenode.FSEditLogOp$DeleteOp (Showing top 15 results out of 315)

origin: org.apache.hadoop/hadoop-hdfs

@Override
void readFields(DataInputStream in, int logVersion)
  throws IOException {
 if (!NameNodeLayoutVersion.supports(
   LayoutVersion.Feature.EDITLOG_OP_OPTIMIZATION, logVersion)) {
  this.length = in.readInt();
  if (this.length != 2) {
   throw new IOException("Incorrect data format. " + "delete operation.");
  }
 }
 this.path = FSImageSerialization.readString(in);
 if (NameNodeLayoutVersion.supports(
   LayoutVersion.Feature.EDITLOG_OP_OPTIMIZATION, logVersion)) {
  this.timestamp = FSImageSerialization.readLong(in);
 } else {
  this.timestamp = readLong(in);
 }
 // read RPC ids if necessary
 readRpcIds(in, logVersion);
}
origin: org.apache.hadoop/hadoop-hdfs

 @Override void fromXml(Stanza st) throws InvalidXmlException {
  this.length = Integer.parseInt(st.getValue("LENGTH"));
  this.path = st.getValue("PATH");
  this.timestamp = Long.parseLong(st.getValue("TIMESTAMP"));
  
  readRpcIdsFromXml(st);
 }
}
origin: io.prestosql.hadoop/hadoop-apache

inst.put(OP_CONCAT_DELETE, new ConcatDeleteOp());
inst.put(OP_RENAME_OLD, new RenameOldOp());
inst.put(OP_DELETE, new DeleteOp());
inst.put(OP_MKDIR, new MkdirOp());
inst.put(OP_SET_GENSTAMP_V1, new SetGenstampV1Op());
origin: ch.cern.hadoop/hadoop-hdfs

inst.put(OP_CONCAT_DELETE, new ConcatDeleteOp());
inst.put(OP_RENAME_OLD, new RenameOldOp());
inst.put(OP_DELETE, new DeleteOp());
inst.put(OP_MKDIR, new MkdirOp());
inst.put(OP_SET_GENSTAMP_V1, new SetGenstampV1Op());
origin: com.facebook.hadoop/hadoop-core

  @Override
  protected EnumMap<FSEditLogOpCodes, FSEditLogOp> initialValue() {
   EnumMap<FSEditLogOpCodes, FSEditLogOp> instances 
    = new EnumMap<FSEditLogOpCodes, FSEditLogOp>(FSEditLogOpCodes.class);
   instances.put(OP_INVALID, new InvalidOp());
   instances.put(OP_ADD, new AddOp());
   instances.put(OP_CLOSE, new CloseOp());
   instances.put(OP_SET_REPLICATION, new SetReplicationOp());
   instances.put(OP_CONCAT_DELETE, new ConcatDeleteOp());
   instances.put(OP_RENAME, new RenameOp());
   instances.put(OP_DELETE, new DeleteOp());
   instances.put(OP_MKDIR, new MkdirOp());
   instances.put(OP_SET_GENSTAMP, new SetGenstampOp());
   instances.put(OP_DATANODE_ADD, new DatanodeAddOp());
   instances.put(OP_DATANODE_REMOVE, new DatanodeRemoveOp());
   instances.put(OP_SET_PERMISSIONS, new SetPermissionsOp());
   instances.put(OP_SET_OWNER, new SetOwnerOp());
   instances.put(OP_SET_NS_QUOTA, new SetNSQuotaOp());
   instances.put(OP_CLEAR_NS_QUOTA, new ClearNSQuotaOp());
   instances.put(OP_SET_QUOTA, new SetQuotaOp());
   instances.put(OP_TIMES, new TimesOp());
   instances.put(OP_START_LOG_SEGMENT,
          new LogSegmentOp(OP_START_LOG_SEGMENT));
   instances.put(OP_END_LOG_SEGMENT,
          new LogSegmentOp(OP_END_LOG_SEGMENT));
   return instances;
  }
};
origin: ch.cern.hadoop/hadoop-hdfs

@Override
void readFields(DataInputStream in, int logVersion)
  throws IOException {
 if (!NameNodeLayoutVersion.supports(
   LayoutVersion.Feature.EDITLOG_OP_OPTIMIZATION, logVersion)) {
  this.length = in.readInt();
  if (this.length != 2) {
   throw new IOException("Incorrect data format. " + "delete operation.");
  }
 }
 this.path = FSImageSerialization.readString(in);
 if (NameNodeLayoutVersion.supports(
   LayoutVersion.Feature.EDITLOG_OP_OPTIMIZATION, logVersion)) {
  this.timestamp = FSImageSerialization.readLong(in);
 } else {
  this.timestamp = readLong(in);
 }
 // read RPC ids if necessary
 readRpcIds(in, logVersion);
}
origin: io.prestosql.hadoop/hadoop-apache

@Override
void readFields(DataInputStream in, int logVersion)
  throws IOException {
 if (!NameNodeLayoutVersion.supports(
   LayoutVersion.Feature.EDITLOG_OP_OPTIMIZATION, logVersion)) {
  this.length = in.readInt();
  if (this.length != 2) {
   throw new IOException("Incorrect data format. " + "delete operation.");
  }
 }
 this.path = FSImageSerialization.readString(in);
 if (NameNodeLayoutVersion.supports(
   LayoutVersion.Feature.EDITLOG_OP_OPTIMIZATION, logVersion)) {
  this.timestamp = FSImageSerialization.readLong(in);
 } else {
  this.timestamp = readLong(in);
 }
 // read RPC ids if necessary
 readRpcIds(in, logVersion);
}
origin: ch.cern.hadoop/hadoop-hdfs

@Override
public void addTransactionsToLog(EditLogOutputStream elos,
  OpInstanceCache cache) throws IOException {
 for (long txid = 1; txid <= MAX_TXID; txid++) {
  if (txid == BAD_TXID) {
   byte garbage[] = { 0x1, 0x2, 0x3 };
   elos.writeRaw(garbage, 0, garbage.length);
  }
  else {
   DeleteOp op;
   op = DeleteOp.getInstance(cache);
   op.setTransactionId(txid);
   op.setPath("/foo." + txid);
   op.setTimestamp(txid);
   elos.write(op);
  }
 }
}
origin: ch.cern.hadoop/hadoop-hdfs

/** 
 * Add delete file record to edit log
 */
void logDelete(String src, long timestamp, boolean toLogRpcIds) {
 DeleteOp op = DeleteOp.getInstance(cache.get())
  .setPath(src)
  .setTimestamp(timestamp);
 logRpcIds(op, toLogRpcIds);
 logEdit(op);
}

origin: com.facebook.hadoop/hadoop-core

/** 
 * Add delete file record to edit log
 */
public void logDelete(String src, long timestamp) {
 DeleteOp op = DeleteOp.getInstance();
 op.set(src, timestamp);
 logEdit(op);
}
origin: ch.cern.hadoop/hadoop-hdfs

 @Override void fromXml(Stanza st) throws InvalidXmlException {
  this.length = Integer.parseInt(st.getValue("LENGTH"));
  this.path = st.getValue("PATH");
  this.timestamp = Long.parseLong(st.getValue("TIMESTAMP"));
  
  readRpcIdsFromXml(st);
 }
}
origin: io.prestosql.hadoop/hadoop-apache

/** 
 * Add delete file record to edit log
 */
void logDelete(String src, long timestamp, boolean toLogRpcIds) {
 DeleteOp op = DeleteOp.getInstance(cache.get())
  .setPath(src)
  .setTimestamp(timestamp);
 logRpcIds(op, toLogRpcIds);
 logEdit(op);
}

origin: ch.cern.hadoop/hadoop-hdfs

static void addDeleteOpcode(EditLogOutputStream elos,
   OpInstanceCache cache, long txId, String path) throws IOException {
 DeleteOp op = DeleteOp.getInstance(cache);
 op.setTransactionId(txId);
 op.setPath(path);
 op.setTimestamp(0);
 elos.write(op);
}

origin: io.prestosql.hadoop/hadoop-apache

 @Override void fromXml(Stanza st) throws InvalidXmlException {
  this.length = Integer.parseInt(st.getValue("LENGTH"));
  this.path = st.getValue("PATH");
  this.timestamp = Long.parseLong(st.getValue("TIMESTAMP"));
  
  readRpcIdsFromXml(st);
 }
}
origin: org.apache.hadoop/hadoop-hdfs

/** 
 * Add delete file record to edit log
 */
void logDelete(String src, long timestamp, boolean toLogRpcIds) {
 DeleteOp op = DeleteOp.getInstance(cache.get())
  .setPath(src)
  .setTimestamp(timestamp);
 logRpcIds(op, toLogRpcIds);
 logEdit(op);
}

org.apache.hadoop.hdfs.server.namenodeFSEditLogOp$DeleteOp

Javadoc

@AtMostOnce for ClientProtocol#delete

Most used methods

  • getInstance
  • setPath
  • setTimestamp
  • <init>
  • readRpcIds
  • readRpcIdsFromXml
  • set
  • setTransactionId

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for WebStorm
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