private void writeSymlinkFile(Path symlinkFile, Path...paths)
      throws IOException {
    OutputStreamWriter writer =
        new OutputStreamWriter(fileSystem.create(symlinkFile));
    for (Path path : paths) {
      writer.write(path.toString());
      writer.write("\n");
    }
    writer.close();
  }
Writes a symlink file that contains given list of paths.

@param symlinkFile
The symlink file to write.

@param paths
The list of paths to write to the symlink file.
ql/src/test/org/apache/hadoop/hive/ql/io/TestSymlinkTextInputFormat.java