HDFS-6492. Support create-time xattrs and atomically setting multiple xattrs. (wang)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1603971 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7b9c074b76
commit
d417e49ce4
|
@ -736,6 +736,9 @@ Release 2.5.0 - UNRELEASED
|
||||||
HDFS-6374. setXAttr should require the user to be the owner of the file
|
HDFS-6374. setXAttr should require the user to be the owner of the file
|
||||||
or directory (Charles Lamb via wang)
|
or directory (Charles Lamb via wang)
|
||||||
|
|
||||||
|
HDFS-6492. Support create-time xattrs and atomically setting multiple
|
||||||
|
xattrs. (wang)
|
||||||
|
|
||||||
Release 2.4.1 - 2014-06-23
|
Release 2.4.1 - 2014-06-23
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -19,6 +19,8 @@ package org.apache.hadoop.fs;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.builder.EqualsBuilder;
|
||||||
|
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -105,40 +107,45 @@ public class XAttr {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
final int prime = 31;
|
return new HashCodeBuilder(811, 67)
|
||||||
int result = 1;
|
.append(name)
|
||||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
.append(ns)
|
||||||
result = prime * result + ((ns == null) ? 0 : ns.hashCode());
|
.append(value)
|
||||||
result = prime * result + Arrays.hashCode(value);
|
.toHashCode();
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (this == obj) {
|
if (obj == null) { return false; }
|
||||||
return true;
|
if (obj == this) { return true; }
|
||||||
}
|
if (obj.getClass() != getClass()) {
|
||||||
if (obj == null) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (getClass() != obj.getClass()) {
|
XAttr rhs = (XAttr) obj;
|
||||||
|
return new EqualsBuilder()
|
||||||
|
.append(ns, rhs.ns)
|
||||||
|
.append(name, rhs.name)
|
||||||
|
.append(value, rhs.value)
|
||||||
|
.isEquals();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Similar to {@link #equals(Object)}, except ignores the XAttr value.
|
||||||
|
*
|
||||||
|
* @param obj to compare equality
|
||||||
|
* @return if the XAttrs are equal, ignoring the XAttr value
|
||||||
|
*/
|
||||||
|
public boolean equalsIgnoreValue(Object obj) {
|
||||||
|
if (obj == null) { return false; }
|
||||||
|
if (obj == this) { return true; }
|
||||||
|
if (obj.getClass() != getClass()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
XAttr other = (XAttr) obj;
|
XAttr rhs = (XAttr) obj;
|
||||||
if (name == null) {
|
return new EqualsBuilder()
|
||||||
if (other.name != null) {
|
.append(ns, rhs.ns)
|
||||||
return false;
|
.append(name, rhs.name)
|
||||||
}
|
.isEquals();
|
||||||
} else if (!name.equals(other.name)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (ns != other.ns) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!Arrays.equals(value, other.value)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -2093,6 +2093,9 @@ public class PBHelper {
|
||||||
|
|
||||||
public static List<XAttrProto> convertXAttrProto(
|
public static List<XAttrProto> convertXAttrProto(
|
||||||
List<XAttr> xAttrSpec) {
|
List<XAttr> xAttrSpec) {
|
||||||
|
if (xAttrSpec == null) {
|
||||||
|
return Lists.newArrayListWithCapacity(0);
|
||||||
|
}
|
||||||
ArrayList<XAttrProto> xAttrs = Lists.newArrayListWithCapacity(
|
ArrayList<XAttrProto> xAttrs = Lists.newArrayListWithCapacity(
|
||||||
xAttrSpec.size());
|
xAttrSpec.size());
|
||||||
for (XAttr a : xAttrSpec) {
|
for (XAttr a : xAttrSpec) {
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.ListIterator;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
import org.apache.hadoop.HadoopIllegalArgumentException;
|
import org.apache.hadoop.HadoopIllegalArgumentException;
|
||||||
|
@ -294,6 +295,7 @@ public class FSDirectory implements Closeable {
|
||||||
String path,
|
String path,
|
||||||
PermissionStatus permissions,
|
PermissionStatus permissions,
|
||||||
List<AclEntry> aclEntries,
|
List<AclEntry> aclEntries,
|
||||||
|
List<XAttr> xAttrs,
|
||||||
short replication,
|
short replication,
|
||||||
long modificationTime,
|
long modificationTime,
|
||||||
long atime,
|
long atime,
|
||||||
|
@ -320,6 +322,10 @@ public class FSDirectory implements Closeable {
|
||||||
AclStorage.updateINodeAcl(newNode, aclEntries,
|
AclStorage.updateINodeAcl(newNode, aclEntries,
|
||||||
Snapshot.CURRENT_STATE_ID);
|
Snapshot.CURRENT_STATE_ID);
|
||||||
}
|
}
|
||||||
|
if (xAttrs != null) {
|
||||||
|
XAttrStorage.updateINodeXAttrs(newNode, xAttrs,
|
||||||
|
Snapshot.CURRENT_STATE_ID);
|
||||||
|
}
|
||||||
return newNode;
|
return newNode;
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -2563,94 +2569,164 @@ public class FSDirectory implements Closeable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
XAttr removeXAttr(String src, XAttr xAttr) throws IOException {
|
/**
|
||||||
|
* Removes a list of XAttrs from an inode at a path.
|
||||||
|
*
|
||||||
|
* @param src path of inode
|
||||||
|
* @param toRemove XAttrs to be removed
|
||||||
|
* @return List of XAttrs that were removed
|
||||||
|
* @throws IOException if the inode does not exist, if quota is exceeded
|
||||||
|
*/
|
||||||
|
List<XAttr> removeXAttrs(final String src, final List<XAttr> toRemove)
|
||||||
|
throws IOException {
|
||||||
writeLock();
|
writeLock();
|
||||||
try {
|
try {
|
||||||
return unprotectedRemoveXAttr(src, xAttr);
|
return unprotectedRemoveXAttrs(src, toRemove);
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
XAttr unprotectedRemoveXAttr(String src,
|
List<XAttr> unprotectedRemoveXAttrs(final String src,
|
||||||
XAttr xAttr) throws IOException {
|
final List<XAttr> toRemove) throws IOException {
|
||||||
assert hasWriteLock();
|
assert hasWriteLock();
|
||||||
INodesInPath iip = getINodesInPath4Write(normalizePath(src), true);
|
INodesInPath iip = getINodesInPath4Write(normalizePath(src), true);
|
||||||
INode inode = resolveLastINode(src, iip);
|
INode inode = resolveLastINode(src, iip);
|
||||||
int snapshotId = iip.getLatestSnapshotId();
|
int snapshotId = iip.getLatestSnapshotId();
|
||||||
List<XAttr> existingXAttrs = XAttrStorage.readINodeXAttrs(inode);
|
List<XAttr> existingXAttrs = XAttrStorage.readINodeXAttrs(inode);
|
||||||
List<XAttr> newXAttrs = filterINodeXAttr(existingXAttrs, xAttr);
|
List<XAttr> removedXAttrs = Lists.newArrayListWithCapacity(toRemove.size());
|
||||||
|
List<XAttr> newXAttrs = filterINodeXAttrs(existingXAttrs, toRemove,
|
||||||
|
removedXAttrs);
|
||||||
if (existingXAttrs.size() != newXAttrs.size()) {
|
if (existingXAttrs.size() != newXAttrs.size()) {
|
||||||
XAttrStorage.updateINodeXAttrs(inode, newXAttrs, snapshotId);
|
XAttrStorage.updateINodeXAttrs(inode, newXAttrs, snapshotId);
|
||||||
return xAttr;
|
return removedXAttrs;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<XAttr> filterINodeXAttr(List<XAttr> existingXAttrs,
|
/**
|
||||||
XAttr xAttr) throws QuotaExceededException {
|
* Filter XAttrs from a list of existing XAttrs. Removes matched XAttrs from
|
||||||
if (existingXAttrs == null || existingXAttrs.isEmpty()) {
|
* toFilter and puts them into filtered. Upon completion,
|
||||||
|
* toFilter contains the filter XAttrs that were not found, while
|
||||||
|
* fitleredXAttrs contains the XAttrs that were found.
|
||||||
|
*
|
||||||
|
* @param existingXAttrs Existing XAttrs to be filtered
|
||||||
|
* @param toFilter XAttrs to filter from the existing XAttrs
|
||||||
|
* @param filtered Return parameter, XAttrs that were filtered
|
||||||
|
* @return List of XAttrs that does not contain filtered XAttrs
|
||||||
|
*/
|
||||||
|
@VisibleForTesting
|
||||||
|
List<XAttr> filterINodeXAttrs(final List<XAttr> existingXAttrs,
|
||||||
|
final List<XAttr> toFilter, final List<XAttr> filtered) {
|
||||||
|
if (existingXAttrs == null || existingXAttrs.isEmpty() ||
|
||||||
|
toFilter == null || toFilter.isEmpty()) {
|
||||||
return existingXAttrs;
|
return existingXAttrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<XAttr> xAttrs = Lists.newArrayListWithCapacity(existingXAttrs.size());
|
// Populate a new list with XAttrs that pass the filter
|
||||||
|
List<XAttr> newXAttrs =
|
||||||
|
Lists.newArrayListWithCapacity(existingXAttrs.size());
|
||||||
for (XAttr a : existingXAttrs) {
|
for (XAttr a : existingXAttrs) {
|
||||||
if (!(a.getNameSpace() == xAttr.getNameSpace()
|
boolean add = true;
|
||||||
&& a.getName().equals(xAttr.getName()))) {
|
for (ListIterator<XAttr> it = toFilter.listIterator(); it.hasNext()
|
||||||
xAttrs.add(a);
|
;) {
|
||||||
|
XAttr filter = it.next();
|
||||||
|
if (a.equalsIgnoreValue(filter)) {
|
||||||
|
add = false;
|
||||||
|
it.remove();
|
||||||
|
filtered.add(filter);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (add) {
|
||||||
|
newXAttrs.add(a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return xAttrs;
|
return newXAttrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setXAttr(String src, XAttr xAttr, EnumSet<XAttrSetFlag> flag)
|
void setXAttrs(final String src, final List<XAttr> xAttrs,
|
||||||
throws IOException {
|
final EnumSet<XAttrSetFlag> flag) throws IOException {
|
||||||
writeLock();
|
writeLock();
|
||||||
try {
|
try {
|
||||||
unprotectedSetXAttr(src, xAttr, flag);
|
unprotectedSetXAttrs(src, xAttrs, flag);
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void unprotectedSetXAttr(String src, XAttr xAttr,
|
void unprotectedSetXAttrs(final String src, final List<XAttr> xAttrs,
|
||||||
EnumSet<XAttrSetFlag> flag) throws IOException {
|
final EnumSet<XAttrSetFlag> flag)
|
||||||
|
throws QuotaExceededException, IOException {
|
||||||
assert hasWriteLock();
|
assert hasWriteLock();
|
||||||
INodesInPath iip = getINodesInPath4Write(normalizePath(src), true);
|
INodesInPath iip = getINodesInPath4Write(normalizePath(src), true);
|
||||||
INode inode = resolveLastINode(src, iip);
|
INode inode = resolveLastINode(src, iip);
|
||||||
int snapshotId = iip.getLatestSnapshotId();
|
int snapshotId = iip.getLatestSnapshotId();
|
||||||
List<XAttr> existingXAttrs = XAttrStorage.readINodeXAttrs(inode);
|
List<XAttr> existingXAttrs = XAttrStorage.readINodeXAttrs(inode);
|
||||||
List<XAttr> newXAttrs = setINodeXAttr(existingXAttrs, xAttr, flag);
|
List<XAttr> newXAttrs = setINodeXAttrs(existingXAttrs, xAttrs, flag);
|
||||||
XAttrStorage.updateINodeXAttrs(inode, newXAttrs, snapshotId);
|
XAttrStorage.updateINodeXAttrs(inode, newXAttrs, snapshotId);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<XAttr> setINodeXAttr(List<XAttr> existingXAttrs, XAttr xAttr,
|
List<XAttr> setINodeXAttrs(final List<XAttr> existingXAttrs,
|
||||||
EnumSet<XAttrSetFlag> flag) throws QuotaExceededException, IOException {
|
final List<XAttr> toSet, final EnumSet<XAttrSetFlag> flag)
|
||||||
List<XAttr> xAttrs = Lists.newArrayListWithCapacity(
|
throws IOException {
|
||||||
existingXAttrs != null ? existingXAttrs.size() + 1 : 1);
|
// Check for duplicate XAttrs in toSet
|
||||||
int userVisibleXAttrsNum = 0; // Number of user visible xAttrs
|
// We need to use a custom comparator, so using a HashSet is not suitable
|
||||||
boolean exist = false;
|
for (int i = 0; i < toSet.size(); i++) {
|
||||||
if (existingXAttrs != null) {
|
for (int j = i + 1; j < toSet.size(); j++) {
|
||||||
for (XAttr a: existingXAttrs) {
|
if (toSet.get(i).equalsIgnoreValue(toSet.get(j))) {
|
||||||
if ((a.getNameSpace() == xAttr.getNameSpace()
|
throw new IOException("Cannot specify the same XAttr to be set " +
|
||||||
&& a.getName().equals(xAttr.getName()))) {
|
"more than once");
|
||||||
exist = true;
|
|
||||||
} else {
|
|
||||||
xAttrs.add(a);
|
|
||||||
|
|
||||||
if (isUserVisible(a)) {
|
|
||||||
userVisibleXAttrsNum++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
XAttrSetFlag.validate(xAttr.getName(), exist, flag);
|
// Count the current number of user-visible XAttrs for limit checking
|
||||||
xAttrs.add(xAttr);
|
int userVisibleXAttrsNum = 0; // Number of user visible xAttrs
|
||||||
|
|
||||||
if (isUserVisible(xAttr)) {
|
// The XAttr list is copied to an exactly-sized array when it's stored,
|
||||||
userVisibleXAttrsNum++;
|
// so there's no need to size it precisely here.
|
||||||
|
int newSize = (existingXAttrs != null) ? existingXAttrs.size() : 0;
|
||||||
|
newSize += toSet.size();
|
||||||
|
List<XAttr> xAttrs = Lists.newArrayListWithCapacity(newSize);
|
||||||
|
|
||||||
|
// Check if the XAttr already exists to validate with the provided flag
|
||||||
|
for (XAttr xAttr: toSet) {
|
||||||
|
boolean exist = false;
|
||||||
|
if (existingXAttrs != null) {
|
||||||
|
for (XAttr a : existingXAttrs) {
|
||||||
|
if (a.equalsIgnoreValue(xAttr)) {
|
||||||
|
exist = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
XAttrSetFlag.validate(xAttr.getName(), exist, flag);
|
||||||
|
// add the new XAttr since it passed validation
|
||||||
|
xAttrs.add(xAttr);
|
||||||
|
if (isUserVisible(xAttr)) {
|
||||||
|
userVisibleXAttrsNum++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the existing xattrs back in, if they weren't already set
|
||||||
|
if (existingXAttrs != null) {
|
||||||
|
for (XAttr existing : existingXAttrs) {
|
||||||
|
boolean alreadySet = false;
|
||||||
|
for (XAttr set : toSet) {
|
||||||
|
if (set.equalsIgnoreValue(existing)) {
|
||||||
|
alreadySet = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!alreadySet) {
|
||||||
|
xAttrs.add(existing);
|
||||||
|
if (isUserVisible(existing)) {
|
||||||
|
userVisibleXAttrsNum++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userVisibleXAttrsNum > inodeXAttrsLimit) {
|
if (userVisibleXAttrsNum > inodeXAttrsLimit) {
|
||||||
|
|
|
@ -700,12 +700,19 @@ public class FSEditLog implements LogsPurgeable {
|
||||||
.setBlocks(newNode.getBlocks())
|
.setBlocks(newNode.getBlocks())
|
||||||
.setPermissionStatus(permissions)
|
.setPermissionStatus(permissions)
|
||||||
.setClientName(newNode.getFileUnderConstructionFeature().getClientName())
|
.setClientName(newNode.getFileUnderConstructionFeature().getClientName())
|
||||||
.setClientMachine(newNode.getFileUnderConstructionFeature().getClientMachine());
|
.setClientMachine(
|
||||||
|
newNode.getFileUnderConstructionFeature().getClientMachine());
|
||||||
|
|
||||||
AclFeature f = newNode.getAclFeature();
|
AclFeature f = newNode.getAclFeature();
|
||||||
if (f != null) {
|
if (f != null) {
|
||||||
op.setAclEntries(AclStorage.readINodeLogicalAcl(newNode));
|
op.setAclEntries(AclStorage.readINodeLogicalAcl(newNode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XAttrFeature x = newNode.getXAttrFeature();
|
||||||
|
if (x != null) {
|
||||||
|
op.setXAttrs(x.getXAttrs());
|
||||||
|
}
|
||||||
|
|
||||||
logRpcIds(op, toLogRpcIds);
|
logRpcIds(op, toLogRpcIds);
|
||||||
logEdit(op);
|
logEdit(op);
|
||||||
}
|
}
|
||||||
|
@ -761,6 +768,11 @@ public class FSEditLog implements LogsPurgeable {
|
||||||
if (f != null) {
|
if (f != null) {
|
||||||
op.setAclEntries(AclStorage.readINodeLogicalAcl(newNode));
|
op.setAclEntries(AclStorage.readINodeLogicalAcl(newNode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XAttrFeature x = newNode.getXAttrFeature();
|
||||||
|
if (x != null) {
|
||||||
|
op.setXAttrs(x.getXAttrs());
|
||||||
|
}
|
||||||
logEdit(op);
|
logEdit(op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1054,18 +1066,18 @@ public class FSEditLog implements LogsPurgeable {
|
||||||
logEdit(op);
|
logEdit(op);
|
||||||
}
|
}
|
||||||
|
|
||||||
void logSetXAttr(String src, XAttr xAttr, boolean toLogRpcIds) {
|
void logSetXAttrs(String src, List<XAttr> xAttrs, boolean toLogRpcIds) {
|
||||||
final SetXAttrOp op = SetXAttrOp.getInstance();
|
final SetXAttrOp op = SetXAttrOp.getInstance();
|
||||||
op.src = src;
|
op.src = src;
|
||||||
op.xAttr = xAttr;
|
op.xAttrs = xAttrs;
|
||||||
logRpcIds(op, toLogRpcIds);
|
logRpcIds(op, toLogRpcIds);
|
||||||
logEdit(op);
|
logEdit(op);
|
||||||
}
|
}
|
||||||
|
|
||||||
void logRemoveXAttr(String src, XAttr xAttr) {
|
void logRemoveXAttrs(String src, List<XAttr> xAttrs) {
|
||||||
final RemoveXAttrOp op = RemoveXAttrOp.getInstance();
|
final RemoveXAttrOp op = RemoveXAttrOp.getInstance();
|
||||||
op.src = src;
|
op.src = src;
|
||||||
op.xAttr = xAttr;
|
op.xAttrs = xAttrs;
|
||||||
logEdit(op);
|
logEdit(op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -355,6 +355,7 @@ public class FSEditLogLoader {
|
||||||
lastInodeId);
|
lastInodeId);
|
||||||
newFile = fsDir.unprotectedAddFile(inodeId,
|
newFile = fsDir.unprotectedAddFile(inodeId,
|
||||||
path, addCloseOp.permissions, addCloseOp.aclEntries,
|
path, addCloseOp.permissions, addCloseOp.aclEntries,
|
||||||
|
addCloseOp.xAttrs,
|
||||||
replication, addCloseOp.mtime, addCloseOp.atime,
|
replication, addCloseOp.mtime, addCloseOp.atime,
|
||||||
addCloseOp.blockSize, true, addCloseOp.clientName,
|
addCloseOp.blockSize, true, addCloseOp.clientName,
|
||||||
addCloseOp.clientMachine);
|
addCloseOp.clientMachine);
|
||||||
|
@ -804,7 +805,7 @@ public class FSEditLogLoader {
|
||||||
}
|
}
|
||||||
case OP_SET_XATTR: {
|
case OP_SET_XATTR: {
|
||||||
SetXAttrOp setXAttrOp = (SetXAttrOp) op;
|
SetXAttrOp setXAttrOp = (SetXAttrOp) op;
|
||||||
fsDir.unprotectedSetXAttr(setXAttrOp.src, setXAttrOp.xAttr,
|
fsDir.unprotectedSetXAttrs(setXAttrOp.src, setXAttrOp.xAttrs,
|
||||||
EnumSet.of(XAttrSetFlag.CREATE, XAttrSetFlag.REPLACE));
|
EnumSet.of(XAttrSetFlag.CREATE, XAttrSetFlag.REPLACE));
|
||||||
if (toAddRetryCache) {
|
if (toAddRetryCache) {
|
||||||
fsNamesys.addCacheEntry(setXAttrOp.rpcClientId, setXAttrOp.rpcCallId);
|
fsNamesys.addCacheEntry(setXAttrOp.rpcClientId, setXAttrOp.rpcCallId);
|
||||||
|
@ -813,7 +814,8 @@ public class FSEditLogLoader {
|
||||||
}
|
}
|
||||||
case OP_REMOVE_XATTR: {
|
case OP_REMOVE_XATTR: {
|
||||||
RemoveXAttrOp removeXAttrOp = (RemoveXAttrOp) op;
|
RemoveXAttrOp removeXAttrOp = (RemoveXAttrOp) op;
|
||||||
fsDir.unprotectedRemoveXAttr(removeXAttrOp.src, removeXAttrOp.xAttr);
|
fsDir.unprotectedRemoveXAttrs(removeXAttrOp.src,
|
||||||
|
removeXAttrOp.xAttrs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -382,6 +382,16 @@ public abstract class FSEditLogOp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static List<XAttr> readXAttrsFromEditLog(DataInputStream in,
|
||||||
|
int logVersion) throws IOException {
|
||||||
|
if (!NameNodeLayoutVersion.supports(NameNodeLayoutVersion.Feature.XATTRS,
|
||||||
|
logVersion)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
XAttrEditLogProto proto = XAttrEditLogProto.parseDelimitedFrom(in);
|
||||||
|
return PBHelper.convertXAttrs(proto.getXAttrsList());
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
static abstract class AddCloseOp extends FSEditLogOp implements BlockListUpdatingOp {
|
static abstract class AddCloseOp extends FSEditLogOp implements BlockListUpdatingOp {
|
||||||
int length;
|
int length;
|
||||||
|
@ -394,6 +404,7 @@ public abstract class FSEditLogOp {
|
||||||
Block[] blocks;
|
Block[] blocks;
|
||||||
PermissionStatus permissions;
|
PermissionStatus permissions;
|
||||||
List<AclEntry> aclEntries;
|
List<AclEntry> aclEntries;
|
||||||
|
List<XAttr> xAttrs;
|
||||||
String clientName;
|
String clientName;
|
||||||
String clientMachine;
|
String clientMachine;
|
||||||
|
|
||||||
|
@ -461,6 +472,11 @@ public abstract class FSEditLogOp {
|
||||||
return (T)this;
|
return (T)this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<T extends AddCloseOp> T setXAttrs(List<XAttr> xAttrs) {
|
||||||
|
this.xAttrs = xAttrs;
|
||||||
|
return (T)this;
|
||||||
|
}
|
||||||
|
|
||||||
<T extends AddCloseOp> T setClientName(String clientName) {
|
<T extends AddCloseOp> T setClientName(String clientName) {
|
||||||
this.clientName = clientName;
|
this.clientName = clientName;
|
||||||
return (T)this;
|
return (T)this;
|
||||||
|
@ -484,6 +500,9 @@ public abstract class FSEditLogOp {
|
||||||
|
|
||||||
if (this.opCode == OP_ADD) {
|
if (this.opCode == OP_ADD) {
|
||||||
AclEditLogUtil.write(aclEntries, out);
|
AclEditLogUtil.write(aclEntries, out);
|
||||||
|
XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
|
||||||
|
b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
|
||||||
|
b.build().writeDelimitedTo(out);
|
||||||
FSImageSerialization.writeString(clientName,out);
|
FSImageSerialization.writeString(clientName,out);
|
||||||
FSImageSerialization.writeString(clientMachine,out);
|
FSImageSerialization.writeString(clientMachine,out);
|
||||||
// write clientId and callId
|
// write clientId and callId
|
||||||
|
@ -546,9 +565,9 @@ public abstract class FSEditLogOp {
|
||||||
this.blocks = readBlocks(in, logVersion);
|
this.blocks = readBlocks(in, logVersion);
|
||||||
this.permissions = PermissionStatus.read(in);
|
this.permissions = PermissionStatus.read(in);
|
||||||
|
|
||||||
// clientname, clientMachine and block locations of last block.
|
|
||||||
if (this.opCode == OP_ADD) {
|
if (this.opCode == OP_ADD) {
|
||||||
aclEntries = AclEditLogUtil.read(in, logVersion);
|
aclEntries = AclEditLogUtil.read(in, logVersion);
|
||||||
|
this.xAttrs = readXAttrsFromEditLog(in, logVersion);
|
||||||
this.clientName = FSImageSerialization.readString(in);
|
this.clientName = FSImageSerialization.readString(in);
|
||||||
this.clientMachine = FSImageSerialization.readString(in);
|
this.clientMachine = FSImageSerialization.readString(in);
|
||||||
// read clientId and callId
|
// read clientId and callId
|
||||||
|
@ -1343,6 +1362,7 @@ public abstract class FSEditLogOp {
|
||||||
long timestamp;
|
long timestamp;
|
||||||
PermissionStatus permissions;
|
PermissionStatus permissions;
|
||||||
List<AclEntry> aclEntries;
|
List<AclEntry> aclEntries;
|
||||||
|
List<XAttr> xAttrs;
|
||||||
|
|
||||||
private MkdirOp() {
|
private MkdirOp() {
|
||||||
super(OP_MKDIR);
|
super(OP_MKDIR);
|
||||||
|
@ -1377,6 +1397,11 @@ public abstract class FSEditLogOp {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MkdirOp setXAttrs(List<XAttr> xAttrs) {
|
||||||
|
this.xAttrs = xAttrs;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public
|
public
|
||||||
void writeFields(DataOutputStream out) throws IOException {
|
void writeFields(DataOutputStream out) throws IOException {
|
||||||
|
@ -1386,6 +1411,9 @@ public abstract class FSEditLogOp {
|
||||||
FSImageSerialization.writeLong(timestamp, out); // atime, unused at this
|
FSImageSerialization.writeLong(timestamp, out); // atime, unused at this
|
||||||
permissions.write(out);
|
permissions.write(out);
|
||||||
AclEditLogUtil.write(aclEntries, out);
|
AclEditLogUtil.write(aclEntries, out);
|
||||||
|
XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
|
||||||
|
b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
|
||||||
|
b.build().writeDelimitedTo(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1430,6 +1458,8 @@ public abstract class FSEditLogOp {
|
||||||
|
|
||||||
this.permissions = PermissionStatus.read(in);
|
this.permissions = PermissionStatus.read(in);
|
||||||
aclEntries = AclEditLogUtil.read(in, logVersion);
|
aclEntries = AclEditLogUtil.read(in, logVersion);
|
||||||
|
|
||||||
|
xAttrs = readXAttrsFromEditLog(in, logVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1451,6 +1481,8 @@ public abstract class FSEditLogOp {
|
||||||
builder.append(opCode);
|
builder.append(opCode);
|
||||||
builder.append(", txid=");
|
builder.append(", txid=");
|
||||||
builder.append(txid);
|
builder.append(txid);
|
||||||
|
builder.append(", xAttrs=");
|
||||||
|
builder.append(xAttrs);
|
||||||
builder.append("]");
|
builder.append("]");
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
@ -1468,6 +1500,9 @@ public abstract class FSEditLogOp {
|
||||||
if (aclEntries != null) {
|
if (aclEntries != null) {
|
||||||
appendAclEntriesToXml(contentHandler, aclEntries);
|
appendAclEntriesToXml(contentHandler, aclEntries);
|
||||||
}
|
}
|
||||||
|
if (xAttrs != null) {
|
||||||
|
appendXAttrsToXml(contentHandler, xAttrs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override void fromXml(Stanza st) throws InvalidXmlException {
|
@Override void fromXml(Stanza st) throws InvalidXmlException {
|
||||||
|
@ -1477,6 +1512,7 @@ public abstract class FSEditLogOp {
|
||||||
this.timestamp = Long.parseLong(st.getValue("TIMESTAMP"));
|
this.timestamp = Long.parseLong(st.getValue("TIMESTAMP"));
|
||||||
this.permissions = permissionStatusFromXml(st);
|
this.permissions = permissionStatusFromXml(st);
|
||||||
aclEntries = readAclEntriesFromXml(st);
|
aclEntries = readAclEntriesFromXml(st);
|
||||||
|
xAttrs = readXAttrsFromXml(st);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3499,7 +3535,7 @@ public abstract class FSEditLogOp {
|
||||||
}
|
}
|
||||||
|
|
||||||
static class RemoveXAttrOp extends FSEditLogOp {
|
static class RemoveXAttrOp extends FSEditLogOp {
|
||||||
XAttr xAttr;
|
List<XAttr> xAttrs;
|
||||||
String src;
|
String src;
|
||||||
|
|
||||||
private RemoveXAttrOp() {
|
private RemoveXAttrOp() {
|
||||||
|
@ -3514,7 +3550,7 @@ public abstract class FSEditLogOp {
|
||||||
void readFields(DataInputStream in, int logVersion) throws IOException {
|
void readFields(DataInputStream in, int logVersion) throws IOException {
|
||||||
XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
|
XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
|
||||||
src = p.getSrc();
|
src = p.getSrc();
|
||||||
xAttr = PBHelper.convertXAttr(p.getXAttr());
|
xAttrs = PBHelper.convertXAttrs(p.getXAttrsList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3523,25 +3559,25 @@ public abstract class FSEditLogOp {
|
||||||
if (src != null) {
|
if (src != null) {
|
||||||
b.setSrc(src);
|
b.setSrc(src);
|
||||||
}
|
}
|
||||||
b.setXAttr(PBHelper.convertXAttrProto(xAttr));
|
b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
|
||||||
b.build().writeDelimitedTo(out);
|
b.build().writeDelimitedTo(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void toXml(ContentHandler contentHandler) throws SAXException {
|
protected void toXml(ContentHandler contentHandler) throws SAXException {
|
||||||
XMLUtils.addSaxString(contentHandler, "SRC", src);
|
XMLUtils.addSaxString(contentHandler, "SRC", src);
|
||||||
appendXAttrToXml(contentHandler, xAttr);
|
appendXAttrsToXml(contentHandler, xAttrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void fromXml(Stanza st) throws InvalidXmlException {
|
void fromXml(Stanza st) throws InvalidXmlException {
|
||||||
src = st.getValue("SRC");
|
src = st.getValue("SRC");
|
||||||
xAttr = readXAttrFromXml(st);
|
xAttrs = readXAttrsFromXml(st);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class SetXAttrOp extends FSEditLogOp {
|
static class SetXAttrOp extends FSEditLogOp {
|
||||||
XAttr xAttr;
|
List<XAttr> xAttrs;
|
||||||
String src;
|
String src;
|
||||||
|
|
||||||
private SetXAttrOp() {
|
private SetXAttrOp() {
|
||||||
|
@ -3556,7 +3592,7 @@ public abstract class FSEditLogOp {
|
||||||
void readFields(DataInputStream in, int logVersion) throws IOException {
|
void readFields(DataInputStream in, int logVersion) throws IOException {
|
||||||
XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
|
XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
|
||||||
src = p.getSrc();
|
src = p.getSrc();
|
||||||
xAttr = PBHelper.convertXAttr(p.getXAttr());
|
xAttrs = PBHelper.convertXAttrs(p.getXAttrsList());
|
||||||
readRpcIds(in, logVersion);
|
readRpcIds(in, logVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3566,7 +3602,7 @@ public abstract class FSEditLogOp {
|
||||||
if (src != null) {
|
if (src != null) {
|
||||||
b.setSrc(src);
|
b.setSrc(src);
|
||||||
}
|
}
|
||||||
b.setXAttr(PBHelper.convertXAttrProto(xAttr));
|
b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
|
||||||
b.build().writeDelimitedTo(out);
|
b.build().writeDelimitedTo(out);
|
||||||
// clientId and callId
|
// clientId and callId
|
||||||
writeRpcIds(rpcClientId, rpcCallId, out);
|
writeRpcIds(rpcClientId, rpcCallId, out);
|
||||||
|
@ -3575,14 +3611,14 @@ public abstract class FSEditLogOp {
|
||||||
@Override
|
@Override
|
||||||
protected void toXml(ContentHandler contentHandler) throws SAXException {
|
protected void toXml(ContentHandler contentHandler) throws SAXException {
|
||||||
XMLUtils.addSaxString(contentHandler, "SRC", src);
|
XMLUtils.addSaxString(contentHandler, "SRC", src);
|
||||||
appendXAttrToXml(contentHandler, xAttr);
|
appendXAttrsToXml(contentHandler, xAttrs);
|
||||||
appendRpcIdsToXml(contentHandler, rpcClientId, rpcCallId);
|
appendRpcIdsToXml(contentHandler, rpcClientId, rpcCallId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void fromXml(Stanza st) throws InvalidXmlException {
|
void fromXml(Stanza st) throws InvalidXmlException {
|
||||||
src = st.getValue("SRC");
|
src = st.getValue("SRC");
|
||||||
xAttr = readXAttrFromXml(st);
|
xAttrs = readXAttrsFromXml(st);
|
||||||
readRpcIdsFromXml(st);
|
readRpcIdsFromXml(st);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4203,41 +4239,47 @@ public abstract class FSEditLogOp {
|
||||||
return aclEntries;
|
return aclEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void appendXAttrToXml(ContentHandler contentHandler,
|
private static void appendXAttrsToXml(ContentHandler contentHandler,
|
||||||
XAttr xAttr) throws SAXException {
|
List<XAttr> xAttrs) throws SAXException {
|
||||||
contentHandler.startElement("", "", "XATTR", new AttributesImpl());
|
for (XAttr xAttr: xAttrs) {
|
||||||
XMLUtils.addSaxString(contentHandler, "NAMESPACE",
|
contentHandler.startElement("", "", "XATTR", new AttributesImpl());
|
||||||
xAttr.getNameSpace().toString());
|
XMLUtils.addSaxString(contentHandler, "NAMESPACE",
|
||||||
XMLUtils.addSaxString(contentHandler, "NAME", xAttr.getName());
|
xAttr.getNameSpace().toString());
|
||||||
if (xAttr.getValue() != null) {
|
XMLUtils.addSaxString(contentHandler, "NAME", xAttr.getName());
|
||||||
try {
|
if (xAttr.getValue() != null) {
|
||||||
XMLUtils.addSaxString(contentHandler, "VALUE",
|
try {
|
||||||
XAttrCodec.encodeValue(xAttr.getValue(), XAttrCodec.HEX));
|
XMLUtils.addSaxString(contentHandler, "VALUE",
|
||||||
} catch (IOException e) {
|
XAttrCodec.encodeValue(xAttr.getValue(), XAttrCodec.HEX));
|
||||||
throw new SAXException(e);
|
} catch (IOException e) {
|
||||||
|
throw new SAXException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
contentHandler.endElement("", "", "XATTR");
|
||||||
}
|
}
|
||||||
contentHandler.endElement("", "", "XATTR");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static XAttr readXAttrFromXml(Stanza st)
|
private static List<XAttr> readXAttrsFromXml(Stanza st)
|
||||||
throws InvalidXmlException {
|
throws InvalidXmlException {
|
||||||
if (!st.hasChildren("XATTR")) {
|
if (!st.hasChildren("XATTR")) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Stanza a = st.getChildren("XATTR").get(0);
|
List<Stanza> stanzas = st.getChildren("XATTR");
|
||||||
XAttr.Builder builder = new XAttr.Builder();
|
List<XAttr> xattrs = Lists.newArrayListWithCapacity(stanzas.size());
|
||||||
builder.setNameSpace(XAttr.NameSpace.valueOf(a.getValue("NAMESPACE"))).
|
for (Stanza a: stanzas) {
|
||||||
setName(a.getValue("NAME"));
|
XAttr.Builder builder = new XAttr.Builder();
|
||||||
String v = a.getValueOrNull("VALUE");
|
builder.setNameSpace(XAttr.NameSpace.valueOf(a.getValue("NAMESPACE"))).
|
||||||
if (v != null) {
|
setName(a.getValue("NAME"));
|
||||||
try {
|
String v = a.getValueOrNull("VALUE");
|
||||||
builder.setValue(XAttrCodec.decodeValue(v));
|
if (v != null) {
|
||||||
} catch (IOException e) {
|
try {
|
||||||
throw new InvalidXmlException(e.toString());
|
builder.setValue(XAttrCodec.decodeValue(v));
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new InvalidXmlException(e.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
xattrs.add(builder.build());
|
||||||
}
|
}
|
||||||
return builder.build();
|
return xattrs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8194,8 +8194,10 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
checkOwner(pc, src);
|
checkOwner(pc, src);
|
||||||
checkPathAccess(pc, src, FsAction.WRITE);
|
checkPathAccess(pc, src, FsAction.WRITE);
|
||||||
}
|
}
|
||||||
dir.setXAttr(src, xAttr, flag);
|
List<XAttr> xAttrs = Lists.newArrayListWithCapacity(1);
|
||||||
getEditLog().logSetXAttr(src, xAttr, logRetryCache);
|
xAttrs.add(xAttr);
|
||||||
|
dir.setXAttrs(src, xAttrs, flag);
|
||||||
|
getEditLog().logSetXAttrs(src, xAttrs, logRetryCache);
|
||||||
resultingStat = getAuditFileInfo(src, false);
|
resultingStat = getAuditFileInfo(src, false);
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
|
@ -8316,9 +8318,11 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
checkPathAccess(pc, src, FsAction.WRITE);
|
checkPathAccess(pc, src, FsAction.WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
XAttr removedXAttr = dir.removeXAttr(src, xAttr);
|
List<XAttr> xAttrs = Lists.newArrayListWithCapacity(1);
|
||||||
if (removedXAttr != null) {
|
xAttrs.add(xAttr);
|
||||||
getEditLog().logRemoveXAttr(src, removedXAttr);
|
List<XAttr> removedXAttrs = dir.removeXAttrs(src, xAttrs);
|
||||||
|
if (removedXAttrs != null && !removedXAttrs.isEmpty()) {
|
||||||
|
getEditLog().logRemoveXAttrs(src, removedXAttrs);
|
||||||
}
|
}
|
||||||
resultingStat = getAuditFileInfo(src, false);
|
resultingStat = getAuditFileInfo(src, false);
|
||||||
} catch (AccessControlException e) {
|
} catch (AccessControlException e) {
|
||||||
|
|
|
@ -35,8 +35,8 @@ message XAttrProto {
|
||||||
}
|
}
|
||||||
|
|
||||||
message XAttrEditLogProto {
|
message XAttrEditLogProto {
|
||||||
required string src = 1;
|
optional string src = 1;
|
||||||
optional XAttrProto xAttr = 2;
|
repeated XAttrProto xAttrs = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum XAttrSetFlagProto {
|
enum XAttrSetFlagProto {
|
||||||
|
|
|
@ -24,7 +24,9 @@ import java.io.IOException;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -44,6 +46,11 @@ import org.junit.Test;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertArrayEquals;
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test {@link FSDirectory}, the in-memory namespace tree.
|
* Test {@link FSDirectory}, the in-memory namespace tree.
|
||||||
*/
|
*/
|
||||||
|
@ -73,6 +80,10 @@ public class TestFSDirectory {
|
||||||
|
|
||||||
private DistributedFileSystem hdfs;
|
private DistributedFileSystem hdfs;
|
||||||
|
|
||||||
|
private static final int numGeneratedXAttrs = 256;
|
||||||
|
private static final ImmutableList<XAttr> generatedXAttrs =
|
||||||
|
ImmutableList.copyOf(generateXAttrs(numGeneratedXAttrs));
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
conf = new Configuration();
|
conf = new Configuration();
|
||||||
|
@ -118,9 +129,10 @@ public class TestFSDirectory {
|
||||||
for(; (line = in.readLine()) != null; ) {
|
for(; (line = in.readLine()) != null; ) {
|
||||||
line = line.trim();
|
line = line.trim();
|
||||||
if (!line.isEmpty() && !line.contains("snapshot")) {
|
if (!line.isEmpty() && !line.contains("snapshot")) {
|
||||||
Assert.assertTrue("line=" + line,
|
assertTrue("line=" + line,
|
||||||
line.startsWith(INodeDirectory.DUMPTREE_LAST_ITEM)
|
line.startsWith(INodeDirectory.DUMPTREE_LAST_ITEM)
|
||||||
|| line.startsWith(INodeDirectory.DUMPTREE_EXCEPT_LAST_ITEM));
|
|| line.startsWith(INodeDirectory.DUMPTREE_EXCEPT_LAST_ITEM)
|
||||||
|
);
|
||||||
checkClassName(line);
|
checkClassName(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,7 +177,7 @@ public class TestFSDirectory {
|
||||||
int i = line.lastIndexOf('(');
|
int i = line.lastIndexOf('(');
|
||||||
int j = line.lastIndexOf('@');
|
int j = line.lastIndexOf('@');
|
||||||
final String classname = line.substring(i+1, j);
|
final String classname = line.substring(i+1, j);
|
||||||
Assert.assertTrue(classname.startsWith(INodeFile.class.getSimpleName())
|
assertTrue(classname.startsWith(INodeFile.class.getSimpleName())
|
||||||
|| classname.startsWith(INodeDirectory.class.getSimpleName()));
|
|| classname.startsWith(INodeDirectory.class.getSimpleName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,22 +194,185 @@ public class TestFSDirectory {
|
||||||
// Adding a system namespace xAttr, isn't affected by inode xAttrs limit.
|
// Adding a system namespace xAttr, isn't affected by inode xAttrs limit.
|
||||||
XAttr newXAttr = (new XAttr.Builder()).setNameSpace(XAttr.NameSpace.SYSTEM).
|
XAttr newXAttr = (new XAttr.Builder()).setNameSpace(XAttr.NameSpace.SYSTEM).
|
||||||
setName("a3").setValue(new byte[]{0x33, 0x33, 0x33}).build();
|
setName("a3").setValue(new byte[]{0x33, 0x33, 0x33}).build();
|
||||||
List<XAttr> xAttrs = fsdir.setINodeXAttr(existingXAttrs, newXAttr,
|
List<XAttr> newXAttrs = Lists.newArrayListWithCapacity(1);
|
||||||
|
newXAttrs.add(newXAttr);
|
||||||
|
List<XAttr> xAttrs = fsdir.setINodeXAttrs(existingXAttrs, newXAttrs,
|
||||||
EnumSet.of(XAttrSetFlag.CREATE, XAttrSetFlag.REPLACE));
|
EnumSet.of(XAttrSetFlag.CREATE, XAttrSetFlag.REPLACE));
|
||||||
Assert.assertEquals(xAttrs.size(), 3);
|
assertEquals(xAttrs.size(), 3);
|
||||||
|
|
||||||
// Adding a trusted namespace xAttr, is affected by inode xAttrs limit.
|
// Adding a trusted namespace xAttr, is affected by inode xAttrs limit.
|
||||||
XAttr newXAttr1 = (new XAttr.Builder()).setNameSpace(
|
XAttr newXAttr1 = (new XAttr.Builder()).setNameSpace(
|
||||||
XAttr.NameSpace.TRUSTED).setName("a4").
|
XAttr.NameSpace.TRUSTED).setName("a4").
|
||||||
setValue(new byte[]{0x34, 0x34, 0x34}).build();
|
setValue(new byte[]{0x34, 0x34, 0x34}).build();
|
||||||
|
newXAttrs.set(0, newXAttr1);
|
||||||
try {
|
try {
|
||||||
fsdir.setINodeXAttr(existingXAttrs, newXAttr1,
|
fsdir.setINodeXAttrs(existingXAttrs, newXAttrs,
|
||||||
EnumSet.of(XAttrSetFlag.CREATE, XAttrSetFlag.REPLACE));
|
EnumSet.of(XAttrSetFlag.CREATE, XAttrSetFlag.REPLACE));
|
||||||
Assert.fail("Setting user visable xattr on inode should fail if " +
|
fail("Setting user visible xattr on inode should fail if " +
|
||||||
"reaching limit.");
|
"reaching limit.");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
GenericTestUtils.assertExceptionContains("Cannot add additional XAttr " +
|
GenericTestUtils.assertExceptionContains("Cannot add additional XAttr " +
|
||||||
"to inode, would exceed limit", e);
|
"to inode, would exceed limit", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verify that the first <i>num</i> generatedXAttrs are present in
|
||||||
|
* newXAttrs.
|
||||||
|
*/
|
||||||
|
private static void verifyXAttrsPresent(List<XAttr> newXAttrs,
|
||||||
|
final int num) {
|
||||||
|
assertEquals("Unexpected number of XAttrs after multiset", num,
|
||||||
|
newXAttrs.size());
|
||||||
|
for (int i=0; i<num; i++) {
|
||||||
|
XAttr search = generatedXAttrs.get(i);
|
||||||
|
assertTrue("Did not find set XAttr " + search + " + after multiset",
|
||||||
|
newXAttrs.contains(search));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<XAttr> generateXAttrs(final int numXAttrs) {
|
||||||
|
List<XAttr> generatedXAttrs = Lists.newArrayListWithCapacity(numXAttrs);
|
||||||
|
for (int i=0; i<numXAttrs; i++) {
|
||||||
|
XAttr xAttr = (new XAttr.Builder())
|
||||||
|
.setNameSpace(XAttr.NameSpace.SYSTEM)
|
||||||
|
.setName("a" + i)
|
||||||
|
.setValue(new byte[] { (byte) i, (byte) (i + 1), (byte) (i + 2) })
|
||||||
|
.build();
|
||||||
|
generatedXAttrs.add(xAttr);
|
||||||
|
}
|
||||||
|
return generatedXAttrs;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test setting and removing multiple xattrs via single operations
|
||||||
|
*/
|
||||||
|
@Test(timeout=300000)
|
||||||
|
public void testXAttrMultiSetRemove() throws Exception {
|
||||||
|
List<XAttr> existingXAttrs = Lists.newArrayListWithCapacity(0);
|
||||||
|
|
||||||
|
// Keep adding a random number of xattrs and verifying until exhausted
|
||||||
|
final Random rand = new Random(0xFEEDA);
|
||||||
|
int numExpectedXAttrs = 0;
|
||||||
|
while (numExpectedXAttrs < numGeneratedXAttrs) {
|
||||||
|
LOG.info("Currently have " + numExpectedXAttrs + " xattrs");
|
||||||
|
final int numToAdd = rand.nextInt(5)+1;
|
||||||
|
|
||||||
|
List<XAttr> toAdd = Lists.newArrayListWithCapacity(numToAdd);
|
||||||
|
for (int i = 0; i < numToAdd; i++) {
|
||||||
|
if (numExpectedXAttrs >= numGeneratedXAttrs) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
toAdd.add(generatedXAttrs.get(numExpectedXAttrs));
|
||||||
|
numExpectedXAttrs++;
|
||||||
|
}
|
||||||
|
LOG.info("Attempting to add " + toAdd.size() + " XAttrs");
|
||||||
|
for (int i = 0; i < toAdd.size(); i++) {
|
||||||
|
LOG.info("Will add XAttr " + toAdd.get(i));
|
||||||
|
}
|
||||||
|
List<XAttr> newXAttrs = fsdir.setINodeXAttrs(existingXAttrs, toAdd,
|
||||||
|
EnumSet.of(XAttrSetFlag.CREATE));
|
||||||
|
verifyXAttrsPresent(newXAttrs, numExpectedXAttrs);
|
||||||
|
existingXAttrs = newXAttrs;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Keep removing a random number of xattrs and verifying until all gone
|
||||||
|
while (numExpectedXAttrs > 0) {
|
||||||
|
LOG.info("Currently have " + numExpectedXAttrs + " xattrs");
|
||||||
|
final int numToRemove = rand.nextInt(5)+1;
|
||||||
|
List<XAttr> toRemove = Lists.newArrayListWithCapacity(numToRemove);
|
||||||
|
for (int i = 0; i < numToRemove; i++) {
|
||||||
|
if (numExpectedXAttrs == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
toRemove.add(generatedXAttrs.get(numExpectedXAttrs-1));
|
||||||
|
numExpectedXAttrs--;
|
||||||
|
}
|
||||||
|
final int expectedNumToRemove = toRemove.size();
|
||||||
|
LOG.info("Attempting to remove " + expectedNumToRemove + " XAttrs");
|
||||||
|
List<XAttr> removedXAttrs = Lists.newArrayList();
|
||||||
|
List<XAttr> newXAttrs = fsdir.filterINodeXAttrs(existingXAttrs,
|
||||||
|
toRemove, removedXAttrs);
|
||||||
|
assertEquals("Unexpected number of removed XAttrs",
|
||||||
|
expectedNumToRemove, removedXAttrs.size());
|
||||||
|
verifyXAttrsPresent(newXAttrs, numExpectedXAttrs);
|
||||||
|
existingXAttrs = newXAttrs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(timeout=300000)
|
||||||
|
public void testXAttrMultiAddRemoveErrors() throws Exception {
|
||||||
|
|
||||||
|
// Test that the same XAttr can not be multiset twice
|
||||||
|
List<XAttr> existingXAttrs = Lists.newArrayList();
|
||||||
|
List<XAttr> toAdd = Lists.newArrayList();
|
||||||
|
toAdd.add(generatedXAttrs.get(0));
|
||||||
|
toAdd.add(generatedXAttrs.get(1));
|
||||||
|
toAdd.add(generatedXAttrs.get(2));
|
||||||
|
toAdd.add(generatedXAttrs.get(0));
|
||||||
|
try {
|
||||||
|
fsdir.setINodeXAttrs(existingXAttrs, toAdd, EnumSet.of(XAttrSetFlag
|
||||||
|
.CREATE));
|
||||||
|
fail("Specified the same xattr to be set twice");
|
||||||
|
} catch (IOException e) {
|
||||||
|
GenericTestUtils.assertExceptionContains("Cannot specify the same " +
|
||||||
|
"XAttr to be set", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test that CREATE and REPLACE flags are obeyed
|
||||||
|
toAdd.remove(generatedXAttrs.get(0));
|
||||||
|
existingXAttrs.add(generatedXAttrs.get(0));
|
||||||
|
try {
|
||||||
|
fsdir.setINodeXAttrs(existingXAttrs, toAdd, EnumSet.of(XAttrSetFlag
|
||||||
|
.CREATE));
|
||||||
|
fail("Set XAttr that is already set without REPLACE flag");
|
||||||
|
} catch (IOException e) {
|
||||||
|
GenericTestUtils.assertExceptionContains("already exists", e);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
fsdir.setINodeXAttrs(existingXAttrs, toAdd, EnumSet.of(XAttrSetFlag
|
||||||
|
.REPLACE));
|
||||||
|
fail("Set XAttr that does not exist without the CREATE flag");
|
||||||
|
} catch (IOException e) {
|
||||||
|
GenericTestUtils.assertExceptionContains("does not exist", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sanity test for CREATE
|
||||||
|
toAdd.remove(generatedXAttrs.get(0));
|
||||||
|
List<XAttr> newXAttrs = fsdir.setINodeXAttrs(existingXAttrs, toAdd,
|
||||||
|
EnumSet.of(XAttrSetFlag.CREATE));
|
||||||
|
assertEquals("Unexpected toAdd size", 2, toAdd.size());
|
||||||
|
for (XAttr x : toAdd) {
|
||||||
|
assertTrue("Did not find added XAttr " + x, newXAttrs.contains(x));
|
||||||
|
}
|
||||||
|
existingXAttrs = newXAttrs;
|
||||||
|
|
||||||
|
// Sanity test for REPLACE
|
||||||
|
toAdd = Lists.newArrayList();
|
||||||
|
for (int i=0; i<3; i++) {
|
||||||
|
XAttr xAttr = (new XAttr.Builder())
|
||||||
|
.setNameSpace(XAttr.NameSpace.SYSTEM)
|
||||||
|
.setName("a" + i)
|
||||||
|
.setValue(new byte[] { (byte) (i*2) })
|
||||||
|
.build();
|
||||||
|
toAdd.add(xAttr);
|
||||||
|
}
|
||||||
|
newXAttrs = fsdir.setINodeXAttrs(existingXAttrs, toAdd,
|
||||||
|
EnumSet.of(XAttrSetFlag.REPLACE));
|
||||||
|
assertEquals("Unexpected number of new XAttrs", 3, newXAttrs.size());
|
||||||
|
for (int i=0; i<3; i++) {
|
||||||
|
assertArrayEquals("Unexpected XAttr value",
|
||||||
|
new byte[] {(byte)(i*2)}, newXAttrs.get(i).getValue());
|
||||||
|
}
|
||||||
|
existingXAttrs = newXAttrs;
|
||||||
|
|
||||||
|
// Sanity test for CREATE+REPLACE
|
||||||
|
toAdd = Lists.newArrayList();
|
||||||
|
for (int i=0; i<4; i++) {
|
||||||
|
toAdd.add(generatedXAttrs.get(i));
|
||||||
|
}
|
||||||
|
newXAttrs = fsdir.setINodeXAttrs(existingXAttrs, toAdd,
|
||||||
|
EnumSet.of(XAttrSetFlag.CREATE, XAttrSetFlag.REPLACE));
|
||||||
|
verifyXAttrsPresent(newXAttrs, 4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,10 +249,10 @@ public class TestXAttrWithSnapshot {
|
||||||
private static void doSnapshotRootRemovalAssertions(Path path,
|
private static void doSnapshotRootRemovalAssertions(Path path,
|
||||||
Path snapshotPath) throws Exception {
|
Path snapshotPath) throws Exception {
|
||||||
Map<String, byte[]> xattrs = hdfs.getXAttrs(path);
|
Map<String, byte[]> xattrs = hdfs.getXAttrs(path);
|
||||||
Assert.assertEquals(xattrs.size(), 0);
|
Assert.assertEquals(0, xattrs.size());
|
||||||
|
|
||||||
xattrs = hdfs.getXAttrs(snapshotPath);
|
xattrs = hdfs.getXAttrs(snapshotPath);
|
||||||
Assert.assertEquals(xattrs.size(), 2);
|
Assert.assertEquals(2, xattrs.size());
|
||||||
Assert.assertArrayEquals(value1, xattrs.get(name1));
|
Assert.assertArrayEquals(value1, xattrs.get(name1));
|
||||||
Assert.assertArrayEquals(value2, xattrs.get(name2));
|
Assert.assertArrayEquals(value2, xattrs.get(name2));
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -13,8 +13,8 @@
|
||||||
<TXID>2</TXID>
|
<TXID>2</TXID>
|
||||||
<DELEGATION_KEY>
|
<DELEGATION_KEY>
|
||||||
<KEY_ID>1</KEY_ID>
|
<KEY_ID>1</KEY_ID>
|
||||||
<EXPIRY_DATE>1394849922137</EXPIRY_DATE>
|
<EXPIRY_DATE>1403590428625</EXPIRY_DATE>
|
||||||
<KEY>37e1a64049bbef35</KEY>
|
<KEY>16f34bfba67b2552</KEY>
|
||||||
</DELEGATION_KEY>
|
</DELEGATION_KEY>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
|
@ -24,8 +24,8 @@
|
||||||
<TXID>3</TXID>
|
<TXID>3</TXID>
|
||||||
<DELEGATION_KEY>
|
<DELEGATION_KEY>
|
||||||
<KEY_ID>2</KEY_ID>
|
<KEY_ID>2</KEY_ID>
|
||||||
<EXPIRY_DATE>1394849922140</EXPIRY_DATE>
|
<EXPIRY_DATE>1403590428631</EXPIRY_DATE>
|
||||||
<KEY>7c0bf5039242fc54</KEY>
|
<KEY>dbe6282854469833</KEY>
|
||||||
</DELEGATION_KEY>
|
</DELEGATION_KEY>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
|
@ -37,18 +37,18 @@
|
||||||
<INODEID>16386</INODEID>
|
<INODEID>16386</INODEID>
|
||||||
<PATH>/file_create</PATH>
|
<PATH>/file_create</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158722811</MTIME>
|
<MTIME>1402899229669</MTIME>
|
||||||
<ATIME>1394158722811</ATIME>
|
<ATIME>1402899229669</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME>DFSClient_NONMAPREDUCE_221786725_1</CLIENT_NAME>
|
<CLIENT_NAME>DFSClient_NONMAPREDUCE_1233039831_1</CLIENT_NAME>
|
||||||
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>6</RPC_CALLID>
|
<RPC_CALLID>8</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -59,13 +59,13 @@
|
||||||
<INODEID>0</INODEID>
|
<INODEID>0</INODEID>
|
||||||
<PATH>/file_create</PATH>
|
<PATH>/file_create</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158722832</MTIME>
|
<MTIME>1402899229711</MTIME>
|
||||||
<ATIME>1394158722811</ATIME>
|
<ATIME>1402899229669</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME></CLIENT_NAME>
|
<CLIENT_NAME></CLIENT_NAME>
|
||||||
<CLIENT_MACHINE></CLIENT_MACHINE>
|
<CLIENT_MACHINE></CLIENT_MACHINE>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
|
@ -78,9 +78,9 @@
|
||||||
<LENGTH>0</LENGTH>
|
<LENGTH>0</LENGTH>
|
||||||
<SRC>/file_create</SRC>
|
<SRC>/file_create</SRC>
|
||||||
<DST>/file_moved</DST>
|
<DST>/file_moved</DST>
|
||||||
<TIMESTAMP>1394158722836</TIMESTAMP>
|
<TIMESTAMP>1402899229718</TIMESTAMP>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>8</RPC_CALLID>
|
<RPC_CALLID>10</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -89,9 +89,9 @@
|
||||||
<TXID>7</TXID>
|
<TXID>7</TXID>
|
||||||
<LENGTH>0</LENGTH>
|
<LENGTH>0</LENGTH>
|
||||||
<PATH>/file_moved</PATH>
|
<PATH>/file_moved</PATH>
|
||||||
<TIMESTAMP>1394158722842</TIMESTAMP>
|
<TIMESTAMP>1402899229730</TIMESTAMP>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>9</RPC_CALLID>
|
<RPC_CALLID>11</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -101,9 +101,9 @@
|
||||||
<LENGTH>0</LENGTH>
|
<LENGTH>0</LENGTH>
|
||||||
<INODEID>16387</INODEID>
|
<INODEID>16387</INODEID>
|
||||||
<PATH>/directory_mkdir</PATH>
|
<PATH>/directory_mkdir</PATH>
|
||||||
<TIMESTAMP>1394158722848</TIMESTAMP>
|
<TIMESTAMP>1402899229748</TIMESTAMP>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>493</MODE>
|
<MODE>493</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
|
@ -136,8 +136,8 @@
|
||||||
<TXID>12</TXID>
|
<TXID>12</TXID>
|
||||||
<SNAPSHOTROOT>/directory_mkdir</SNAPSHOTROOT>
|
<SNAPSHOTROOT>/directory_mkdir</SNAPSHOTROOT>
|
||||||
<SNAPSHOTNAME>snapshot1</SNAPSHOTNAME>
|
<SNAPSHOTNAME>snapshot1</SNAPSHOTNAME>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>14</RPC_CALLID>
|
<RPC_CALLID>16</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -147,8 +147,8 @@
|
||||||
<SNAPSHOTROOT>/directory_mkdir</SNAPSHOTROOT>
|
<SNAPSHOTROOT>/directory_mkdir</SNAPSHOTROOT>
|
||||||
<SNAPSHOTOLDNAME>snapshot1</SNAPSHOTOLDNAME>
|
<SNAPSHOTOLDNAME>snapshot1</SNAPSHOTOLDNAME>
|
||||||
<SNAPSHOTNEWNAME>snapshot2</SNAPSHOTNEWNAME>
|
<SNAPSHOTNEWNAME>snapshot2</SNAPSHOTNEWNAME>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>15</RPC_CALLID>
|
<RPC_CALLID>17</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -157,8 +157,8 @@
|
||||||
<TXID>14</TXID>
|
<TXID>14</TXID>
|
||||||
<SNAPSHOTROOT>/directory_mkdir</SNAPSHOTROOT>
|
<SNAPSHOTROOT>/directory_mkdir</SNAPSHOTROOT>
|
||||||
<SNAPSHOTNAME>snapshot2</SNAPSHOTNAME>
|
<SNAPSHOTNAME>snapshot2</SNAPSHOTNAME>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>16</RPC_CALLID>
|
<RPC_CALLID>18</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -169,18 +169,18 @@
|
||||||
<INODEID>16388</INODEID>
|
<INODEID>16388</INODEID>
|
||||||
<PATH>/file_create</PATH>
|
<PATH>/file_create</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158722872</MTIME>
|
<MTIME>1402899229871</MTIME>
|
||||||
<ATIME>1394158722872</ATIME>
|
<ATIME>1402899229871</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME>DFSClient_NONMAPREDUCE_221786725_1</CLIENT_NAME>
|
<CLIENT_NAME>DFSClient_NONMAPREDUCE_1233039831_1</CLIENT_NAME>
|
||||||
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>17</RPC_CALLID>
|
<RPC_CALLID>19</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -191,13 +191,13 @@
|
||||||
<INODEID>0</INODEID>
|
<INODEID>0</INODEID>
|
||||||
<PATH>/file_create</PATH>
|
<PATH>/file_create</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158722874</MTIME>
|
<MTIME>1402899229881</MTIME>
|
||||||
<ATIME>1394158722872</ATIME>
|
<ATIME>1402899229871</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME></CLIENT_NAME>
|
<CLIENT_NAME></CLIENT_NAME>
|
||||||
<CLIENT_MACHINE></CLIENT_MACHINE>
|
<CLIENT_MACHINE></CLIENT_MACHINE>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
|
@ -253,10 +253,10 @@
|
||||||
<LENGTH>0</LENGTH>
|
<LENGTH>0</LENGTH>
|
||||||
<SRC>/file_create</SRC>
|
<SRC>/file_create</SRC>
|
||||||
<DST>/file_moved</DST>
|
<DST>/file_moved</DST>
|
||||||
<TIMESTAMP>1394158722890</TIMESTAMP>
|
<TIMESTAMP>1402899229963</TIMESTAMP>
|
||||||
<OPTIONS>NONE</OPTIONS>
|
<OPTIONS>NONE</OPTIONS>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>24</RPC_CALLID>
|
<RPC_CALLID>26</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -267,18 +267,18 @@
|
||||||
<INODEID>16389</INODEID>
|
<INODEID>16389</INODEID>
|
||||||
<PATH>/file_concat_target</PATH>
|
<PATH>/file_concat_target</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158722895</MTIME>
|
<MTIME>1402899229981</MTIME>
|
||||||
<ATIME>1394158722895</ATIME>
|
<ATIME>1402899229981</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME>DFSClient_NONMAPREDUCE_221786725_1</CLIENT_NAME>
|
<CLIENT_NAME>DFSClient_NONMAPREDUCE_1233039831_1</CLIENT_NAME>
|
||||||
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>26</RPC_CALLID>
|
<RPC_CALLID>28</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -383,8 +383,8 @@
|
||||||
<INODEID>0</INODEID>
|
<INODEID>0</INODEID>
|
||||||
<PATH>/file_concat_target</PATH>
|
<PATH>/file_concat_target</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158722986</MTIME>
|
<MTIME>1402899230219</MTIME>
|
||||||
<ATIME>1394158722895</ATIME>
|
<ATIME>1402899229981</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME></CLIENT_NAME>
|
<CLIENT_NAME></CLIENT_NAME>
|
||||||
<CLIENT_MACHINE></CLIENT_MACHINE>
|
<CLIENT_MACHINE></CLIENT_MACHINE>
|
||||||
|
@ -404,7 +404,7 @@
|
||||||
<GENSTAMP>1003</GENSTAMP>
|
<GENSTAMP>1003</GENSTAMP>
|
||||||
</BLOCK>
|
</BLOCK>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
|
@ -418,18 +418,18 @@
|
||||||
<INODEID>16390</INODEID>
|
<INODEID>16390</INODEID>
|
||||||
<PATH>/file_concat_0</PATH>
|
<PATH>/file_concat_0</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158722989</MTIME>
|
<MTIME>1402899230235</MTIME>
|
||||||
<ATIME>1394158722989</ATIME>
|
<ATIME>1402899230235</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME>DFSClient_NONMAPREDUCE_221786725_1</CLIENT_NAME>
|
<CLIENT_NAME>DFSClient_NONMAPREDUCE_1233039831_1</CLIENT_NAME>
|
||||||
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>39</RPC_CALLID>
|
<RPC_CALLID>41</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -534,8 +534,8 @@
|
||||||
<INODEID>0</INODEID>
|
<INODEID>0</INODEID>
|
||||||
<PATH>/file_concat_0</PATH>
|
<PATH>/file_concat_0</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158723010</MTIME>
|
<MTIME>1402899230307</MTIME>
|
||||||
<ATIME>1394158722989</ATIME>
|
<ATIME>1402899230235</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME></CLIENT_NAME>
|
<CLIENT_NAME></CLIENT_NAME>
|
||||||
<CLIENT_MACHINE></CLIENT_MACHINE>
|
<CLIENT_MACHINE></CLIENT_MACHINE>
|
||||||
|
@ -555,7 +555,7 @@
|
||||||
<GENSTAMP>1006</GENSTAMP>
|
<GENSTAMP>1006</GENSTAMP>
|
||||||
</BLOCK>
|
</BLOCK>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
|
@ -569,18 +569,18 @@
|
||||||
<INODEID>16391</INODEID>
|
<INODEID>16391</INODEID>
|
||||||
<PATH>/file_concat_1</PATH>
|
<PATH>/file_concat_1</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158723012</MTIME>
|
<MTIME>1402899230320</MTIME>
|
||||||
<ATIME>1394158723012</ATIME>
|
<ATIME>1402899230320</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME>DFSClient_NONMAPREDUCE_221786725_1</CLIENT_NAME>
|
<CLIENT_NAME>DFSClient_NONMAPREDUCE_1233039831_1</CLIENT_NAME>
|
||||||
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>51</RPC_CALLID>
|
<RPC_CALLID>53</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -685,8 +685,8 @@
|
||||||
<INODEID>0</INODEID>
|
<INODEID>0</INODEID>
|
||||||
<PATH>/file_concat_1</PATH>
|
<PATH>/file_concat_1</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158723035</MTIME>
|
<MTIME>1402899230383</MTIME>
|
||||||
<ATIME>1394158723012</ATIME>
|
<ATIME>1402899230320</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME></CLIENT_NAME>
|
<CLIENT_NAME></CLIENT_NAME>
|
||||||
<CLIENT_MACHINE></CLIENT_MACHINE>
|
<CLIENT_MACHINE></CLIENT_MACHINE>
|
||||||
|
@ -706,7 +706,7 @@
|
||||||
<GENSTAMP>1009</GENSTAMP>
|
<GENSTAMP>1009</GENSTAMP>
|
||||||
</BLOCK>
|
</BLOCK>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
|
@ -718,13 +718,13 @@
|
||||||
<TXID>56</TXID>
|
<TXID>56</TXID>
|
||||||
<LENGTH>0</LENGTH>
|
<LENGTH>0</LENGTH>
|
||||||
<TRG>/file_concat_target</TRG>
|
<TRG>/file_concat_target</TRG>
|
||||||
<TIMESTAMP>1394158723039</TIMESTAMP>
|
<TIMESTAMP>1402899230394</TIMESTAMP>
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<SOURCE1>/file_concat_0</SOURCE1>
|
<SOURCE1>/file_concat_0</SOURCE1>
|
||||||
<SOURCE2>/file_concat_1</SOURCE2>
|
<SOURCE2>/file_concat_1</SOURCE2>
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>62</RPC_CALLID>
|
<RPC_CALLID>64</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -735,15 +735,15 @@
|
||||||
<INODEID>16392</INODEID>
|
<INODEID>16392</INODEID>
|
||||||
<PATH>/file_symlink</PATH>
|
<PATH>/file_symlink</PATH>
|
||||||
<VALUE>/file_concat_target</VALUE>
|
<VALUE>/file_concat_target</VALUE>
|
||||||
<MTIME>1394158723044</MTIME>
|
<MTIME>1402899230406</MTIME>
|
||||||
<ATIME>1394158723044</ATIME>
|
<ATIME>1402899230406</ATIME>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>511</MODE>
|
<MODE>511</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>63</RPC_CALLID>
|
<RPC_CALLID>65</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -754,18 +754,18 @@
|
||||||
<INODEID>16393</INODEID>
|
<INODEID>16393</INODEID>
|
||||||
<PATH>/hard-lease-recovery-test</PATH>
|
<PATH>/hard-lease-recovery-test</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158723047</MTIME>
|
<MTIME>1402899230413</MTIME>
|
||||||
<ATIME>1394158723047</ATIME>
|
<ATIME>1402899230413</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME>DFSClient_NONMAPREDUCE_221786725_1</CLIENT_NAME>
|
<CLIENT_NAME>DFSClient_NONMAPREDUCE_1233039831_1</CLIENT_NAME>
|
||||||
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
<CLIENT_MACHINE>127.0.0.1</CLIENT_MACHINE>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>64</RPC_CALLID>
|
<RPC_CALLID>66</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -821,7 +821,7 @@
|
||||||
<OPCODE>OP_REASSIGN_LEASE</OPCODE>
|
<OPCODE>OP_REASSIGN_LEASE</OPCODE>
|
||||||
<DATA>
|
<DATA>
|
||||||
<TXID>64</TXID>
|
<TXID>64</TXID>
|
||||||
<LEASEHOLDER>DFSClient_NONMAPREDUCE_221786725_1</LEASEHOLDER>
|
<LEASEHOLDER>DFSClient_NONMAPREDUCE_1233039831_1</LEASEHOLDER>
|
||||||
<PATH>/hard-lease-recovery-test</PATH>
|
<PATH>/hard-lease-recovery-test</PATH>
|
||||||
<NEWHOLDER>HDFS_NameNode</NEWHOLDER>
|
<NEWHOLDER>HDFS_NameNode</NEWHOLDER>
|
||||||
</DATA>
|
</DATA>
|
||||||
|
@ -834,8 +834,8 @@
|
||||||
<INODEID>0</INODEID>
|
<INODEID>0</INODEID>
|
||||||
<PATH>/hard-lease-recovery-test</PATH>
|
<PATH>/hard-lease-recovery-test</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<MTIME>1394158725708</MTIME>
|
<MTIME>1402899232526</MTIME>
|
||||||
<ATIME>1394158723047</ATIME>
|
<ATIME>1402899230413</ATIME>
|
||||||
<BLOCKSIZE>512</BLOCKSIZE>
|
<BLOCKSIZE>512</BLOCKSIZE>
|
||||||
<CLIENT_NAME></CLIENT_NAME>
|
<CLIENT_NAME></CLIENT_NAME>
|
||||||
<CLIENT_MACHINE></CLIENT_MACHINE>
|
<CLIENT_MACHINE></CLIENT_MACHINE>
|
||||||
|
@ -845,7 +845,7 @@
|
||||||
<GENSTAMP>1011</GENSTAMP>
|
<GENSTAMP>1011</GENSTAMP>
|
||||||
</BLOCK>
|
</BLOCK>
|
||||||
<PERMISSION_STATUS>
|
<PERMISSION_STATUS>
|
||||||
<USERNAME>jing</USERNAME>
|
<USERNAME>andrew</USERNAME>
|
||||||
<GROUPNAME>supergroup</GROUPNAME>
|
<GROUPNAME>supergroup</GROUPNAME>
|
||||||
<MODE>420</MODE>
|
<MODE>420</MODE>
|
||||||
</PERMISSION_STATUS>
|
</PERMISSION_STATUS>
|
||||||
|
@ -856,13 +856,13 @@
|
||||||
<DATA>
|
<DATA>
|
||||||
<TXID>66</TXID>
|
<TXID>66</TXID>
|
||||||
<POOLNAME>pool1</POOLNAME>
|
<POOLNAME>pool1</POOLNAME>
|
||||||
<OWNERNAME>jing</OWNERNAME>
|
<OWNERNAME>andrew</OWNERNAME>
|
||||||
<GROUPNAME>staff</GROUPNAME>
|
<GROUPNAME>andrew</GROUPNAME>
|
||||||
<MODE>493</MODE>
|
<MODE>493</MODE>
|
||||||
<LIMIT>9223372036854775807</LIMIT>
|
<LIMIT>9223372036854775807</LIMIT>
|
||||||
<MAXRELATIVEEXPIRY>2305843009213693951</MAXRELATIVEEXPIRY>
|
<MAXRELATIVEEXPIRY>2305843009213693951</MAXRELATIVEEXPIRY>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>71</RPC_CALLID>
|
<RPC_CALLID>73</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -871,8 +871,8 @@
|
||||||
<TXID>67</TXID>
|
<TXID>67</TXID>
|
||||||
<POOLNAME>pool1</POOLNAME>
|
<POOLNAME>pool1</POOLNAME>
|
||||||
<LIMIT>99</LIMIT>
|
<LIMIT>99</LIMIT>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>72</RPC_CALLID>
|
<RPC_CALLID>74</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -883,9 +883,9 @@
|
||||||
<PATH>/path</PATH>
|
<PATH>/path</PATH>
|
||||||
<REPLICATION>1</REPLICATION>
|
<REPLICATION>1</REPLICATION>
|
||||||
<POOL>pool1</POOL>
|
<POOL>pool1</POOL>
|
||||||
<EXPIRATION>2305844403372420029</EXPIRATION>
|
<EXPIRATION>2305844412112927450</EXPIRATION>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>73</RPC_CALLID>
|
<RPC_CALLID>75</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -894,8 +894,8 @@
|
||||||
<TXID>69</TXID>
|
<TXID>69</TXID>
|
||||||
<ID>1</ID>
|
<ID>1</ID>
|
||||||
<REPLICATION>2</REPLICATION>
|
<REPLICATION>2</REPLICATION>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>74</RPC_CALLID>
|
<RPC_CALLID>76</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -903,8 +903,8 @@
|
||||||
<DATA>
|
<DATA>
|
||||||
<TXID>70</TXID>
|
<TXID>70</TXID>
|
||||||
<ID>1</ID>
|
<ID>1</ID>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>75</RPC_CALLID>
|
<RPC_CALLID>77</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -912,8 +912,8 @@
|
||||||
<DATA>
|
<DATA>
|
||||||
<TXID>71</TXID>
|
<TXID>71</TXID>
|
||||||
<POOLNAME>pool1</POOLNAME>
|
<POOLNAME>pool1</POOLNAME>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>76</RPC_CALLID>
|
<RPC_CALLID>78</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
|
@ -921,51 +921,91 @@
|
||||||
<DATA>
|
<DATA>
|
||||||
<TXID>72</TXID>
|
<TXID>72</TXID>
|
||||||
<SRC>/file_concat_target</SRC>
|
<SRC>/file_concat_target</SRC>
|
||||||
</DATA>
|
<ENTRY>
|
||||||
</RECORD>
|
<SCOPE>ACCESS</SCOPE>
|
||||||
<RECORD>
|
<TYPE>USER</TYPE>
|
||||||
<OPCODE>OP_ROLLING_UPGRADE_START</OPCODE>
|
<PERM>rw-</PERM>
|
||||||
<DATA>
|
</ENTRY>
|
||||||
<TXID>73</TXID>
|
<ENTRY>
|
||||||
<STARTTIME>1394158726098</STARTTIME>
|
<SCOPE>ACCESS</SCOPE>
|
||||||
</DATA>
|
<TYPE>USER</TYPE>
|
||||||
</RECORD>
|
<NAME>user</NAME>
|
||||||
<RECORD>
|
<PERM>rw-</PERM>
|
||||||
<OPCODE>OP_ROLLING_UPGRADE_FINALIZE</OPCODE>
|
</ENTRY>
|
||||||
<DATA>
|
<ENTRY>
|
||||||
<TXID>74</TXID>
|
<SCOPE>ACCESS</SCOPE>
|
||||||
<FINALIZETIME>1394158726098</FINALIZETIME>
|
<TYPE>GROUP</TYPE>
|
||||||
|
<PERM>-w-</PERM>
|
||||||
|
</ENTRY>
|
||||||
|
<ENTRY>
|
||||||
|
<SCOPE>ACCESS</SCOPE>
|
||||||
|
<TYPE>MASK</TYPE>
|
||||||
|
<PERM>rw-</PERM>
|
||||||
|
</ENTRY>
|
||||||
|
<ENTRY>
|
||||||
|
<SCOPE>ACCESS</SCOPE>
|
||||||
|
<TYPE>OTHER</TYPE>
|
||||||
|
<PERM>---</PERM>
|
||||||
|
</ENTRY>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
<OPCODE>OP_SET_XATTR</OPCODE>
|
<OPCODE>OP_SET_XATTR</OPCODE>
|
||||||
<DATA>
|
<DATA>
|
||||||
<TXID>75</TXID>
|
<TXID>73</TXID>
|
||||||
<SRC>/file_concat_target</SRC>
|
<SRC>/file_concat_target</SRC>
|
||||||
<XATTR>
|
<XATTR>
|
||||||
<NAMESPACE>USER</NAMESPACE>
|
<NAMESPACE>USER</NAMESPACE>
|
||||||
<NAME>a1</NAME>
|
<NAME>a1</NAME>
|
||||||
<VALUE>0x313233</VALUE>
|
<VALUE>0x313233</VALUE>
|
||||||
</XATTR>
|
</XATTR>
|
||||||
<RPC_CLIENTID>9b85a845-bbfa-42f6-8a16-c433614b8eb9</RPC_CLIENTID>
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
<RPC_CALLID>80</RPC_CALLID>
|
<RPC_CALLID>80</RPC_CALLID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
|
<RECORD>
|
||||||
|
<OPCODE>OP_SET_XATTR</OPCODE>
|
||||||
|
<DATA>
|
||||||
|
<TXID>74</TXID>
|
||||||
|
<SRC>/file_concat_target</SRC>
|
||||||
|
<XATTR>
|
||||||
|
<NAMESPACE>USER</NAMESPACE>
|
||||||
|
<NAME>a2</NAME>
|
||||||
|
<VALUE>0x373839</VALUE>
|
||||||
|
</XATTR>
|
||||||
|
<RPC_CLIENTID>e03f4a52-3d85-4e05-8942-286185e639bd</RPC_CLIENTID>
|
||||||
|
<RPC_CALLID>81</RPC_CALLID>
|
||||||
|
</DATA>
|
||||||
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
<OPCODE>OP_REMOVE_XATTR</OPCODE>
|
<OPCODE>OP_REMOVE_XATTR</OPCODE>
|
||||||
<DATA>
|
<DATA>
|
||||||
<TXID>76</TXID>
|
<TXID>75</TXID>
|
||||||
<SRC>/file_concat_target</SRC>
|
<SRC>/file_concat_target</SRC>
|
||||||
<XATTR>
|
<XATTR>
|
||||||
<NAMESPACE>USER</NAMESPACE>
|
<NAMESPACE>USER</NAMESPACE>
|
||||||
<NAME>a1</NAME>
|
<NAME>a2</NAME>
|
||||||
</XATTR>
|
</XATTR>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
|
<RECORD>
|
||||||
|
<OPCODE>OP_ROLLING_UPGRADE_START</OPCODE>
|
||||||
|
<DATA>
|
||||||
|
<TXID>76</TXID>
|
||||||
|
<STARTTIME>1402899233646</STARTTIME>
|
||||||
|
</DATA>
|
||||||
|
</RECORD>
|
||||||
|
<RECORD>
|
||||||
|
<OPCODE>OP_ROLLING_UPGRADE_FINALIZE</OPCODE>
|
||||||
|
<DATA>
|
||||||
|
<TXID>77</TXID>
|
||||||
|
<FINALIZETIME>1402899233647</FINALIZETIME>
|
||||||
|
</DATA>
|
||||||
|
</RECORD>
|
||||||
<RECORD>
|
<RECORD>
|
||||||
<OPCODE>OP_END_LOG_SEGMENT</OPCODE>
|
<OPCODE>OP_END_LOG_SEGMENT</OPCODE>
|
||||||
<DATA>
|
<DATA>
|
||||||
<TXID>77</TXID>
|
<TXID>78</TXID>
|
||||||
</DATA>
|
</DATA>
|
||||||
</RECORD>
|
</RECORD>
|
||||||
</EDITS>
|
</EDITS>
|
||||||
|
|
Loading…
Reference in New Issue