| | |
| | | List<String> pathlist; |
| | | try { |
| | | pathlist = iotdbCfg.getSessionPool().showPathsTemplateSetOn(template); |
| | | //logger.info("pathlist"+pathlist); |
| | | return pathlist.contains(path); |
| | | } catch (StatementExecutionException|IoTDBConnectionException e) { |
| | | logger.error("获取模板使用错误",e); |
| | |
| | | * @param template 模板名称 |
| | | * @param deviceId 设备路径 |
| | | */ |
| | | public void setTemmplateIsNotSet(String template,String deviceId) { |
| | | public void setTemmplateIfNotSet(String template,String deviceId) { |
| | | if(!isTemplateSetOnPath(template, deviceId)) { |
| | | try { |
| | | iotdbCfg.getSessionPool().setSchemaTemplate(template, deviceId); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | logger.error("获取模板使用错误,template="+template+",deviceId="+deviceId,e); |
| | | } |
| | | } |
| | | } |