psClient.saveStatus(planId, planStatus);
if(enableSampleOutput) {
// Get sample output for the job
try {
P2jSampleOutputList sampleOutputList = new P2jSampleOutputList();
OutputSampler os = new OutputSampler(jobStats);
// The 10 & 1024 params (maxRows and maxBytes)
// should be configurable via properties
for (SampleOutput schemaOutputPair : os.getSampleOutputs(10, 1024)) {
P2jSampleOutput sampleOutput = new P2jSampleOutput();
sampleOutput.setSchemaString(schemaOutputPair.getSchema());
sampleOutput.setSampleOutput(schemaOutputPair.getOutput());
sampleOutputList.add(sampleOutput);
}
psClient.saveSampleOutput(planId,
jobIdToJobStatusMap.get(jobStats.getJobId()).getScope(),
sampleOutputList);
} catch (Exception e) {