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