From 17130e4d2f968e0f8695284c9cc2c4619c44f122 Mon Sep 17 00:00:00 2001 From: Gary Helmling Date: Thu, 14 Jan 2016 09:51:03 -0800 Subject: [PATCH] HBASE-15111 hbase version should write to stdout Signed-off-by: Sean Busbey Conflicts: hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java --- .../java/org/apache/hadoop/hbase/util/VersionInfo.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java index aadad2eb551..8061b4d1dd8 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java @@ -19,6 +19,7 @@ package org.apache.hadoop.hbase.util; import org.apache.commons.logging.LogFactory; +import java.io.PrintStream; import java.io.PrintWriter; import org.apache.hadoop.hbase.classification.InterfaceAudience; @@ -113,6 +114,12 @@ public class VersionInfo { } } + public static void writeTo(PrintStream out) { + for (String line : versionReport()) { + out.println(line); + } + } + public static void logVersion() { for (String line : versionReport()) { LOG.info(line); @@ -120,6 +127,6 @@ public class VersionInfo { } public static void main(String[] args) { - logVersion(); + writeTo(System.out); } }