HBASE-15111 hbase version should write to stdout
Signed-off-by: Sean Busbey <busbey@cloudera.com> Conflicts: hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java
This commit is contained in:
parent
e76a2e4e6d
commit
17130e4d2f
|
@ -19,6 +19,7 @@
|
||||||
package org.apache.hadoop.hbase.util;
|
package org.apache.hadoop.hbase.util;
|
||||||
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import java.io.PrintStream;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
import org.apache.hadoop.hbase.classification.InterfaceAudience;
|
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() {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue