System.getenv("HADOOP_TOKEN_FILE_LOCATION"));
}
loader = new ReadToEndLoader(
new InterStorage(), conf, scalarfilename, 0);
} catch (Exception e) {
throw new ExecException("Failed to open file '" + scalarfilename
+ "'; error = " + e.getMessage());
}
try {
Tuple t1 = loader.getNext();
if(t1 == null){
log.warn("No scalar field to read, returning null");
return null;
}
value = t1.get(pos);
Tuple t2 = loader.getNext();
if(t2 != null){
String msg = "Scalar has more than one row in the output. "
+ "1st : " + t1 + ", 2nd :" + t2;
throw new ExecException(msg);
}
} catch (Exception e) {
throw new ExecException(e.getMessage());
}
}
return value;
}