Search in sources :

Example 56 with VolumeManager

use of org.apache.accumulo.server.fs.VolumeManager in project accumulo by apache.

the class TabletServer method main.

public static void main(String[] args) throws IOException {
    try {
        final String app = "tserver";
        ServerOpts opts = new ServerOpts();
        opts.parseArgs(app, args);
        SecurityUtil.serverLogin(SiteConfiguration.getInstance());
        String hostname = opts.getAddress();
        Instance instance = HdfsZooInstance.getInstance();
        ServerConfigurationFactory conf = new ServerConfigurationFactory(instance);
        VolumeManager fs = VolumeManagerImpl.get();
        MetricsSystemHelper.configure(TabletServer.class.getSimpleName());
        Accumulo.init(fs, instance, conf, app);
        final TabletServer server = new TabletServer(instance, conf, fs);
        server.config(hostname);
        DistributedTrace.enable(hostname, app, conf.getSystemConfiguration());
        if (UserGroupInformation.isSecurityEnabled()) {
            UserGroupInformation loginUser = UserGroupInformation.getLoginUser();
            loginUser.doAs(new PrivilegedExceptionAction<Void>() {

                @Override
                public Void run() {
                    server.run();
                    return null;
                }
            });
        } else {
            server.run();
        }
    } catch (Exception ex) {
        log.error("Uncaught exception in TabletServer.main, exiting", ex);
        System.exit(1);
    } finally {
        DistributedTrace.disable();
    }
}
Also used : VolumeManager(org.apache.accumulo.server.fs.VolumeManager) HdfsZooInstance(org.apache.accumulo.server.client.HdfsZooInstance) Instance(org.apache.accumulo.core.client.Instance) TServerInstance(org.apache.accumulo.server.master.state.TServerInstance) ServerOpts(org.apache.accumulo.server.ServerOpts) ServerConfigurationFactory(org.apache.accumulo.server.conf.ServerConfigurationFactory) TableNotFoundException(org.apache.accumulo.core.client.TableNotFoundException) ThriftSecurityException(org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) IterationInterruptedException(org.apache.accumulo.core.iterators.IterationInterruptedException) TSampleNotPresentException(org.apache.accumulo.core.tabletserver.thrift.TSampleNotPresentException) WalMarkerException(org.apache.accumulo.server.log.WalStateManager.WalMarkerException) ConstraintViolationException(org.apache.accumulo.core.tabletserver.thrift.ConstraintViolationException) IOException(java.io.IOException) UnknownHostException(java.net.UnknownHostException) ExecutionException(java.util.concurrent.ExecutionException) NotServingTabletException(org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException) AccumuloSecurityException(org.apache.accumulo.core.client.AccumuloSecurityException) KeeperException(org.apache.zookeeper.KeeperException) NoSuchScanIDException(org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException) CancellationException(java.util.concurrent.CancellationException) DistributedStoreException(org.apache.accumulo.server.master.state.DistributedStoreException) TException(org.apache.thrift.TException) NoNodeException(org.apache.zookeeper.KeeperException.NoNodeException) ThriftTableOperationException(org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException) BadLocationStateException(org.apache.accumulo.server.master.state.TabletLocationState.BadLocationStateException) TimeoutException(java.util.concurrent.TimeoutException) TabletClosedException(org.apache.accumulo.tserver.tablet.TabletClosedException) SampleNotPresentException(org.apache.accumulo.core.client.SampleNotPresentException) AccumuloException(org.apache.accumulo.core.client.AccumuloException) UserGroupInformation(org.apache.hadoop.security.UserGroupInformation)

Example 57 with VolumeManager

use of org.apache.accumulo.server.fs.VolumeManager in project accumulo by apache.

the class TraceServer method main.

public static void main(String[] args) throws Exception {
    final String app = "tracer";
    ServerOpts opts = new ServerOpts();
    opts.parseArgs(app, args);
    loginTracer(SiteConfiguration.getInstance());
    Instance instance = HdfsZooInstance.getInstance();
    ServerConfigurationFactory conf = new ServerConfigurationFactory(instance);
    VolumeManager fs = VolumeManagerImpl.get();
    MetricsSystemHelper.configure(TraceServer.class.getSimpleName());
    Accumulo.init(fs, instance, conf, app);
    String hostname = opts.getAddress();
    TraceServer server = new TraceServer(instance, conf, hostname);
    try {
        server.run();
    } finally {
        log.info("tracer stopping");
        ZooReaderWriter.getInstance().getZooKeeper().close();
    }
}
Also used : VolumeManager(org.apache.accumulo.server.fs.VolumeManager) Instance(org.apache.accumulo.core.client.Instance) HdfsZooInstance(org.apache.accumulo.server.client.HdfsZooInstance) ServerOpts(org.apache.accumulo.server.ServerOpts) ServerConfigurationFactory(org.apache.accumulo.server.conf.ServerConfigurationFactory)

Aggregations

VolumeManager (org.apache.accumulo.server.fs.VolumeManager)57 Path (org.apache.hadoop.fs.Path)30 IOException (java.io.IOException)17 Test (org.junit.Test)17 Key (org.apache.accumulo.core.data.Key)14 HashMap (java.util.HashMap)13 Value (org.apache.accumulo.core.data.Value)13 Scanner (org.apache.accumulo.core.client.Scanner)12 ArrayList (java.util.ArrayList)11 FileRef (org.apache.accumulo.server.fs.FileRef)10 Connector (org.apache.accumulo.core.client.Connector)9 Instance (org.apache.accumulo.core.client.Instance)9 KeyExtent (org.apache.accumulo.core.data.impl.KeyExtent)7 DataFileValue (org.apache.accumulo.core.metadata.schema.DataFileValue)7 AccumuloServerContext (org.apache.accumulo.server.AccumuloServerContext)7 ServerConfigurationFactory (org.apache.accumulo.server.conf.ServerConfigurationFactory)7 File (java.io.File)6 AccumuloException (org.apache.accumulo.core.client.AccumuloException)6 FileStatus (org.apache.hadoop.fs.FileStatus)6 Text (org.apache.hadoop.io.Text)6