HBASE-15111 hbase version should write to stdout

Signed-off-by: Sean Busbey <busbey@cloudera.com>
This commit is contained in:
Gary Helmling 2016-01-14 09:51:03 -08:00 committed by Sean Busbey
parent 2c0394f078
commit df36178062
1 changed files with 8 additions and 1 deletions

View File

@ -18,6 +18,7 @@
package org.apache.hadoop.hbase.util; package org.apache.hadoop.hbase.util;
import java.io.PrintStream;
import java.io.PrintWriter; import java.io.PrintWriter;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
@ -113,6 +114,12 @@ public class VersionInfo {
} }
} }
public static void writeTo(PrintStream out) {
for (String line : versionReport()) {
out.println(line);
}
}
public static void logVersion() { public static void logVersion() {
for (String line : versionReport()) { for (String line : versionReport()) {
LOG.info(line); LOG.info(line);
@ -120,6 +127,6 @@ public class VersionInfo {
} }
public static void main(String[] args) { public static void main(String[] args) {
logVersion(); writeTo(System.out);
} }
} }