You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2017/09/11 07:42:48 UTC

[21/50] [abbrv] hbase git commit: HBASE-18780 Remove HLogPrettyPrinter

HBASE-18780 Remove HLogPrettyPrinter

Signed-off-by: Michael Stack <st...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/87c3ae93
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/87c3ae93
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/87c3ae93

Branch: refs/heads/HBASE-18467
Commit: 87c3ae9314e3a6ba85900cceb06ea34cf295395a
Parents: c90602e
Author: Chia-Ping Tsai <ch...@gmail.com>
Authored: Fri Sep 8 21:27:20 2017 +0800
Committer: Michael Stack <st...@apache.org>
Committed: Fri Sep 8 10:20:20 2017 -0700

----------------------------------------------------------------------
 bin/hbase                                       |  3 +-
 bin/hbase.cmd                                   |  5 --
 .../regionserver/wal/HLogPrettyPrinter.java     | 88 --------------------
 src/main/asciidoc/_chapters/ops_mgt.adoc        |  8 +-
 4 files changed, 5 insertions(+), 99 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/87c3ae93/bin/hbase
----------------------------------------------------------------------
diff --git a/bin/hbase b/bin/hbase
index c2e077c..998bdbe 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -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'

http://git-wip-us.apache.org/repos/asf/hbase/blob/87c3ae93/bin/hbase.cmd
----------------------------------------------------------------------
diff --git a/bin/hbase.cmd b/bin/hbase.cmd
index 0ff6ff5..070cb61 100644
--- a/bin/hbase.cmd
+++ b/bin/hbase.cmd
@@ -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

http://git-wip-us.apache.org/repos/asf/hbase/blob/87c3ae93/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogPrettyPrinter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogPrettyPrinter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogPrettyPrinter.java
deleted file mode 100644
index cf3b5c4..0000000
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogPrettyPrinter.java
+++ /dev/null
@@ -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);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/87c3ae93/src/main/asciidoc/_chapters/ops_mgt.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/ops_mgt.adoc b/src/main/asciidoc/_chapters/ops_mgt.adoc
index 6f7f9e0..771e3be 100644
--- a/src/main/asciidoc/_chapters/ops_mgt.adoc
+++ b/src/main/asciidoc/_chapters/ops_mgt.adoc
@@ -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.
 
 ----