001/** 002 * 003 * Licensed to the Apache Software Foundation (ASF) under one 004 * or more contributor license agreements. See the NOTICE file 005 * distributed with this work for additional information 006 * regarding copyright ownership. The ASF licenses this file 007 * to you under the Apache License, Version 2.0 (the 008 * "License"); you may not use this file except in compliance 009 * with the License. You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 */ 019package org.apache.hadoop.hbase.thrift2.client; 020 021import java.io.IOException; 022import java.nio.ByteBuffer; 023import java.util.EnumSet; 024import java.util.List; 025import java.util.Map; 026import java.util.Set; 027import java.util.concurrent.Future; 028import java.util.regex.Pattern; 029 030import org.apache.commons.lang3.NotImplementedException; 031import org.apache.hadoop.conf.Configuration; 032import org.apache.hadoop.hbase.CacheEvictionStats; 033import org.apache.hadoop.hbase.ClusterMetrics; 034import org.apache.hadoop.hbase.HConstants; 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.RegionMetrics; 040import org.apache.hadoop.hbase.ServerName; 041import org.apache.hadoop.hbase.TableName; 042import org.apache.hadoop.hbase.TableNotFoundException; 043import org.apache.hadoop.hbase.client.Admin; 044import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; 045import org.apache.hadoop.hbase.client.CompactType; 046import org.apache.hadoop.hbase.client.CompactionState; 047import org.apache.hadoop.hbase.client.Connection; 048import org.apache.hadoop.hbase.client.RegionInfo; 049import org.apache.hadoop.hbase.client.SnapshotDescription; 050import org.apache.hadoop.hbase.client.SnapshotType; 051import org.apache.hadoop.hbase.client.TableDescriptor; 052import org.apache.hadoop.hbase.client.replication.TableCFs; 053import org.apache.hadoop.hbase.client.security.SecurityCapability; 054import org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel; 055import org.apache.hadoop.hbase.quotas.QuotaFilter; 056import org.apache.hadoop.hbase.quotas.QuotaRetriever; 057import org.apache.hadoop.hbase.quotas.QuotaSettings; 058import org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot; 059import org.apache.hadoop.hbase.replication.ReplicationException; 060import org.apache.hadoop.hbase.replication.ReplicationPeerConfig; 061import org.apache.hadoop.hbase.replication.ReplicationPeerDescription; 062import org.apache.hadoop.hbase.security.access.GetUserPermissionsRequest; 063import org.apache.hadoop.hbase.security.access.Permission; 064import org.apache.hadoop.hbase.security.access.UserPermission; 065import org.apache.hadoop.hbase.thrift2.ThriftUtilities; 066import org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor; 067import org.apache.hadoop.hbase.thrift2.generated.THBaseService; 068import org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor; 069import org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor; 070import org.apache.hadoop.hbase.thrift2.generated.TTableName; 071import org.apache.hadoop.hbase.util.Bytes; 072import org.apache.hadoop.hbase.util.Pair; 073import org.apache.thrift.TException; 074import org.apache.thrift.transport.TTransport; 075import org.apache.yetus.audience.InterfaceAudience; 076 077@InterfaceAudience.Private 078public class ThriftAdmin implements Admin { 079 080 private THBaseService.Client client; 081 private TTransport transport; 082 private int operationTimeout; 083 private Configuration conf; 084 085 086 public ThriftAdmin(THBaseService.Client client, TTransport tTransport, Configuration conf) { 087 this.client = client; 088 this.transport = tTransport; 089 this.operationTimeout = conf.getInt(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT, 090 HConstants.DEFAULT_HBASE_CLIENT_OPERATION_TIMEOUT); 091 this.conf = conf; 092 } 093 094 @Override 095 public int getOperationTimeout() { 096 return operationTimeout; 097 } 098 099 @Override 100 public void abort(String why, Throwable e) { 101 102 } 103 104 @Override 105 public boolean isAborted() { 106 return false; 107 } 108 109 @Override 110 public void close() throws IOException { 111 transport.close(); 112 } 113 114 @Override 115 public Configuration getConfiguration() { 116 return conf; 117 } 118 119 @Override 120 public boolean tableExists(TableName tableName) throws IOException { 121 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 122 try { 123 return client.tableExists(tTableName); 124 } catch (TException e) { 125 throw new IOException(e); 126 } 127 } 128 129 @Override 130 public Connection getConnection() { 131 throw new NotImplementedException("getConnection not supported in ThriftAdmin"); 132 } 133 134 @Override 135 public HTableDescriptor[] listTables() throws IOException { 136 return listTables((String)null); 137 } 138 139 @Override 140 public List<TableDescriptor> listTableDescriptors() throws IOException { 141 return listTableDescriptors((Pattern) null); 142 } 143 144 @Override 145 public HTableDescriptor[] listTables(Pattern pattern) throws IOException { 146 String regex = (pattern == null ? null : pattern.toString()); 147 return listTables(regex); 148 } 149 150 @Override 151 public List<TableDescriptor> listTableDescriptors(Pattern pattern) throws IOException { 152 return listTableDescriptors(pattern, false); 153 } 154 155 @Override 156 public HTableDescriptor[] listTables(String regex) throws IOException { 157 return listTables(regex, false); 158 } 159 160 @Override 161 public HTableDescriptor[] listTables(Pattern pattern, boolean includeSysTables) 162 throws IOException { 163 String regex = (pattern == null ? null : pattern.toString()); 164 return listTables(regex, includeSysTables); 165 166 } 167 168 @Override 169 public List<TableDescriptor> listTableDescriptors(Pattern pattern, boolean includeSysTables) 170 throws IOException { 171 try { 172 String regex = (pattern == null ? null : pattern.toString()); 173 List<TTableDescriptor> tTableDescriptors = client 174 .getTableDescriptorsByPattern(regex, includeSysTables); 175 return ThriftUtilities.tableDescriptorsFromThrift(tTableDescriptors); 176 177 } catch (TException e) { 178 throw new IOException(e); 179 } 180 } 181 182 @Override 183 public HTableDescriptor[] listTables(String regex, boolean includeSysTables) throws IOException { 184 try { 185 List<TTableDescriptor> tTableDescriptors = client 186 .getTableDescriptorsByPattern(regex, includeSysTables); 187 return ThriftUtilities.hTableDescriptorsFromThrift(tTableDescriptors); 188 189 } catch (TException e) { 190 throw new IOException(e); 191 } 192 } 193 194 @Override 195 public TableName[] listTableNames() throws IOException { 196 return listTableNames((String)null); 197 } 198 199 @Override 200 public TableName[] listTableNames(Pattern pattern) throws IOException { 201 return listTableNames(pattern, false); 202 } 203 204 @Override 205 public TableName[] listTableNames(String regex) throws IOException { 206 return listTableNames(regex, false); 207 } 208 209 @Override 210 public TableName[] listTableNames(Pattern pattern, boolean includeSysTables) throws IOException { 211 String regex = (pattern == null ? null : pattern.toString()); 212 return listTableNames(regex, includeSysTables); 213 } 214 215 @Override 216 public TableName[] listTableNames(String regex, boolean includeSysTables) throws IOException { 217 try { 218 List<TTableName> tTableNames = client.getTableNamesByPattern(regex, includeSysTables); 219 return ThriftUtilities.tableNamesArrayFromThrift(tTableNames); 220 } catch (TException e) { 221 throw new IOException(e); 222 } 223 } 224 225 @Override 226 public HTableDescriptor getTableDescriptor(TableName tableName) 227 throws TableNotFoundException, IOException { 228 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 229 try { 230 TTableDescriptor tTableDescriptor = client.getTableDescriptor(tTableName); 231 return ThriftUtilities.hTableDescriptorFromThrift(tTableDescriptor); 232 } catch (TException e) { 233 throw new IOException(e); 234 } 235 } 236 237 @Override 238 public TableDescriptor getDescriptor(TableName tableName) 239 throws TableNotFoundException, IOException { 240 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 241 try { 242 TTableDescriptor tTableDescriptor = client.getTableDescriptor(tTableName); 243 return ThriftUtilities.tableDescriptorFromThrift(tTableDescriptor); 244 } catch (TException e) { 245 throw new IOException(e); 246 } 247 } 248 249 @Override 250 public HTableDescriptor[] listTableDescriptorsByNamespace(String name) throws IOException { 251 try { 252 List<TTableDescriptor> tTableDescriptors = client.getTableDescriptorsByNamespace(name); 253 return ThriftUtilities.hTableDescriptorsFromThrift(tTableDescriptors); 254 } catch (TException e) { 255 throw new IOException(e); 256 } 257 } 258 259 @Override 260 public List<TableDescriptor> listTableDescriptorsByNamespace(byte[] name) throws IOException { 261 try { 262 List<TTableDescriptor> tTableDescriptors = client 263 .getTableDescriptorsByNamespace(Bytes.toString(name)); 264 return ThriftUtilities.tableDescriptorsFromThrift(tTableDescriptors); 265 } catch (TException e) { 266 throw new IOException(e); 267 } 268 } 269 270 @Override 271 public TableName[] listTableNamesByNamespace(String name) throws IOException { 272 try { 273 List<TTableName> tTableNames = client.getTableNamesByNamespace(name); 274 return ThriftUtilities.tableNamesArrayFromThrift(tTableNames); 275 } catch (TException e) { 276 throw new IOException(e); 277 } 278 } 279 280 @Override 281 public void createTable(TableDescriptor desc) throws IOException { 282 createTable(desc, null); 283 } 284 285 @Override 286 public void createTable(TableDescriptor desc, byte[] startKey, byte[] endKey, int numRegions) 287 throws IOException { 288 if(numRegions < 3) { 289 throw new IllegalArgumentException("Must create at least three regions"); 290 } else if(Bytes.compareTo(startKey, endKey) >= 0) { 291 throw new IllegalArgumentException("Start key must be smaller than end key"); 292 } 293 if (numRegions == 3) { 294 createTable(desc, new byte[][]{startKey, endKey}); 295 return; 296 } 297 byte [][] splitKeys = Bytes.split(startKey, endKey, numRegions - 3); 298 if(splitKeys == null || splitKeys.length != numRegions - 1) { 299 throw new IllegalArgumentException("Unable to split key range into enough regions"); 300 } 301 createTable(desc, splitKeys); 302 } 303 304 @Override 305 public void createTable(TableDescriptor desc, byte[][] splitKeys) throws IOException { 306 TTableDescriptor tTableDescriptor = ThriftUtilities.tableDescriptorFromHBase(desc); 307 List<ByteBuffer> splitKeyInBuffer = ThriftUtilities.splitKeyFromHBase(splitKeys); 308 try { 309 client.createTable(tTableDescriptor, splitKeyInBuffer); 310 } catch (TException e) { 311 throw new IOException(e); 312 } 313 } 314 315 @Override 316 public void deleteTable(TableName tableName) throws IOException { 317 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 318 try { 319 client.deleteTable(tTableName); 320 } catch (TException e) { 321 throw new IOException(e); 322 } 323 } 324 325 @Override 326 public void truncateTable(TableName tableName, boolean preserveSplits) throws IOException { 327 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 328 try { 329 client.truncateTable(tTableName, preserveSplits); 330 } catch (TException e) { 331 throw new IOException(e); 332 } 333 } 334 335 @Override 336 public void enableTable(TableName tableName) throws IOException { 337 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 338 try { 339 client.enableTable(tTableName); 340 } catch (TException e) { 341 throw new IOException(e); 342 } 343 } 344 345 @Override 346 public void disableTable(TableName tableName) throws IOException { 347 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 348 try { 349 client.disableTable(tTableName); 350 } catch (TException e) { 351 throw new IOException(e); 352 } 353 } 354 355 @Override 356 public boolean isTableEnabled(TableName tableName) throws IOException { 357 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 358 try { 359 return client.isTableEnabled(tTableName); 360 } catch (TException e) { 361 throw new IOException(e); 362 } 363 } 364 365 @Override 366 public boolean isTableDisabled(TableName tableName) throws IOException { 367 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 368 try { 369 return client.isTableDisabled(tTableName); 370 } catch (TException e) { 371 throw new IOException(e); 372 } 373 } 374 375 @Override 376 public boolean isTableAvailable(TableName tableName) throws IOException { 377 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 378 try { 379 return client.isTableAvailable(tTableName); 380 } catch (TException e) { 381 throw new IOException(e); 382 } 383 } 384 385 @Override 386 public boolean isTableAvailable(TableName tableName, byte[][] splitKeys) throws IOException { 387 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 388 List<ByteBuffer> splitKeyInBuffer = ThriftUtilities.splitKeyFromHBase(splitKeys); 389 try { 390 return client.isTableAvailableWithSplit(tTableName, splitKeyInBuffer); 391 } catch (TException e) { 392 throw new IOException(e); 393 } 394 } 395 396 @Override 397 public void addColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily) 398 throws IOException { 399 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 400 TColumnFamilyDescriptor tColumnFamilyDescriptor = ThriftUtilities 401 .columnFamilyDescriptorFromHBase(columnFamily); 402 try { 403 client.addColumnFamily(tTableName, tColumnFamilyDescriptor); 404 } catch (TException e) { 405 throw new IOException(e); 406 } 407 } 408 409 @Override 410 public void deleteColumn(TableName tableName, byte[] columnFamily) throws IOException { 411 deleteColumnFamily(tableName, columnFamily); 412 } 413 414 @Override 415 public void deleteColumnFamily(TableName tableName, byte[] columnFamily) throws IOException { 416 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 417 try { 418 client.deleteColumnFamily(tTableName, ByteBuffer.wrap(columnFamily)); 419 } catch (TException e) { 420 throw new IOException(e); 421 } 422 } 423 424 @Override 425 public void modifyColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily) 426 throws IOException { 427 TTableName tTableName = ThriftUtilities.tableNameFromHBase(tableName); 428 TColumnFamilyDescriptor tColumnFamilyDescriptor = ThriftUtilities 429 .columnFamilyDescriptorFromHBase(columnFamily); 430 try { 431 client.modifyColumnFamily(tTableName, tColumnFamilyDescriptor); 432 } catch (TException e) { 433 throw new IOException(e); 434 } 435 } 436 437 @Override 438 public void modifyTable(TableName tableName, TableDescriptor td) throws IOException { 439 modifyTable(td); 440 } 441 442 @Override 443 public void modifyTable(TableDescriptor td) throws IOException { 444 TTableDescriptor tTableDescriptor = ThriftUtilities 445 .tableDescriptorFromHBase(td); 446 try { 447 client.modifyTable(tTableDescriptor); 448 } catch (TException e) { 449 throw new IOException(e); 450 } 451 } 452 453 @Override 454 public void modifyNamespace(NamespaceDescriptor descriptor) throws IOException { 455 TNamespaceDescriptor tNamespaceDescriptor = ThriftUtilities 456 .namespaceDescriptorFromHBase(descriptor); 457 try { 458 client.modifyNamespace(tNamespaceDescriptor); 459 } catch (TException e) { 460 throw new IOException(e); 461 } 462 } 463 464 @Override 465 public void deleteNamespace(String name) throws IOException { 466 try { 467 client.deleteNamespace(name); 468 } catch (TException e) { 469 throw new IOException(e); 470 } 471 } 472 473 @Override 474 public NamespaceDescriptor getNamespaceDescriptor(String name) 475 throws NamespaceNotFoundException, IOException { 476 try { 477 TNamespaceDescriptor tNamespaceDescriptor = client.getNamespaceDescriptor(name); 478 return ThriftUtilities.namespaceDescriptorFromThrift(tNamespaceDescriptor); 479 } catch (TException e) { 480 throw new IOException(e); 481 } 482 } 483 484 @Override 485 public NamespaceDescriptor[] listNamespaceDescriptors() throws IOException { 486 try { 487 List<TNamespaceDescriptor> tNamespaceDescriptors = client.listNamespaceDescriptors(); 488 return ThriftUtilities.namespaceDescriptorsFromThrift(tNamespaceDescriptors); 489 } catch (TException e) { 490 throw new IOException(e); 491 } 492 } 493 494 @Override 495 public void createNamespace(NamespaceDescriptor descriptor) throws IOException { 496 TNamespaceDescriptor tNamespaceDescriptor = ThriftUtilities 497 .namespaceDescriptorFromHBase(descriptor); 498 try { 499 client.createNamespace(tNamespaceDescriptor); 500 } catch (TException e) { 501 throw new IOException(e); 502 } 503 } 504 505 @Override 506 public boolean switchRpcThrottle(boolean enable) throws IOException { 507 throw new NotImplementedException("switchRpcThrottle by pattern not supported in ThriftAdmin"); 508 } 509 510 @Override 511 public boolean isRpcThrottleEnabled() throws IOException { 512 throw new NotImplementedException( 513 "isRpcThrottleEnabled by pattern not supported in ThriftAdmin"); 514 } 515 516 @Override 517 public boolean exceedThrottleQuotaSwitch(boolean enable) throws IOException { 518 throw new NotImplementedException( 519 "exceedThrottleQuotaSwitch by pattern not supported in ThriftAdmin"); 520 } 521 522 @Override 523 public HTableDescriptor[] disableTables(String regex) throws IOException { 524 throw new NotImplementedException("disableTables by pattern not supported in ThriftAdmin"); 525 } 526 527 @Override 528 public HTableDescriptor[] disableTables(Pattern pattern) throws IOException { 529 throw new NotImplementedException("disableTables by pattern not supported in ThriftAdmin"); 530 } 531 532 @Override 533 public HTableDescriptor[] enableTables(String regex) throws IOException { 534 throw new NotImplementedException("enableTables by pattern not supported in ThriftAdmin"); 535 } 536 537 @Override 538 public HTableDescriptor[] enableTables(Pattern pattern) throws IOException { 539 throw new NotImplementedException("enableTables by pattern not supported in ThriftAdmin"); 540 } 541 542 @Override 543 public HTableDescriptor[] deleteTables(String regex) throws IOException { 544 throw new NotImplementedException("deleteTables by pattern not supported in ThriftAdmin"); 545 } 546 547 @Override 548 public HTableDescriptor[] deleteTables(Pattern pattern) throws IOException { 549 throw new NotImplementedException("deleteTables by pattern not supported in ThriftAdmin"); 550 551 } 552 553 @Override 554 public HTableDescriptor[] getTableDescriptorsByTableName(List<TableName> tableNames) 555 throws IOException { 556 throw new NotImplementedException("getTableDescriptorsByTableName not supported in ThriftAdmin" 557 + ", use getDescriptor to get descriptors one by one"); 558 } 559 560 @Override 561 public List<TableDescriptor> listTableDescriptors(List<TableName> tableNames) throws IOException { 562 throw new NotImplementedException("listTableDescriptors not supported in ThriftAdmin" 563 + ", use getDescriptor to get descriptors one by one"); 564 } 565 566 @Override 567 public HTableDescriptor[] getTableDescriptors(List<String> names) throws IOException { 568 throw new NotImplementedException("getTableDescriptors not supported in ThriftAdmin" 569 + ", use getDescriptor to get descriptors one by one"); 570 } 571 572 @Override 573 public void closeRegion(String regionname, String serverName) { 574 throw new NotImplementedException("closeRegion not supported in ThriftAdmin"); 575 576 } 577 578 @Override 579 public void closeRegion(byte[] regionname, String serverName) { 580 throw new NotImplementedException("closeRegion not supported in ThriftAdmin"); 581 582 } 583 584 @Override 585 public boolean closeRegionWithEncodedRegionName(String encodedRegionName, String serverName) { 586 throw new NotImplementedException( 587 "closeRegionWithEncodedRegionName not supported in ThriftAdmin"); 588 } 589 590 @Override 591 public void closeRegion(ServerName sn, HRegionInfo hri) { 592 throw new NotImplementedException("closeRegion not supported in ThriftAdmin"); 593 594 } 595 596 @Override 597 public List<HRegionInfo> getOnlineRegions(ServerName sn) { 598 throw new NotImplementedException("getOnlineRegions not supported in ThriftAdmin"); 599 } 600 601 @Override 602 public List<RegionInfo> getRegions(ServerName serverName) { 603 throw new NotImplementedException("getRegions not supported in ThriftAdmin"); 604 } 605 606 @Override 607 public void flush(TableName tableName) { 608 throw new NotImplementedException("flush not supported in ThriftAdmin"); 609 610 } 611 612 @Override 613 public void flushRegion(byte[] regionName) { 614 throw new NotImplementedException("flushRegion not supported in ThriftAdmin"); 615 616 } 617 618 @Override 619 public void flushRegionServer(ServerName serverName) { 620 throw new NotImplementedException("flushRegionServer not supported in ThriftAdmin"); 621 622 } 623 624 @Override 625 public void compact(TableName tableName) { 626 throw new NotImplementedException("compact not supported in ThriftAdmin"); 627 628 } 629 630 @Override 631 public void compactRegion(byte[] regionName) { 632 throw new NotImplementedException("compactRegion not supported in ThriftAdmin"); 633 634 } 635 636 @Override 637 public void compact(TableName tableName, byte[] columnFamily) { 638 throw new NotImplementedException("compact not supported in ThriftAdmin"); 639 640 } 641 642 @Override 643 public void compactRegion(byte[] regionName, byte[] columnFamily) { 644 throw new NotImplementedException("compactRegion not supported in ThriftAdmin"); 645 646 } 647 648 @Override 649 public void compact(TableName tableName, CompactType compactType) { 650 throw new NotImplementedException("compact not supported in ThriftAdmin"); 651 652 } 653 654 @Override 655 public void compact(TableName tableName, byte[] columnFamily, CompactType compactType) { 656 throw new NotImplementedException("compact not supported in ThriftAdmin"); 657 658 } 659 660 @Override 661 public void majorCompact(TableName tableName) { 662 throw new NotImplementedException("majorCompact not supported in ThriftAdmin"); 663 664 } 665 666 @Override 667 public void majorCompactRegion(byte[] regionName) { 668 throw new NotImplementedException("majorCompactRegion not supported in ThriftAdmin"); 669 670 } 671 672 @Override 673 public void majorCompact(TableName tableName, byte[] columnFamily) { 674 throw new NotImplementedException("majorCompact not supported in ThriftAdmin"); 675 676 } 677 678 @Override 679 public void majorCompactRegion(byte[] regionName, byte[] columnFamily) { 680 throw new NotImplementedException("majorCompactRegion not supported in ThriftAdmin"); 681 682 } 683 684 @Override 685 public void majorCompact(TableName tableName, CompactType compactType) { 686 throw new NotImplementedException("majorCompact not supported in ThriftAdmin"); 687 688 } 689 690 @Override 691 public void majorCompact(TableName tableName, byte[] columnFamily, CompactType compactType) { 692 throw new NotImplementedException("majorCompact not supported in ThriftAdmin"); 693 694 } 695 696 @Override 697 public Map<ServerName, Boolean> compactionSwitch(boolean switchState, 698 List<String> serverNamesList) { 699 throw new NotImplementedException("compactionSwitch not supported in ThriftAdmin"); 700 } 701 702 @Override 703 public void compactRegionServer(ServerName serverName) { 704 throw new NotImplementedException("compactRegionServer not supported in ThriftAdmin"); 705 706 } 707 708 @Override 709 public void majorCompactRegionServer(ServerName serverName) { 710 throw new NotImplementedException("majorCompactRegionServer not supported in ThriftAdmin"); 711 712 } 713 714 @Override 715 public void move(byte[] encodedRegionName) { 716 throw new NotImplementedException("move not supported in ThriftAdmin"); 717 } 718 719 @Override 720 public void move(byte[] encodedRegionName, ServerName destServerName) { 721 throw new NotImplementedException("move not supported in ThriftAdmin"); 722 } 723 724 @Override 725 public void assign(byte[] regionName) { 726 throw new NotImplementedException("assign not supported in ThriftAdmin"); 727 728 } 729 730 @Override 731 public void unassign(byte[] regionName, boolean force) { 732 throw new NotImplementedException("unassign not supported in ThriftAdmin"); 733 734 } 735 736 @Override 737 public void offline(byte[] regionName) { 738 throw new NotImplementedException("offline not supported in ThriftAdmin"); 739 740 } 741 742 @Override 743 public boolean balancerSwitch(boolean onOrOff, boolean synchronous) { 744 throw new NotImplementedException("balancerSwitch not supported in ThriftAdmin"); 745 } 746 747 @Override 748 public boolean balance() { 749 throw new NotImplementedException("balance not supported in ThriftAdmin"); 750 } 751 752 @Override 753 public boolean balance(boolean force) { 754 throw new NotImplementedException("balance not supported in ThriftAdmin"); 755 } 756 757 @Override 758 public boolean isBalancerEnabled() { 759 throw new NotImplementedException("isBalancerEnabled not supported in ThriftAdmin"); 760 } 761 762 @Override 763 public CacheEvictionStats clearBlockCache(TableName tableName) { 764 throw new NotImplementedException("clearBlockCache not supported in ThriftAdmin"); 765 } 766 767 @Override 768 public boolean normalize() { 769 throw new NotImplementedException("normalize not supported in ThriftAdmin"); 770 } 771 772 @Override 773 public boolean isNormalizerEnabled() { 774 throw new NotImplementedException("isNormalizerEnabled not supported in ThriftAdmin"); 775 } 776 777 @Override 778 public boolean normalizerSwitch(boolean on) { 779 throw new NotImplementedException("normalizerSwitch not supported in ThriftAdmin"); 780 } 781 782 @Override 783 public boolean catalogJanitorSwitch(boolean onOrOff) { 784 throw new NotImplementedException("catalogJanitorSwitch not supported in ThriftAdmin"); 785 } 786 787 @Override 788 public int runCatalogJanitor() { 789 throw new NotImplementedException("runCatalogJanitor not supported in ThriftAdmin"); 790 } 791 792 @Override 793 public boolean isCatalogJanitorEnabled() { 794 throw new NotImplementedException("isCatalogJanitorEnabled not supported in ThriftAdmin"); 795 } 796 797 @Override 798 public boolean cleanerChoreSwitch(boolean onOrOff) { 799 throw new NotImplementedException("cleanerChoreSwitch not supported in ThriftAdmin"); 800 } 801 802 @Override 803 public boolean runCleanerChore() { 804 throw new NotImplementedException("runCleanerChore not supported in ThriftAdmin"); 805 } 806 807 @Override 808 public boolean isCleanerChoreEnabled() { 809 throw new NotImplementedException("isCleanerChoreEnabled not supported in ThriftAdmin"); 810 } 811 812 @Override 813 public void mergeRegions(byte[] nameOfRegionA, byte[] nameOfRegionB, boolean forcible) { 814 throw new NotImplementedException("mergeRegions not supported in ThriftAdmin"); 815 816 } 817 818 @Override 819 public Future<Void> mergeRegionsAsync(byte[] nameOfRegionA, byte[] nameOfRegionB, 820 boolean forcible) { 821 throw new NotImplementedException("mergeRegionsAsync not supported in ThriftAdmin"); 822 } 823 824 @Override 825 public Future<Void> mergeRegionsAsync(byte[][] nameofRegionsToMerge, boolean forcible) { 826 throw new NotImplementedException("mergeRegionsAsync not supported in ThriftAdmin"); 827 } 828 829 @Override 830 public void split(TableName tableName) { 831 throw new NotImplementedException("split not supported in ThriftAdmin"); 832 } 833 834 @Override 835 public void splitRegion(byte[] regionName) { 836 throw new NotImplementedException("splitRegion not supported in ThriftAdmin"); 837 } 838 839 @Override 840 public void split(TableName tableName, byte[] splitPoint) { 841 throw new NotImplementedException("split not supported in ThriftAdmin"); 842 } 843 844 @Override 845 public void splitRegion(byte[] regionName, byte[] splitPoint) { 846 throw new NotImplementedException("splitRegion not supported in ThriftAdmin"); 847 } 848 849 @Override 850 public Future<Void> splitRegionAsync(byte[] regionName, byte[] splitPoint) { 851 throw new NotImplementedException("splitRegionAsync not supported in ThriftAdmin"); 852 } 853 854 @Override 855 public Future<Void> modifyTableAsync(TableName tableName, TableDescriptor td) { 856 throw new NotImplementedException("modifyTableAsync not supported in ThriftAdmin"); 857 } 858 859 @Override 860 public Future<Void> modifyTableAsync(TableDescriptor td) { 861 throw new NotImplementedException("modifyTableAsync not supported in ThriftAdmin"); 862 } 863 864 @Override 865 public void shutdown() { 866 throw new NotImplementedException("shutdown not supported in ThriftAdmin"); 867 868 } 869 870 @Override 871 public void stopMaster() { 872 throw new NotImplementedException("stopMaster not supported in ThriftAdmin"); 873 874 } 875 876 @Override 877 public boolean isMasterInMaintenanceMode() { 878 throw new NotImplementedException("isMasterInMaintenanceMode not supported in ThriftAdmin"); 879 } 880 881 @Override 882 public void stopRegionServer(String hostnamePort) { 883 throw new NotImplementedException("stopRegionServer not supported in ThriftAdmin"); 884 885 } 886 887 @Override 888 public ClusterMetrics getClusterMetrics(EnumSet<ClusterMetrics.Option> options) { 889 throw new NotImplementedException("getClusterMetrics not supported in ThriftAdmin"); 890 } 891 892 @Override 893 public List<RegionMetrics> getRegionMetrics(ServerName serverName, TableName tableName) { 894 throw new NotImplementedException("getRegionMetrics not supported in ThriftAdmin"); 895 } 896 897 @Override 898 public Future<Void> createNamespaceAsync(NamespaceDescriptor descriptor) { 899 throw new NotImplementedException("createNamespaceAsync not supported in ThriftAdmin"); 900 } 901 902 @Override 903 public Future<Void> modifyNamespaceAsync(NamespaceDescriptor descriptor) { 904 throw new NotImplementedException("modifyNamespaceAsync not supported in ThriftAdmin"); 905 } 906 907 @Override 908 public List<HRegionInfo> getTableRegions(TableName tableName) { 909 throw new NotImplementedException("getTableRegions not supported in ThriftAdmin"); 910 } 911 912 @Override 913 public List<RegionInfo> getRegions(TableName tableName) { 914 throw new NotImplementedException("getRegions not supported in ThriftAdmin"); 915 } 916 917 @Override 918 public boolean abortProcedure(long procId, boolean mayInterruptIfRunning) { 919 throw new NotImplementedException("abortProcedure not supported in ThriftAdmin"); 920 } 921 922 @Override 923 public Future<Boolean> abortProcedureAsync(long procId, boolean mayInterruptIfRunning) { 924 throw new NotImplementedException("abortProcedureAsync not supported in ThriftAdmin"); 925 } 926 927 @Override 928 public String getProcedures() { 929 throw new NotImplementedException("getProcedures not supported in ThriftAdmin"); 930 } 931 932 @Override 933 public String getLocks() { 934 throw new NotImplementedException("getLocks not supported in ThriftAdmin"); 935 } 936 937 @Override 938 public void rollWALWriter(ServerName serverName) { 939 throw new NotImplementedException("rollWALWriter not supported in ThriftAdmin"); 940 941 } 942 943 @Override 944 public CompactionState getCompactionState(TableName tableName) { 945 throw new NotImplementedException("getCompactionState not supported in ThriftAdmin"); 946 } 947 948 @Override 949 public CompactionState getCompactionState(TableName tableName, CompactType compactType) { 950 throw new NotImplementedException("getCompactionState not supported in ThriftAdmin"); 951 } 952 953 @Override 954 public CompactionState getCompactionStateForRegion(byte[] regionName) { 955 throw new NotImplementedException("getCompactionStateForRegion not supported in ThriftAdmin"); 956 } 957 958 @Override 959 public long getLastMajorCompactionTimestamp(TableName tableName) { 960 throw new NotImplementedException( 961 "getLastMajorCompactionTimestamp not supported in ThriftAdmin"); 962 } 963 964 @Override 965 public long getLastMajorCompactionTimestampForRegion(byte[] regionName) { 966 throw new NotImplementedException( 967 "getLastMajorCompactionTimestampForRegion not supported in ThriftAdmin"); 968 } 969 970 @Override 971 public void snapshot(String snapshotName, TableName tableName) { 972 throw new NotImplementedException("snapshot not supported in ThriftAdmin"); 973 974 } 975 976 @Override 977 public void snapshot(byte[] snapshotName, TableName tableName) { 978 throw new NotImplementedException("snapshot not supported in ThriftAdmin"); 979 980 } 981 982 @Override 983 public void snapshot(String snapshotName, TableName tableName, SnapshotType type) { 984 throw new NotImplementedException("snapshot not supported in ThriftAdmin"); 985 986 } 987 988 @Override 989 public void snapshot(SnapshotDescription snapshot) { 990 throw new NotImplementedException("snapshot not supported in ThriftAdmin"); 991 992 } 993 994 @Override 995 public void snapshotAsync(SnapshotDescription snapshot) { 996 throw new NotImplementedException("snapshotAsync not supported in ThriftAdmin"); 997 998 } 999 1000 @Override 1001 public boolean isSnapshotFinished(SnapshotDescription snapshot) { 1002 throw new NotImplementedException("isSnapshotFinished not supported in ThriftAdmin"); 1003 } 1004 1005 @Override 1006 public void restoreSnapshot(byte[] snapshotName) { 1007 throw new NotImplementedException("restoreSnapshot not supported in ThriftAdmin"); 1008 1009 } 1010 1011 @Override 1012 public void restoreSnapshot(String snapshotName) { 1013 throw new NotImplementedException("restoreSnapshot not supported in ThriftAdmin"); 1014 1015 } 1016 1017 @Override 1018 public Future<Void> restoreSnapshotAsync(String snapshotName) { 1019 throw new NotImplementedException("restoreSnapshotAsync not supported in ThriftAdmin"); 1020 } 1021 1022 @Override 1023 public void restoreSnapshot(byte[] snapshotName, boolean takeFailSafeSnapshot) { 1024 throw new NotImplementedException("restoreSnapshot not supported in ThriftAdmin"); 1025 1026 } 1027 1028 @Override 1029 public void restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot) { 1030 throw new NotImplementedException("restoreSnapshot not supported in ThriftAdmin"); 1031 1032 } 1033 1034 @Override 1035 public void restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot, 1036 boolean restoreAcl) { 1037 throw new NotImplementedException("restoreSnapshot not supported in ThriftAdmin"); 1038 1039 } 1040 1041 @Override 1042 public void cloneSnapshot(byte[] snapshotName, TableName tableName) { 1043 throw new NotImplementedException("cloneSnapshot not supported in ThriftAdmin"); 1044 1045 } 1046 1047 @Override 1048 public void cloneSnapshot(String snapshotName, TableName tableName, boolean restoreAcl) { 1049 throw new NotImplementedException("cloneSnapshot not supported in ThriftAdmin"); 1050 1051 } 1052 1053 @Override 1054 public void cloneSnapshot(String snapshotName, TableName tableName) { 1055 throw new NotImplementedException("cloneSnapshot not supported in ThriftAdmin"); 1056 1057 } 1058 1059 @Override 1060 public Future<Void> cloneSnapshotAsync(String snapshotName, TableName tableName) { 1061 throw new NotImplementedException("cloneSnapshotAsync not supported in ThriftAdmin"); 1062 } 1063 1064 @Override 1065 public void execProcedure(String signature, String instance, Map<String, String> props) { 1066 throw new NotImplementedException("execProcedure not supported in ThriftAdmin"); 1067 1068 } 1069 1070 @Override 1071 public byte[] execProcedureWithReturn(String signature, String instance, 1072 Map<String, String> props) { 1073 throw new NotImplementedException("execProcedureWithReturn not supported in ThriftAdmin"); 1074 } 1075 1076 @Override 1077 public boolean isProcedureFinished(String signature, String instance, Map<String, String> props) { 1078 throw new NotImplementedException("isProcedureFinished not supported in ThriftAdmin"); 1079 } 1080 1081 @Override 1082 public List<SnapshotDescription> listSnapshots() { 1083 throw new NotImplementedException("listSnapshots not supported in ThriftAdmin"); 1084 } 1085 1086 @Override 1087 public List<SnapshotDescription> listSnapshots(String regex) { 1088 throw new NotImplementedException("listSnapshots not supported in ThriftAdmin"); 1089 } 1090 1091 @Override 1092 public List<SnapshotDescription> listSnapshots(Pattern pattern) { 1093 throw new NotImplementedException("listSnapshots not supported in ThriftAdmin"); 1094 } 1095 1096 @Override 1097 public List<SnapshotDescription> listTableSnapshots(String tableNameRegex, 1098 String snapshotNameRegex) { 1099 throw new NotImplementedException("listTableSnapshots not supported in ThriftAdmin"); 1100 } 1101 1102 @Override 1103 public List<SnapshotDescription> listTableSnapshots(Pattern tableNamePattern, 1104 Pattern snapshotNamePattern) { 1105 throw new NotImplementedException("listTableSnapshots not supported in ThriftAdmin"); 1106 } 1107 1108 @Override 1109 public void deleteSnapshot(byte[] snapshotName) { 1110 throw new NotImplementedException("deleteSnapshot not supported in ThriftAdmin"); 1111 1112 } 1113 1114 @Override 1115 public void deleteSnapshot(String snapshotName) { 1116 throw new NotImplementedException("deleteSnapshot not supported in ThriftAdmin"); 1117 1118 } 1119 1120 @Override 1121 public void deleteSnapshots(String regex) { 1122 throw new NotImplementedException("deleteSnapshots not supported in ThriftAdmin"); 1123 1124 } 1125 1126 @Override 1127 public void deleteSnapshots(Pattern pattern) { 1128 throw new NotImplementedException("deleteSnapshots not supported in ThriftAdmin"); 1129 1130 } 1131 1132 @Override 1133 public void deleteTableSnapshots(String tableNameRegex, String snapshotNameRegex) { 1134 throw new NotImplementedException("deleteTableSnapshots not supported in ThriftAdmin"); 1135 1136 } 1137 1138 @Override 1139 public void deleteTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern) { 1140 throw new NotImplementedException("deleteTableSnapshots not supported in ThriftAdmin"); 1141 1142 } 1143 1144 @Override 1145 public void setQuota(QuotaSettings quota) { 1146 throw new NotImplementedException("setQuota not supported in ThriftAdmin"); 1147 1148 } 1149 1150 @Override 1151 public QuotaRetriever getQuotaRetriever(QuotaFilter filter) { 1152 throw new NotImplementedException("getQuotaRetriever not supported in ThriftAdmin"); 1153 } 1154 1155 @Override 1156 public List<QuotaSettings> getQuota(QuotaFilter filter) { 1157 throw new NotImplementedException("getQuota not supported in ThriftAdmin"); 1158 } 1159 1160 @Override 1161 public CoprocessorRpcChannel coprocessorService() { 1162 throw new NotImplementedException("coprocessorService not supported in ThriftAdmin"); 1163 } 1164 1165 @Override 1166 public CoprocessorRpcChannel coprocessorService(ServerName serverName) { 1167 throw new NotImplementedException("coprocessorService not supported in ThriftAdmin"); 1168 } 1169 1170 @Override 1171 public void updateConfiguration(ServerName server) { 1172 throw new NotImplementedException("updateConfiguration not supported in ThriftAdmin"); 1173 1174 } 1175 1176 @Override 1177 public void updateConfiguration() { 1178 throw new NotImplementedException("updateConfiguration not supported in ThriftAdmin"); 1179 1180 } 1181 1182 @Override 1183 public List<SecurityCapability> getSecurityCapabilities() { 1184 throw new NotImplementedException("getSecurityCapabilities not supported in ThriftAdmin"); 1185 } 1186 1187 @Override 1188 public boolean splitSwitch(boolean enabled, boolean synchronous) { 1189 throw new NotImplementedException("splitSwitch not supported in ThriftAdmin"); 1190 } 1191 1192 @Override 1193 public boolean mergeSwitch(boolean enabled, boolean synchronous) { 1194 throw new NotImplementedException("mergeSwitch not supported in ThriftAdmin"); 1195 } 1196 1197 @Override 1198 public boolean isSplitEnabled() { 1199 throw new NotImplementedException("isSplitEnabled not supported in ThriftAdmin"); 1200 } 1201 1202 @Override 1203 public boolean isMergeEnabled() { 1204 throw new NotImplementedException("isMergeEnabled not supported in ThriftAdmin"); 1205 } 1206 1207 @Override 1208 public void addReplicationPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled) { 1209 throw new NotImplementedException("addReplicationPeer not supported in ThriftAdmin"); 1210 1211 } 1212 1213 @Override 1214 public Future<Void> addReplicationPeerAsync(String peerId, ReplicationPeerConfig peerConfig, 1215 boolean enabled) { 1216 throw new NotImplementedException("addReplicationPeerAsync not supported in ThriftAdmin"); 1217 } 1218 1219 @Override 1220 public void removeReplicationPeer(String peerId) { 1221 throw new NotImplementedException("removeReplicationPeer not supported in ThriftAdmin"); 1222 1223 } 1224 1225 @Override 1226 public Future<Void> removeReplicationPeerAsync(String peerId) { 1227 throw new NotImplementedException("removeReplicationPeerAsync not supported in ThriftAdmin"); 1228 } 1229 1230 @Override 1231 public void enableReplicationPeer(String peerId) { 1232 throw new NotImplementedException("enableReplicationPeer not supported in ThriftAdmin"); 1233 1234 } 1235 1236 @Override 1237 public Future<Void> enableReplicationPeerAsync(String peerId) { 1238 throw new NotImplementedException("enableReplicationPeerAsync not supported in ThriftAdmin"); 1239 } 1240 1241 @Override 1242 public void disableReplicationPeer(String peerId) { 1243 throw new NotImplementedException("disableReplicationPeer not supported in ThriftAdmin"); 1244 1245 } 1246 1247 @Override 1248 public Future<Void> disableReplicationPeerAsync(String peerId) { 1249 throw new NotImplementedException("disableReplicationPeerAsync not supported in ThriftAdmin"); 1250 } 1251 1252 @Override 1253 public ReplicationPeerConfig getReplicationPeerConfig(String peerId) { 1254 throw new NotImplementedException("getReplicationPeerConfig not supported in ThriftAdmin"); 1255 } 1256 1257 @Override 1258 public void updateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig) { 1259 throw new NotImplementedException("updateReplicationPeerConfig not supported in ThriftAdmin"); 1260 1261 } 1262 1263 @Override 1264 public Future<Void> updateReplicationPeerConfigAsync(String peerId, 1265 ReplicationPeerConfig peerConfig) { 1266 throw new NotImplementedException( 1267 "updateReplicationPeerConfigAsync not supported in ThriftAdmin"); 1268 } 1269 1270 @Override 1271 public void appendReplicationPeerTableCFs(String id, Map<TableName, List<String>> tableCfs) 1272 throws ReplicationException, IOException { 1273 throw new NotImplementedException("appendReplicationPeerTableCFs not supported in ThriftAdmin"); 1274 1275 } 1276 1277 @Override 1278 public void removeReplicationPeerTableCFs(String id, Map<TableName, List<String>> tableCfs) 1279 throws ReplicationException, IOException { 1280 throw new NotImplementedException("removeReplicationPeerTableCFs not supported in ThriftAdmin"); 1281 1282 } 1283 1284 @Override 1285 public List<ReplicationPeerDescription> listReplicationPeers() { 1286 throw new NotImplementedException("listReplicationPeers not supported in ThriftAdmin"); 1287 } 1288 1289 @Override 1290 public List<ReplicationPeerDescription> listReplicationPeers(Pattern pattern) { 1291 throw new NotImplementedException("listReplicationPeers not supported in ThriftAdmin"); 1292 } 1293 1294 @Override 1295 public void decommissionRegionServers(List<ServerName> servers, boolean offload) { 1296 throw new NotImplementedException("decommissionRegionServers not supported in ThriftAdmin"); 1297 1298 } 1299 1300 @Override 1301 public List<ServerName> listDecommissionedRegionServers() { 1302 throw new NotImplementedException( 1303 "listDecommissionedRegionServers not supported in ThriftAdmin"); 1304 } 1305 1306 @Override 1307 public void recommissionRegionServer(ServerName server, List<byte[]> encodedRegionNames) { 1308 throw new NotImplementedException("recommissionRegionServer not supported in ThriftAdmin"); 1309 1310 } 1311 1312 @Override 1313 public List<TableCFs> listReplicatedTableCFs() { 1314 throw new NotImplementedException("listReplicatedTableCFs not supported in ThriftAdmin"); 1315 } 1316 1317 @Override 1318 public void enableTableReplication(TableName tableName) { 1319 throw new NotImplementedException("enableTableReplication not supported in ThriftAdmin"); 1320 1321 } 1322 1323 @Override 1324 public void disableTableReplication(TableName tableName) { 1325 throw new NotImplementedException("disableTableReplication not supported in ThriftAdmin"); 1326 1327 } 1328 1329 @Override 1330 public void clearCompactionQueues(ServerName serverName, Set<String> queues) { 1331 throw new NotImplementedException("clearCompactionQueues not supported in ThriftAdmin"); 1332 1333 } 1334 1335 @Override 1336 public List<ServerName> clearDeadServers(List<ServerName> servers) { 1337 throw new NotImplementedException("clearDeadServers not supported in ThriftAdmin"); 1338 } 1339 1340 @Override 1341 public void cloneTableSchema(TableName tableName, TableName newTableName, 1342 boolean preserveSplits) { 1343 throw new NotImplementedException("cloneTableSchema not supported in ThriftAdmin"); 1344 1345 } 1346 1347 @Override 1348 public Future<Void> createTableAsync(TableDescriptor desc) { 1349 throw new NotImplementedException("createTableAsync not supported in ThriftAdmin"); 1350 } 1351 1352 @Override 1353 public Future<Void> createTableAsync(TableDescriptor desc, byte[][] splitKeys) { 1354 throw new NotImplementedException("createTableAsync not supported in ThriftAdmin"); 1355 } 1356 1357 @Override 1358 public Future<Void> deleteTableAsync(TableName tableName) { 1359 throw new NotImplementedException("deleteTableAsync not supported in ThriftAdmin"); 1360 } 1361 1362 @Override 1363 public Future<Void> truncateTableAsync(TableName tableName, boolean preserveSplits) { 1364 throw new NotImplementedException("truncateTableAsync not supported in ThriftAdmin"); 1365 } 1366 1367 @Override 1368 public Future<Void> enableTableAsync(TableName tableName) { 1369 throw new NotImplementedException("enableTableAsync not supported in ThriftAdmin"); 1370 } 1371 1372 @Override 1373 public Future<Void> disableTableAsync(TableName tableName) { 1374 throw new NotImplementedException("disableTableAsync not supported in ThriftAdmin"); 1375 } 1376 1377 @Override 1378 public Pair<Integer, Integer> getAlterStatus(TableName tableName) { 1379 throw new NotImplementedException("getAlterStatus not supported in ThriftAdmin"); 1380 } 1381 1382 @Override 1383 public Pair<Integer, Integer> getAlterStatus(byte[] tableName) { 1384 throw new NotImplementedException("getAlterStatus not supported in ThriftAdmin"); 1385 } 1386 1387 @Override 1388 public Future<Void> deleteColumnFamilyAsync(TableName tableName, byte[] columnFamily) { 1389 throw new NotImplementedException("deleteColumnFamilyAsync not supported in ThriftAdmin"); 1390 } 1391 1392 @Override 1393 public Future<Void> addColumnFamilyAsync(TableName tableName, 1394 ColumnFamilyDescriptor columnFamily) { 1395 throw new NotImplementedException("addColumnFamilyAsync not supported in ThriftAdmin"); 1396 } 1397 1398 @Override 1399 public Future<Void> modifyColumnFamilyAsync(TableName tableName, 1400 ColumnFamilyDescriptor columnFamily) { 1401 throw new NotImplementedException("modifyColumnFamilyAsync not supported in ThriftAdmin"); 1402 } 1403 1404 @Override 1405 public Future<Void> deleteNamespaceAsync(String name) { 1406 throw new NotImplementedException("deleteNamespaceAsync not supported in ThriftAdmin"); 1407 } 1408 1409 @Override 1410 public Map<TableName, Long> getSpaceQuotaTableSizes() throws IOException { 1411 throw new NotImplementedException("getSpaceQuotaTableSizes not supported in ThriftAdmin"); 1412 } 1413 1414 @Override 1415 public Map<TableName, SpaceQuotaSnapshot> getRegionServerSpaceQuotaSnapshots( 1416 ServerName serverName) throws IOException { 1417 throw new NotImplementedException( 1418 "getRegionServerSpaceQuotaSnapshots not supported in ThriftAdmin"); 1419 } 1420 1421 @Override 1422 public SpaceQuotaSnapshot getCurrentSpaceQuotaSnapshot(String namespace) throws IOException { 1423 throw new NotImplementedException("getCurrentSpaceQuotaSnapshot not supported in ThriftAdmin"); 1424 } 1425 1426 @Override 1427 public SpaceQuotaSnapshot getCurrentSpaceQuotaSnapshot(TableName tableName) throws IOException { 1428 throw new NotImplementedException("getCurrentSpaceQuotaSnapshot not supported in ThriftAdmin"); 1429 } 1430 1431 @Override 1432 public void grant(UserPermission userPermission, boolean mergeExistingPermissions) { 1433 throw new NotImplementedException("grant not supported in ThriftAdmin"); 1434 } 1435 1436 @Override 1437 public void revoke(UserPermission userPermission) { 1438 throw new NotImplementedException("revoke not supported in ThriftAdmin"); 1439 } 1440 1441 @Override 1442 public List<UserPermission> 1443 getUserPermissions(GetUserPermissionsRequest getUserPermissionsRequest) { 1444 throw new NotImplementedException("getUserPermissions not supported in ThriftAdmin"); 1445 } 1446 1447 @Override 1448 public List<Boolean> hasUserPermissions(String userName, List<Permission> permissions) { 1449 throw new NotImplementedException("hasUserPermissions not supported in ThriftAdmin"); 1450 } 1451 1452 @Override 1453 public Future<Void> splitRegionAsync(byte[] regionName) throws IOException { 1454 return splitRegionAsync(regionName, null); 1455 } 1456}