Package org.apache.accumulo.core.tabletserver.thrift.TabletClientService

Examples of org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Client


    return results;
  }
 
  @Override
  public List<ActiveScan> getActiveScans(String tserver) throws AccumuloException, AccumuloSecurityException {
    Client client = null;
    try {
      client = ThriftUtil.getTServerClient(tserver, instance.getConfiguration());
     
      List<ActiveScan> as = new ArrayList<ActiveScan>();
      for (org.apache.accumulo.core.tabletserver.thrift.ActiveScan activeScan : client.getActiveScans(Tracer.traceInfo(), credentials)) {
        try {
          as.add(new ActiveScan(instance, activeScan));
        } catch (TableNotFoundException e) {
          throw new AccumuloException(e);
        }
View Full Code Here


    });
  }
 
  @Override
  public List<ActiveCompaction> getActiveCompactions(String tserver) throws AccumuloException, AccumuloSecurityException {
    Client client = null;
    try {
      client = ThriftUtil.getTServerClient(tserver, instance.getConfiguration());
     
      List<ActiveCompaction> as = new ArrayList<ActiveCompaction>();
      for (org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction activeCompaction : client.getActiveCompactions(Tracer.traceInfo(), credentials)) {
        as.add(new ActiveCompaction(instance, activeCompaction));
      }
      return as;
    } catch (TTransportException e) {
      throw new AccumuloException(e);
View Full Code Here

   * @throws TException
   *           any other problem
   */
  public List<TabletStats> getOnlineTabletsForTable(TServerInstance tserver, String tableId) throws ThriftSecurityException, TException {
    log.debug("Scanning tablet server " + tserver + " for table " + tableId);
    Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), tserver.getLocation(), configuration.getConfiguration());
    try {
      List<TabletStats> onlineTabletsForTable = client.getTabletStats(Tracer.traceInfo(), SecurityConstants.getSystemCredentials(), tableId);
      return onlineTabletsForTable;
    } catch (TTransportException e) {
      log.error("Unable to connect to " + tserver + ": " + e);
    } finally {
      ThriftUtil.returnClient(client);
View Full Code Here

              log.error("Unable to delete wal " + filename + ": " + ex);
            }
          }
          continue;
        } else {
          Client tserver = null;
          try {
            tserver = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
            tserver.removeLogs(Tracer.traceInfo(), SecurityConstants.getSystemCredentials(), entry.getValue());
            log.debug("deleted " + entry.getValue() + " from " + entry.getKey());
            status.currentLog.deleted += entry.getValue().size();
          } catch (TException e) {
            log.warn("Error talking to " + address + ": " + e);
          } finally {
View Full Code Here

              log.error("Unable to delete wal " + filename + ": " + ex);
            }
          }
          continue;
        } else {
          Client tserver = null;
          try {
            tserver = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
            tserver.removeLogs(Tracer.traceInfo(), SecurityConstants.getSystemCredentials(), entry.getValue());
            log.debug("deleted " + entry.getValue() + " from " + entry.getKey());
            status.currentLog.deleted += entry.getValue().size();
          } catch (TException e) {
            log.warn("Error talking to " + address + ": " + e);
          } finally {
View Full Code Here

   * @see org.apache.accumulo.core.client.admin.InstanceOperations#getActiveScans(java.lang.String)
   */
 
  @Override
  public List<ActiveScan> getActiveScans(String tserver) throws AccumuloException, AccumuloSecurityException {
    Client client = null;
    try {
      client = ThriftUtil.getTServerClient(tserver, instance.getConfiguration());
     
      List<ActiveScan> as = new ArrayList<ActiveScan>();
      for (org.apache.accumulo.core.tabletserver.thrift.ActiveScan activeScan : client.getActiveScans(Tracer.traceInfo(), credentials)) {
        try {
          as.add(new ActiveScan(instance, activeScan));
        } catch (TableNotFoundException e) {
          throw new AccumuloException(e);
        }
View Full Code Here

   *
   * @see org.apache.accumulo.core.client.admin.InstanceOperations#getActiveCompactions(java.lang.String)
   */
  @Override
  public List<ActiveCompaction> getActiveCompactions(String tserver) throws AccumuloException, AccumuloSecurityException {
    Client client = null;
    try {
      client = ThriftUtil.getTServerClient(tserver, instance.getConfiguration());
     
      List<ActiveCompaction> as = new ArrayList<ActiveCompaction>();
      for (org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction activeCompaction : client.getActiveCompactions(Tracer.traceInfo(), credentials)) {
        as.add(new ActiveCompaction(instance, activeCompaction));
      }
      return as;
    } catch (TTransportException e) {
      throw new AccumuloException(e);
View Full Code Here

   * @throws TException
   *           any other problem
   */
  public List<TabletStats> getOnlineTabletsForTable(TServerInstance tserver, String tableId) throws ThriftSecurityException, TException {
    log.debug("Scanning tablet server " + tserver + " for table " + tableId);
    Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), tserver.getLocation(), configuration.getConfiguration());
    try {
      List<TabletStats> onlineTabletsForTable = client.getTabletStats(Tracer.traceInfo(), SecurityConstants.getSystemCredentials(), tableId);
      return onlineTabletsForTable;
    } catch (TTransportException e) {
      log.error("Unable to connect to " + tserver + ": " + e);
    } finally {
      ThriftUtil.returnClient(client);
View Full Code Here

   * @throws TException
   *           any other problem
   */
  public List<TabletStats> getOnlineTabletsForTable(TServerInstance tserver, String tableId) throws ThriftSecurityException, TException {
    log.debug("Scanning tablet server " + tserver + " for table " + tableId);
    Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), tserver.getLocation(), configuration.getConfiguration());
    try {
      List<TabletStats> onlineTabletsForTable = client.getTabletStats(Tracer.traceInfo(), SystemCredentials.get().toThrift(configuration.getInstance()),
          tableId);
      return onlineTabletsForTable;
    } catch (TTransportException e) {
      log.error("Unable to connect to " + tserver + ": " + e);
    } finally {
View Full Code Here

    });
  }

  @Override
  public List<ActiveCompaction> getActiveCompactions(String tserver) throws AccumuloException, AccumuloSecurityException {
    Client client = null;
    try {
      client = ThriftUtil.getTServerClient(tserver, ServerConfigurationUtil.getConfiguration(instance));

      List<ActiveCompaction> as = new ArrayList<ActiveCompaction>();
      for (org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction activeCompaction : client.getActiveCompactions(Tracer.traceInfo(),
          credentials.toThrift(instance))) {
        as.add(new ActiveCompactionImpl(instance, activeCompaction));
      }
      return as;
    } catch (TTransportException e) {
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Client

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.