final long blocksize) throws IOException {
final FSNamesystem ns = namenode.getNamesystem();
if (op == PutOpParam.Op.CREATE) {
//choose a datanode near to client
final DatanodeInfo dn = ns.chooseDatanode(path, getRemoteAddress(), blocksize);
if (dn != null) {
return dn;
}
} else if (op == GetOpParam.Op.OPEN
|| op == GetOpParam.Op.GETFILECHECKSUM