[
https://issues.apache.org/jira/browse/HBASE-22760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16916915#comment-16916915
]
Viraj Jasani commented on HBASE-22760:
--------------------------------------
{quote}In all related places is it better to say autoclean instead of cleanup?
{quote}
With the previous comment provided by [~apurtell], cleanup itself is auto in
nature with our case, hence I believe not using auto should be better.
{quote}Why it is optional? If this PB message is written to zk, it must have
this boolean right? In that angle it should be required?
{quote}
Agree. Will change this.
{quote}Synchronous is optional in the PB request and so you should do
hasSynchronous?
{quote}
Agree, should be done.
{quote}We can have switchSnapshotCleanup method itself synchronized to have a
consistent prevState return value?
{quote}
Agree, will do it.
{quote}you can pass Synchronous param to HMaster#switchSnapshotCleanup() and
handle wait for completion of the chore cur run. So you can avoid exposing
SnapshotCleanerChore getSnapshotCleanerChore();
{quote}
Sure let me take a lock on snapshotCleanerChore in HMaster.
{quote}In shell command not using Synchronous param?
{quote}
Not yet, just tried to be consistent with other switches. I can see unit tests
using sync option(sure, it's good to have), but not sure if we ever use shell
command similar to: xyz_switch sync true / xyz_switch async true ? All switch
operation is async by nature. Would you recommend exposing sync param in shell?
One advantage of sync is that if the chore is already running, we wait for it
to complete and then make a switch.
Let me upload the updated patch. Please review if shell triggered sync is not
required.
> Stop/Resume Snapshot Auto-Cleanup activity with shell command
> -------------------------------------------------------------
>
> Key: HBASE-22760
> URL: https://issues.apache.org/jira/browse/HBASE-22760
> Project: HBase
> Issue Type: Improvement
> Components: Admin, shell, snapshots
> Affects Versions: 3.0.0, 1.5.0, 2.3.0, 2.2.1, 1.4.11
> Reporter: Viraj Jasani
> Assignee: Viraj Jasani
> Priority: Major
> Fix For: 3.0.0, 1.5.0, 2.3.0, 2.2.1, 1.4.11
>
> Attachments: HBASE-22760.master.003.patch,
> HBASE-22760.master.004.patch, HBASE-22760.master.005.patch,
> HBASE-22760.master.008.patch
>
>
> For any scheduled snapshot backup activity, we would like to disable
> auto-cleaner for snapshot based on TTL. However, as per HBASE-22648 we have a
> config to disable snapshot auto-cleaner:
> hbase.master.cleaner.snapshot.disable, which would take effect only upon
> HMaster restart just similar to any other hbase-site configs.
> For any running cluster, we should be able to stop/resume auto-cleanup
> activity for snapshot based on shell command. Something similar to below
> command should be able to stop/start cleanup chore:
> hbase(main):001:0> snapshot_auto_cleanup_switch false (disable
> auto-cleaner)
> hbase(main):001:0> snapshot_auto_cleanup_switch true (enable auto-cleaner)
--
This message was sent by Atlassian Jira
(v8.3.2#803003)