Skip to content

Commit

Permalink
fix java and add get_person_name.cypher
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanglei1949 committed Sep 21, 2023
1 parent aa8c2e1 commit ef920d0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion flex/engines/http_server/stored_procedure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ std::vector<StoredProcedureMeta> parse_stored_procedures(
}
}
} else {
LOG(WARNING) << "Expect ntry <pre_installed>: " << stored_procedure_yaml;
LOG(WARNING) << "Expect entry <pre_installed>: " << stored_procedure_yaml;
}
return stored_procedures;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MATCH(p : person {id: $personId}) RETURN p.firstName, p.lastName;
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public GraphStoredProcedures(MetaDataReader reader) throws Exception {
for (InputStream inputStream : reader.getStoredProcedures()) {
StoredProcedureMeta createdMeta = StoredProcedureMeta.Deserializer.perform(inputStream);
this.storedProcedureMetaMap.put(createdMeta.getName(), createdMeta);
logger.info("Got stored procedure: {} from reader", createdMeta.getName());
logger.debug("Got stored procedure: {} from reader", createdMeta.getName());
inputStream.close();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,13 @@ public List<InputStream> getStoredProcedures() throws IOException {
getProcedureNameWithInputStream(procedureDir);
for (String enableProcedure : enableProcedureList) {
InputStream enableInput = procedureInputMap.get(enableProcedure);
// check enableProcedure exists in procedureInputMap's keyset
if (procedureInputMap.containsKey(enableProcedure)) {
Preconditions.checkArgument(
enableInput != null,
"procedure %s not exist in %s",
enableProcedure,
procedurePath);
logger.info("Load enabled procedure {}", enableProcedure);
procedureInputs.add(enableInput);
} else {
logger.warn(
"Enabled procedure {} not exist in {}", enableProcedure, procedurePath);
}
Preconditions.checkArgument(
enableInput != null,
"can not find procedure with name=%s under directory=%s, candidates are %s",
enableProcedure,
procedureDir,
procedureInputMap.keySet());
procedureInputs.add(enableInput);
}
}
return Collections.unmodifiableList(procedureInputs);
Expand All @@ -97,7 +91,7 @@ private Map<String, InputStream> getProcedureNameWithInputStream(File procedureD
}
String procedureName = getProcedureName(file);
procedureInputMap.put(procedureName, new FileInputStream(file));
logger.info("load procedure {}", procedureName);
logger.debug("load procedure {}", procedureName);
}
return procedureInputMap;
}
Expand Down

0 comments on commit ef920d0

Please sign in to comment.