HIVE-17594: Unit format error in Copy.java (Saijin Huang, reviewed by Dmitry Tolpeko)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/fa9097e2 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/fa9097e2 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/fa9097e2 Branch: refs/heads/hive-14535 Commit: fa9097e25cf5b6abdd9122823aee2fd15fe16297 Parents: df8ddbf Author: Dmitry Tolpeko <[email protected]> Authored: Tue Sep 26 02:10:43 2017 +0000 Committer: Dmitry Tolpeko <[email protected]> Committed: Tue Sep 26 02:10:43 2017 +0000 ---------------------------------------------------------------------- hplsql/src/main/java/org/apache/hive/hplsql/Copy.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/fa9097e2/hplsql/src/main/java/org/apache/hive/hplsql/Copy.java ---------------------------------------------------------------------- diff --git a/hplsql/src/main/java/org/apache/hive/hplsql/Copy.java b/hplsql/src/main/java/org/apache/hive/hplsql/Copy.java index 1879f99..ff31d01 100644 --- a/hplsql/src/main/java/org/apache/hive/hplsql/Copy.java +++ b/hplsql/src/main/java/org/apache/hive/hplsql/Copy.java @@ -268,7 +268,9 @@ public class Copy { } long elapsed = timer.stop(); if (info) { - info(ctx, "COPY completed: " + rows + " row(s), " + Utils.formatSizeInBytes(bytes) + ", " + timer.format() + ", " + rows/elapsed/1000 + " rows/sec"); + DecimalFormat df = new DecimalFormat("#,##0.00"); + df.setRoundingMode(RoundingMode.HALF_UP); + info(ctx, "COPY completed: " + rows + " row(s), " + Utils.formatSizeInBytes(bytes) + ", " + timer.format() + ", " + df.format(rows/(elapsed/1000.0)) + " rows/sec"); } }
