HBASE-21415 Snapshot requests can be done concurrently and the master will simply run them sequentially.

Co-authored-by: Josh Elser <elserj@apache.org>
Signed-off-by: Josh Elser <elserj@apache.org>
This commit is contained in:
Philippe Laflamme 2018-10-31 14:50:52 -04:00 committed by Josh Elser
parent dd99ea8d14
commit 2ae3b4883b
2 changed files with 24 additions and 21 deletions

View File

@ -1333,9 +1333,10 @@ public interface Admin extends Abortable, Closeable {
/** /**
* Take a snapshot for the given table. If the table is enabled, a FLUSH-type snapshot will be * Take a snapshot for the given table. If the table is enabled, a FLUSH-type snapshot will be
* taken. If the table is disabled, an offline snapshot is taken. Snapshots are considered unique * taken. If the table is disabled, an offline snapshot is taken. Snapshots are taken
* based on <b>the name of the snapshot</b>. Attempts to take a snapshot with the same name (even * sequentially even when requested concurrently, across all tables. Snapshots are considered
* a different type or with different parameters) will fail with a * unique based on <b>the name of the snapshot</b>. Attempts to take a snapshot with the same
* name (even a different type or with different parameters) will fail with a
* {@link org.apache.hadoop.hbase.snapshot.SnapshotCreationException} indicating the duplicate * {@link org.apache.hadoop.hbase.snapshot.SnapshotCreationException} indicating the duplicate
* naming. Snapshot names follow the same naming constraints as tables in HBase. See * naming. Snapshot names follow the same naming constraints as tables in HBase. See
* {@link org.apache.hadoop.hbase.TableName#isLegalFullyQualifiedTableName(byte[])}. * {@link org.apache.hadoop.hbase.TableName#isLegalFullyQualifiedTableName(byte[])}.
@ -1352,7 +1353,8 @@ public interface Admin extends Abortable, Closeable {
/** /**
* Create typed snapshot of the table. Snapshots are considered unique based on <b>the name of the * Create typed snapshot of the table. Snapshots are considered unique based on <b>the name of the
* snapshot</b>. Attempts to take a snapshot with the same name (even a different type or with * snapshot</b>. Snapshots are taken sequentially even when requested concurrently, across
* all tables. Attempts to take a snapshot with the same name (even a different type or with
* different parameters) will fail with a {@link SnapshotCreationException} indicating the * different parameters) will fail with a {@link SnapshotCreationException} indicating the
* duplicate naming. Snapshot names follow the same naming constraints as tables in HBase. See * duplicate naming. Snapshot names follow the same naming constraints as tables in HBase. See
* {@link org.apache.hadoop.hbase.TableName#isLegalFullyQualifiedTableName(byte[])}. * {@link org.apache.hadoop.hbase.TableName#isLegalFullyQualifiedTableName(byte[])}.
@ -1370,13 +1372,12 @@ public interface Admin extends Abortable, Closeable {
} }
/** /**
* Take a snapshot and wait for the server to complete that snapshot (blocking). Only a single * Take a snapshot and wait for the server to complete that snapshot (blocking). Snapshots are
* snapshot should be taken at a time for an instance of HBase, or results may be undefined (you * considered unique based on <b>the name of the snapshot</b>. Snapshots are taken sequentially
* can tell multiple HBase clusters to snapshot at the same time, but only one at a time for a * even when requested concurrently, across all tables. Attempts to take a snapshot with the same
* single cluster). Snapshots are considered unique based on <b>the name of the snapshot</b>. * name (even a different type or with different parameters) will fail with a
* Attempts to take a snapshot with the same name (even a different type or with different * {@link SnapshotCreationException} indicating the duplicate naming. Snapshot names follow the
* parameters) will fail with a {@link SnapshotCreationException} indicating the duplicate naming. * same naming constraints as tables in HBase. See
* Snapshot names follow the same naming constraints as tables in HBase. See
* {@link org.apache.hadoop.hbase.TableName#isLegalFullyQualifiedTableName(byte[])}. You should * {@link org.apache.hadoop.hbase.TableName#isLegalFullyQualifiedTableName(byte[])}. You should
* probably use {@link #snapshot(String, org.apache.hadoop.hbase.TableName)} unless you are sure * probably use {@link #snapshot(String, org.apache.hadoop.hbase.TableName)} unless you are sure
* about the type of snapshot that you want to take. * about the type of snapshot that you want to take.
@ -1389,8 +1390,9 @@ public interface Admin extends Abortable, Closeable {
throws IOException, SnapshotCreationException, IllegalArgumentException; throws IOException, SnapshotCreationException, IllegalArgumentException;
/** /**
* Take a snapshot without waiting for the server to complete that snapshot (asynchronous) Only a * Take a snapshot without waiting for the server to complete that snapshot (asynchronous).
* single snapshot should be taken at a time, or results may be undefined. * Snapshots are considered unique based on <b>the name of the snapshot</b>. Snapshots are taken
* sequentially even when requested concurrently, across all tables.
* *
* @param snapshot snapshot to take * @param snapshot snapshot to take
* @throws IOException if the snapshot did not succeed or we lose contact with the master. * @throws IOException if the snapshot did not succeed or we lose contact with the master.

View File

@ -746,9 +746,10 @@ public interface AsyncAdmin {
/** /**
* Take a snapshot for the given table. If the table is enabled, a FLUSH-type snapshot will be * Take a snapshot for the given table. If the table is enabled, a FLUSH-type snapshot will be
* taken. If the table is disabled, an offline snapshot is taken. Snapshots are considered unique * taken. If the table is disabled, an offline snapshot is taken. Snapshots are taken
* based on <b>the name of the snapshot</b>. Attempts to take a snapshot with the same name (even * sequentially even when requested concurrently, across all tables. Snapshots are considered
* a different type or with different parameters) will fail with a * unique based on <b>the name of the snapshot</b>. Attempts to take a snapshot with the same
* name (even a different type or with different parameters) will fail with a
* {@link org.apache.hadoop.hbase.snapshot.SnapshotCreationException} indicating the duplicate * {@link org.apache.hadoop.hbase.snapshot.SnapshotCreationException} indicating the duplicate
* naming. Snapshot names follow the same naming constraints as tables in HBase. See * naming. Snapshot names follow the same naming constraints as tables in HBase. See
* {@link org.apache.hadoop.hbase.TableName#isLegalFullyQualifiedTableName(byte[])}. * {@link org.apache.hadoop.hbase.TableName#isLegalFullyQualifiedTableName(byte[])}.
@ -761,7 +762,8 @@ public interface AsyncAdmin {
/** /**
* Create typed snapshot of the table. Snapshots are considered unique based on <b>the name of the * Create typed snapshot of the table. Snapshots are considered unique based on <b>the name of the
* snapshot</b>. Attempts to take a snapshot with the same name (even a different type or with * snapshot</b>. Snapshots are taken sequentially even when requested concurrently, across all
* tables. Attempts to take a snapshot with the same name (even a different type or with
* different parameters) will fail with a * different parameters) will fail with a
* {@link org.apache.hadoop.hbase.snapshot.SnapshotCreationException} indicating the duplicate * {@link org.apache.hadoop.hbase.snapshot.SnapshotCreationException} indicating the duplicate
* naming. Snapshot names follow the same naming constraints as tables in HBase. See * naming. Snapshot names follow the same naming constraints as tables in HBase. See
@ -777,10 +779,9 @@ public interface AsyncAdmin {
} }
/** /**
* Take a snapshot and wait for the server to complete that snapshot asynchronously. Only a single * Take a snapshot and wait for the server to complete that snapshot asynchronously. Snapshots
* snapshot should be taken at a time for an instance of HBase, or results may be undefined (you * are taken sequentially even when requested concurrently, across all tables. Snapshots are
* can tell multiple HBase clusters to snapshot at the same time, but only one at a time for a * considered unique based on <b>the name of the snapshot</b>.
* single cluster). Snapshots are considered unique based on <b>the name of the snapshot</b>.
* Attempts to take a snapshot with the same name (even a different type or with different * Attempts to take a snapshot with the same name (even a different type or with different
* parameters) will fail with a {@link org.apache.hadoop.hbase.snapshot.SnapshotCreationException} * parameters) will fail with a {@link org.apache.hadoop.hbase.snapshot.SnapshotCreationException}
* indicating the duplicate naming. Snapshot names follow the same naming constraints as tables in * indicating the duplicate naming. Snapshot names follow the same naming constraints as tables in