private void setAnalysisRecords(ResultsMessage response) { if(analysisRecord != null) { if (requestMsg.getShowPlan() != ShowPlan.OFF) { if (processor != null) { PlanNode node = processor.getProcessorPlan().getDescriptionProperties(); node.addProperty(AnalysisRecord.PROP_DATA_BYTES_SENT, String.valueOf(dataBytes.get())); if (planningEnd != 0) { node.addProperty(AnalysisRecord.PROP_PLANNING_TIME, String.valueOf(planningEnd - planningStart)); } response.setPlanDescription(node); } if (analysisRecord.getAnnotations() != null && !analysisRecord.getAnnotations().isEmpty()) { response.setAnnotations(analysisRecord.getAnnotations()); analysisRecord.getAnnotations().clear(); } } if (requestMsg.getShowPlan() == ShowPlan.DEBUG) { response.setDebugLog(analysisRecord.getDebugLog()); analysisRecord.stopDebugLog(); } } }
private void setAnalysisRecords(ResultsMessage response) { if(analysisRecord != null) { if (requestMsg.getShowPlan() != ShowPlan.OFF) { if (processor != null) { PlanNode node = processor.getProcessorPlan().getDescriptionProperties(); node.addProperty(AnalysisRecord.PROP_DATA_BYTES_SENT, String.valueOf(dataBytes.get())); if (planningEnd != 0) { node.addProperty(AnalysisRecord.PROP_PLANNING_TIME, String.valueOf(planningEnd - planningStart)); } response.setPlanDescription(node); } if (analysisRecord.getAnnotations() != null && !analysisRecord.getAnnotations().isEmpty()) { response.setAnnotations(analysisRecord.getAnnotations()); analysisRecord.getAnnotations().clear(); } } if (requestMsg.getShowPlan() == ShowPlan.DEBUG) { response.setDebugLog(analysisRecord.getDebugLog()); analysisRecord.stopDebugLog(); } } }
private void setAnalysisRecords(ResultsMessage response) { if(analysisRecord != null) { if (requestMsg.getShowPlan() != ShowPlan.OFF) { if (processor != null) { PlanNode node = processor.getProcessorPlan().getDescriptionProperties(); node.addProperty(AnalysisRecord.PROP_DATA_BYTES_SENT, String.valueOf(dataBytes.get())); if (planningEnd != 0) { node.addProperty(AnalysisRecord.PROP_PLANNING_TIME, String.valueOf(planningEnd - planningStart)); } response.setPlanDescription(node); } if (analysisRecord.getAnnotations() != null && !analysisRecord.getAnnotations().isEmpty()) { response.setAnnotations(analysisRecord.getAnnotations()); analysisRecord.getAnnotations().clear(); } } if (requestMsg.getShowPlan() == ShowPlan.DEBUG) { response.setDebugLog(analysisRecord.getDebugLog()); analysisRecord.stopDebugLog(); } } }
public void testDebugLog() { AnalysisRecord rec = new AnalysisRecord(false, true); assertTrue(rec.recordDebug()); rec.println("a"); //$NON-NLS-1$ rec.println("b"); //$NON-NLS-1$ String log = rec.getDebugLog(); assertEquals("a\nb\n", log); //$NON-NLS-1$ }
} finally { CommandContext.popThreadLocalContext(); String debugLog = analysisRecord.getDebugLog(); if(debugLog != null && debugLog.length() > 0) { LogManager.log(requestMsg.getShowPlan()==ShowPlan.DEBUG?MessageLevel.INFO:MessageLevel.TRACE, LogConstants.CTX_QUERY_PLANNER, debugLog);
} finally { CommandContext.popThreadLocalContext(); String debugLog = analysisRecord.getDebugLog(); if(debugLog != null && debugLog.length() > 0) { LogManager.log(requestMsg.getShowPlan()==ShowPlan.DEBUG?MessageLevel.INFO:MessageLevel.TRACE, LogConstants.CTX_QUERY_PLANNER, debugLog);
} finally { CommandContext.popThreadLocalContext(); String debugLog = analysisRecord.getDebugLog(); if(debugLog != null && debugLog.length() > 0) { LogManager.log(requestMsg.getShowPlan()==ShowPlan.DEBUG?MessageLevel.INFO:MessageLevel.TRACE, LogConstants.CTX_QUERY_PLANNER, debugLog);
} finally { if(DEBUG) { System.out.println(analysisRecord.getDebugLog());