Java Code Examples for org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.DeleteOp#setTransactionId()
The following examples show how to use
org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.DeleteOp#setTransactionId() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestNameNodeRecovery.java From hadoop with Apache License 2.0 | 6 votes |
@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); } } }
Example 2
Source File: TestNameNodeRecovery.java From big-c with Apache License 2.0 | 6 votes |
@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); } } }
Example 3
Source File: TestNameNodeRecovery.java From hadoop with Apache License 2.0 | 5 votes |
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); }
Example 4
Source File: TestNameNodeRecovery.java From big-c with Apache License 2.0 | 5 votes |
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); }