[
https://issues.apache.org/jira/browse/HBASE-15411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15200017#comment-15200017
]
Ted Yu commented on HBASE-15411:
--------------------------------
I tried extracting common code between FullTableBackupProcedure and
IncrementalTableBackupProcedure into TableBackupProcedure:
{code}
public abstract class TableBackupProcedure
extends StateMachineProcedure<MasterProcedureEnv,
IncrementalTableBackupState>
implements TableProcedureInterface {
{code}
But I realized the above wouldn't work because FullTableBackupProcedure and
IncrementalTableBackupProcedure use different enums for their states:
{code}
public class FullTableBackupProcedure
extends StateMachineProcedure<MasterProcedureEnv, FullTableBackupState>
{code}
Since extending multiple base classes is not supported by Java, I don't see how
the common base class can be formed.
> Rewrite backup with Procedure V2
> --------------------------------
>
> Key: HBASE-15411
> URL: https://issues.apache.org/jira/browse/HBASE-15411
> Project: HBase
> Issue Type: Improvement
> Reporter: Ted Yu
> Assignee: Ted Yu
> Attachments: 15411-v1.txt, 15411-v11.txt, 15411-v12.txt,
> 15411-v13.txt, 15411-v14.txt, 15411-v3.txt, 15411-v5.txt, 15411-v6.txt,
> 15411-v7.txt, 15411-v9.txt, FullTableBackupProcedure.java
>
>
> Currently full / incremental backup is driven by BackupHandler (see call()
> method for flow).
> This issue is to rewrite the flow using Procedure V2.
> States (enum) for full / incremental backup would be introduced in
> Backup.proto which correspond to the steps performed in BackupHandler#call().
> executeFromState() would pace the backup based on the current state.
> serializeStateData() / deserializeStateData() would be used to persist state
> into procedure WAL.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)