HBASE-18780 Remove HLogPrettyPrinter
Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
parent
f08dd5d342
commit
84ec18eb45
|
@ -357,8 +357,7 @@ if [ "$COMMAND" = "shell" ] ; then
|
|||
CLASS="org.jruby.Main -X+O ${JRUBY_OPTS} ${HBASE_HOME}/bin/hirb.rb"
|
||||
elif [ "$COMMAND" = "hbck" ] ; then
|
||||
CLASS='org.apache.hadoop.hbase.util.HBaseFsck'
|
||||
# TODO remove old 'hlog' version
|
||||
elif [ "$COMMAND" = "hlog" -o "$COMMAND" = "wal" ] ; then
|
||||
elif [ "$COMMAND" = "wal" ] ; then
|
||||
CLASS='org.apache.hadoop.hbase.wal.WALPrettyPrinter'
|
||||
elif [ "$COMMAND" = "hfile" ] ; then
|
||||
CLASS='org.apache.hadoop.hbase.io.hfile.HFilePrettyPrinter'
|
||||
|
|
|
@ -415,11 +415,6 @@ goto :eof
|
|||
set CLASS=org.apache.hadoop.hbase.util.HBaseFsck
|
||||
goto :eof
|
||||
|
||||
@rem TODO remove older 'hlog' command
|
||||
:hlog
|
||||
set CLASS=org.apache.hadoop.hbase.wal.WALPrettyPrinter
|
||||
goto :eof
|
||||
|
||||
:wal
|
||||
set CLASS=org.apache.hadoop.hbase.wal.WALPrettyPrinter
|
||||
goto :eof
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.hadoop.hbase.regionserver.wal;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import org.apache.hadoop.hbase.classification.InterfaceAudience;
|
||||
import org.apache.hadoop.hbase.classification.InterfaceStability;
|
||||
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
|
||||
import org.apache.hadoop.hbase.wal.WALPrettyPrinter;
|
||||
|
||||
/**
|
||||
* HLogPrettyPrinter prints the contents of a given HLog with a variety of
|
||||
* options affecting formatting and extent of content.
|
||||
*
|
||||
* It targets two usage cases: pretty printing for ease of debugging directly by
|
||||
* humans, and JSON output for consumption by monitoring and/or maintenance
|
||||
* scripts.
|
||||
*
|
||||
* It can filter by row, region, or sequence id.
|
||||
*
|
||||
* It can also toggle output of values.
|
||||
*
|
||||
* @deprecated use the "hbase wal" command
|
||||
*/
|
||||
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.TOOLS)
|
||||
@InterfaceStability.Evolving
|
||||
@Deprecated
|
||||
public class HLogPrettyPrinter extends WALPrettyPrinter {
|
||||
|
||||
/**
|
||||
* Basic constructor that simply initializes values to reasonable defaults.
|
||||
*/
|
||||
public HLogPrettyPrinter() {
|
||||
this(false, false, -1l, null, null, false, System.out);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fully specified constructor.
|
||||
*
|
||||
* @param outputValues
|
||||
* when true, enables output of values along with other log
|
||||
* information
|
||||
* @param outputJSON
|
||||
* when true, enables output in JSON format rather than a
|
||||
* "pretty string"
|
||||
* @param sequence
|
||||
* when nonnegative, serves as a filter; only log entries with this
|
||||
* sequence id will be printed
|
||||
* @param region
|
||||
* when not null, serves as a filter; only log entries from this
|
||||
* region will be printed
|
||||
* @param row
|
||||
* when not null, serves as a filter; only log entries from this row
|
||||
* will be printed
|
||||
* @param persistentOutput
|
||||
* keeps a single list running for multiple files. if enabled, the
|
||||
* endPersistentOutput() method must be used!
|
||||
* @param out
|
||||
* Specifies an alternative to stdout for the destination of this
|
||||
* PrettyPrinter's output.
|
||||
*/
|
||||
public HLogPrettyPrinter(boolean outputValues, boolean outputJSON,
|
||||
long sequence, String region, String row, boolean persistentOutput,
|
||||
PrintStream out) {
|
||||
super(outputValues, outputJSON, sequence, region, row, persistentOutput, out);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
WALPrettyPrinter.main(args);
|
||||
}
|
||||
|
||||
}
|
|
@ -332,7 +332,7 @@ See <<hfile_tool>>.
|
|||
=== WAL Tools
|
||||
|
||||
[[hlog_tool]]
|
||||
==== `FSHLog` tool
|
||||
==== FSHLog tool
|
||||
|
||||
The main method on `FSHLog` offers manual split and dump facilities.
|
||||
Pass it WALs or the product of a split, the content of the _recovered.edits_.
|
||||
|
@ -353,9 +353,9 @@ Similarly you can force a split of a log file directory by doing:
|
|||
----
|
||||
|
||||
[[hlog_tool.prettyprint]]
|
||||
===== WAL Pretty Printer
|
||||
===== WALPrettyPrinter
|
||||
|
||||
The WAL Pretty Printer is a tool with configurable options to print the contents of a WAL.
|
||||
The `WALPrettyPrinter` is a tool with configurable options to print the contents of a WAL.
|
||||
You can invoke it via the HBase cli with the 'wal' command.
|
||||
|
||||
----
|
||||
|
@ -365,7 +365,7 @@ You can invoke it via the HBase cli with the 'wal' command.
|
|||
.WAL Printing in older versions of HBase
|
||||
[NOTE]
|
||||
====
|
||||
Prior to version 2.0, the WAL Pretty Printer was called the `HLogPrettyPrinter`, after an internal name for HBase's write ahead log.
|
||||
Prior to version 2.0, the `WALPrettyPrinter` was called the `HLogPrettyPrinter`, after an internal name for HBase's write ahead log.
|
||||
In those versions, you can print the contents of a WAL using the same configuration as above, but with the 'hlog' command.
|
||||
|
||||
----
|
||||
|
|
Loading…
Reference in New Issue