@SuppressWarnings("unchecked") private void parsePhysicalPlan() throws IOException { if (queryProfile.getJsonPlan() == null || queryProfile.getJsonPlan().isEmpty()) { return; } // Parse the plan and map tables to major fragment and operator ids. final Map<String, Object> plan = mapper.readValue(queryProfile.getJsonPlan(), Map.class); for (Map.Entry<String, Object> entry: plan.entrySet()) { checkIsAssignable(entry.getKey(), entry.getValue().getClass(), Map.class); final Map<String, Object> operatorInfo = (Map)entry.getValue(); final String operator = (String) operatorInfo.get("\"op\""); if (operator != null && operator.contains("Scan") && operatorInfo.containsKey("\"values\"")) { // Get table name checkIsAssignable(entry.getKey() + ": values", operatorInfo.get("\"values\"").getClass(), Map.class); final Map<String, Object> values = (Map)operatorInfo.get("\"values\""); if (values.containsKey("\"table\"")) { // TODO (Amit H) remove this after we clean up code. final String tokens = ((String) values.get("\"table\"")).replaceAll("^\\[|\\]$", ""); final String tablePath = PathUtils.constructFullPath(IteratorUtils.toList(splitter.split(tokens).iterator())); operatorToTable.put(entry.getKey(), tablePath); } } } }
parsePhysicalPlan(); } catch (IOException ioe) { logger.error("Failed to parse physical plan for query {}, plan {}", jobId.getId(), queryProfile.getJsonPlan(), ioe);
output.writeInt64(18, message.getPlanningEnd(), false); if(message.hasJsonPlan()) output.writeString(19, message.getJsonPlan(), false); if(message.hasPrepareId()) output.writeObject(24, message.getPrepareId(), com.dremio.exec.proto.SchemaUserBitShared.QueryId.WRITE, false);
/** * <code>optional string json_plan = 19;</code> */ public Builder clearJsonPlan() { bitField0_ = (bitField0_ & ~0x00040000); jsonPlan_ = getDefaultInstance().getJsonPlan(); onChanged(); return this; } /**