/** * Add set replication record to edit log */ void logSetReplication(String src, short replication) { SetReplicationOp op = SetReplicationOp.getInstance(cache.get()) .setPath(src) .setReplication(replication); logEdit(op); }
public OpInstanceCache() { inst.put(OP_ADD, new AddOp()); inst.put(OP_CLOSE, new CloseOp()); inst.put(OP_SET_REPLICATION, new SetReplicationOp()); inst.put(OP_CONCAT_DELETE, new ConcatDeleteOp()); inst.put(OP_RENAME_OLD, new RenameOldOp());
public OpInstanceCache() { inst.put(OP_ADD, new AddOp()); inst.put(OP_CLOSE, new CloseOp()); inst.put(OP_SET_REPLICATION, new SetReplicationOp()); inst.put(OP_CONCAT_DELETE, new ConcatDeleteOp()); inst.put(OP_RENAME_OLD, new RenameOldOp());
@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; } };
/** * Add set replication record to edit log */ public void logSetReplication(String src, short replication) { SetReplicationOp op = SetReplicationOp.getInstance(); op.set(src, replication); logEdit(op); }
/** * Add set replication record to edit log */ void logSetReplication(String src, short replication) { SetReplicationOp op = SetReplicationOp.getInstance(cache.get()) .setPath(src) .setReplication(replication); logEdit(op); }
/** * Add set replication record to edit log */ void logSetReplication(String src, short replication) { SetReplicationOp op = SetReplicationOp.getInstance(cache.get()) .setPath(src) .setReplication(replication); logEdit(op); }