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