Repository: systemml Updated Branches: refs/heads/master 7350a0c6d -> af9cc8a90
[MINOR] Fix consistency explain/stats output to stdout (instead of log) This patch redirects the -explain output to stdout instead of LOG.info for consistency with the -stats output. On recent HDP versions the log level is by default set to WARN resulting in the explain output not being shown. This led to confusion because the stats output was handled differently. Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/7eebb42e Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/7eebb42e Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/7eebb42e Branch: refs/heads/master Commit: 7eebb42ea778e5e313d3a7fad2af6d674077d6a9 Parents: 7350a0c Author: Matthias Boehm <mboe...@gmail.com> Authored: Wed May 30 21:53:06 2018 -0700 Committer: Matthias Boehm <mboe...@gmail.com> Committed: Wed May 30 21:53:06 2018 -0700 ---------------------------------------------------------------------- src/main/java/org/apache/sysml/api/DMLScript.java | 10 +++++----- .../apache/sysml/runtime/instructions/cp/ListObject.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/7eebb42e/src/main/java/org/apache/sysml/api/DMLScript.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/api/DMLScript.java b/src/main/java/org/apache/sysml/api/DMLScript.java index c8c2e39..07e766a 100644 --- a/src/main/java/org/apache/sysml/api/DMLScript.java +++ b/src/main/java/org/apache/sysml/api/DMLScript.java @@ -678,8 +678,8 @@ public class DMLScript try { DMLScript.GPU_EVICTION_POLICY = EvictionPolicy.valueOf(evictionPolicy); } catch(IllegalArgumentException e) { - throw new RuntimeException("Unsupported eviction policy:" + evictionPolicy); - } + throw new RuntimeException("Unsupported eviction policy:" + evictionPolicy); + } //Step 2: set local/remote memory if requested (for compile in AM context) if( dmlconf.getBooleanValue(DMLConfig.YARN_APPMASTER) ){ @@ -726,11 +726,11 @@ public class DMLScript //Step 9: prepare statistics [and optional explain output] //count number compiled MR jobs / SP instructions ExplainCounts counts = Explain.countDistributedOperations(rtprog); - Statistics.resetNoOfCompiledJobs( counts.numJobs ); + Statistics.resetNoOfCompiledJobs( counts.numJobs ); //explain plan of program (hops or runtime) if( EXPLAIN != ExplainType.NONE ) - LOG.info(Explain.display(prog, rtprog, EXPLAIN, counts)); + System.out.println(Explain.display(prog, rtprog, EXPLAIN, counts)); Statistics.stopCompileTimer(); @@ -750,7 +750,7 @@ public class DMLScript //cleanup scratch_space and all working dirs cleanupHadoopExecution( dmlconf ); } - } + } /** * Launcher for DML debugger. This method should be called after http://git-wip-us.apache.org/repos/asf/systemml/blob/7eebb42e/src/main/java/org/apache/sysml/runtime/instructions/cp/ListObject.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/ListObject.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/ListObject.java index 670190c..4c06396 100644 --- a/src/main/java/org/apache/sysml/runtime/instructions/cp/ListObject.java +++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/ListObject.java @@ -118,7 +118,7 @@ public class ListObject extends Data { public long getDataSize() { return _data.stream().filter(data -> data instanceof CacheableData) - .map(data -> ((CacheableData) data).getDataSize()).reduce((l1, l2) -> l1 + l2).get(); + .mapToLong(data -> ((CacheableData<?>) data).getDataSize()).sum(); } @Override