http://git-wip-us.apache.org/repos/asf/hbase-site/blob/37cf49a6/apidocs/src-html/org/apache/hadoop/hbase/client/Admin.html ---------------------------------------------------------------------- diff --git a/apidocs/src-html/org/apache/hadoop/hbase/client/Admin.html b/apidocs/src-html/org/apache/hadoop/hbase/client/Admin.html index dd498f4..d854518 100644 --- a/apidocs/src-html/org/apache/hadoop/hbase/client/Admin.html +++ b/apidocs/src-html/org/apache/hadoop/hbase/client/Admin.html @@ -1745,1060 +1745,1066 @@ <span class="sourceLineNo">1737</span><a name="line.1737"></a> <span class="sourceLineNo">1738</span> /**<a name="line.1738"></a> <span class="sourceLineNo">1739</span> * Abort a procedure.<a name="line.1739"></a> -<span class="sourceLineNo">1740</span> * @param procId ID of the procedure to abort<a name="line.1740"></a> -<span class="sourceLineNo">1741</span> * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted?<a name="line.1741"></a> -<span class="sourceLineNo">1742</span> * @return <code>true</code> if aborted, <code>false</code> if procedure already completed or does not exist<a name="line.1742"></a> -<span class="sourceLineNo">1743</span> * @throws IOException<a name="line.1743"></a> -<span class="sourceLineNo">1744</span> */<a name="line.1744"></a> -<span class="sourceLineNo">1745</span> boolean abortProcedure(<a name="line.1745"></a> -<span class="sourceLineNo">1746</span> long procId,<a name="line.1746"></a> -<span class="sourceLineNo">1747</span> boolean mayInterruptIfRunning) throws IOException;<a name="line.1747"></a> -<span class="sourceLineNo">1748</span><a name="line.1748"></a> -<span class="sourceLineNo">1749</span> /**<a name="line.1749"></a> -<span class="sourceLineNo">1750</span> * Abort a procedure but does not block and wait for completion.<a name="line.1750"></a> -<span class="sourceLineNo">1751</span> * You can use Future.get(long, TimeUnit) to wait on the operation to complete.<a name="line.1751"></a> -<span class="sourceLineNo">1752</span> * It may throw ExecutionException if there was an error while executing the operation<a name="line.1752"></a> -<span class="sourceLineNo">1753</span> * or TimeoutException in case the wait timeout was not long enough to allow the<a name="line.1753"></a> -<span class="sourceLineNo">1754</span> * operation to complete.<a name="line.1754"></a> -<span class="sourceLineNo">1755</span> *<a name="line.1755"></a> -<span class="sourceLineNo">1756</span> * @param procId ID of the procedure to abort<a name="line.1756"></a> -<span class="sourceLineNo">1757</span> * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted?<a name="line.1757"></a> -<span class="sourceLineNo">1758</span> * @return <code>true</code> if aborted, <code>false</code> if procedure already completed or does not exist<a name="line.1758"></a> -<span class="sourceLineNo">1759</span> * @throws IOException<a name="line.1759"></a> -<span class="sourceLineNo">1760</span> */<a name="line.1760"></a> -<span class="sourceLineNo">1761</span> Future<Boolean> abortProcedureAsync(<a name="line.1761"></a> -<span class="sourceLineNo">1762</span> long procId,<a name="line.1762"></a> -<span class="sourceLineNo">1763</span> boolean mayInterruptIfRunning) throws IOException;<a name="line.1763"></a> -<span class="sourceLineNo">1764</span><a name="line.1764"></a> -<span class="sourceLineNo">1765</span> /**<a name="line.1765"></a> -<span class="sourceLineNo">1766</span> * Get procedures.<a name="line.1766"></a> -<span class="sourceLineNo">1767</span> * @return procedure list in JSON<a name="line.1767"></a> -<span class="sourceLineNo">1768</span> * @throws IOException<a name="line.1768"></a> -<span class="sourceLineNo">1769</span> */<a name="line.1769"></a> -<span class="sourceLineNo">1770</span> String getProcedures() throws IOException;<a name="line.1770"></a> -<span class="sourceLineNo">1771</span><a name="line.1771"></a> -<span class="sourceLineNo">1772</span> /**<a name="line.1772"></a> -<span class="sourceLineNo">1773</span> * Get locks.<a name="line.1773"></a> -<span class="sourceLineNo">1774</span> * @return lock list in JSON<a name="line.1774"></a> -<span class="sourceLineNo">1775</span> * @throws IOException if a remote or network exception occurs<a name="line.1775"></a> -<span class="sourceLineNo">1776</span> */<a name="line.1776"></a> -<span class="sourceLineNo">1777</span> String getLocks() throws IOException;<a name="line.1777"></a> -<span class="sourceLineNo">1778</span><a name="line.1778"></a> -<span class="sourceLineNo">1779</span> /**<a name="line.1779"></a> -<span class="sourceLineNo">1780</span> * Roll the log writer. I.e. for filesystem based write ahead logs, start writing to a new file.<a name="line.1780"></a> -<span class="sourceLineNo">1781</span> *<a name="line.1781"></a> -<span class="sourceLineNo">1782</span> * Note that the actual rolling of the log writer is asynchronous and may not be complete when<a name="line.1782"></a> -<span class="sourceLineNo">1783</span> * this method returns. As a side effect of this call, the named region server may schedule<a name="line.1783"></a> -<span class="sourceLineNo">1784</span> * store flushes at the request of the wal.<a name="line.1784"></a> -<span class="sourceLineNo">1785</span> *<a name="line.1785"></a> -<span class="sourceLineNo">1786</span> * @param serverName The servername of the regionserver.<a name="line.1786"></a> -<span class="sourceLineNo">1787</span> * @throws IOException if a remote or network exception occurs<a name="line.1787"></a> -<span class="sourceLineNo">1788</span> * @throws org.apache.hadoop.hbase.regionserver.wal.FailedLogCloseException<a name="line.1788"></a> -<span class="sourceLineNo">1789</span> */<a name="line.1789"></a> -<span class="sourceLineNo">1790</span> void rollWALWriter(ServerName serverName) throws IOException, FailedLogCloseException;<a name="line.1790"></a> -<span class="sourceLineNo">1791</span><a name="line.1791"></a> -<span class="sourceLineNo">1792</span> /**<a name="line.1792"></a> -<span class="sourceLineNo">1793</span> * Helper that delegates to getClusterMetrics().getMasterCoprocessorNames().<a name="line.1793"></a> -<span class="sourceLineNo">1794</span> * @return an array of master coprocessors<a name="line.1794"></a> -<span class="sourceLineNo">1795</span> * @see org.apache.hadoop.hbase.ClusterMetrics#getMasterCoprocessorNames()<a name="line.1795"></a> -<span class="sourceLineNo">1796</span> * @deprecated since 2.0 version and will be removed in 3.0 version.<a name="line.1796"></a> -<span class="sourceLineNo">1797</span> * use {@link #getMasterCoprocessorNames()}<a name="line.1797"></a> -<span class="sourceLineNo">1798</span> */<a name="line.1798"></a> -<span class="sourceLineNo">1799</span> @Deprecated<a name="line.1799"></a> -<span class="sourceLineNo">1800</span> default String[] getMasterCoprocessors() throws IOException {<a name="line.1800"></a> -<span class="sourceLineNo">1801</span> return getMasterCoprocessorNames().stream().toArray(size -> new String[size]);<a name="line.1801"></a> -<span class="sourceLineNo">1802</span> }<a name="line.1802"></a> -<span class="sourceLineNo">1803</span><a name="line.1803"></a> -<span class="sourceLineNo">1804</span> /**<a name="line.1804"></a> -<span class="sourceLineNo">1805</span> * Helper that delegates to getClusterMetrics().getMasterCoprocessorNames().<a name="line.1805"></a> -<span class="sourceLineNo">1806</span> * @return an array of master coprocessors<a name="line.1806"></a> -<span class="sourceLineNo">1807</span> * @see org.apache.hadoop.hbase.ClusterMetrics#getMasterCoprocessorNames()<a name="line.1807"></a> -<span class="sourceLineNo">1808</span> */<a name="line.1808"></a> -<span class="sourceLineNo">1809</span> default List<String> getMasterCoprocessorNames() throws IOException {<a name="line.1809"></a> -<span class="sourceLineNo">1810</span> return getClusterMetrics(EnumSet.of(Option.MASTER_COPROCESSORS))<a name="line.1810"></a> -<span class="sourceLineNo">1811</span> .getMasterCoprocessorNames();<a name="line.1811"></a> -<span class="sourceLineNo">1812</span> }<a name="line.1812"></a> -<span class="sourceLineNo">1813</span><a name="line.1813"></a> -<span class="sourceLineNo">1814</span> /**<a name="line.1814"></a> -<span class="sourceLineNo">1815</span> * Get the current compaction state of a table. It could be in a major compaction, a minor<a name="line.1815"></a> -<span class="sourceLineNo">1816</span> * compaction, both, or none.<a name="line.1816"></a> -<span class="sourceLineNo">1817</span> *<a name="line.1817"></a> -<span class="sourceLineNo">1818</span> * @param tableName table to examine<a name="line.1818"></a> -<span class="sourceLineNo">1819</span> * @return the current compaction state<a name="line.1819"></a> -<span class="sourceLineNo">1820</span> * @throws IOException if a remote or network exception occurs<a name="line.1820"></a> -<span class="sourceLineNo">1821</span> */<a name="line.1821"></a> -<span class="sourceLineNo">1822</span> CompactionState getCompactionState(TableName tableName) throws IOException;<a name="line.1822"></a> -<span class="sourceLineNo">1823</span><a name="line.1823"></a> -<span class="sourceLineNo">1824</span> /**<a name="line.1824"></a> -<span class="sourceLineNo">1825</span> * Get the current compaction state of a table. It could be in a compaction, or none.<a name="line.1825"></a> -<span class="sourceLineNo">1826</span> *<a name="line.1826"></a> -<span class="sourceLineNo">1827</span> * @param tableName table to examine<a name="line.1827"></a> -<span class="sourceLineNo">1828</span> * @param compactType {@link org.apache.hadoop.hbase.client.CompactType}<a name="line.1828"></a> -<span class="sourceLineNo">1829</span> * @return the current compaction state<a name="line.1829"></a> -<span class="sourceLineNo">1830</span> * @throws IOException if a remote or network exception occurs<a name="line.1830"></a> -<span class="sourceLineNo">1831</span> */<a name="line.1831"></a> -<span class="sourceLineNo">1832</span> CompactionState getCompactionState(TableName tableName,<a name="line.1832"></a> -<span class="sourceLineNo">1833</span> CompactType compactType) throws IOException;<a name="line.1833"></a> -<span class="sourceLineNo">1834</span><a name="line.1834"></a> -<span class="sourceLineNo">1835</span> /**<a name="line.1835"></a> -<span class="sourceLineNo">1836</span> * Get the current compaction state of region. It could be in a major compaction, a minor<a name="line.1836"></a> -<span class="sourceLineNo">1837</span> * compaction, both, or none.<a name="line.1837"></a> -<span class="sourceLineNo">1838</span> *<a name="line.1838"></a> -<span class="sourceLineNo">1839</span> * @param regionName region to examine<a name="line.1839"></a> -<span class="sourceLineNo">1840</span> * @return the current compaction state<a name="line.1840"></a> -<span class="sourceLineNo">1841</span> * @throws IOException if a remote or network exception occurs<a name="line.1841"></a> -<span class="sourceLineNo">1842</span> */<a name="line.1842"></a> -<span class="sourceLineNo">1843</span> CompactionState getCompactionStateForRegion(byte[] regionName) throws IOException;<a name="line.1843"></a> -<span class="sourceLineNo">1844</span><a name="line.1844"></a> -<span class="sourceLineNo">1845</span> /**<a name="line.1845"></a> -<span class="sourceLineNo">1846</span> * Get the timestamp of the last major compaction for the passed table<a name="line.1846"></a> -<span class="sourceLineNo">1847</span> *<a name="line.1847"></a> -<span class="sourceLineNo">1848</span> * The timestamp of the oldest HFile resulting from a major compaction of that table,<a name="line.1848"></a> -<span class="sourceLineNo">1849</span> * or 0 if no such HFile could be found.<a name="line.1849"></a> -<span class="sourceLineNo">1850</span> *<a name="line.1850"></a> -<span class="sourceLineNo">1851</span> * @param tableName table to examine<a name="line.1851"></a> -<span class="sourceLineNo">1852</span> * @return the last major compaction timestamp or 0<a name="line.1852"></a> -<span class="sourceLineNo">1853</span> * @throws IOException if a remote or network exception occurs<a name="line.1853"></a> -<span class="sourceLineNo">1854</span> */<a name="line.1854"></a> -<span class="sourceLineNo">1855</span> long getLastMajorCompactionTimestamp(TableName tableName) throws IOException;<a name="line.1855"></a> -<span class="sourceLineNo">1856</span><a name="line.1856"></a> -<span class="sourceLineNo">1857</span> /**<a name="line.1857"></a> -<span class="sourceLineNo">1858</span> * Get the timestamp of the last major compaction for the passed region.<a name="line.1858"></a> -<span class="sourceLineNo">1859</span> *<a name="line.1859"></a> -<span class="sourceLineNo">1860</span> * The timestamp of the oldest HFile resulting from a major compaction of that region,<a name="line.1860"></a> -<span class="sourceLineNo">1861</span> * or 0 if no such HFile could be found.<a name="line.1861"></a> -<span class="sourceLineNo">1862</span> *<a name="line.1862"></a> -<span class="sourceLineNo">1863</span> * @param regionName region to examine<a name="line.1863"></a> -<span class="sourceLineNo">1864</span> * @return the last major compaction timestamp or 0<a name="line.1864"></a> -<span class="sourceLineNo">1865</span> * @throws IOException if a remote or network exception occurs<a name="line.1865"></a> -<span class="sourceLineNo">1866</span> */<a name="line.1866"></a> -<span class="sourceLineNo">1867</span> long getLastMajorCompactionTimestampForRegion(byte[] regionName) throws IOException;<a name="line.1867"></a> -<span class="sourceLineNo">1868</span><a name="line.1868"></a> -<span class="sourceLineNo">1869</span> /**<a name="line.1869"></a> -<span class="sourceLineNo">1870</span> * Take a snapshot for the given table. If the table is enabled, a FLUSH-type snapshot will be<a name="line.1870"></a> -<span class="sourceLineNo">1871</span> * taken. If the table is disabled, an offline snapshot is taken. Snapshots are considered unique<a name="line.1871"></a> -<span class="sourceLineNo">1872</span> * based on <b>the name of the snapshot</b>. Attempts to take a snapshot with the same name (even<a name="line.1872"></a> -<span class="sourceLineNo">1873</span> * a different type or with different parameters) will fail with a {@link<a name="line.1873"></a> -<span class="sourceLineNo">1874</span> * org.apache.hadoop.hbase.snapshot.SnapshotCreationException} indicating the duplicate naming.<a name="line.1874"></a> -<span class="sourceLineNo">1875</span> * Snapshot names follow the same naming constraints as tables in HBase. See {@link<a name="line.1875"></a> -<span class="sourceLineNo">1876</span> * org.apache.hadoop.hbase.TableName#isLegalFullyQualifiedTableName(byte[])}.<a name="line.1876"></a> -<span class="sourceLineNo">1877</span> *<a name="line.1877"></a> -<span class="sourceLineNo">1878</span> * @param snapshotName name of the snapshot to be created<a name="line.1878"></a> -<span class="sourceLineNo">1879</span> * @param tableName name of the table for which snapshot is created<a name="line.1879"></a> -<span class="sourceLineNo">1880</span> * @throws IOException if a remote or network exception occurs<a name="line.1880"></a> -<span class="sourceLineNo">1881</span> * @throws org.apache.hadoop.hbase.snapshot.SnapshotCreationException if snapshot creation failed<a name="line.1881"></a> -<span class="sourceLineNo">1882</span> * @throws IllegalArgumentException if the snapshot request is formatted incorrectly<a name="line.1882"></a> -<span class="sourceLineNo">1883</span> */<a name="line.1883"></a> -<span class="sourceLineNo">1884</span> void snapshot(String snapshotName, TableName tableName)<a name="line.1884"></a> -<span class="sourceLineNo">1885</span> throws IOException, SnapshotCreationException, IllegalArgumentException;<a name="line.1885"></a> -<span class="sourceLineNo">1886</span><a name="line.1886"></a> -<span class="sourceLineNo">1887</span> /**<a name="line.1887"></a> -<span class="sourceLineNo">1888</span> * Create a timestamp consistent snapshot for the given table. Snapshots are considered unique<a name="line.1888"></a> -<span class="sourceLineNo">1889</span> * based on <b>the name of the snapshot</b>. Attempts to take a snapshot with the same name (even<a name="line.1889"></a> -<span class="sourceLineNo">1890</span> * different type or with different parameters) will fail with a {@link SnapshotCreationException}<a name="line.1890"></a> -<span class="sourceLineNo">1891</span> * indicating the duplicate naming. Snapshot names follow the same naming constraints as tables in<a name="line.1891"></a> -<span class="sourceLineNo">1892</span> * HBase.<a name="line.1892"></a> -<span class="sourceLineNo">1893</span> *<a name="line.1893"></a> -<span class="sourceLineNo">1894</span> * @param snapshotName name of the snapshot to be created<a name="line.1894"></a> -<span class="sourceLineNo">1895</span> * @param tableName name of the table for which snapshot is created<a name="line.1895"></a> -<span class="sourceLineNo">1896</span> * @throws IOException if a remote or network exception occurs<a name="line.1896"></a> -<span class="sourceLineNo">1897</span> * @throws SnapshotCreationException if snapshot creation failed<a name="line.1897"></a> -<span class="sourceLineNo">1898</span> * @throws IllegalArgumentException if the snapshot request is formatted incorrectly<a name="line.1898"></a> -<span class="sourceLineNo">1899</span> */<a name="line.1899"></a> -<span class="sourceLineNo">1900</span> void snapshot(byte[] snapshotName, TableName tableName)<a name="line.1900"></a> -<span class="sourceLineNo">1901</span> throws IOException, SnapshotCreationException, IllegalArgumentException;<a name="line.1901"></a> -<span class="sourceLineNo">1902</span><a name="line.1902"></a> -<span class="sourceLineNo">1903</span> /**<a name="line.1903"></a> -<span class="sourceLineNo">1904</span> * Create typed snapshot of the table. Snapshots are considered unique based on <b>the name of the<a name="line.1904"></a> -<span class="sourceLineNo">1905</span> * snapshot</b>. Attempts to take a snapshot with the same name (even a different type or with<a name="line.1905"></a> -<span class="sourceLineNo">1906</span> * different parameters) will fail with a {@link SnapshotCreationException} indicating the<a name="line.1906"></a> -<span class="sourceLineNo">1907</span> * duplicate naming. Snapshot names follow the same naming constraints as tables in HBase. See<a name="line.1907"></a> -<span class="sourceLineNo">1908</span> * {@link org.apache.hadoop.hbase.TableName#isLegalFullyQualifiedTableName(byte[])}.<a name="line.1908"></a> -<span class="sourceLineNo">1909</span> *<a name="line.1909"></a> -<span class="sourceLineNo">1910</span> * @param snapshotName name to give the snapshot on the filesystem. Must be unique from all other<a name="line.1910"></a> -<span class="sourceLineNo">1911</span> * snapshots stored on the cluster<a name="line.1911"></a> -<span class="sourceLineNo">1912</span> * @param tableName name of the table to snapshot<a name="line.1912"></a> -<span class="sourceLineNo">1913</span> * @param type type of snapshot to take<a name="line.1913"></a> -<span class="sourceLineNo">1914</span> * @throws IOException we fail to reach the master<a name="line.1914"></a> -<span class="sourceLineNo">1915</span> * @throws SnapshotCreationException if snapshot creation failed<a name="line.1915"></a> -<span class="sourceLineNo">1916</span> * @throws IllegalArgumentException if the snapshot request is formatted incorrectly<a name="line.1916"></a> -<span class="sourceLineNo">1917</span> */<a name="line.1917"></a> -<span class="sourceLineNo">1918</span> void snapshot(String snapshotName,<a name="line.1918"></a> -<span class="sourceLineNo">1919</span> TableName tableName,<a name="line.1919"></a> -<span class="sourceLineNo">1920</span> SnapshotType type) throws IOException, SnapshotCreationException,<a name="line.1920"></a> -<span class="sourceLineNo">1921</span> IllegalArgumentException;<a name="line.1921"></a> -<span class="sourceLineNo">1922</span><a name="line.1922"></a> -<span class="sourceLineNo">1923</span> /**<a name="line.1923"></a> -<span class="sourceLineNo">1924</span> * Take a snapshot and wait for the server to complete that snapshot (blocking). Only a single<a name="line.1924"></a> -<span class="sourceLineNo">1925</span> * snapshot should be taken at a time for an instance of HBase, or results may be undefined (you<a name="line.1925"></a> -<span class="sourceLineNo">1926</span> * can tell multiple HBase clusters to snapshot at the same time, but only one at a time for a<a name="line.1926"></a> -<span class="sourceLineNo">1927</span> * single cluster). Snapshots are considered unique based on <b>the name of the snapshot</b>.<a name="line.1927"></a> -<span class="sourceLineNo">1928</span> * Attempts to take a snapshot with the same name (even a different type or with different<a name="line.1928"></a> -<span class="sourceLineNo">1929</span> * parameters) will fail with a {@link SnapshotCreationException} indicating the duplicate naming.<a name="line.1929"></a> -<span class="sourceLineNo">1930</span> * Snapshot names follow the same naming constraints as tables in HBase. See {@link<a name="line.1930"></a> -<span class="sourceLineNo">1931</span> * org.apache.hadoop.hbase.TableName#isLegalFullyQualifiedTableName(byte[])}. You should probably<a name="line.1931"></a> -<span class="sourceLineNo">1932</span> * use {@link #snapshot(String, org.apache.hadoop.hbase.TableName)} or<a name="line.1932"></a> -<span class="sourceLineNo">1933</span> * {@link #snapshot(byte[], org.apache.hadoop.hbase.TableName)} unless you are sure about the type<a name="line.1933"></a> -<span class="sourceLineNo">1934</span> * of snapshot that you want to take.<a name="line.1934"></a> -<span class="sourceLineNo">1935</span> *<a name="line.1935"></a> -<span class="sourceLineNo">1936</span> * @param snapshot snapshot to take<a name="line.1936"></a> -<span class="sourceLineNo">1937</span> * @throws IOException or we lose contact with the master.<a name="line.1937"></a> -<span class="sourceLineNo">1938</span> * @throws SnapshotCreationException if snapshot failed to be taken<a name="line.1938"></a> -<span class="sourceLineNo">1939</span> * @throws IllegalArgumentException if the snapshot request is formatted incorrectly<a name="line.1939"></a> -<span class="sourceLineNo">1940</span> */<a name="line.1940"></a> -<span class="sourceLineNo">1941</span> void snapshot(SnapshotDescription snapshot)<a name="line.1941"></a> -<span class="sourceLineNo">1942</span> throws IOException, SnapshotCreationException, IllegalArgumentException;<a name="line.1942"></a> -<span class="sourceLineNo">1943</span><a name="line.1943"></a> -<span class="sourceLineNo">1944</span> /**<a name="line.1944"></a> -<span class="sourceLineNo">1945</span> * Take a snapshot without waiting for the server to complete that snapshot (asynchronous) Only a<a name="line.1945"></a> -<span class="sourceLineNo">1946</span> * single snapshot should be taken at a time, or results may be undefined.<a name="line.1946"></a> -<span class="sourceLineNo">1947</span> *<a name="line.1947"></a> -<span class="sourceLineNo">1948</span> * @param snapshot snapshot to take<a name="line.1948"></a> -<span class="sourceLineNo">1949</span> * @throws IOException if the snapshot did not succeed or we lose contact with the master.<a name="line.1949"></a> -<span class="sourceLineNo">1950</span> * @throws SnapshotCreationException if snapshot creation failed<a name="line.1950"></a> -<span class="sourceLineNo">1951</span> * @throws IllegalArgumentException if the snapshot request is formatted incorrectly<a name="line.1951"></a> -<span class="sourceLineNo">1952</span> * @deprecated Since 2.0.0. Will be removed in 3.0.0. Use<a name="line.1952"></a> -<span class="sourceLineNo">1953</span> * {@link #snapshotAsync(SnapshotDescription)} instead.<a name="line.1953"></a> -<span class="sourceLineNo">1954</span> */<a name="line.1954"></a> -<span class="sourceLineNo">1955</span> @Deprecated<a name="line.1955"></a> -<span class="sourceLineNo">1956</span> default void takeSnapshotAsync(SnapshotDescription snapshot)<a name="line.1956"></a> -<span class="sourceLineNo">1957</span> throws IOException, SnapshotCreationException {<a name="line.1957"></a> -<span class="sourceLineNo">1958</span> snapshotAsync(snapshot);<a name="line.1958"></a> -<span class="sourceLineNo">1959</span> }<a name="line.1959"></a> -<span class="sourceLineNo">1960</span><a name="line.1960"></a> -<span class="sourceLineNo">1961</span> /**<a name="line.1961"></a> -<span class="sourceLineNo">1962</span> * Take a snapshot without waiting for the server to complete that snapshot (asynchronous) Only a<a name="line.1962"></a> -<span class="sourceLineNo">1963</span> * single snapshot should be taken at a time, or results may be undefined.<a name="line.1963"></a> -<span class="sourceLineNo">1964</span> *<a name="line.1964"></a> -<span class="sourceLineNo">1965</span> * @param snapshot snapshot to take<a name="line.1965"></a> -<span class="sourceLineNo">1966</span> * @throws IOException if the snapshot did not succeed or we lose contact with the master.<a name="line.1966"></a> -<span class="sourceLineNo">1967</span> * @throws SnapshotCreationException if snapshot creation failed<a name="line.1967"></a> -<span class="sourceLineNo">1968</span> * @throws IllegalArgumentException if the snapshot request is formatted incorrectly<a name="line.1968"></a> -<span class="sourceLineNo">1969</span> */<a name="line.1969"></a> -<span class="sourceLineNo">1970</span> void snapshotAsync(SnapshotDescription snapshot) throws IOException, SnapshotCreationException;<a name="line.1970"></a> -<span class="sourceLineNo">1971</span><a name="line.1971"></a> -<span class="sourceLineNo">1972</span> /**<a name="line.1972"></a> -<span class="sourceLineNo">1973</span> * Check the current state of the passed snapshot. There are three possible states: <ol><a name="line.1973"></a> -<span class="sourceLineNo">1974</span> * <li>running - returns <tt>false</tt></li> <li>finished - returns <tt>true</tt></li><a name="line.1974"></a> -<span class="sourceLineNo">1975</span> * <li>finished with error - throws the exception that caused the snapshot to fail</li> </ol> The<a name="line.1975"></a> -<span class="sourceLineNo">1976</span> * cluster only knows about the most recent snapshot. Therefore, if another snapshot has been<a name="line.1976"></a> -<span class="sourceLineNo">1977</span> * run/started since the snapshot you are checking, you will receive an {@link<a name="line.1977"></a> -<span class="sourceLineNo">1978</span> * org.apache.hadoop.hbase.snapshot.UnknownSnapshotException}.<a name="line.1978"></a> -<span class="sourceLineNo">1979</span> *<a name="line.1979"></a> -<span class="sourceLineNo">1980</span> * @param snapshot description of the snapshot to check<a name="line.1980"></a> -<span class="sourceLineNo">1981</span> * @return <tt>true</tt> if the snapshot is completed, <tt>false</tt> if the snapshot is still<a name="line.1981"></a> -<span class="sourceLineNo">1982</span> * running<a name="line.1982"></a> -<span class="sourceLineNo">1983</span> * @throws IOException if we have a network issue<a name="line.1983"></a> -<span class="sourceLineNo">1984</span> * @throws org.apache.hadoop.hbase.snapshot.HBaseSnapshotException if the snapshot failed<a name="line.1984"></a> -<span class="sourceLineNo">1985</span> * @throws org.apache.hadoop.hbase.snapshot.UnknownSnapshotException if the requested snapshot is<a name="line.1985"></a> -<span class="sourceLineNo">1986</span> * unknown<a name="line.1986"></a> -<span class="sourceLineNo">1987</span> */<a name="line.1987"></a> -<span class="sourceLineNo">1988</span> boolean isSnapshotFinished(SnapshotDescription snapshot)<a name="line.1988"></a> -<span class="sourceLineNo">1989</span> throws IOException, HBaseSnapshotException, UnknownSnapshotException;<a name="line.1989"></a> -<span class="sourceLineNo">1990</span><a name="line.1990"></a> -<span class="sourceLineNo">1991</span> /**<a name="line.1991"></a> -<span class="sourceLineNo">1992</span> * Restore the specified snapshot on the original table. (The table must be disabled) If the<a name="line.1992"></a> -<span class="sourceLineNo">1993</span> * "hbase.snapshot.restore.take.failsafe.snapshot" configuration property is set to <code>true</code>, a<a name="line.1993"></a> -<span class="sourceLineNo">1994</span> * snapshot of the current table is taken before executing the restore operation. In case of<a name="line.1994"></a> -<span class="sourceLineNo">1995</span> * restore failure, the failsafe snapshot will be restored. If the restore completes without<a name="line.1995"></a> -<span class="sourceLineNo">1996</span> * problem the failsafe snapshot is deleted.<a name="line.1996"></a> -<span class="sourceLineNo">1997</span> *<a name="line.1997"></a> -<span class="sourceLineNo">1998</span> * @param snapshotName name of the snapshot to restore<a name="line.1998"></a> -<span class="sourceLineNo">1999</span> * @throws IOException if a remote or network exception occurs<a name="line.1999"></a> -<span class="sourceLineNo">2000</span> * @throws org.apache.hadoop.hbase.snapshot.RestoreSnapshotException if snapshot failed to be<a name="line.2000"></a> -<span class="sourceLineNo">2001</span> * restored<a name="line.2001"></a> -<span class="sourceLineNo">2002</span> * @throws IllegalArgumentException if the restore request is formatted incorrectly<a name="line.2002"></a> -<span class="sourceLineNo">2003</span> */<a name="line.2003"></a> -<span class="sourceLineNo">2004</span> void restoreSnapshot(byte[] snapshotName) throws IOException, RestoreSnapshotException;<a name="line.2004"></a> -<span class="sourceLineNo">2005</span><a name="line.2005"></a> -<span class="sourceLineNo">2006</span> /**<a name="line.2006"></a> -<span class="sourceLineNo">2007</span> * Restore the specified snapshot on the original table. (The table must be disabled) If the<a name="line.2007"></a> -<span class="sourceLineNo">2008</span> * "hbase.snapshot.restore.take.failsafe.snapshot" configuration property is set to <code>true</code>, a<a name="line.2008"></a> -<span class="sourceLineNo">2009</span> * snapshot of the current table is taken before executing the restore operation. In case of<a name="line.2009"></a> -<span class="sourceLineNo">2010</span> * restore failure, the failsafe snapshot will be restored. If the restore completes without<a name="line.2010"></a> -<span class="sourceLineNo">2011</span> * problem the failsafe snapshot is deleted.<a name="line.2011"></a> -<span class="sourceLineNo">2012</span> *<a name="line.2012"></a> -<span class="sourceLineNo">2013</span> * @param snapshotName name of the snapshot to restore<a name="line.2013"></a> -<span class="sourceLineNo">2014</span> * @throws IOException if a remote or network exception occurs<a name="line.2014"></a> -<span class="sourceLineNo">2015</span> * @throws RestoreSnapshotException if snapshot failed to be restored<a name="line.2015"></a> -<span class="sourceLineNo">2016</span> * @throws IllegalArgumentException if the restore request is formatted incorrectly<a name="line.2016"></a> -<span class="sourceLineNo">2017</span> */<a name="line.2017"></a> -<span class="sourceLineNo">2018</span> void restoreSnapshot(String snapshotName) throws IOException, RestoreSnapshotException;<a name="line.2018"></a> -<span class="sourceLineNo">2019</span><a name="line.2019"></a> -<span class="sourceLineNo">2020</span> /**<a name="line.2020"></a> -<span class="sourceLineNo">2021</span> * Restore the specified snapshot on the original table. (The table must be disabled) If the<a name="line.2021"></a> -<span class="sourceLineNo">2022</span> * "hbase.snapshot.restore.take.failsafe.snapshot" configuration property is set to <code>true</code>, a<a name="line.2022"></a> -<span class="sourceLineNo">2023</span> * snapshot of the current table is taken before executing the restore operation. In case of<a name="line.2023"></a> -<span class="sourceLineNo">2024</span> * restore failure, the failsafe snapshot will be restored. If the restore completes without<a name="line.2024"></a> -<span class="sourceLineNo">2025</span> * problem the failsafe snapshot is deleted.<a name="line.2025"></a> -<span class="sourceLineNo">2026</span> *<a name="line.2026"></a> -<span class="sourceLineNo">2027</span> * @param snapshotName name of the snapshot to restore<a name="line.2027"></a> -<span class="sourceLineNo">2028</span> * @throws IOException if a remote or network exception occurs<a name="line.2028"></a> -<span class="sourceLineNo">2029</span> * @throws RestoreSnapshotException if snapshot failed to be restored<a name="line.2029"></a> -<span class="sourceLineNo">2030</span> * @return the result of the async restore snapshot. You can use Future.get(long, TimeUnit)<a name="line.2030"></a> -<span class="sourceLineNo">2031</span> * to wait on the operation to complete.<a name="line.2031"></a> -<span class="sourceLineNo">2032</span> */<a name="line.2032"></a> -<span class="sourceLineNo">2033</span> Future<Void> restoreSnapshotAsync(String snapshotName)<a name="line.2033"></a> -<span class="sourceLineNo">2034</span> throws IOException, RestoreSnapshotException;<a name="line.2034"></a> -<span class="sourceLineNo">2035</span><a name="line.2035"></a> -<span class="sourceLineNo">2036</span> /**<a name="line.2036"></a> -<span class="sourceLineNo">2037</span> * Restore the specified snapshot on the original table. (The table must be disabled) If<a name="line.2037"></a> -<span class="sourceLineNo">2038</span> * 'takeFailSafeSnapshot' is set to <code>true</code>, a snapshot of the current table is taken before<a name="line.2038"></a> -<span class="sourceLineNo">2039</span> * executing the restore operation. In case of restore failure, the failsafe snapshot will be<a name="line.2039"></a> -<span class="sourceLineNo">2040</span> * restored. If the restore completes without problem the failsafe snapshot is deleted. The<a name="line.2040"></a> -<span class="sourceLineNo">2041</span> * failsafe snapshot name is configurable by using the property<a name="line.2041"></a> -<span class="sourceLineNo">2042</span> * "hbase.snapshot.restore.failsafe.name".<a name="line.2042"></a> -<span class="sourceLineNo">2043</span> *<a name="line.2043"></a> -<span class="sourceLineNo">2044</span> * @param snapshotName name of the snapshot to restore<a name="line.2044"></a> -<span class="sourceLineNo">2045</span> * @param takeFailSafeSnapshot <code>true</code> if the failsafe snapshot should be taken<a name="line.2045"></a> -<span class="sourceLineNo">2046</span> * @throws IOException if a remote or network exception occurs<a name="line.2046"></a> -<span class="sourceLineNo">2047</span> * @throws RestoreSnapshotException if snapshot failed to be restored<a name="line.2047"></a> -<span class="sourceLineNo">2048</span> * @throws IllegalArgumentException if the restore request is formatted incorrectly<a name="line.2048"></a> -<span class="sourceLineNo">2049</span> */<a name="line.2049"></a> -<span class="sourceLineNo">2050</span> void restoreSnapshot(byte[] snapshotName, boolean takeFailSafeSnapshot)<a name="line.2050"></a> -<span class="sourceLineNo">2051</span> throws IOException, RestoreSnapshotException;<a name="line.2051"></a> -<span class="sourceLineNo">2052</span><a name="line.2052"></a> -<span class="sourceLineNo">2053</span> /**<a name="line.2053"></a> -<span class="sourceLineNo">2054</span> * Restore the specified snapshot on the original table. (The table must be disabled) If<a name="line.2054"></a> -<span class="sourceLineNo">2055</span> * 'takeFailSafeSnapshot' is set to <code>true</code>, a snapshot of the current table is taken before<a name="line.2055"></a> -<span class="sourceLineNo">2056</span> * executing the restore operation. In case of restore failure, the failsafe snapshot will be<a name="line.2056"></a> -<span class="sourceLineNo">2057</span> * restored. If the restore completes without problem the failsafe snapshot is deleted. The<a name="line.2057"></a> -<span class="sourceLineNo">2058</span> * failsafe snapshot name is configurable by using the property<a name="line.2058"></a> -<span class="sourceLineNo">2059</span> * "hbase.snapshot.restore.failsafe.name".<a name="line.2059"></a> -<span class="sourceLineNo">2060</span> *<a name="line.2060"></a> -<span class="sourceLineNo">2061</span> * @param snapshotName name of the snapshot to restore<a name="line.2061"></a> -<span class="sourceLineNo">2062</span> * @param takeFailSafeSnapshot <code>true</code> if the failsafe snapshot should be taken<a name="line.2062"></a> -<span class="sourceLineNo">2063</span> * @throws IOException if a remote or network exception occurs<a name="line.2063"></a> -<span class="sourceLineNo">2064</span> * @throws RestoreSnapshotException if snapshot failed to be restored<a name="line.2064"></a> -<span class="sourceLineNo">2065</span> * @throws IllegalArgumentException if the restore request is formatted incorrectly<a name="line.2065"></a> -<span class="sourceLineNo">2066</span> */<a name="line.2066"></a> -<span class="sourceLineNo">2067</span> void restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot)<a name="line.2067"></a> -<span class="sourceLineNo">2068</span> throws IOException, RestoreSnapshotException;<a name="line.2068"></a> -<span class="sourceLineNo">2069</span><a name="line.2069"></a> -<span class="sourceLineNo">2070</span> /**<a name="line.2070"></a> -<span class="sourceLineNo">2071</span> * Restore the specified snapshot on the original table. (The table must be disabled) If<a name="line.2071"></a> -<span class="sourceLineNo">2072</span> * 'takeFailSafeSnapshot' is set to <code>true</code>, a snapshot of the current table is taken before<a name="line.2072"></a> -<span class="sourceLineNo">2073</span> * executing the restore operation. In case of restore failure, the failsafe snapshot will be<a name="line.2073"></a> -<span class="sourceLineNo">2074</span> * restored. If the restore completes without problem the failsafe snapshot is deleted. The<a name="line.2074"></a> -<span class="sourceLineNo">2075</span> * failsafe snapshot name is configurable by using the property<a name="line.2075"></a> -<span class="sourceLineNo">2076</span> * "hbase.snapshot.restore.failsafe.name".<a name="line.2076"></a> -<span class="sourceLineNo">2077</span> * @param snapshotName name of the snapshot to restore<a name="line.2077"></a> -<span class="sourceLineNo">2078</span> * @param takeFailSafeSnapshot <code>true</code> if the failsafe snapshot should be taken<a name="line.2078"></a> -<span class="sourceLineNo">2079</span> * @param restoreAcl <code>true</code> to restore acl of snapshot<a name="line.2079"></a> -<span class="sourceLineNo">2080</span> * @throws IOException if a remote or network exception occurs<a name="line.2080"></a> -<span class="sourceLineNo">2081</span> * @throws RestoreSnapshotException if snapshot failed to be restored<a name="line.2081"></a> -<span class="sourceLineNo">2082</span> * @throws IllegalArgumentException if the restore request is formatted incorrectly<a name="line.2082"></a> -<span class="sourceLineNo">2083</span> */<a name="line.2083"></a> -<span class="sourceLineNo">2084</span> void restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot,<a name="line.2084"></a> -<span class="sourceLineNo">2085</span> boolean restoreAcl) throws IOException, RestoreSnapshotException;<a name="line.2085"></a> -<span class="sourceLineNo">2086</span><a name="line.2086"></a> -<span class="sourceLineNo">2087</span> /**<a name="line.2087"></a> -<span class="sourceLineNo">2088</span> * Create a new table by cloning the snapshot content.<a name="line.2088"></a> -<span class="sourceLineNo">2089</span> *<a name="line.2089"></a> -<span class="sourceLineNo">2090</span> * @param snapshotName name of the snapshot to be cloned<a name="line.2090"></a> -<span class="sourceLineNo">2091</span> * @param tableName name of the table where the snapshot will be restored<a name="line.2091"></a> -<span class="sourceLineNo">2092</span> * @throws IOException if a remote or network exception occurs<a name="line.2092"></a> -<span class="sourceLineNo">2093</span> * @throws TableExistsException if table to be created already exists<a name="line.2093"></a> -<span class="sourceLineNo">2094</span> * @throws RestoreSnapshotException if snapshot failed to be cloned<a name="line.2094"></a> -<span class="sourceLineNo">2095</span> * @throws IllegalArgumentException if the specified table has not a valid name<a name="line.2095"></a> -<span class="sourceLineNo">2096</span> */<a name="line.2096"></a> -<span class="sourceLineNo">2097</span> void cloneSnapshot(byte[] snapshotName, TableName tableName)<a name="line.2097"></a> -<span class="sourceLineNo">2098</span> throws IOException, TableExistsException, RestoreSnapshotException;<a name="line.2098"></a> -<span class="sourceLineNo">2099</span><a name="line.2099"></a> -<span class="sourceLineNo">2100</span> /**<a name="line.2100"></a> -<span class="sourceLineNo">2101</span> * Create a new table by cloning the snapshot content.<a name="line.2101"></a> -<span class="sourceLineNo">2102</span> * @param snapshotName name of the snapshot to be cloned<a name="line.2102"></a> -<span class="sourceLineNo">2103</span> * @param tableName name of the table where the snapshot will be restored<a name="line.2103"></a> -<span class="sourceLineNo">2104</span> * @param restoreAcl <code>true</code> to clone acl into newly created table<a name="line.2104"></a> -<span class="sourceLineNo">2105</span> * @throws IOException if a remote or network exception occurs<a name="line.2105"></a> -<span class="sourceLineNo">2106</span> * @throws TableExistsException if table to be created already exists<a name="line.2106"></a> -<span class="sourceLineNo">2107</span> * @throws RestoreSnapshotException if snapshot failed to be cloned<a name="line.2107"></a> -<span class="sourceLineNo">2108</span> * @throws IllegalArgumentException if the specified table has not a valid name<a name="line.2108"></a> -<span class="sourceLineNo">2109</span> */<a name="line.2109"></a> -<span class="sourceLineNo">2110</span> void cloneSnapshot(String snapshotName, TableName tableName, boolean restoreAcl)<a name="line.2110"></a> -<span class="sourceLineNo">2111</span> throws IOException, TableExistsException, RestoreSnapshotException;<a name="line.2111"></a> -<span class="sourceLineNo">2112</span><a name="line.2112"></a> -<span class="sourceLineNo">2113</span> /**<a name="line.2113"></a> -<span class="sourceLineNo">2114</span> * Create a new table by cloning the snapshot content.<a name="line.2114"></a> -<span class="sourceLineNo">2115</span> *<a name="line.2115"></a> -<span class="sourceLineNo">2116</span> * @param snapshotName name of the snapshot to be cloned<a name="line.2116"></a> -<span class="sourceLineNo">2117</span> * @param tableName name of the table where the snapshot will be restored<a name="line.2117"></a> -<span class="sourceLineNo">2118</span> * @throws IOException if a remote or network exception occurs<a name="line.2118"></a> -<span class="sourceLineNo">2119</span> * @throws TableExistsException if table to be created already exists<a name="line.2119"></a> -<span class="sourceLineNo">2120</span> * @throws RestoreSnapshotException if snapshot failed to be cloned<a name="line.2120"></a> -<span class="sourceLineNo">2121</span> * @throws IllegalArgumentException if the specified table has not a valid name<a name="line.2121"></a> -<span class="sourceLineNo">2122</span> */<a name="line.2122"></a> -<span class="sourceLineNo">2123</span> void cloneSnapshot(String snapshotName, TableName tableName)<a name="line.2123"></a> -<span class="sourceLineNo">2124</span> throws IOException, TableExistsException, RestoreSnapshotException;<a name="line.2124"></a> -<span class="sourceLineNo">2125</span><a name="line.2125"></a> -<span class="sourceLineNo">2126</span> /**<a name="line.2126"></a> -<span class="sourceLineNo">2127</span> * Create a new table by cloning the snapshot content, but does not block<a name="line.2127"></a> -<span class="sourceLineNo">2128</span> * and wait for it to be completely cloned.<a name="line.2128"></a> -<span class="sourceLineNo">2129</span> * You can use Future.get(long, TimeUnit) to wait on the operation to complete.<a name="line.2129"></a> -<span class="sourceLineNo">2130</span> * It may throw ExecutionException if there was an error while executing the operation<a name="line.2130"></a> -<span class="sourceLineNo">2131</span> * or TimeoutException in case the wait timeout was not long enough to allow the<a name="line.2131"></a> -<span class="sourceLineNo">2132</span> * operation to complete.<a name="line.2132"></a> -<span class="sourceLineNo">2133</span> *<a name="line.2133"></a> -<span class="sourceLineNo">2134</span> * @param snapshotName name of the snapshot to be cloned<a name="line.2134"></a> -<span class="sourceLineNo">2135</span> * @param tableName name of the table where the snapshot will be restored<a name="line.2135"></a> -<span class="sourceLineNo">2136</span> * @throws IOException if a remote or network exception occurs<a name="line.2136"></a> -<span class="sourceLineNo">2137</span> * @throws TableExistsException if table to be cloned already exists<a name="line.2137"></a> -<span class="sourceLineNo">2138</span> * @return the result of the async clone snapshot. You can use Future.get(long, TimeUnit)<a name="line.2138"></a> -<span class="sourceLineNo">2139</span> * to wait on the operation to complete.<a name="line.2139"></a> -<span class="sourceLineNo">2140</span> */<a name="line.2140"></a> -<span class="sourceLineNo">2141</span> Future<Void> cloneSnapshotAsync(String snapshotName, TableName tableName)<a name="line.2141"></a> -<span class="sourceLineNo">2142</span> throws IOException, TableExistsException;<a name="line.2142"></a> -<span class="sourceLineNo">2143</span><a name="line.2143"></a> -<span class="sourceLineNo">2144</span> /**<a name="line.2144"></a> -<span class="sourceLineNo">2145</span> * Execute a distributed procedure on a cluster.<a name="line.2145"></a> -<span class="sourceLineNo">2146</span> *<a name="line.2146"></a> -<span class="sourceLineNo">2147</span> * @param signature A distributed procedure is uniquely identified by its signature (default the<a name="line.2147"></a> -<span class="sourceLineNo">2148</span> * root ZK node name of the procedure).<a name="line.2148"></a> -<span class="sourceLineNo">2149</span> * @param instance The instance name of the procedure. For some procedures, this parameter is<a name="line.2149"></a> -<span class="sourceLineNo">2150</span> * optional.<a name="line.2150"></a> -<span class="sourceLineNo">2151</span> * @param props Property/Value pairs of properties passing to the procedure<a name="line.2151"></a> -<span class="sourceLineNo">2152</span> * @throws IOException<a name="line.2152"></a> -<span class="sourceLineNo">2153</span> */<a name="line.2153"></a> -<span class="sourceLineNo">2154</span> void execProcedure(String signature, String instance, Map<String, String> props)<a name="line.2154"></a> -<span class="sourceLineNo">2155</span> throws IOException;<a name="line.2155"></a> -<span class="sourceLineNo">2156</span><a name="line.2156"></a> -<span class="sourceLineNo">2157</span> /**<a name="line.2157"></a> -<span class="sourceLineNo">2158</span> * Execute a distributed procedure on a cluster.<a name="line.2158"></a> -<span class="sourceLineNo">2159</span> *<a name="line.2159"></a> -<span class="sourceLineNo">2160</span> * @param signature A distributed procedure is uniquely identified by its signature (default the<a name="line.2160"></a> -<span class="sourceLineNo">2161</span> * root ZK node name of the procedure).<a name="line.2161"></a> -<span class="sourceLineNo">2162</span> * @param instance The instance name of the procedure. For some procedures, this parameter is<a name="line.2162"></a> -<span class="sourceLineNo">2163</span> * optional.<a name="line.2163"></a> -<span class="sourceLineNo">2164</span> * @param props Property/Value pairs of properties passing to the procedure<a name="line.2164"></a> -<span class="sourceLineNo">2165</span> * @return data returned after procedure execution. null if no return data.<a name="line.2165"></a> -<span class="sourceLineNo">2166</span> * @throws IOException<a name="line.2166"></a> -<span class="sourceLineNo">2167</span> * @deprecated Since 2.0.0. Will be removed in 3.0.0. Use<a name="line.2167"></a> -<span class="sourceLineNo">2168</span> * {@link #execProcedureWithReturn(String, String, Map)} } instead.<a name="line.2168"></a> -<span class="sourceLineNo">2169</span> */<a name="line.2169"></a> -<span class="sourceLineNo">2170</span> @Deprecated<a name="line.2170"></a> -<span class="sourceLineNo">2171</span> default byte[] execProcedureWithRet(String signature, String instance, Map<String, String> props)<a name="line.2171"></a> -<span class="sourceLineNo">2172</span> throws IOException {<a name="line.2172"></a> -<span class="sourceLineNo">2173</span> return execProcedureWithReturn(signature, instance, props);<a name="line.2173"></a> -<span class="sourceLineNo">2174</span> }<a name="line.2174"></a> -<span class="sourceLineNo">2175</span><a name="line.2175"></a> -<span class="sourceLineNo">2176</span> /**<a name="line.2176"></a> -<span class="sourceLineNo">2177</span> * Execute a distributed procedure on a cluster.<a name="line.2177"></a> -<span class="sourceLineNo">2178</span> *<a name="line.2178"></a> -<span class="sourceLineNo">2179</span> * @param signature A distributed procedure is uniquely identified by its signature (default the<a name="line.2179"></a> -<span class="sourceLineNo">2180</span> * root ZK node name of the procedure).<a name="line.2180"></a> -<span class="sourceLineNo">2181</span> * @param instance The instance name of the procedure. For some procedures, this parameter is<a name="line.2181"></a> -<span class="sourceLineNo">2182</span> * optional.<a name="line.2182"></a> -<span class="sourceLineNo">2183</span> * @param props Property/Value pairs of properties passing to the procedure<a name="line.2183"></a> -<span class="sourceLineNo">2184</span> * @return data returned after procedure execution. null if no return data.<a name="line.2184"></a> -<span class="sourceLineNo">2185</span> * @throws IOException<a name="line.2185"></a> -<span class="sourceLineNo">2186</span> */<a name="line.2186"></a> -<span class="sourceLineNo">2187</span> byte[] execProcedureWithReturn(String signature, String instance, Map<String, String> props)<a name="line.2187"></a> -<span class="sourceLineNo">2188</span> throws IOException;<a name="line.2188"></a> -<span class="sourceLineNo">2189</span><a name="line.2189"></a> -<span class="sourceLineNo">2190</span> /**<a name="line.2190"></a> -<span class="sourceLineNo">2191</span> * Check the current state of the specified procedure. There are three possible states: <ol><a name="line.2191"></a> -<span class="sourceLineNo">2192</span> * <li>running - returns <tt>false</tt></li> <li>finished - returns <tt>true</tt></li><a name="line.2192"></a> -<span class="sourceLineNo">2193</span> * <li>finished with error - throws the exception that caused the procedure to fail</li> </ol><a name="line.2193"></a> -<span class="sourceLineNo">2194</span> *<a name="line.2194"></a> -<span class="sourceLineNo">2195</span> * @param signature The signature that uniquely identifies a procedure<a name="line.2195"></a> -<span class="sourceLineNo">2196</span> * @param instance The instance name of the procedure<a name="line.2196"></a> -<span class="sourceLineNo">2197</span> * @param props Property/Value pairs of properties passing to the procedure<a name="line.2197"></a> -<span class="sourceLineNo">2198</span> * @return <code>true</code> if the specified procedure is finished successfully, <code>false</code> if it is still running<a name="line.2198"></a> -<span class="sourceLineNo">2199</span> * @throws IOException if the specified procedure finished with error<a name="line.2199"></a> -<span class="sourceLineNo">2200</span> */<a name="line.2200"></a> -<span class="sourceLineNo">2201</span> boolean isProcedureFinished(String signature, String instance, Map<String, String> props)<a name="line.2201"></a> -<span class="sourceLineNo">2202</span> throws IOException;<a name="line.2202"></a> -<span class="sourceLineNo">2203</span><a name="line.2203"></a> -<span class="sourceLineNo">2204</span> /**<a name="line.2204"></a> -<span class="sourceLineNo">2205</span> * List completed snapshots.<a name="line.2205"></a> -<span class="sourceLineNo">2206</span> *<a name="line.2206"></a> -<span class="sourceLineNo">2207</span> * @return a list of snapshot descriptors for completed snapshots<a name="line.2207"></a> -<span class="sourceLineNo">2208</span> * @throws IOException if a network error occurs<a name="line.2208"></a> -<span class="sourceLineNo">2209</span> */<a name="line.2209"></a> -<span class="sourceLineNo">2210</span> List<SnapshotDescription> listSnapshots() throws IOException;<a name="line.2210"></a> -<span class="sourceLineNo">2211</span><a name="line.2211"></a> -<span class="sourceLineNo">2212</span> /**<a name="line.2212"></a> -<span class="sourceLineNo">2213</span> * List all the completed snapshots matching the given regular expression.<a name="line.2213"></a> -<span class="sourceLineNo">2214</span> *<a name="line.2214"></a> -<span class="sourceLineNo">2215</span> * @param regex The regular expression to match against<a name="line.2215"></a> -<span class="sourceLineNo">2216</span> * @return list of SnapshotDescription<a name="line.2216"></a> -<span class="sourceLineNo">2217</span> * @throws IOException if a remote or network exception occurs<a name="line.2217"></a> -<span class="sourceLineNo">2218</span> * @deprecated since 2.0 version and will be removed in 3.0 version.<a name="line.2218"></a> -<span class="sourceLineNo">2219</span> * Use {@link #listSnapshots(Pattern)} instead.<a name="line.2219"></a> -<span class="sourceLineNo">2220</span> */<a name="line.2220"></a> -<span class="sourceLineNo">2221</span> @Deprecated<a name="line.2221"></a> -<span class="sourceLineNo">2222</span> List<SnapshotDescription> listSnapshots(String regex) throws IOException;<a name="line.2222"></a> -<span class="sourceLineNo">2223</span><a name="line.2223"></a> -<span class="sourceLineNo">2224</span> /**<a name="line.2224"></a> -<span class="sourceLineNo">2225</span> * List all the completed snapshots matching the given pattern.<a name="line.2225"></a> -<span class="sourceLineNo">2226</span> *<a name="line.2226"></a> -<span class="sourceLineNo">2227</span> * @param pattern The compiled regular expression to match against<a name="line.2227"></a> -<span class="sourceLineNo">2228</span> * @return list of SnapshotDescription<a name="line.2228"></a> -<span class="sourceLineNo">2229</span> * @throws IOException if a remote or network exception occurs<a name="line.2229"></a> -<span class="sourceLineNo">2230</span> */<a name="line.2230"></a> -<span class="sourceLineNo">2231</span> List<SnapshotDescription> listSnapshots(Pattern pattern) throws IOException;<a name="line.2231"></a> -<span class="sourceLineNo">2232</span><a name="line.2232"></a> -<span class="sourceLineNo">2233</span> /**<a name="line.2233"></a> -<span class="sourceLineNo">2234</span> * List all the completed snapshots matching the given table name regular expression and snapshot<a name="line.2234"></a> -<span class="sourceLineNo">2235</span> * name regular expression.<a name="line.2235"></a> -<span class="sourceLineNo">2236</span> * @param tableNameRegex The table name regular expression to match against<a name="line.2236"></a> -<span class="sourceLineNo">2237</span> * @param snapshotNameRegex The snapshot name regular expression to match against<a name="line.2237"></a> -<span class="sourceLineNo">2238</span> * @return list of completed SnapshotDescription<a name="line.2238"></a> -<span class="sourceLineNo">2239</span> * @throws IOException if a remote or network exception occurs<a name="line.2239"></a> -<span class="sourceLineNo">2240</span> * @deprecated since 2.0 version and will be removed in 3.0 version.<a name="line.2240"></a> -<span class="sourceLineNo">2241</span> * Use {@link #listTableSnapshots(Pattern, Pattern)} instead.<a name="line.2241"></a> -<span class="sourceLineNo">2242</span> */<a name="line.2242"></a> -<span class="sourceLineNo">2243</span> @Deprecated<a name="line.2243"></a> -<span class="sourceLineNo">2244</span> List<SnapshotDescription> listTableSnapshots(String tableNameRegex,<a name="line.2244"></a> -<span class="sourceLineNo">2245</span> String snapshotNameRegex) throws IOException;<a name="line.2245"></a> -<span class="sourceLineNo">2246</span><a name="line.2246"></a> -<span class="sourceLineNo">2247</span> /**<a name="line.2247"></a> -<span class="sourceLineNo">2248</span> * List all the completed snapshots matching the given table name regular expression and snapshot<a name="line.2248"></a> -<span class="sourceLineNo">2249</span> * name regular expression.<a name="line.2249"></a> -<span class="sourceLineNo">2250</span> * @param tableNamePattern The compiled table name regular expression to match against<a name="line.2250"></a> -<span class="sourceLineNo">2251</span> * @param snapshotNamePattern The compiled snapshot name regular expression to match against<a name="line.2251"></a> -<span class="sourceLineNo">2252</span> * @return list of completed SnapshotDescription<a name="line.2252"></a> -<span class="sourceLineNo">2253</span> * @throws IOException if a remote or network exception occurs<a name="line.2253"></a> -<span class="sourceLineNo">2254</span> */<a name="line.2254"></a> -<span class="sourceLineNo">2255</span> List<SnapshotDescription> listTableSnapshots(Pattern tableNamePattern,<a name="line.2255"></a> -<span class="sourceLineNo">2256</span> Pattern snapshotNamePattern) throws IOException;<a name="line.2256"></a> -<span class="sourceLineNo">2257</span><a name="line.2257"></a> -<span class="sourceLineNo">2258</span> /**<a name="line.2258"></a> -<span class="sourceLineNo">2259</span> * Delete an existing snapshot.<a name="line.2259"></a> -<span class="sourceLineNo">2260</span> *<a name="line.2260"></a> -<span class="sourceLineNo">2261</span> * @param snapshotName name of the snapshot<a name="line.2261"></a> -<span class="sourceLineNo">2262</span> * @throws IOException if a remote or network exception occurs<a name="line.2262"></a> -<span class="sourceLineNo">2263</span> */<a name="line.2263"></a> -<span class="sourceLineNo">2264</span> void deleteSnapshot(byte[] snapshotName) throws IOException;<a name="line.2264"></a> -<span class="sourceLineNo">2265</span><a name="line.2265"></a> -<span class="sourceLineNo">2266</span> /**<a name="line.2266"></a> -<span class="sourceLineNo">2267</span> * Delete an existing snapshot.<a name="line.2267"></a> -<span class="sourceLineNo">2268</span> *<a name="line.2268"></a> -<span class="sourceLineNo">2269</span> * @param snapshotName name of the snapshot<a name="line.2269"></a> -<span class="sourceLineNo">2270</span> * @throws IOException if a remote or network exception occurs<a name="line.2270"></a> -<span class="sourceLineNo">2271</span> */<a name="line.2271"></a> -<span class="sourceLineNo">2272</span> void deleteSnapshot(String snapshotName) throws IOException;<a name="line.2272"></a> -<span class="sourceLineNo">2273</span><a name="line.2273"></a> -<span class="sourceLineNo">2274</span> /**<a name="line.2274"></a> -<span class="sourceLineNo">2275</span> * Delete existing snapshots whose names match the pattern passed.<a name="line.2275"></a> -<span class="sourceLineNo">2276</span> *<a name="line.2276"></a> -<span class="sourceLineNo">2277</span> * @param regex The regular expression to match against<a name="line.2277"></a> -<span class="sourceLineNo">2278</span> * @throws IOException if a remote or network exception occurs<a name="line.2278"></a> -<span class="sourceLineNo">2279</span> * @deprecated since 2.0 version and will be removed in 3.0 version.<a name="line.2279"></a> -<span class="sourceLineNo">2280</span> * Use {@link #deleteSnapshots(Pattern)} instead.<a name="line.2280"></a> -<span class="sourceLineNo">2281</span> */<a name="line.2281"></a> -<span class="sourceLineNo">2282</span> @Deprecated<a name="line.2282"></a> -<span class="sourceLineNo">2283</span> void deleteSnapshots(String regex) throws IOException;<a name="line.2283"></a> -<span class="sourceLineNo">2284</span><a name="line.2284"></a> -<span class="sourceLineNo">2285</span> /**<a name="line.2285"></a> -<span class="sourceLineNo">2286</span> * Delete existing snapshots whose names match the pattern passed.<a name="line.2286"></a> -<span class="sourceLineNo">2287</span> *<a name="line.2287"></a> -<span class="sourceLineNo">2288</span> * @param pattern pattern for names of the snapshot to match<a name="line.2288"></a> -<span class="sourceLineNo">2289</span> * @throws IOException if a remote or network exception occurs<a name="line.2289"></a> -<span class="sourceLineNo">2290</span> */<a name="line.2290"></a> -<span class="sourceLineNo">2291</span> void deleteSnapshots(Pattern pattern) throws IOException;<a name="line.2291"></a> -<span class="sourceLineNo">2292</span><a name="line.2292"></a> -<span class="sourceLineNo">2293</span> /**<a name="line.2293"></a> -<span class="sourceLineNo">2294</span> * Delete all existing snapshots matching the given table name regular expression and snapshot<a name="line.2294"></a> -<span class="sourceLineNo">2295</span> * name regular expression.<a name="line.2295"></a> -<span class="sourceLineNo">2296</span> * @param tableNameRegex The table name regular expression to match against<a name="line.2296"></a> -<span class="sourceLineNo">2297</span> * @param snapshotNameRegex The snapshot name regular expression to match against<a name="line.2297"></a> -<span class="sourceLineNo">2298</span> * @throws IOException if a remote or network exception occurs<a name="line.2298"></a> -<span class="sourceLineNo">2299</span> * @deprecated since 2.0 version and will be removed in 3.0 version.<a name="line.2299"></a> -<span class="sourceLineNo">2300</span> * Use {@link #deleteTableSnapshots(Pattern, Pattern)} instead.<a name="line.2300"></a> -<span class="sourceLineNo">2301</span> */<a name="line.2301"></a> -<span class="sourceLineNo">2302</span> @Deprecated<a name="line.2302"></a> -<span class="sourceLineNo">2303</span> void deleteTableSnapshots(String tableNameRegex, String snapshotNameRegex) throws IOException;<a name="line.2303"></a> -<span class="sourceLineNo">2304</span><a name="line.2304"></a> -<span class="sourceLineNo">2305</span> /**<a name="line.2305"></a> -<span class="sourceLineNo">2306</span> * Delete all existing snapshots matching the given table name regular expression and snapshot<a name="line.2306"></a> -<span class="sourceLineNo">2307</span> * name regular expression.<a name="line.2307"></a> -<span class="sourceLineNo">2308</span> * @param tableNamePattern The compiled table name regular expression to match against<a name="line.2308"></a> -<span class="sourceLineNo">2309</span> * @param snapshotNamePattern The compiled snapshot name regular expression to match against<a name="line.2309"></a> -<span class="sourceLineNo">2310</span> * @throws IOException if a remote or network exception occurs<a name="line.2310"></a> -<span class="sourceLineNo">2311</span> */<a name="line.2311"></a> -<span class="sourceLineNo">2312</span> void deleteTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern)<a name="line.2312"></a> -<span class="sourceLineNo">2313</span> throws IOException;<a name="line.2313"></a> -<span class="sourceLineNo">2314</span><a name="line.2314"></a> -<span class="sourceLineNo">2315</span> /**<a name="line.2315"></a> -<span class="sourceLineNo">2316</span> * Apply the new quota settings.<a name="line.2316"></a> -<span class="sourceLineNo">2317</span> *<a name="line.2317"></a> -<span class="sourceLineNo">2318</span> * @param quota the quota settings<a name="line.2318"></a> -<span class="sourceLineNo">2319</span> * @throws IOException if a remote or network exception occurs<a name="line.2319"></a> -<span class="sourceLineNo">2320</span> */<a name="line.2320"></a> -<span class="sourceLineNo">2321</span> void setQuota(QuotaSettings quota) throws IOException;<a name="line.2321"></a> -<span class="sourceLineNo">2322</span><a name="line.2322"></a> -<span class="sourceLineNo">2323</span> /**<a name="line.2323"></a> -<span class="sourceLineNo">2324</span> * Return a QuotaRetriever to list the quotas based on the filter.<a name="line.2324"></a> -<span class="sourceLineNo">2325</span> * @param filter the quota settings filter<a name="line.2325"></a> -<span class="sourceLineNo">2326</span> * @return the quota retriever<a name="line.2326"></a> -<span class="sourceLineNo">2327</span> * @throws IOException if a remote or network exception occurs<a name="line.2327"></a> -<span class="sourceLineNo">2328</span> * @deprecated Since 2.0.0. Will be removed in 3.0.0. Use {@link #getQuota(QuotaFilter)}.<a name="line.2328"></a> -<span class="sourceLineNo">2329</span> */<a name="line.2329"></a> -<span class="sourceLineNo">2330</span> @Deprecated<a name="line.2330"></a> -<span class="sourceLineNo">2331</span> QuotaRetriever getQuotaRetriever(QuotaFilter filter) throws IOException;<a name="line.2331"></a> -<span class="sourceLineNo">2332</span><a name="line.2332"></a> -<span class="sourceLineNo">2333</span> /**<a name="line.2333"></a> -<span class="sourceLineNo">2334</span> * List the quotas based on the filter.<a name="line.2334"></a> -<span class="sourceLineNo">2335</span> * @param filter the quota settings filter<a name="line.2335"></a> -<span class="sourceLineNo">2336</span> * @return the QuotaSetting list<a name="line.2336"></a> -<span class="sourceLineNo">2337</span> * @throws IOException if a remote or network exception occurs<a name="line.2337"></a> -<span class="sourceLineNo">2338</span> */<a name="line.2338"></a> -<span class="sourceLineNo">2339</span> List<QuotaSettings> getQuota(QuotaFilter filter) throws IOException;<a name="line.2339"></a> -<span class="sourceLineNo">2340</span><a name="line.2340"></a> -<span class="sourceLineNo">2341</span> /**<a name="line.2341"></a> -<span class="sourceLineNo">2342</span> * Creates and returns a {@link com.google.protobuf.RpcChannel} instance connected to the active<a name="line.2342"></a> -<span class="sourceLineNo">2343</span> * master. <p> The obtained {@link com.google.protobuf.RpcChannel} instance can be used to access<a name="line.2343"></a> -<span class="sourceLineNo">2344</span> * a published coprocessor {@link com.google.protobuf.Service} using standard protobuf service<a name="line.2344"></a> -<span class="sourceLineNo">2345</span> * invocations: </p> <div style="background-color: #cccccc; padding: 2px"><a name="line.2345"></a> -<span class="sourceLineNo">2346</span> * <blockquote><pre><a name="line.2346"></a> -<span class="sourceLineNo">2347</span> * CoprocessorRpcChannel channel = myAdmin.coprocessorService();<a name="line.2347"></a> -<span class="sourceLineNo">2348</span> * MyService.BlockingInterface service = MyService.newBlockingStub(channel);<a name="line.2348"></a> -<span class="sourceLineNo">2349</span> * MyCallRequest request = MyCallRequest.newBuilder()<a name="line.2349"></a> -<span class="sourceLineNo">2350</span> * ...<a name="line.2350"></a> -<span class="sourceLineNo">2351</span> * .build();<a name="line.2351"></a> -<span class="sourceLineNo">2352</span> * MyCallResponse response = service.myCall(null, request);<a name="line.2352"></a> -<span class="sourceLineNo">2353</span> * </pre></blockquote></div><a name="line.2353"></a> -<span class="sourceLineNo">2354</span> *<a name="line.2354"></a> -<span class="sourceLineNo">2355</span> * @return A MasterCoprocessorRpcChannel instance<a name="line.2355"></a> -<span class="sourceLineNo">2356</span> */<a name="line.2356"></a> -<span class="sourceLineNo">2357</span> CoprocessorRpcChannel coprocessorService();<a name="line.2357"></a> -<span class="sourceLineNo">2358</span><a name="line.2358"></a> -<span class="sourceLineNo">2359</span><a name="line.2359"></a> -<span class="sourceLineNo">2360</span> /**<a name="line.2360"></a> -<span class="sourceLineNo">2361</span> * Creates and returns a {@link com.google.protobuf.RpcChannel} instance<a name="line.2361"></a> -<span class="sourceLineNo">2362</span> * connected to the passed region server.<a name="line.2362"></a> -<span class="sourceLineNo">2363</span> *<a name="line.2363"></a> -<span class="sourceLineNo">2364</span> * <p><a name="line.2364"></a> -<span class="sourceLineNo">2365</span> * The obtained {@link com.google.protobuf.RpcChannel} instance can be used to access a published<a name="line.2365"></a> -<span class="sourceLineNo">2366</span> * coprocessor {@link com.google.protobuf.Service} using standard protobuf service invocations:<a name="line.2366"></a> -<span class="sourceLineNo">2367</span> * </p><a name="line.2367"></a> -<span class="sourceLineNo">2368</span> *<a name="line.2368"></a> -<span class="sourceLineNo">2369</span> * <div style="background-color: #cccccc; padding: 2px"><a name="line.2369"></a> -<span class="sourceLineNo">2370</span> * <blockquote><pre><a name="line.2370"></a> -<span class="sourceLineNo">2371</span> * CoprocessorRpcChannel channel = myAdmin.coprocessorService(serverName);<a name="line.2371"></a> -<span class="sourceLineNo">2372</span> * MyService.BlockingInterface service = MyService.newBlockingStub(channel);<a name="line.2372"></a> -<span class="sourceLineNo">2373</span> * MyCallRequest request = MyCallRequest.newBuilder()<a name="line.2373"></a> -<span class="sourceLineNo">2374</span> * ...<a name="line.2374"></a> -<span class="sourceLineNo">2375</span> * .build();<a name="line.2375"></a> -<span class="sourceLineNo">2376</span> * MyCallResponse response = service.myCall(null, request);<a name="line.2376"></a> -<span class="sourceLineNo">2377</span> * </pre></blockquote></div><a name="line.2377"></a> -<span class="sourceLineNo">2378</span> *<a name="line.2378"></a> -<span class="sourceLineNo">2379</span> * @param serverName the server name to which the endpoint call is made<a name="line.2379"></a> -<span class="sourceLineNo">2380</span> * @return A RegionServerCoprocessorRpcChannel instance<a name="line.2380"></a> -<span class="sourceLineNo">2381</span> */<a name="line.2381"></a> -<span class="sourceLineNo">2382</span> CoprocessorRpcChannel coprocessorService(ServerName serverName);<a name="line.2382"></a> -<span class="sourceLineNo">2383</span><a name="line.2383"></a> -<span class="sourceLineNo">2384</span><a name="line.2384"></a> -<span class="sourceLineNo">2385</span> /**<a name="line.2385"></a> -<span class="sourceLineNo">2386</span> * Update the configuration and trigger an online config change<a name="line.2386"></a> -<span class="sourceLineNo">2387</span> * on the regionserver.<a name="line.2387"></a> -<span class="sourceLineNo">2388</span> * @param server : The server whose config needs to be updated.<a name="line.2388"></a> -<span class="sourceLineNo">2389</span> * @throws IOException<a name="line.2389"></a> -<span class="sourceLineNo">2390</span> */<a name="line.2390"></a> -<span class="sourceLineNo">2391</span> void updateConfiguration(ServerName server) throws IOException;<a name="line.2391"></a> -<span class="sourceLineNo">2392</span><a name="line.2392"></a> -<span class="sourceLineNo">2393</span><a name="line.2393"></a> -<span class="sourceLineNo">2394</span> /**<a name="line.2394"></a> -<span class="sourceLineNo">2395</span> * Update the configuration and trigger an online config change<a name="line.2395"></a> -<span class="sourceLineNo">2396</span> * on all the regionservers.<a name="line.2396"></a> -<span class="sourceLineNo">2397</span> * @throws IOException<a name="line.2397"></a> -<span class="sourceLineNo">2398</span> */<a name="line.2398"></a> -<span class="sourceLineNo">2399</span> void updateConfiguration() throws IOException;<a name="line.2399"></a> -<span class="sourceLineNo">2400</span><a name="line.2400"></a> -<span class="sourceLineNo">2401</span> /**<a name="line.2401"></a> -<span class="sourceLineNo">2402</span> * Get the info port of the current master if one is available.<a name="line.2402"></a> -<span class="sourceLineNo">2403</span> * @return master info port<a name="line.2403"></a> -<span class="sourceLineNo">2404</span> * @throws IOException<a name="line.2404"></a> -<span class="sourceLineNo">2405</span> */<a name="line.2405"></a> -<span class="sourceLineNo">2406</span> default int getMasterInfoPort() throws IOException {<a name="line.2406"></a> -<span class="sourceLineNo">2407</span> return getClusterMetrics(EnumSet.of(Option.MASTER_INFO_PORT)).getMasterInfoPort();<a name="line.2407"></a> -<span class="sourceLineNo">2408</span> }<a name="line.2408"></a> -<span class="sourceLineNo">2409</span><a name="line.2409"></a> -<span class="sourceLineNo">2410</span> /**<a name="line.2410"></a> -<span class="sourceLineNo">2411</span> * Return the set of supported security capabilities.<a name="line.2411"></a> -<span class="sourceLineNo">2412</span> * @throws IOException<a name="line.2412"></a> -<span class="sourceLineNo">2413</span> * @throws UnsupportedOperationException<a name="line.2413"></a> -<span class="sourceLineNo">2414</span> */<a name="line.2414"></a> -<span class="sourceLineNo">2415</span> List<SecurityCapability> getSecurityCapabilities() throws IOException;<a name="line.2415"></a> -<span class="sourceLineNo">2416</span><a name="line.2416"></a> -<span class="sourceLineNo">2417</span> /**<a name="line.2417"></a> -<span class="sourceLineNo">2418</span> * Turn the Split or Merge switches on or off.<a name="line.2418"></a> -<span class="sourceLineNo">2419</span> * @param enabled enabled or not<a name="line.2419"></a> -<span class="sourceLineNo">2420</span> * @param synchronous If <code>true</code>, it waits until current split() call, if outstanding,<a name="line.2420"></a> -<span class="sourceLineNo">2421</span> * to return.<a name="line.2421"></a> -<span class="sourceLineNo">2422</span> * @param switchTypes switchType list {@link MasterSwitchType}<a name="line.2422"></a> -<span class="sourceLineNo">2423</span> * @return Previous switch value array<a name="line.2423"></a> -<span class="sourceLineNo">2424</span> * @deprecated Since 2.0.0. Will be removed in 3.0.0. Use {@link #splitSwitch(boolean, boolean)}<a name="line.2424"></a> -<span class="sourceLineNo">2425</span> * or {@link #mergeSwitch(boolean, boolean)} instead.<a name="line.2425"></a> -<span class="sourceLineNo">2426</span> */<a name="line.2426"></a> -<span class="sourceLineNo">2427</span> @Deprecated<a name="line.2427"></a> -<span class="sourceLineNo">2428</span> default boolean[] setSplitOrMergeEnabled(boolean enabled, boolean synchronous,<a name="line.2428"></a> -<span class="sourceLineNo">2429</span> MasterSwitchType... switchTypes) throws IOException {<a name="line.2429"></a> -<span class="sourceLineNo">2430</span> boolean[] preValues = new boolean[switchTypes.length];<a name="line.2430"></a> -<span class="sourceLineNo">2431</span> for (int i = 0; i < switchTypes.length; i++) {<a name="line.2431"></a> -<span class="sourceLineNo">2432</span> switch (switchTypes[i]) {<a name="line.2432"></a> -<span class="sourceLineNo">2433</span> case SPLIT:<a name="line.2433"></a> -<span class="sourceLineNo">2434</span> preValues[i] = splitSwitch(enabled, synchronous);<a name="line.2434"></a> -<span class="sourceLineNo">2435</span> break;<a name="line.2435"></a> -<span class="sourceLineNo">2436</span> case MERGE:<a name="line.2436"></a> -<span class="sourceLineNo">2437</span> preValues[i] = mergeSwitch(enabled, synchronous);<a name="line.2437"></a> -<span class="sourceLineNo">2438</span> break;<a name="line.2438"></a> -<span class="sourceLineNo">2439</span> default:<a name="line.2439"></a> -<span class="sourceLineNo">2440</span> throw new UnsupportedOperationException("Unsupported switch type:" + switchTypes[i]);<a name="line.2440"></a> -<span class="sourceLineNo">2441</span> }<a name="line.2441"></a> -<span class="sourceLineNo">2442</span> }<a name="line.2442"></a> -<span class="sourceLineNo">2443</span> return preValues;<a name="line.2443"></a> -<span class="sourceLineNo">2444</span> }<a name="line.2444"></a> -<span class="sourceLineNo">2445</span><a name="line.2445"></a> -<span class="sourceLineNo">2446</span> /**<a name="line.2446"></a> -<span class="sourceLineNo">2447</span> * Turn the split switch on or off.<a name="line.2447"></a> -<span class="sourceLineNo">2448</span> * @param enabled enabled or not<a name="line.2448"></a> -<span class="sourceLineNo">2449</span> * @param synchronous If <code>true</code>, it waits until current split() call, if outstanding,<a name="line.2449"></a> -<span class="sourceLineNo">2450</span> * to return.<a name="line.2450"></a> -<span class="sourceLineNo">2451</span> * @return Previous switch value<a name="line.2451"></a> -<span class="sourceLineNo">2452</span> */<a name="line.2452"></a> -<span class="sourceLineNo">2453</span> boolean splitSwitch(boolean enabled, boolean synchronous) throws IOException;<a name="line.2453"></a> -<span class="sourceLineNo">2454</span><a name="line.2454"></a> -<span class="sourceLineNo">2455</span> /**<a name="line.2455"></a> -<span class="sourceLineNo">2456</span> * Turn the merge switch on or off.<a name="line.2456"></a> -<span class="sourceLineNo">2457</span> * @param enabled enabled or not<a name="line.2457"></a> -<span class="sourceLineNo">2458</span> * @param synchronous If <code>true</code>, it waits until current merge() call, if outstanding,<a name="line.2458"></a> -<span class="sourceLineNo">2459</span> * to return.<a name="line.2459"></a> -<span class="sourceLineNo">2460</span> * @return Previous switch value<a name="line.2460"></a> -<span class="sourceLineNo">2461</span> */<a name="line.2461"></a> -<span class="sourceLineNo">2462</span> boolean mergeSwitch(boolean enabled, boolean synchronous) throws IOException;<a name="line.2462"></a> -<span class="sourceLineNo">2463</span><a name="line.2463"></a> -<span class="sourceLineNo">2464</span> /**<a name="line.2464"></a> -<span class="sourceLineNo">2465</span> * Query the current state of the switch.<a name="line.2465"></a> -<span class="sourceLineNo">2466</span> *<a name="line.2466"></a> -<span class="sourceLineNo">2467</span> * @return <code>true</code> if the switch is enabled, <code>false</code> otherwise.<a name="line.2467"></a> -<span class="sourceLineNo">2468</span> * @deprecated Since 2.0.0. Will be removed in 3.0.0. Use<a name="line.2468"></a> -<span class="sourceLineNo">2469</span> * {@link #isSplitEnabled()} or {@link #isMergeEnabled()} instead.<a name="line.2469"></a> -<span class="sourceLineNo">2470</span> */<a name="line.2470"></a> -<span class="sourceLineNo">2471</span> @Deprecated<a name="line.2471"></a> -<span class="sourceLineNo">2472</span> default boolean isSplitOrMergeEnabled(MasterSwitchType switchType) throws IOException {<a name="line.2472"></a> -<span class="sourceLineNo">2473</span> switch (switchType) {<a name="line.2473"></a> -<span class="sourceLineNo">2474</span> case SPLIT:<a name="line.2474"></a> -<span class="sourceLineNo">2475</span> return isSplitEnabled();<a name="line.2475"></a> -<span class="sourceLineNo">2476</span> case MERGE:<a name="line.2476"></a> -<span class="sourceLineNo">2477</span> return isMergeEnabled();<a name="line.2477"></a> -<span class="sourceLineNo">2478</span> default:<a name="line.2478"></a> -<span class="sourceLineNo">2479</span> break;<a name="line.2479"></a> -<span class="sourceLineNo">2480</span> }<a name="line.2480"></a> -<span class="sourceLineNo">2481</span> throw new UnsupportedOperationException("Unsupported switch type:" + switchType);<a name="line.2481"></a> -<span class="sourceLineNo">2482</span> }<a name="line.2482"></a> -<span class="sourceLineNo">2483</span><a name="line.2483"></a> -<span class="sourceLineNo">2484</span> /**<a name="line.2484"></a> -<span class="sourceLineNo">2485</span> * Query the current state of the split switch.<a name="line.2485"></a> -<span class="sourceLineNo">2486</span> * @return <code>true</code> if the switch is enabled, <code>false</code> otherwise.<a name="line.2486"></a> -<span class="sourceLineNo">2487</span> */<a name="line.2487"></a> -<span class="sourceLineNo">2488</span> boolean isSplitEnabled() throws IOException;<a name="line.2488"></a> +<span class="sourceLineNo">1740</span> * Do not use. Usually it is ignored but if not, it can do more damage than good. See hbck2.<a name="line.1740"></a> +<span class="sourceLineNo">1741</span> * @param procId ID of the procedure to abort<a name="line.1741"></a> +<span class="sourceLineNo">1742</span> * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted?<a name="line.1742"></a> +<span class="sourceLineNo">1743</span> * @return <code>true</code> if aborted, <code>false</code> if procedure already completed or does not exist<a name="line.1743"></a> +<span class="sourceLineNo">1744</span> * @throws IOException<a name="line.1744"></a> +<span class="sourceLineNo">1745</span> * @deprecated Since 2.1.1 -- to be removed.<a name="line.1745"></a> +<span class="sourceLineNo">1746</span> */<a name="line.1746"></a> +<span class="sourceLineNo">1747</span> @Deprecated<a name="line.1747"></a> +<span class="sourceLineNo">1748</span> boolean abortProcedure(<a name="line.1748"></a> +<span class="sourceLineNo">1749</span> long procId,<a name="line.1749"></a> +<span class="sourceLineNo">1750</span> boolean mayInterruptIfRunning) throws IOException;<a name="line.1750"></a> +<span class="sourceLineNo">1751</span><a name="line.1751"></a> +<span class="sourceLineNo">1752</span> /**<a name="line.1752"></a> +<span class="sourceLineNo">1753</span> * Abort a procedure but does not block and wait for completion.<a name="line.1753"></a> +<span class="sourceLineNo">1754</span> * You can use Future.get(long, TimeUnit) to wait on the operation to complete.<a name="line.1754"></a> +<span class="sourceLineNo">1755</span> * It may throw ExecutionException if there was an error while executing the operation<a name="line.1755"></a> +<span class="sourceLineNo">1756</span> * or TimeoutException in case the wait timeout was not long enough to allow the<a name="line.1756"></a> +<span class="sourceLineNo">1757</span> * operation to complete.<a name="line.1757"></a> +<span class="sourceLineNo">1758</span> * Do not use. Usually it is ignored but if not, it can do more damage than good. See hbck2.<a name="line.1758"></a> +<span class="sourceLineNo">1759</span> *<a name="line.1759"></a> +<span class="sourceLineNo">1760</span> * @param procId ID of the procedure to abort<a name="line.1760"></a> +<span class="sourceLineNo">1761</span> * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted?<a name="line.1761"></a> +<span class="sourceLineNo">1762</span> * @return <code>true</code> if aborted, <code>false</code> if procedure already completed or does not exist<a name="line.1762"></a> +<span class="sourceLineNo">1763</span> * @throws IOException<a name="line.1763"></a> +<span class="sourceLineNo">1764</span> * @deprecated Since 2.1.1 -- to be removed.<a name="line.1764"></a> +<span class="sourceLineNo">1765</span> */<a name="line.1765"></a> +<span class="sourceLineNo">1766</span> @Deprecated<a name="line.1766"></a> +<span class="sourceLineNo">1767</span> Future<Boolean> abortProcedureAsync(<a name="line.1767"></a> +<span class="sourceLineNo">1768</span> long procId,<a name="line.1768"></a> +<span class="sourceLineNo">1769</span> boolean mayInterruptIfRunning) throws IOException;<a name="line.1769"></a> +<span class="sourceLineNo">1770</span><a name="line.1770"></a> +<span class="sourceLineNo">1771</span> /**<a name="line.1771"></a> +<span class="sourceLineNo">1772</span> * Get procedures.<a name="line.1772"></a> +<span class="sourceLineNo">1773</span> * @return procedure list in JSON<a name="line.1773"></a> +<span class="sourceLineNo">1774</span> * @throws IOException<a name="line.1774"></a> +<span class="sourceLineNo">1775</span> */<a name="line.1775"></a> +<span class="sourceLineNo">1776</span> String getProcedures() throws IOException;<a name="line.1776"></a> +<span class="sourceLineNo">1777</span><a name="line.1777"></a> +<span class="sourceLineNo">1778</span> /**<a name="line.1778"></a> +<span class="sourceLineNo">1779</span> * Get locks.<a name="line.1779"></a> +<span class="sourceLineNo">1780</span> * @return lock list in JSON<a name="line.1780"></a> +<span class="sourceLineNo">1781</span> * @throws IOException if a remote or network exception occurs<a name="line.1781"></a> +<span class="sourceLineNo">1782</span> */<a name="line.1782"></a> +<span class="sourceLineNo">1783</span> String getLocks() throws IOException;<a name="line.1783"></a> +<span class="sourceLineNo">1784</span><a name="line.1784"></a> +<span class="sourceLineNo">1785</span> /**<a name="line.1785"></a> +<span class="sourceLineNo">1786</span> * Roll the log writer. I.e. for filesystem based write ahead logs, start writing to a new file.<a name="line.1786"></a> +<span class="sourceLineNo">1787</span> *<a name="line.1787"></a> +<span class="sourceLineNo">1788</span> * Note that the actual rolling of the log writer is asynchronous and may not be complete when<a name="line.1788"></a> +<span class="sourceLineNo">1789</span> * this method returns. As a side effect of this call, the named region server may schedule<a name="line.1789"></a> +<span class="sourceLineNo">1790</span> * store flushes at the request of the wal.<a name="line.1790"></a> +<span class="sourceLineNo">1791</span> *<a name="line.1791"></a> +<span class="sourceLineNo">1792</span> * @param serverName The servername of the regionserver.<a name="line.1792"></a> +<span class="sourceLineNo">1793</span> * @throws IOException if a remote or network exception occurs<a name="line.1793"></a> +<span class="sourceLineNo">1794</span> * @throws org.apache.hadoop.hbase.regionserver.wal.FailedLogCloseException<a name="line.1794"></a> +<span class="sourceLineNo">1795</span> */<a name="line.1795"></a> +<span class="sourceLineNo">1796</span> void rollWALWriter(ServerName serverName) throws IOException, FailedLogCloseException;<a name="line.1796"></a> +<span class="sourceLineNo">1797</span><a name="line.1797"></a> +<span class="sourceLineNo">1798</span> /**<a name="line.1798"></a> +<span class="sourceLineNo">1799</span> * Helper that delegates to getClusterMetrics().getMasterCoprocessorNames().<a name="line.1799"></a> +<span class="sourceLineNo">1800</span> * @return an
<TRUNCATED>