You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Hudson (Jira)" <ji...@apache.org> on 2019/09/19 13:58:00 UTC
[jira] [Commented] (HBASE-23046) Remove compatibility case from
truncate command
[ https://issues.apache.org/jira/browse/HBASE-23046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16933404#comment-16933404 ]
Hudson commented on HBASE-23046:
--------------------------------
Results for branch master
[build #1458 on builds.a.o|https://builds.apache.org/job/HBase%20Nightly/job/master/1458/]: (x) *{color:red}-1 overall{color}*
----
details (if available):
(x) {color:red}-1 general checks{color}
-- For more information [see general report|https://builds.apache.org/job/HBase%20Nightly/job/master/1458//General_Nightly_Build_Report/]
(x) {color:red}-1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) report|https://builds.apache.org/job/HBase%20Nightly/job/master/1458//JDK8_Nightly_Build_Report_(Hadoop2)/]
(x) {color:red}-1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) report|https://builds.apache.org/job/HBase%20Nightly/job/master/1458//JDK8_Nightly_Build_Report_(Hadoop3)/]
(x) {color:red}-1 source release artifact{color}
-- See build output for details.
(x) {color:red}-1 client integration test{color}
-- Something went wrong with this stage, [check relevant console output|https://builds.apache.org/job/HBase%20Nightly/job/master/1458//console].
> Remove compatibility case from truncate command
> -----------------------------------------------
>
> Key: HBASE-23046
> URL: https://issues.apache.org/jira/browse/HBASE-23046
> Project: HBase
> Issue Type: Bug
> Components: shell
> Affects Versions: 3.0.0, 2.3.0
> Reporter: Peter Somogyi
> Assignee: Peter Somogyi
> Priority: Minor
> Fix For: 3.0.0, 2.3.0
>
>
> The truncate and truncate_preserve commands in shell have a compatibility block to handle the case when Master does not have truncate command.
> This was added in HBASE-8332 for HBase 0.99 so it is safe to remove it now.
> The current compatibility block catches DoNotRetryIOException which can hide different kind of errors and just drops and recreates the table.
> {code:ruby}
> begin
> puts 'Truncating table...'
> @admin.truncateTable(table_name, false)
> rescue => e
> # Handle the compatibility case, where the truncate method doesn't exists on the Master
> raise e unless e.respond_to?(:cause) && !e.cause.nil?
> rootCause = e.cause
> if rootCause.is_a?(org.apache.hadoop.hbase.DoNotRetryIOException)
> # Handle the compatibility case, where the truncate method doesn't exists on the Master
> puts 'Dropping table...'
> @admin.deleteTable(table_name)
> puts 'Creating table...'
> @admin.createTable(table_description)
> else
> raise e
> end
> end
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)