use of org.apache.phoenix.pherf.result.ResultHandler in project phoenix by apache.
the class MonitorManager method readResults.
/**
* This method should really only be used for testing
*
* @return List < {@link org.apache.phoenix.pherf.result.Result} >
* @throws IOException
*/
public synchronized List<Result> readResults() throws Exception {
ResultHandler handler = null;
try {
if (resultHandler.isClosed()) {
handler = new CSVFileResultHandler();
handler.setResultFileDetails(ResultFileDetails.CSV);
handler.setResultFileName(PherfConstants.MONITOR_FILE_NAME);
return handler.read();
} else {
return resultHandler.read();
}
} catch (Exception e) {
throw new FileLoaderRuntimeException("Could not close monitor results.", e);
} finally {
if (handler != null) {
handler.close();
}
}
}
Aggregations