/** Serialize a {@link PermissionStatus} from its base components. */
 public static void write(
     DataOutput out, String username, String groupname, FsPermission permission)
     throws IOException {
   Text.writeString(out, username);
   Text.writeString(out, groupname);
   permission.write(out);
 }
Пример #2
0
 //////////////////////////////////////////////////
 // Writable
 //////////////////////////////////////////////////
 public void write(DataOutput out) throws IOException {
   out.writeInt(path.length);
   out.write(path);
   out.writeLong(length);
   out.writeBoolean(isdir);
   out.writeShort(block_replication);
   out.writeLong(blocksize);
   out.writeLong(modification_time);
   out.writeLong(access_time);
   permission.write(out);
   Text.writeStringOpt(out, owner);
   Text.writeStringOpt(out, group);
 }