Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 95EEA200CEF for ; Mon, 4 Sep 2017 17:13:39 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9474C165254; Mon, 4 Sep 2017 15:13:39 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4836E165222 for ; Mon, 4 Sep 2017 17:13:37 +0200 (CEST) Received: (qmail 30573 invoked by uid 500); 4 Sep 2017 15:13:32 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 26312 invoked by uid 99); 4 Sep 2017 15:13:29 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Sep 2017 15:13:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3FF38F5695; Mon, 4 Sep 2017 15:13:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: git-site-role@apache.org To: commits@hbase.apache.org Date: Mon, 04 Sep 2017 15:13:55 -0000 Message-Id: <6b46b6b2f29047a694e85dbd71d74ce0@git.apache.org> In-Reply-To: <11ac7b34f0de4798b7ee39965d7dade7@git.apache.org> References: <11ac7b34f0de4798b7ee39965d7dade7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [29/51] [partial] hbase-site git commit: Published site at . archived-at: Mon, 04 Sep 2017 15:13:39 -0000 http://git-wip-us.apache.org/repos/asf/hbase-site/blob/e1eb0a07/devapidocs/src-html/org/apache/hadoop/hbase/client/Admin.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/Admin.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/Admin.html index 5a77704..b2f4152 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/Admin.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/Admin.html @@ -40,2314 +40,2231 @@ 032import org.apache.hadoop.hbase.Abortable; 033import org.apache.hadoop.hbase.ClusterStatus; 034import org.apache.hadoop.hbase.ClusterStatus.Options; -035import org.apache.hadoop.hbase.HColumnDescriptor; -036import org.apache.hadoop.hbase.HRegionInfo; -037import org.apache.hadoop.hbase.HTableDescriptor; -038import org.apache.hadoop.hbase.NamespaceDescriptor; -039import org.apache.hadoop.hbase.NamespaceNotFoundException; -040import org.apache.hadoop.hbase.ProcedureInfo; -041import org.apache.hadoop.hbase.RegionLoad; -042import org.apache.hadoop.hbase.ServerName; -043import org.apache.hadoop.hbase.TableExistsException; -044import org.apache.hadoop.hbase.TableName; -045import org.apache.hadoop.hbase.TableNotFoundException; -046import org.apache.hadoop.hbase.classification.InterfaceAudience; -047import org.apache.hadoop.hbase.client.replication.TableCFs; -048import org.apache.hadoop.hbase.client.security.SecurityCapability; -049import org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel; -050import org.apache.hadoop.hbase.procedure2.LockInfo; -051import org.apache.hadoop.hbase.quotas.QuotaFilter; -052import org.apache.hadoop.hbase.quotas.QuotaRetriever; -053import org.apache.hadoop.hbase.quotas.QuotaSettings; -054import org.apache.hadoop.hbase.regionserver.wal.FailedLogCloseException; -055import org.apache.hadoop.hbase.replication.ReplicationException; -056import org.apache.hadoop.hbase.replication.ReplicationPeerConfig; -057import org.apache.hadoop.hbase.replication.ReplicationPeerDescription; -058import org.apache.hadoop.hbase.snapshot.HBaseSnapshotException; -059import org.apache.hadoop.hbase.snapshot.RestoreSnapshotException; -060import org.apache.hadoop.hbase.snapshot.SnapshotCreationException; -061import org.apache.hadoop.hbase.snapshot.UnknownSnapshotException; -062import org.apache.hadoop.hbase.util.Pair; -063 -064/** -065 * The administrative API for HBase. Obtain an instance from an {@link Connection#getAdmin()} and -066 * call {@link #close()} afterwards. -067 * <p>Admin can be used to create, drop, list, enable and disable tables, add and drop table -068 * column families and other administrative operations. -069 * -070 * @see ConnectionFactory -071 * @see Connection -072 * @see Table -073 * @since 0.99.0 -074 */ -075@InterfaceAudience.Public -076public interface Admin extends Abortable, Closeable { -077 int getOperationTimeout(); -078 -079 @Override -080 void abort(String why, Throwable e); -081 -082 @Override -083 boolean isAborted(); -084 -085 /** -086 * @return Connection used by this object. -087 */ -088 Connection getConnection(); -089 -090 /** -091 * @param tableName Table to check. -092 * @return True if table exists already. -093 * @throws IOException -094 */ -095 boolean tableExists(final TableName tableName) throws IOException; -096 -097 /** -098 * List all the userspace tables. -099 * -100 * @return - returns an array of read-only HTableDescriptors -101 * @throws IOException if a remote or network exception occurs -102 * @deprecated since 2.0 version and will be removed in 3.0 version. -103 * use {@link #listTableDescriptors()} -104 */ -105 @Deprecated -106 HTableDescriptor[] listTables() throws IOException; -107 -108 /** -109 * List all the userspace tables. -110 * -111 * @return - returns a list of TableDescriptors -112 * @throws IOException if a remote or network exception occurs -113 */ -114 List<TableDescriptor> listTableDescriptors() throws IOException; -115 -116 /** -117 * List all the userspace tables matching the given pattern. -118 * -119 * @param pattern The compiled regular expression to match against -120 * @return - returns an array of read-only HTableDescriptors -121 * @throws IOException if a remote or network exception occurs -122 * @see #listTables() -123 * @deprecated since 2.0 version and will be removed in 3.0 version. -124 * use {@link #listTableDescriptors(java.util.regex.Pattern)} -125 */ -126 @Deprecated -127 HTableDescriptor[] listTables(Pattern pattern) throws IOException; -128 -129 /** -130 * List all the userspace tables matching the given pattern. -131 * -132 * @param pattern The compiled regular expression to match against -133 * @return - returns a list of TableDescriptors -134 * @throws IOException if a remote or network exception occurs -135 * @see #listTables() -136 */ -137 List<TableDescriptor> listTableDescriptors(Pattern pattern) throws IOException; -138 -139 /** -140 * List all the userspace tables matching the given regular expression. -141 * -142 * @param regex The regular expression to match against -143 * @return - returns an array of read-only HTableDescriptors -144 * @throws IOException if a remote or network exception occurs -145 * @see #listTables(java.util.regex.Pattern) -146 * @deprecated since 2.0 version and will be removed in 3.0 version. -147 * use {@link #listTableDescriptors(java.lang.String)} -148 */ -149 @Deprecated -150 HTableDescriptor[] listTables(String regex) throws IOException; -151 -152 /** -153 * List all the userspace tables matching the given regular expression. -154 * -155 * @param regex The regular expression to match against -156 * @return - returns a list of TableDescriptors -157 * @throws IOException if a remote or network exception occurs -158 * @see #listTables(java.util.regex.Pattern) -159 */ -160 List<TableDescriptor> listTableDescriptors(String regex) throws IOException; -161 -162 /** -163 * List all the tables matching the given pattern. -164 * -165 * @param pattern The compiled regular expression to match against -166 * @param includeSysTables False to match only against userspace tables -167 * @return - returns an array of read-only HTableDescriptors -168 * @throws IOException if a remote or network exception occurs -169 * @see #listTables() -170 * @deprecated since 2.0 version and will be removed in 3.0 version. -171 * use {@link #listTableDescriptors(java.util.regex.Pattern, boolean)} -172 */ -173 @Deprecated -174 HTableDescriptor[] listTables(Pattern pattern, boolean includeSysTables) -175 throws IOException; -176 -177 /** -178 * List all the tables matching the given pattern. -179 * -180 * @param pattern The compiled regular expression to match against -181 * @param includeSysTables False to match only against userspace tables -182 * @return - returns a list of TableDescriptors -183 * @throws IOException if a remote or network exception occurs -184 * @see #listTables() -185 */ -186 List<TableDescriptor> listTableDescriptors(Pattern pattern, boolean includeSysTables) -187 throws IOException; -188 -189 /** -190 * List all the tables matching the given pattern. -191 * -192 * @param regex The regular expression to match against -193 * @param includeSysTables False to match only against userspace tables -194 * @return - returns an array of read-only HTableDescriptors -195 * @throws IOException if a remote or network exception occurs -196 * @see #listTables(java.util.regex.Pattern, boolean) -197 * @deprecated since 2.0 version and will be removed in 3.0 version. -198 * use {@link #listTableDescriptors(java.lang.String, boolean)} -199 */ -200 @Deprecated -201 HTableDescriptor[] listTables(String regex, boolean includeSysTables) -202 throws IOException; -203 -204 /** -205 * List all the tables matching the given pattern. -206 * -207 * @param regex The regular expression to match against -208 * @param includeSysTables False to match only against userspace tables -209 * @return - returns a list of TableDescriptors -210 * @throws IOException if a remote or network exception occurs -211 * @see #listTables(java.util.regex.Pattern, boolean) -212 */ -213 List<TableDescriptor> listTableDescriptors(String regex, boolean includeSysTables) -214 throws IOException; -215 -216 /** -217 * List all of the names of userspace tables. -218 * -219 * @return TableName[] table names -220 * @throws IOException if a remote or network exception occurs -221 */ -222 TableName[] listTableNames() throws IOException; -223 -224 /** -225 * List all of the names of userspace tables. -226 * @param pattern The regular expression to match against -227 * @return TableName[] table names -228 * @throws IOException if a remote or network exception occurs -229 */ -230 TableName[] listTableNames(Pattern pattern) throws IOException; -231 -232 /** -233 * List all of the names of userspace tables. -234 * @param regex The regular expression to match against -235 * @return TableName[] table names -236 * @throws IOException if a remote or network exception occurs -237 */ -238 TableName[] listTableNames(String regex) throws IOException; -239 -240 /** -241 * List all of the names of userspace tables. -242 * @param pattern The regular expression to match against -243 * @param includeSysTables False to match only against userspace tables -244 * @return TableName[] table names -245 * @throws IOException if a remote or network exception occurs -246 */ -247 TableName[] listTableNames(final Pattern pattern, final boolean includeSysTables) -248 throws IOException; -249 -250 /** -251 * List all of the names of userspace tables. -252 * @param regex The regular expression to match against -253 * @param includeSysTables False to match only against userspace tables -254 * @return TableName[] table names -255 * @throws IOException if a remote or network exception occurs -256 */ -257 TableName[] listTableNames(final String regex, final boolean includeSysTables) -258 throws IOException; -259 -260 /** -261 * Method for getting the tableDescriptor -262 * -263 * @param tableName as a {@link TableName} -264 * @return the read-only tableDescriptor -265 * @throws org.apache.hadoop.hbase.TableNotFoundException -266 * @throws IOException if a remote or network exception occurs -267 * @deprecated since 2.0 version and will be removed in 3.0 version. -268 * use {@link #listTableDescriptor(TableName)} -269 */ -270 @Deprecated -271 HTableDescriptor getTableDescriptor(final TableName tableName) -272 throws TableNotFoundException, IOException; -273 -274 /** -275 * Method for getting the tableDescriptor -276 * -277 * @param tableName as a {@link TableName} -278 * @return the tableDescriptor -279 * @throws org.apache.hadoop.hbase.TableNotFoundException -280 * @throws IOException if a remote or network exception occurs -281 */ -282 TableDescriptor listTableDescriptor(final TableName tableName) -283 throws TableNotFoundException, IOException; -284 -285 /** -286 * Creates a new table. Synchronous operation. -287 * -288 * @param desc table descriptor for table -289 * @throws IllegalArgumentException if the table name is reserved -290 * @throws org.apache.hadoop.hbase.MasterNotRunningException if master is not running -291 * @throws org.apache.hadoop.hbase.TableExistsException if table already exists (If concurrent -292 * threads, the table may have been created between test-for-existence and attempt-at-creation). -293 * @throws IOException if a remote or network exception occurs -294 * @deprecated since 2.0 version and will be removed in 3.0 version. -295 * use {@link #createTable(TableDescriptor)} -296 */ -297 @Deprecated -298 default void createTable(HTableDescriptor desc) throws IOException { -299 createTable((TableDescriptor) desc); -300 } -301 -302 /** -303 * Creates a new table. Synchronous operation. -304 * -305 * @param desc table descriptor for table -306 * @throws IllegalArgumentException if the table name is reserved -307 * @throws org.apache.hadoop.hbase.MasterNotRunningException if master is not running -308 * @throws org.apache.hadoop.hbase.TableExistsException if table already exists (If concurrent -309 * threads, the table may have been created between test-for-existence and attempt-at-creation). -310 * @throws IOException if a remote or network exception occurs -311 */ -312 void createTable(TableDescriptor desc) throws IOException; -313 -314 /** -315 * Creates a new table with the specified number of regions. The start key specified will become -316 * the end key of the first region of the table, and the end key specified will become the start -317 * key of the last region of the table (the first region has a null start key and the last region -318 * has a null end key). BigInteger math will be used to divide the key range specified into enough -319 * segments to make the required number of total regions. Synchronous operation. +035import org.apache.hadoop.hbase.HRegionInfo; +036import org.apache.hadoop.hbase.HTableDescriptor; +037import org.apache.hadoop.hbase.NamespaceDescriptor; +038import org.apache.hadoop.hbase.NamespaceNotFoundException; +039import org.apache.hadoop.hbase.ProcedureInfo; +040import org.apache.hadoop.hbase.RegionLoad; +041import org.apache.hadoop.hbase.ServerName; +042import org.apache.hadoop.hbase.TableExistsException; +043import org.apache.hadoop.hbase.TableName; +044import org.apache.hadoop.hbase.TableNotFoundException; +045import org.apache.hadoop.hbase.classification.InterfaceAudience; +046import org.apache.hadoop.hbase.client.replication.TableCFs; +047import org.apache.hadoop.hbase.client.security.SecurityCapability; +048import org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel; +049import org.apache.hadoop.hbase.procedure2.LockInfo; +050import org.apache.hadoop.hbase.quotas.QuotaFilter; +051import org.apache.hadoop.hbase.quotas.QuotaRetriever; +052import org.apache.hadoop.hbase.quotas.QuotaSettings; +053import org.apache.hadoop.hbase.regionserver.wal.FailedLogCloseException; +054import org.apache.hadoop.hbase.replication.ReplicationException; +055import org.apache.hadoop.hbase.replication.ReplicationPeerConfig; +056import org.apache.hadoop.hbase.replication.ReplicationPeerDescription; +057import org.apache.hadoop.hbase.snapshot.HBaseSnapshotException; +058import org.apache.hadoop.hbase.snapshot.RestoreSnapshotException; +059import org.apache.hadoop.hbase.snapshot.SnapshotCreationException; +060import org.apache.hadoop.hbase.snapshot.UnknownSnapshotException; +061import org.apache.hadoop.hbase.util.Pair; +062 +063/** +064 * The administrative API for HBase. Obtain an instance from an {@link Connection#getAdmin()} and +065 * call {@link #close()} afterwards. +066 * <p>Admin can be used to create, drop, list, enable and disable tables, add and drop table +067 * column families and other administrative operations. +068 * +069 * @see ConnectionFactory +070 * @see Connection +071 * @see Table +072 * @since 0.99.0 +073 */ +074@InterfaceAudience.Public +075public interface Admin extends Abortable, Closeable { +076 int getOperationTimeout(); +077 +078 @Override +079 void abort(String why, Throwable e); +080 +081 @Override +082 boolean isAborted(); +083 +084 /** +085 * @return Connection used by this object. +086 */ +087 Connection getConnection(); +088 +089 /** +090 * @param tableName Table to check. +091 * @return True if table exists already. +092 * @throws IOException +093 */ +094 boolean tableExists(final TableName tableName) throws IOException; +095 +096 /** +097 * List all the userspace tables. +098 * +099 * @return - returns an array of read-only HTableDescriptors +100 * @throws IOException if a remote or network exception occurs +101 * @deprecated since 2.0 version and will be removed in 3.0 version. +102 * use {@link #listTableDescriptors()} +103 */ +104 @Deprecated +105 HTableDescriptor[] listTables() throws IOException; +106 +107 /** +108 * List all the userspace tables. +109 * +110 * @return - returns a list of TableDescriptors +111 * @throws IOException if a remote or network exception occurs +112 */ +113 List<TableDescriptor> listTableDescriptors() throws IOException; +114 +115 /** +116 * List all the userspace tables matching the given pattern. +117 * +118 * @param pattern The compiled regular expression to match against +119 * @return - returns an array of read-only HTableDescriptors +120 * @throws IOException if a remote or network exception occurs +121 * @see #listTables() +122 * @deprecated since 2.0 version and will be removed in 3.0 version. +123 * use {@link #listTableDescriptors(java.util.regex.Pattern)} +124 */ +125 @Deprecated +126 HTableDescriptor[] listTables(Pattern pattern) throws IOException; +127 +128 /** +129 * List all the userspace tables matching the given pattern. +130 * +131 * @param pattern The compiled regular expression to match against +132 * @return - returns a list of TableDescriptors +133 * @throws IOException if a remote or network exception occurs +134 * @see #listTables() +135 */ +136 List<TableDescriptor> listTableDescriptors(Pattern pattern) throws IOException; +137 +138 /** +139 * List all the userspace tables matching the given regular expression. +140 * +141 * @param regex The regular expression to match against +142 * @return - returns an array of read-only HTableDescriptors +143 * @throws IOException if a remote or network exception occurs +144 * @see #listTables(java.util.regex.Pattern) +145 * @deprecated since 2.0 version and will be removed in 3.0 version. +146 * use {@link #listTableDescriptors(java.lang.String)} +147 */ +148 @Deprecated +149 HTableDescriptor[] listTables(String regex) throws IOException; +150 +151 /** +152 * List all the userspace tables matching the given regular expression. +153 * +154 * @param regex The regular expression to match against +155 * @return - returns a list of TableDescriptors +156 * @throws IOException if a remote or network exception occurs +157 * @see #listTables(java.util.regex.Pattern) +158 */ +159 List<TableDescriptor> listTableDescriptors(String regex) throws IOException; +160 +161 /** +162 * List all the tables matching the given pattern. +163 * +164 * @param pattern The compiled regular expression to match against +165 * @param includeSysTables False to match only against userspace tables +166 * @return - returns an array of read-only HTableDescriptors +167 * @throws IOException if a remote or network exception occurs +168 * @see #listTables() +169 * @deprecated since 2.0 version and will be removed in 3.0 version. +170 * use {@link #listTableDescriptors(java.util.regex.Pattern, boolean)} +171 */ +172 @Deprecated +173 HTableDescriptor[] listTables(Pattern pattern, boolean includeSysTables) +174 throws IOException; +175 +176 /** +177 * List all the tables matching the given pattern. +178 * +179 * @param pattern The compiled regular expression to match against +180 * @param includeSysTables False to match only against userspace tables +181 * @return - returns a list of TableDescriptors +182 * @throws IOException if a remote or network exception occurs +183 * @see #listTables() +184 */ +185 List<TableDescriptor> listTableDescriptors(Pattern pattern, boolean includeSysTables) +186 throws IOException; +187 +188 /** +189 * List all the tables matching the given pattern. +190 * +191 * @param regex The regular expression to match against +192 * @param includeSysTables False to match only against userspace tables +193 * @return - returns an array of read-only HTableDescriptors +194 * @throws IOException if a remote or network exception occurs +195 * @see #listTables(java.util.regex.Pattern, boolean) +196 * @deprecated since 2.0 version and will be removed in 3.0 version. +197 * use {@link #listTableDescriptors(java.lang.String, boolean)} +198 */ +199 @Deprecated +200 HTableDescriptor[] listTables(String regex, boolean includeSysTables) +201 throws IOException; +202 +203 /** +204 * List all the tables matching the given pattern. +205 * +206 * @param regex The regular expression to match against +207 * @param includeSysTables False to match only against userspace tables +208 * @return - returns a list of TableDescriptors +209 * @throws IOException if a remote or network exception occurs +210 * @see #listTables(java.util.regex.Pattern, boolean) +211 */ +212 List<TableDescriptor> listTableDescriptors(String regex, boolean includeSysTables) +213 throws IOException; +214 +215 /** +216 * List all of the names of userspace tables. +217 * +218 * @return TableName[] table names +219 * @throws IOException if a remote or network exception occurs +220 */ +221 TableName[] listTableNames() throws IOException; +222 +223 /** +224 * List all of the names of userspace tables. +225 * @param pattern The regular expression to match against +226 * @return TableName[] table names +227 * @throws IOException if a remote or network exception occurs +228 */ +229 TableName[] listTableNames(Pattern pattern) throws IOException; +230 +231 /** +232 * List all of the names of userspace tables. +233 * @param regex The regular expression to match against +234 * @return TableName[] table names +235 * @throws IOException if a remote or network exception occurs +236 */ +237 TableName[] listTableNames(String regex) throws IOException; +238 +239 /** +240 * List all of the names of userspace tables. +241 * @param pattern The regular expression to match against +242 * @param includeSysTables False to match only against userspace tables +243 * @return TableName[] table names +244 * @throws IOException if a remote or network exception occurs +245 */ +246 TableName[] listTableNames(final Pattern pattern, final boolean includeSysTables) +247 throws IOException; +248 +249 /** +250 * List all of the names of userspace tables. +251 * @param regex The regular expression to match against +252 * @param includeSysTables False to match only against userspace tables +253 * @return TableName[] table names +254 * @throws IOException if a remote or network exception occurs +255 */ +256 TableName[] listTableNames(final String regex, final boolean includeSysTables) +257 throws IOException; +258 +259 /** +260 * Method for getting the tableDescriptor +261 * +262 * @param tableName as a {@link TableName} +263 * @return the read-only tableDescriptor +264 * @throws org.apache.hadoop.hbase.TableNotFoundException +265 * @throws IOException if a remote or network exception occurs +266 * @deprecated since 2.0 version and will be removed in 3.0 version. +267 * use {@link #listTableDescriptor(TableName)} +268 */ +269 @Deprecated +270 HTableDescriptor getTableDescriptor(final TableName tableName) +271 throws TableNotFoundException, IOException; +272 +273 /** +274 * Method for getting the tableDescriptor +275 * +276 * @param tableName as a {@link TableName} +277 * @return the tableDescriptor +278 * @throws org.apache.hadoop.hbase.TableNotFoundException +279 * @throws IOException if a remote or network exception occurs +280 */ +281 TableDescriptor listTableDescriptor(final TableName tableName) +282 throws TableNotFoundException, IOException; +283 +284 /** +285 * Creates a new table. Synchronous operation. +286 * +287 * @param desc table descriptor for table +288 * @throws IllegalArgumentException if the table name is reserved +289 * @throws org.apache.hadoop.hbase.MasterNotRunningException if master is not running +290 * @throws org.apache.hadoop.hbase.TableExistsException if table already exists (If concurrent +291 * threads, the table may have been created between test-for-existence and attempt-at-creation). +292 * @throws IOException if a remote or network exception occurs +293 */ +294 void createTable(TableDescriptor desc) throws IOException; +295 +296 /** +297 * Creates a new table with the specified number of regions. The start key specified will become +298 * the end key of the first region of the table, and the end key specified will become the start +299 * key of the last region of the table (the first region has a null start key and the last region +300 * has a null end key). BigInteger math will be used to divide the key range specified into enough +301 * segments to make the required number of total regions. Synchronous operation. +302 * +303 * @param desc table descriptor for table +304 * @param startKey beginning of key range +305 * @param endKey end of key range +306 * @param numRegions the total number of regions to create +307 * @throws IllegalArgumentException if the table name is reserved +308 * @throws org.apache.hadoop.hbase.MasterNotRunningException if master is not running +309 * @throws org.apache.hadoop.hbase.TableExistsException if table already exists (If concurrent +310 * threads, the table may have been created between test-for-existence and attempt-at-creation). +311 * @throws IOException +312 */ +313 void createTable(TableDescriptor desc, byte[] startKey, byte[] endKey, int numRegions) +314 throws IOException; +315 +316 /** +317 * Creates a new table with an initial set of empty regions defined by the specified split keys. +318 * The total number of regions created will be the number of split keys plus one. Synchronous +319 * operation. Note : Avoid passing empty split key. 320 * 321 * @param desc table descriptor for table -322 * @param startKey beginning of key range -323 * @param endKey end of key range -324 * @param numRegions the total number of regions to create -325 * @throws IllegalArgumentException if the table name is reserved -326 * @throws org.apache.hadoop.hbase.MasterNotRunningException if master is not running -327 * @throws org.apache.hadoop.hbase.TableExistsException if table already exists (If concurrent -328 * threads, the table may have been created between test-for-existence and attempt-at-creation). -329 * @throws IOException -330 * @deprecated since 2.0 version and will be removed in 3.0 version. -331 * use {@link #createTable(TableDescriptor, byte[], byte[], int)} -332 */ -333 @Deprecated -334 default void createTable(HTableDescriptor desc, byte[] startKey, byte[] endKey, int numRegions) -335 throws IOException { -336 createTable((TableDescriptor) desc, startKey, endKey, numRegions); -337 } -338 -339 /** -340 * Creates a new table with the specified number of regions. The start key specified will become -341 * the end key of the first region of the table, and the end key specified will become the start -342 * key of the last region of the table (the first region has a null start key and the last region -343 * has a null end key). BigInteger math will be used to divide the key range specified into enough -344 * segments to make the required number of total regions. Synchronous operation. -345 * -346 * @param desc table descriptor for table -347 * @param startKey beginning of key range -348 * @param endKey end of key range -349 * @param numRegions the total number of regions to create -350 * @throws IllegalArgumentException if the table name is reserved -351 * @throws org.apache.hadoop.hbase.MasterNotRunningException if master is not running -352 * @throws org.apache.hadoop.hbase.TableExistsException if table already exists (If concurrent -353 * threads, the table may have been created between test-for-existence and attempt-at-creation). -354 * @throws IOException +322 * @param splitKeys array of split keys for the initial regions of the table +323 * @throws IllegalArgumentException if the table name is reserved, if the split keys are repeated +324 * and if the split key has empty byte array. +325 * @throws org.apache.hadoop.hbase.MasterNotRunningException if master is not running +326 * @throws org.apache.hadoop.hbase.TableExistsException if table already exists (If concurrent +327 * threads, the table may have been created between test-for-existence and attempt-at-creation). +328 * @throws IOException +329 */ +330 void createTable(final TableDescriptor desc, byte[][] splitKeys) throws IOException; +331 +332 /** +333 * Creates a new table but does not block and wait for it to come online. +334 * You can use Future.get(long, TimeUnit) to wait on the operation to complete. +335 * It may throw ExecutionException if there was an error while executing the operation +336 * or TimeoutException in case the wait timeout was not long enough to allow the +337 * operation to complete. +338 * Throws IllegalArgumentException Bad table name, if the split keys +339 * are repeated and if the split key has empty byte array. +340 * +341 * @param desc table descriptor for table +342 * @param splitKeys keys to check if the table has been created with all split keys +343 * @throws IOException if a remote or network exception occurs +344 * @return the result of the async creation. You can use Future.get(long, TimeUnit) +345 * to wait on the operation to complete. +346 */ +347 Future<Void> createTableAsync(final TableDescriptor desc, final byte[][] splitKeys) +348 throws IOException; +349 +350 /** +351 * Deletes a table. Synchronous operation. +352 * +353 * @param tableName name of table to delete +354 * @throws IOException if a remote or network exception occurs 355 */ -356 void createTable(TableDescriptor desc, byte[] startKey, byte[] endKey, int numRegions) -357 throws IOException; -358 -359 /** -360 * Creates a new table with an initial set of empty regions defined by the specified split keys. -361 * The total number of regions created will be the number of split keys plus one. Synchronous -362 * operation. Note : Avoid passing empty split key. -363 * -364 * @param desc table descriptor for table -365 * @param splitKeys array of split keys for the initial regions of the table -366 * @throws IllegalArgumentException if the table name is reserved, if the split keys are repeated -367 * and if the split key has empty byte array. -368 * @throws org.apache.hadoop.hbase.MasterNotRunningException if master is not running -369 * @throws org.apache.hadoop.hbase.TableExistsException if table already exists (If concurrent -370 * threads, the table may have been created between test-for-existence and attempt-at-creation). -371 * @throws IOException -372 * @deprecated since 2.0 version and will be removed in 3.0 version. -373 * use {@link #createTable(TableDescriptor, byte[][])} -374 */ -375 @Deprecated -376 default void createTable(final HTableDescriptor desc, byte[][] splitKeys) throws IOException { -377 createTable((TableDescriptor) desc, splitKeys); -378 } -379 -380 /** -381 * Creates a new table with an initial set of empty regions defined by the specified split keys. -382 * The total number of regions created will be the number of split keys plus one. Synchronous -383 * operation. Note : Avoid passing empty split key. -384 * -385 * @param desc table descriptor for table -386 * @param splitKeys array of split keys for the initial regions of the table -387 * @throws IllegalArgumentException if the table name is reserved, if the split keys are repeated -388 * and if the split key has empty byte array. -389 * @throws org.apache.hadoop.hbase.MasterNotRunningException if master is not running -390 * @throws org.apache.hadoop.hbase.TableExistsException if table already exists (If concurrent -391 * threads, the table may have been created between test-for-existence and attempt-at-creation). -392 * @throws IOException -393 */ -394 void createTable(final TableDescriptor desc, byte[][] splitKeys) throws IOException; -395 -396 /** -397 * Creates a new table but does not block and wait for it to come online. -398 * You can use Future.get(long, TimeUnit) to wait on the operation to complete. -399 * It may throw ExecutionException if there was an error while executing the operation -400 * or TimeoutException in case the wait timeout was not long enough to allow the -401 * operation to complete. -402 * Throws IllegalArgumentException Bad table name, if the split keys -403 * are repeated and if the split key has empty byte array. -404 * -405 * @param desc table descriptor for table -406 * @param splitKeys keys to check if the table has been created with all split keys -407 * @throws IOException if a remote or network exception occurs -408 * @return the result of the async creation. You can use Future.get(long, TimeUnit) -409 * to wait on the operation to complete. -410 * @deprecated since 2.0 version and will be removed in 3.0 version. -411 * use {@link #createTableAsync(TableDescriptor, byte[][])} -412 */ -413 @Deprecated -414 default Future<Void> createTableAsync(final HTableDescriptor desc, final byte[][] splitKeys) -415 throws IOException { -416 return createTableAsync((TableDescriptor) desc, splitKeys); -417 } -418 -419 /** -420 * Creates a new table but does not block and wait for it to come online. -421 * You can use Future.get(long, TimeUnit) to wait on the operation to complete. -422 * It may throw ExecutionException if there was an error while executing the operation -423 * or TimeoutException in case the wait timeout was not long enough to allow the -424 * operation to complete. -425 * Throws IllegalArgumentException Bad table name, if the split keys -426 * are repeated and if the split key has empty byte array. -427 * -428 * @param desc table descriptor for table -429 * @param splitKeys keys to check if the table has been created with all split keys -430 * @throws IOException if a remote or network exception occurs -431 * @return the result of the async creation. You can use Future.get(long, TimeUnit) -432 * to wait on the operation to complete. -433 */ -434 Future<Void> createTableAsync(final TableDescriptor desc, final byte[][] splitKeys) -435 throws IOException; -436 -437 /** -438 * Deletes a table. Synchronous operation. +356 void deleteTable(final TableName tableName) throws IOException; +357 +358 /** +359 * Deletes the table but does not block and wait for it be completely removed. +360 * You can use Future.get(long, TimeUnit) to wait on the operation to complete. +361 * It may throw ExecutionException if there was an error while executing the operation +362 * or TimeoutException in case the wait timeout was not long enough to allow the +363 * operation to complete. +364 * +365 * @param tableName name of table to delete +366 * @throws IOException if a remote or network exception occurs +367 * @return the result of the async delete. You can use Future.get(long, TimeUnit) +368 * to wait on the operation to complete. +369 */ +370 Future<Void> deleteTableAsync(TableName tableName) throws IOException; +371 +372 /** +373 * Deletes tables matching the passed in pattern and wait on completion. Warning: Use this method +374 * carefully, there is no prompting and the effect is immediate. Consider using {@link +375 * #listTableDescriptors(java.lang.String)} +376 * and {@link #deleteTable(org.apache.hadoop.hbase.TableName)} +377 * +378 * @param regex The regular expression to match table names against +379 * @return Table descriptors for tables that couldn't be deleted. +380 * The return htds are read-only +381 * @throws IOException +382 * @see #deleteTables(java.util.regex.Pattern) +383 * @see #deleteTable(org.apache.hadoop.hbase.TableName) +384 * @deprecated since 2.0 version and will be removed in 3.0 version +385 * This is just a trivial helper method without any magic. +386 * Consider using {@link #listTableDescriptors(java.lang.String)} +387 * and {@link #enableTable(org.apache.hadoop.hbase.TableName)} +388 */ +389 @Deprecated +390 HTableDescriptor[] deleteTables(String regex) throws IOException; +391 +392 /** +393 * Delete tables matching the passed in pattern and wait on completion. Warning: Use this method +394 * carefully, there is no prompting and the effect is immediate. Consider using {@link +395 * #listTableDescriptors(java.util.regex.Pattern)} and +396 * {@link #deleteTable(org.apache.hadoop.hbase.TableName)} +397 * +398 * @param pattern The pattern to match table names against +399 * @return Table descriptors for tables that couldn't be deleted +400 * The return htds are read-only +401 * @throws IOException +402 * @deprecated since 2.0 version and will be removed in 3.0 version +403 * This is just a trivial helper method without any magic. +404 * Consider using {@link #listTableDescriptors(java.util.regex.Pattern)} +405 * and {@link #enableTable(org.apache.hadoop.hbase.TableName)} +406 */ +407 @Deprecated +408 HTableDescriptor[] deleteTables(Pattern pattern) throws IOException; +409 +410 /** +411 * Truncate a table. +412 * Synchronous operation. +413 * +414 * @param tableName name of table to truncate +415 * @param preserveSplits True if the splits should be preserved +416 * @throws IOException if a remote or network exception occurs +417 */ +418 public void truncateTable(final TableName tableName, final boolean preserveSplits) +419 throws IOException; +420 +421 /** +422 * Truncate the table but does not block and wait for it be completely enabled. You can use +423 * Future.get(long, TimeUnit) to wait on the operation to complete. It may throw +424 * ExecutionException if there was an error while executing the operation or TimeoutException in +425 * case the wait timeout was not long enough to allow the operation to complete. +426 * @param tableName name of table to delete +427 * @param preserveSplits true if the splits should be preserved +428 * @throws IOException if a remote or network exception occurs +429 * @return the result of the async truncate. You can use Future.get(long, TimeUnit) to wait on the +430 * operation to complete. +431 */ +432 Future<Void> truncateTableAsync(final TableName tableName, final boolean preserveSplits) +433 throws IOException; +434 +435 /** +436 * Enable a table. May timeout. Use {@link #enableTableAsync(org.apache.hadoop.hbase.TableName)} +437 * and {@link #isTableEnabled(org.apache.hadoop.hbase.TableName)} instead. The table has to be in +438 * disabled state for it to be enabled. 439 * -440 * @param tableName name of table to delete -441 * @throws IOException if a remote or network exception occurs -442 */ -443 void deleteTable(final TableName tableName) throws IOException; -444 -445 /** -446 * Deletes the table but does not block and wait for it be completely removed. -447 * You can use Future.get(long, TimeUnit) to wait on the operation to complete. -448 * It may throw ExecutionException if there was an error while executing the operation -449 * or TimeoutException in case the wait timeout was not long enough to allow the -450 * operation to complete. -451 * -452 * @param tableName name of table to delete -453 * @throws IOException if a remote or network exception occurs -454 * @return the result of the async delete. You can use Future.get(long, TimeUnit) -455 * to wait on the operation to complete. -456 */ -457 Future<Void> deleteTableAsync(TableName tableName) throws IOException; -458 -459 /** -460 * Deletes tables matching the passed in pattern and wait on completion. Warning: Use this method -461 * carefully, there is no prompting and the effect is immediate. Consider using {@link -462 * #listTableDescriptors(java.lang.String)} -463 * and {@link #deleteTable(org.apache.hadoop.hbase.TableName)} -464 * -465 * @param regex The regular expression to match table names against -466 * @return Table descriptors for tables that couldn't be deleted. -467 * The return htds are read-only -468 * @throws IOException -469 * @see #deleteTables(java.util.regex.Pattern) -470 * @see #deleteTable(org.apache.hadoop.hbase.TableName) -471 * @deprecated since 2.0 version and will be removed in 3.0 version -472 * This is just a trivial helper method without any magic. -473 * Consider using {@link #listTableDescriptors(java.lang.String)} -474 * and {@link #enableTable(org.apache.hadoop.hbase.TableName)} -475 */ -476 @Deprecated -477 HTableDescriptor[] deleteTables(String regex)