Search in sources :

Example 1 with Iface

use of org.apache.accumulo.core.gc.thrift.GCMonitorService.Iface in project accumulo by apache.

the class SimpleGarbageCollector method startStatsService.

private HostAndPort startStatsService() throws UnknownHostException {
    Iface rpcProxy = RpcWrapper.service(this);
    final Processor<Iface> processor;
    if (ThriftServerType.SASL == getThriftServerType()) {
        Iface tcProxy = TCredentialsUpdatingWrapper.service(rpcProxy, getClass(), getConfiguration());
        processor = new Processor<>(tcProxy);
    } else {
        processor = new Processor<>(rpcProxy);
    }
    int[] port = getConfiguration().getPort(Property.GC_PORT);
    HostAndPort[] addresses = TServerUtils.getHostAndPorts(this.opts.getAddress(), port);
    long maxMessageSize = getConfiguration().getAsBytes(Property.GENERAL_MAX_MESSAGE_SIZE);
    try {
        ServerAddress server = TServerUtils.startTServer(getConfiguration(), getThriftServerType(), processor, this.getClass().getSimpleName(), "GC Monitor Service", 2, getConfiguration().getCount(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE), 1000, maxMessageSize, getServerSslParams(), getSaslParams(), 0, addresses);
        log.debug("Starting garbage collector listening on " + server.address);
        return server.address;
    } catch (Exception ex) {
        // ACCUMULO-3651 Level changed to error and FATAL added to message for slf4j compatibility
        log.error("FATAL:", ex);
        throw new RuntimeException(ex);
    }
}
Also used : HostAndPort(org.apache.accumulo.core.util.HostAndPort) Iface(org.apache.accumulo.core.gc.thrift.GCMonitorService.Iface) ServerAddress(org.apache.accumulo.server.rpc.ServerAddress) TableNotFoundException(org.apache.accumulo.core.client.TableNotFoundException) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) MutationsRejectedException(org.apache.accumulo.core.client.MutationsRejectedException) FileNotFoundException(java.io.FileNotFoundException) ReplicationTableOfflineException(org.apache.accumulo.core.replication.ReplicationTableOfflineException) AccumuloSecurityException(org.apache.accumulo.core.client.AccumuloSecurityException) KeeperException(org.apache.zookeeper.KeeperException) IOException(java.io.IOException) UnknownHostException(java.net.UnknownHostException) AccumuloException(org.apache.accumulo.core.client.AccumuloException)

Aggregations

InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 UnknownHostException (java.net.UnknownHostException)1 AccumuloException (org.apache.accumulo.core.client.AccumuloException)1 AccumuloSecurityException (org.apache.accumulo.core.client.AccumuloSecurityException)1 MutationsRejectedException (org.apache.accumulo.core.client.MutationsRejectedException)1 TableNotFoundException (org.apache.accumulo.core.client.TableNotFoundException)1 Iface (org.apache.accumulo.core.gc.thrift.GCMonitorService.Iface)1 ReplicationTableOfflineException (org.apache.accumulo.core.replication.ReplicationTableOfflineException)1 HostAndPort (org.apache.accumulo.core.util.HostAndPort)1 ServerAddress (org.apache.accumulo.server.rpc.ServerAddress)1 KeeperException (org.apache.zookeeper.KeeperException)1