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