private String createHadoopTempFile(PigContext ctx) throws Throwable {
File fp1 = generateTempFile() ;
ElementDescriptor localElem =
ctx.getLfs().asElement(fp1.getAbsolutePath());
String path = fp1.getAbsolutePath();
if (System.getProperty("os.name").toUpperCase().startsWith("WINDOWS"))
path = FileLocalizer.parseCygPath(path, FileLocalizer.STYLE_UNIX);
ElementDescriptor distribElem = ctx.getDfs().asElement(path) ;
localElem.copy(distribElem, null, false);
return distribElem.toString();
}