wonook commented on a change in pull request #215: [NEMO-373] Optimize with DAG
Patterns
URL: https://github.com/apache/incubator-nemo/pull/215#discussion_r279145252
##########
File path:
compiler/optimizer/src/main/java/org/apache/nemo/compiler/optimizer/pass/compiletime/annotating/XGBoostPass.java
##########
@@ -77,29 +77,39 @@ public IRDAG apply(final IRDAG dag) {
List<Map<String, String>> listOfMap =
mapper.readValue(message, new TypeReference<List<Map<String,
String>>>() {
});
- // Formatted into 9 digits: 0:vertex/edge 1-5:ID 5-9:EP Index.
- listOfMap.stream().filter(m -> m.get("feature").length() ==
9).forEach(m -> {
- final Pair<String, Integer> idAndEPKey =
OptimizerUtils.stringToIdAndEPKeyIndex(m.get("feature"));
+ listOfMap.forEach(m -> {
+ final Pair<List<Object>, Integer> objAndEPKey;
+ if (m.get("feature").length() == 10) { // get by pattern.
+ // Formatted into 10 digits: 0:pattern(1) 1-3:pattern ID
4-5:vtx/edge index 6-9:EP Index.
+ objAndEPKey =
OptimizerUtils.patternStringToObjAndEPKeyIndex(m.get("feature"), dag);
+ } else if (m.get("feature").length() == 9) { // get by id.
+ // Formatted into 9 digits: 0:vertex(2)/edge(3) 1-4:vtx/edge ID
5-8:EP Index.
Review comment:
This one's works with the ID
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services