Java Code Examples for org.apache.hadoop.hdfs.server.namenode.INode#getLocalNameBytes()

The following examples show how to use org.apache.hadoop.hdfs.server.namenode.INode#getLocalNameBytes() . 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: SnapshotDiffInfo.java    From hadoop with Apache License 2.0 5 votes vote down vote up
void setSource(INode source, byte[][] sourceParentPath) {
  Preconditions.checkState(sourcePath == null);
  sourcePath = new byte[sourceParentPath.length + 1][];
  System.arraycopy(sourceParentPath, 0, sourcePath, 0,
      sourceParentPath.length);
  sourcePath[sourcePath.length - 1] = source.getLocalNameBytes();
}
 
Example 2
Source File: DirectoryWithSnapshotFeature.java    From hadoop with Apache License 2.0 5 votes vote down vote up
/** Serialize {@link #created} */
private void writeCreated(DataOutput out) throws IOException {
  final List<INode> created = getList(ListType.CREATED);
  out.writeInt(created.size());
  for (INode node : created) {
    // For INode in created list, we only need to record its local name
    byte[] name = node.getLocalNameBytes();
    out.writeShort(name.length);
    out.write(name);
  }
}
 
Example 3
Source File: SnapshotDiffInfo.java    From big-c with Apache License 2.0 5 votes vote down vote up
void setSource(INode source, byte[][] sourceParentPath) {
  Preconditions.checkState(sourcePath == null);
  sourcePath = new byte[sourceParentPath.length + 1][];
  System.arraycopy(sourceParentPath, 0, sourcePath, 0,
      sourceParentPath.length);
  sourcePath[sourcePath.length - 1] = source.getLocalNameBytes();
}
 
Example 4
Source File: DirectoryWithSnapshotFeature.java    From big-c with Apache License 2.0 5 votes vote down vote up
/** Serialize {@link #created} */
private void writeCreated(DataOutput out) throws IOException {
  final List<INode> created = getList(ListType.CREATED);
  out.writeInt(created.size());
  for (INode node : created) {
    // For INode in created list, we only need to record its local name
    byte[] name = node.getLocalNameBytes();
    out.writeShort(name.length);
    out.write(name);
  }
}
 
Example 5
Source File: SnapshotDiffInfo.java    From hadoop with Apache License 2.0 4 votes vote down vote up
void setTarget(INode target, byte[][] targetParentPath) {
  targetPath = new byte[targetParentPath.length + 1][];
  System.arraycopy(targetParentPath, 0, targetPath, 0,
      targetParentPath.length);
  targetPath[targetPath.length - 1] = target.getLocalNameBytes();
}
 
Example 6
Source File: SnapshotDiffInfo.java    From big-c with Apache License 2.0 4 votes vote down vote up
void setTarget(INode target, byte[][] targetParentPath) {
  targetPath = new byte[targetParentPath.length + 1][];
  System.arraycopy(targetParentPath, 0, targetPath, 0,
      targetParentPath.length);
  targetPath[targetPath.length - 1] = target.getLocalNameBytes();
}