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 void shutdown() { 755 throw new NotImplementedException("shutdown not supported in ThriftAdmin"); 756 757 } 758 759 @Override 760 public void stopMaster() { 761 throw new NotImplementedException("stopMaster not supported in ThriftAdmin"); 762 763 } 764 765 @Override 766 public boolean isMasterInMaintenanceMode() { 767 throw new NotImplementedException("isMasterInMaintenanceMode not supported in ThriftAdmin"); 768 } 769 770 @Override 771 public void stopRegionServer(String hostnamePort) { 772 throw new NotImplementedException("stopRegionServer not supported in ThriftAdmin"); 773 774 } 775 776 @Override 777 public ClusterMetrics getClusterMetrics(EnumSet<ClusterMetrics.Option> options) { 778 throw new NotImplementedException("getClusterMetrics not supported in ThriftAdmin"); 779 } 780 781 @Override 782 public List<RegionMetrics> getRegionMetrics(ServerName serverName) { 783 throw new NotImplementedException("getRegionMetrics not supported in ThriftAdmin"); 784 } 785 786 @Override 787 public List<RegionMetrics> getRegionMetrics(ServerName serverName, TableName tableName) { 788 throw new NotImplementedException("getRegionMetrics not supported in ThriftAdmin"); 789 } 790 791 @Override 792 public Future<Void> createNamespaceAsync(NamespaceDescriptor descriptor) { 793 throw new NotImplementedException("createNamespaceAsync not supported in ThriftAdmin"); 794 } 795 796 @Override 797 public Future<Void> modifyNamespaceAsync(NamespaceDescriptor descriptor) { 798 throw new NotImplementedException("modifyNamespaceAsync not supported in ThriftAdmin"); 799 } 800 801 @Override 802 public List<RegionInfo> getRegions(TableName tableName) { 803 throw new NotImplementedException("getRegions not supported in ThriftAdmin"); 804 } 805 806 @Override 807 public boolean abortProcedure(long procId, boolean mayInterruptIfRunning) { 808 throw new NotImplementedException("abortProcedure not supported in ThriftAdmin"); 809 } 810 811 @Override 812 public Future<Boolean> abortProcedureAsync(long procId, boolean mayInterruptIfRunning) { 813 throw new NotImplementedException("abortProcedureAsync not supported in ThriftAdmin"); 814 } 815 816 @Override 817 public String getProcedures() { 818 throw new NotImplementedException("getProcedures not supported in ThriftAdmin"); 819 } 820 821 @Override 822 public String getLocks() { 823 throw new NotImplementedException("getLocks not supported in ThriftAdmin"); 824 } 825 826 @Override 827 public void rollWALWriter(ServerName serverName) { 828 throw new NotImplementedException("rollWALWriter not supported in ThriftAdmin"); 829 } 830 831 @Override 832 public Map<ServerName, Long> rollAllWALWriters() { 833 throw new NotImplementedException("rollAllWALWriters not supported in ThriftAdmin"); 834 } 835 836 @Override 837 public CompactionState getCompactionState(TableName tableName) { 838 throw new NotImplementedException("getCompactionState not supported in ThriftAdmin"); 839 } 840 841 @Override 842 public CompactionState getCompactionState(TableName tableName, CompactType compactType) { 843 throw new NotImplementedException("getCompactionState not supported in ThriftAdmin"); 844 } 845 846 @Override 847 public CompactionState getCompactionStateForRegion(byte[] regionName) { 848 throw new NotImplementedException("getCompactionStateForRegion not supported in ThriftAdmin"); 849 } 850 851 @Override 852 public long getLastMajorCompactionTimestamp(TableName tableName) { 853 throw new NotImplementedException( 854 "getLastMajorCompactionTimestamp not supported in ThriftAdmin"); 855 } 856 857 @Override 858 public long getLastMajorCompactionTimestampForRegion(byte[] regionName) { 859 throw new NotImplementedException( 860 "getLastMajorCompactionTimestampForRegion not supported in ThriftAdmin"); 861 } 862 863 @Override 864 public void snapshot(String snapshotName, TableName tableName) { 865 throw new NotImplementedException("snapshot not supported in ThriftAdmin"); 866 867 } 868 869 @Override 870 public void snapshot(String snapshotName, TableName tableName, SnapshotType type) { 871 throw new NotImplementedException("snapshot not supported in ThriftAdmin"); 872 873 } 874 875 @Override 876 public void snapshot(SnapshotDescription snapshot) { 877 throw new NotImplementedException("snapshot not supported in ThriftAdmin"); 878 879 } 880 881 @Override 882 public Future<Void> snapshotAsync(SnapshotDescription snapshot) { 883 throw new NotImplementedException("snapshotAsync not supported in ThriftAdmin"); 884 885 } 886 887 @Override 888 public boolean isSnapshotFinished(SnapshotDescription snapshot) { 889 throw new NotImplementedException("isSnapshotFinished not supported in ThriftAdmin"); 890 } 891 892 @Override 893 public void restoreSnapshot(String snapshotName) { 894 throw new NotImplementedException("restoreSnapshot not supported in ThriftAdmin"); 895 896 } 897 898 @Override 899 public void restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot, 900 boolean restoreAcl) { 901 throw new NotImplementedException("restoreSnapshot not supported in ThriftAdmin"); 902 } 903 904 @Override 905 public Future<Void> cloneSnapshotAsync(String snapshotName, TableName tableName, boolean cloneAcl, 906 String customSFT) throws IOException, TableExistsException, RestoreSnapshotException { 907 throw new NotImplementedException("cloneSnapshotAsync not supported in ThriftAdmin"); 908 } 909 910 @Override 911 public void execProcedure(String signature, String instance, Map<String, String> props) { 912 throw new NotImplementedException("execProcedure not supported in ThriftAdmin"); 913 914 } 915 916 @Override 917 public byte[] execProcedureWithReturn(String signature, String instance, 918 Map<String, String> props) { 919 throw new NotImplementedException("execProcedureWithReturn not supported in ThriftAdmin"); 920 } 921 922 @Override 923 public boolean isProcedureFinished(String signature, String instance, Map<String, String> props) { 924 throw new NotImplementedException("isProcedureFinished not supported in ThriftAdmin"); 925 } 926 927 @Override 928 public List<SnapshotDescription> listSnapshots() { 929 throw new NotImplementedException("listSnapshots not supported in ThriftAdmin"); 930 } 931 932 @Override 933 public List<SnapshotDescription> listSnapshots(Pattern pattern) { 934 throw new NotImplementedException("listSnapshots not supported in ThriftAdmin"); 935 } 936 937 @Override 938 public List<SnapshotDescription> listTableSnapshots(Pattern tableNamePattern, 939 Pattern snapshotNamePattern) { 940 throw new NotImplementedException("listTableSnapshots not supported in ThriftAdmin"); 941 } 942 943 @Override 944 public void deleteSnapshot(String snapshotName) { 945 throw new NotImplementedException("deleteSnapshot not supported in ThriftAdmin"); 946 } 947 948 @Override 949 public void deleteSnapshots(Pattern pattern) { 950 throw new NotImplementedException("deleteSnapshots not supported in ThriftAdmin"); 951 } 952 953 @Override 954 public void deleteTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern) { 955 throw new NotImplementedException("deleteTableSnapshots not supported in ThriftAdmin"); 956 } 957 958 @Override 959 public void setQuota(QuotaSettings quota) { 960 throw new NotImplementedException("setQuota not supported in ThriftAdmin"); 961 } 962 963 @Override 964 public List<QuotaSettings> getQuota(QuotaFilter filter) { 965 throw new NotImplementedException("getQuota not supported in ThriftAdmin"); 966 } 967 968 @Override 969 public CoprocessorRpcChannel coprocessorService() { 970 throw new NotImplementedException("coprocessorService not supported in ThriftAdmin"); 971 } 972 973 @Override 974 public CoprocessorRpcChannel coprocessorService(ServerName serverName) { 975 throw new NotImplementedException("coprocessorService not supported in ThriftAdmin"); 976 } 977 978 @Override 979 public void updateConfiguration(ServerName server) { 980 throw new NotImplementedException("updateConfiguration not supported in ThriftAdmin"); 981 } 982 983 @Override 984 public void updateConfiguration() { 985 throw new NotImplementedException("updateConfiguration not supported in ThriftAdmin"); 986 } 987 988 @Override 989 public void updateConfiguration(String groupName) { 990 throw new NotImplementedException("updateConfiguration not supported in ThriftAdmin"); 991 } 992 993 @Override 994 public List<SecurityCapability> getSecurityCapabilities() { 995 throw new NotImplementedException("getSecurityCapabilities not supported in ThriftAdmin"); 996 } 997 998 @Override 999 public boolean splitSwitch(boolean enabled, boolean synchronous) { 1000 throw new NotImplementedException("splitSwitch not supported in ThriftAdmin"); 1001 } 1002 1003 @Override 1004 public boolean mergeSwitch(boolean enabled, boolean synchronous) { 1005 throw new NotImplementedException("mergeSwitch not supported in ThriftAdmin"); 1006 } 1007 1008 @Override 1009 public boolean isSplitEnabled() { 1010 throw new NotImplementedException("isSplitEnabled not supported in ThriftAdmin"); 1011 } 1012 1013 @Override 1014 public boolean isMergeEnabled() { 1015 throw new NotImplementedException("isMergeEnabled not supported in ThriftAdmin"); 1016 } 1017 1018 @Override 1019 public Future<Void> addReplicationPeerAsync(String peerId, ReplicationPeerConfig peerConfig, 1020 boolean enabled) { 1021 throw new NotImplementedException("addReplicationPeerAsync not supported in ThriftAdmin"); 1022 } 1023 1024 @Override 1025 public Future<Void> removeReplicationPeerAsync(String peerId) { 1026 throw new NotImplementedException("removeReplicationPeerAsync not supported in ThriftAdmin"); 1027 } 1028 1029 @Override 1030 public Future<Void> enableReplicationPeerAsync(String peerId) { 1031 throw new NotImplementedException("enableReplicationPeerAsync not supported in ThriftAdmin"); 1032 } 1033 1034 @Override 1035 public Future<Void> disableReplicationPeerAsync(String peerId) { 1036 throw new NotImplementedException("disableReplicationPeerAsync not supported in ThriftAdmin"); 1037 } 1038 1039 @Override 1040 public ReplicationPeerConfig getReplicationPeerConfig(String peerId) { 1041 throw new NotImplementedException("getReplicationPeerConfig not supported in ThriftAdmin"); 1042 } 1043 1044 @Override 1045 public Future<Void> updateReplicationPeerConfigAsync(String peerId, 1046 ReplicationPeerConfig peerConfig) { 1047 throw new NotImplementedException( 1048 "updateReplicationPeerConfigAsync not supported in ThriftAdmin"); 1049 } 1050 1051 @Override 1052 public List<ReplicationPeerDescription> listReplicationPeers() { 1053 throw new NotImplementedException("listReplicationPeers not supported in ThriftAdmin"); 1054 } 1055 1056 @Override 1057 public List<ReplicationPeerDescription> listReplicationPeers(Pattern pattern) { 1058 throw new NotImplementedException("listReplicationPeers not supported in ThriftAdmin"); 1059 } 1060 1061 @Override 1062 public Future<Void> transitReplicationPeerSyncReplicationStateAsync(String peerId, 1063 SyncReplicationState state) { 1064 throw new NotImplementedException( 1065 "transitReplicationPeerSyncReplicationStateAsync not supported in ThriftAdmin"); 1066 } 1067 1068 @Override 1069 public boolean isReplicationPeerEnabled(String peerId) throws IOException { 1070 throw new NotImplementedException("isReplicationPeerEnabled not supported in ThriftAdmin"); 1071 } 1072 1073 @Override 1074 public void decommissionRegionServers(List<ServerName> servers, boolean offload) { 1075 throw new NotImplementedException("decommissionRegionServers not supported in ThriftAdmin"); 1076 1077 } 1078 1079 @Override 1080 public List<ServerName> listDecommissionedRegionServers() { 1081 throw new NotImplementedException( 1082 "listDecommissionedRegionServers not supported in ThriftAdmin"); 1083 } 1084 1085 @Override 1086 public void recommissionRegionServer(ServerName server, List<byte[]> encodedRegionNames) { 1087 throw new NotImplementedException("recommissionRegionServer not supported in ThriftAdmin"); 1088 1089 } 1090 1091 @Override 1092 public List<TableCFs> listReplicatedTableCFs() { 1093 throw new NotImplementedException("listReplicatedTableCFs not supported in ThriftAdmin"); 1094 } 1095 1096 @Override 1097 public void enableTableReplication(TableName tableName) { 1098 throw new NotImplementedException("enableTableReplication not supported in ThriftAdmin"); 1099 1100 } 1101 1102 @Override 1103 public void disableTableReplication(TableName tableName) { 1104 throw new NotImplementedException("disableTableReplication not supported in ThriftAdmin"); 1105 1106 } 1107 1108 @Override 1109 public void clearCompactionQueues(ServerName serverName, Set<String> queues) { 1110 throw new NotImplementedException("clearCompactionQueues not supported in ThriftAdmin"); 1111 1112 } 1113 1114 @Override 1115 public List<ServerName> clearDeadServers(List<ServerName> servers) { 1116 throw new NotImplementedException("clearDeadServers not supported in ThriftAdmin"); 1117 } 1118 1119 @Override 1120 public void cloneTableSchema(TableName tableName, TableName newTableName, 1121 boolean preserveSplits) { 1122 throw new NotImplementedException("cloneTableSchema not supported in ThriftAdmin"); 1123 1124 } 1125 1126 @Override 1127 public Future<Void> createTableAsync(TableDescriptor desc) { 1128 throw new NotImplementedException("createTableAsync not supported in ThriftAdmin"); 1129 } 1130 1131 @Override 1132 public Future<Void> createTableAsync(TableDescriptor desc, byte[][] splitKeys) { 1133 throw new NotImplementedException("createTableAsync not supported in ThriftAdmin"); 1134 } 1135 1136 @Override 1137 public Future<Void> deleteTableAsync(TableName tableName) { 1138 throw new NotImplementedException("deleteTableAsync not supported in ThriftAdmin"); 1139 } 1140 1141 @Override 1142 public Future<Void> truncateTableAsync(TableName tableName, boolean preserveSplits) { 1143 throw new NotImplementedException("truncateTableAsync not supported in ThriftAdmin"); 1144 } 1145 1146 @Override 1147 public Future<Void> enableTableAsync(TableName tableName) { 1148 throw new NotImplementedException("enableTableAsync not supported in ThriftAdmin"); 1149 } 1150 1151 @Override 1152 public Future<Void> disableTableAsync(TableName tableName) { 1153 throw new NotImplementedException("disableTableAsync not supported in ThriftAdmin"); 1154 } 1155 1156 @Override 1157 public Future<Void> deleteColumnFamilyAsync(TableName tableName, byte[] columnFamily) { 1158 throw new NotImplementedException("deleteColumnFamilyAsync not supported in ThriftAdmin"); 1159 } 1160 1161 @Override 1162 public Future<Void> addColumnFamilyAsync(TableName tableName, 1163 ColumnFamilyDescriptor columnFamily) { 1164 throw new NotImplementedException("addColumnFamilyAsync not supported in ThriftAdmin"); 1165 } 1166 1167 @Override 1168 public Future<Void> modifyColumnFamilyAsync(TableName tableName, 1169 ColumnFamilyDescriptor columnFamily) { 1170 throw new NotImplementedException("modifyColumnFamilyAsync not supported in ThriftAdmin"); 1171 } 1172 1173 @Override 1174 public Future<Void> deleteNamespaceAsync(String name) { 1175 throw new NotImplementedException("deleteNamespaceAsync not supported in ThriftAdmin"); 1176 } 1177 1178 @Override 1179 public Map<TableName, Long> getSpaceQuotaTableSizes() throws IOException { 1180 throw new NotImplementedException("getSpaceQuotaTableSizes not supported in ThriftAdmin"); 1181 } 1182 1183 @Override 1184 public Map<TableName, SpaceQuotaSnapshot> 1185 getRegionServerSpaceQuotaSnapshots(ServerName serverName) throws IOException { 1186 throw new NotImplementedException( 1187 "getRegionServerSpaceQuotaSnapshots not supported in ThriftAdmin"); 1188 } 1189 1190 @Override 1191 public SpaceQuotaSnapshot getCurrentSpaceQuotaSnapshot(String namespace) throws IOException { 1192 throw new NotImplementedException("getCurrentSpaceQuotaSnapshot not supported in ThriftAdmin"); 1193 } 1194 1195 @Override 1196 public SpaceQuotaSnapshot getCurrentSpaceQuotaSnapshot(TableName tableName) throws IOException { 1197 throw new NotImplementedException("getCurrentSpaceQuotaSnapshot not supported in ThriftAdmin"); 1198 } 1199 1200 @Override 1201 public void grant(UserPermission userPermission, boolean mergeExistingPermissions) { 1202 throw new NotImplementedException("grant not supported in ThriftAdmin"); 1203 } 1204 1205 @Override 1206 public void revoke(UserPermission userPermission) { 1207 throw new NotImplementedException("revoke not supported in ThriftAdmin"); 1208 } 1209 1210 @Override 1211 public List<UserPermission> 1212 getUserPermissions(GetUserPermissionsRequest getUserPermissionsRequest) { 1213 throw new NotImplementedException("getUserPermissions not supported in ThriftAdmin"); 1214 } 1215 1216 @Override 1217 public List<Boolean> hasUserPermissions(String userName, List<Permission> permissions) { 1218 throw new NotImplementedException("hasUserPermissions not supported in ThriftAdmin"); 1219 } 1220 1221 @Override 1222 public boolean snapshotCleanupSwitch(boolean on, boolean synchronous) { 1223 throw new NotImplementedException("snapshotCleanupSwitch not supported in ThriftAdmin"); 1224 } 1225 1226 @Override 1227 public boolean isSnapshotCleanupEnabled() { 1228 throw new NotImplementedException("isSnapshotCleanupEnabled not supported in ThriftAdmin"); 1229 } 1230 1231 @Override 1232 public List<OnlineLogRecord> getSlowLogResponses(final Set<ServerName> serverNames, 1233 final LogQueryFilter logQueryFilter) throws IOException { 1234 Set<TServerName> tServerNames = ThriftUtilities.getServerNamesFromHBase(serverNames); 1235 TLogQueryFilter tLogQueryFilter = ThriftUtilities.getSlowLogQueryFromHBase(logQueryFilter); 1236 try { 1237 List<TOnlineLogRecord> tOnlineLogRecords = 1238 client.getSlowLogResponses(tServerNames, tLogQueryFilter); 1239 return ThriftUtilities.getSlowLogRecordsFromThrift(tOnlineLogRecords); 1240 } catch (TException e) { 1241 throw new IOException(e); 1242 } 1243 } 1244 1245 @Override 1246 public List<Boolean> clearSlowLogResponses(final Set<ServerName> serverNames) throws IOException { 1247 Set<TServerName> tServerNames = ThriftUtilities.getServerNamesFromHBase(serverNames); 1248 try { 1249 return client.clearSlowLogResponses(tServerNames); 1250 } catch (TException e) { 1251 throw new IOException(e); 1252 } 1253 } 1254 1255 @Override 1256 public RSGroupInfo getRSGroup(String groupName) { 1257 throw new NotImplementedException("getRSGroup not supported in ThriftAdmin"); 1258 } 1259 1260 @Override 1261 public void moveServersToRSGroup(Set<Address> servers, String targetGroup) { 1262 throw new NotImplementedException("moveToRSGroup not supported in ThriftAdmin"); 1263 } 1264 1265 @Override 1266 public void addRSGroup(String groupName) { 1267 throw new NotImplementedException("addRSGroup not supported in ThriftAdmin"); 1268 } 1269 1270 @Override 1271 public void removeRSGroup(String groupName) { 1272 throw new NotImplementedException("removeRSGroup not supported in ThriftAdmin"); 1273 } 1274 1275 @Override 1276 public BalanceResponse balanceRSGroup(String groupName, BalanceRequest request) { 1277 throw new NotImplementedException("balanceRSGroup not supported in ThriftAdmin"); 1278 } 1279 1280 @Override 1281 public List<RSGroupInfo> listRSGroups() { 1282 throw new NotImplementedException("listRSGroups not supported in ThriftAdmin"); 1283 } 1284 1285 @Override 1286 public RSGroupInfo getRSGroup(Address hostPort) { 1287 throw new NotImplementedException("getRSGroup not supported in ThriftAdmin"); 1288 } 1289 1290 @Override 1291 public void removeServersFromRSGroup(Set<Address> servers) { 1292 throw new NotImplementedException("removeRSGroup not supported in ThriftAdmin"); 1293 } 1294 1295 @Override 1296 public RSGroupInfo getRSGroup(TableName tableName) { 1297 throw new NotImplementedException("getRSGroup not supported in ThriftAdmin"); 1298 } 1299 1300 @Override 1301 public void setRSGroup(Set<TableName> tables, String groupName) { 1302 throw new NotImplementedException("setRSGroup not supported in ThriftAdmin"); 1303 } 1304 1305 @Override 1306 public Future<Void> splitRegionAsync(byte[] regionName) throws IOException { 1307 return splitRegionAsync(regionName, null); 1308 } 1309 1310 @Override 1311 public List<TableName> listTablesInRSGroup(String groupName) throws IOException { 1312 throw new NotImplementedException("setRSGroup not supported in ThriftAdmin"); 1313 } 1314 1315 @Override 1316 public Pair<List<String>, List<TableName>> 1317 getConfiguredNamespacesAndTablesInRSGroup(String groupName) throws IOException { 1318 throw new NotImplementedException("setRSGroup not supported in ThriftAdmin"); 1319 } 1320 1321 @Override 1322 public void renameRSGroup(String oldName, String newName) throws IOException { 1323 throw new NotImplementedException("renameRSGroup not supported in ThriftAdmin"); 1324 } 1325 1326 @Override 1327 public void updateRSGroupConfig(String groupName, Map<String, String> configuration) 1328 throws IOException { 1329 throw new NotImplementedException("updateRSGroupConfig not supported in ThriftAdmin"); 1330 } 1331 1332 @Override 1333 public List<LogEntry> getLogEntries(Set<ServerName> serverNames, String logType, 1334 ServerType serverType, int limit, Map<String, Object> filterParams) throws IOException { 1335 throw new NotImplementedException("getLogEntries not supported in ThriftAdmin"); 1336 } 1337 1338 @Override 1339 public Future<Void> modifyColumnFamilyStoreFileTrackerAsync(TableName tableName, byte[] family, 1340 String dstSFT) throws IOException { 1341 throw new NotImplementedException( 1342 "modifyColumnFamilyStoreFileTrackerAsync not supported in ThriftAdmin"); 1343 } 1344 1345 @Override 1346 public Future<Void> modifyTableStoreFileTrackerAsync(TableName tableName, String dstSFT) 1347 throws IOException { 1348 throw new NotImplementedException( 1349 "modifyTableStoreFileTrackerAsync not supported in ThriftAdmin"); 1350 } 1351 1352 @Override 1353 public void flushMasterStore() throws IOException { 1354 throw new NotImplementedException("flushMasterStore not supported in ThriftAdmin"); 1355 } 1356 1357 @Override 1358 public List<String> getCachedFilesList(ServerName serverName) throws IOException { 1359 throw new NotImplementedException("getCachedFilesList not supported in ThriftAdmin"); 1360 } 1361 1362 @Override 1363 public void restoreBackupSystemTable(String snapshotName) throws IOException { 1364 throw new NotImplementedException("restoreBackupSystemTable not supported in ThriftAdmin"); 1365 } 1366 1367 @Override 1368 public boolean replicationPeerModificationSwitch(boolean on, boolean drainProcedures) 1369 throws IOException { 1370 throw new NotImplementedException( 1371 "replicationPeerModificationSwitch not supported in ThriftAdmin"); 1372 } 1373 1374 @Override 1375 public boolean isReplicationPeerModificationEnabled() throws IOException { 1376 throw new NotImplementedException( 1377 "isReplicationPeerModificationEnabled not supported in ThriftAdmin"); 1378 } 1379}