Search in sources :

Example 11 with ExceptionUtils.getStackTrace

use of org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace in project bisq-desktop by bisq-network.

the class BisqApp method init.

// NOTE: This method is not called on the JavaFX Application Thread.
@Override
public void init() throws Exception {
    String logPath = Paths.get(bisqEnvironment.getProperty(AppOptionKeys.APP_DATA_DIR_KEY), "bisq").toString();
    Log.setup(logPath);
    log.info("Log files under: " + logPath);
    Utilities.printSysInfo();
    Log.setLevel(Level.toLevel(bisqEnvironment.getRequiredProperty(CommonOptionKeys.LOG_LEVEL_KEY)));
    UserThread.setExecutor(Platform::runLater);
    UserThread.setTimerClass(UITimer.class);
    shutDownHandler = this::stop;
    // setup UncaughtExceptionHandler
    Thread.UncaughtExceptionHandler handler = (thread, throwable) -> {
        // Might come from another thread
        if (throwable.getCause() != null && throwable.getCause().getCause() != null && throwable.getCause().getCause() instanceof BlockStoreException) {
            log.error(throwable.getMessage());
        } else if (throwable instanceof ClassCastException && "sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData".equals(throwable.getMessage())) {
            log.warn(throwable.getMessage());
        } else {
            log.error("Uncaught Exception from thread " + Thread.currentThread().getName());
            log.error("throwableMessage= " + throwable.getMessage());
            log.error("throwableClass= " + throwable.getClass());
            log.error("Stack trace:\n" + ExceptionUtils.getStackTrace(throwable));
            throwable.printStackTrace();
            UserThread.execute(() -> showErrorPopup(throwable, false));
        }
    };
    Thread.setDefaultUncaughtExceptionHandler(handler);
    Thread.currentThread().setUncaughtExceptionHandler(handler);
    try {
        Utilities.checkCryptoPolicySetup();
    } catch (NoSuchAlgorithmException | LimitedKeyStrengthException e) {
        e.printStackTrace();
        UserThread.execute(() -> showErrorPopup(e, true));
    }
    Security.addProvider(new BouncyCastleProvider());
    final BaseCurrencyNetwork baseCurrencyNetwork = BisqEnvironment.getBaseCurrencyNetwork();
    final String currencyCode = baseCurrencyNetwork.getCurrencyCode();
    Res.setBaseCurrencyCode(currencyCode);
    Res.setBaseCurrencyName(baseCurrencyNetwork.getCurrencyName());
    CurrencyUtil.setBaseCurrencyCode(currencyCode);
    Capabilities.setSupportedCapabilities(new ArrayList<>(Arrays.asList(Capabilities.Capability.TRADE_STATISTICS.ordinal(), Capabilities.Capability.TRADE_STATISTICS_2.ordinal(), Capabilities.Capability.ACCOUNT_AGE_WITNESS.ordinal(), Capabilities.Capability.COMP_REQUEST.ordinal(), Capabilities.Capability.VOTE.ordinal())));
}
Also used : StageStyle(javafx.stage.StageStyle) ManualPayoutTxWindow(bisq.desktop.main.overlays.windows.ManualPayoutTxWindow) Arrays(java.util.Arrays) Utilities(bisq.common.util.Utilities) DaoManager(bisq.core.dao.DaoManager) Key(com.google.inject.Key) LoggerFactory(org.slf4j.LoggerFactory) Security(java.security.Security) StackPane(javafx.scene.layout.StackPane) DisputeManager(bisq.core.arbitration.DisputeManager) User(bisq.core.user.User) Application(javafx.application.Application) Parent(javafx.scene.Parent) ViewLoader(bisq.desktop.common.view.ViewLoader) AddressEntryList(bisq.core.btc.AddressEntryList) Res(bisq.core.locale.Res) SendAlertMessageWindow(bisq.desktop.main.overlays.windows.SendAlertMessageWindow) BlockStoreException(org.bitcoinj.store.BlockStoreException) INITIAL_SCENE_WIDTH(bisq.desktop.util.Layout.INITIAL_SCENE_WIDTH) VoteService(bisq.core.dao.vote.VoteService) Pane(javafx.scene.layout.Pane) Navigation(bisq.desktop.Navigation) Popup(bisq.desktop.main.overlays.popups.Popup) ClosedTradableManager(bisq.core.trade.closed.ClosedTradableManager) Capabilities(bisq.common.app.Capabilities) P2PService(bisq.network.p2p.P2PService) CachingViewLoader(bisq.desktop.common.view.CachingViewLoader) ArbitratorManager(bisq.core.arbitration.ArbitratorManager) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel) FilterManager(bisq.core.filter.FilterManager) PersistedDataHost(bisq.common.proto.persistable.PersistedDataHost) ShowWalletDataWindow(bisq.desktop.main.overlays.windows.ShowWalletDataWindow) KeyEvent(javafx.scene.input.KeyEvent) BaseCurrencyNetwork(bisq.core.btc.BaseCurrencyNetwork) BsqWalletService(bisq.core.btc.wallet.BsqWalletService) Platform(javafx.application.Platform) List(java.util.List) WalletsSetup(bisq.core.btc.wallet.WalletsSetup) DevEnv(bisq.common.app.DevEnv) TradeManager(bisq.core.trade.TradeManager) Logger(ch.qos.logback.classic.Logger) EmptyWalletWindow(bisq.desktop.main.overlays.windows.EmptyWalletWindow) AppOptionKeys(bisq.core.app.AppOptionKeys) Preferences(bisq.core.user.Preferences) UserThread(bisq.common.UserThread) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) EventStreams(org.reactfx.EventStreams) INITIAL_SCENE_HEIGHT(bisq.desktop.util.Layout.INITIAL_SCENE_HEIGHT) ExceptionUtils(org.apache.commons.lang3.exception.ExceptionUtils) BtcWalletService(bisq.core.btc.wallet.BtcWalletService) Scene(javafx.scene.Scene) AlertManager(bisq.core.alert.AlertManager) WalletService(bisq.core.btc.wallet.WalletService) CommonOptionKeys(bisq.common.CommonOptionKeys) ArrayList(java.util.ArrayList) WalletsManager(bisq.core.btc.wallet.WalletsManager) UITimer(bisq.desktop.common.UITimer) CurrencyUtil(bisq.core.locale.CurrencyUtil) Profiler(bisq.common.util.Profiler) LimitedKeyStrengthException(bisq.common.crypto.LimitedKeyStrengthException) InjectorViewFactory(bisq.desktop.common.view.guice.InjectorViewFactory) KeyCode(javafx.scene.input.KeyCode) Version(bisq.common.app.Version) Modality(javafx.stage.Modality) Label(javafx.scene.control.Label) FailedTradesManager(bisq.core.trade.failed.FailedTradesManager) ResultHandler(bisq.common.handlers.ResultHandler) Log(bisq.common.app.Log) IOException(java.io.IOException) BisqEnvironment(bisq.core.app.BisqEnvironment) Names(com.google.inject.name.Names) OpenOfferManager(bisq.core.offer.OpenOfferManager) BouncyCastleProvider(org.bouncycastle.jce.provider.BouncyCastleProvider) DebugView(bisq.desktop.main.debug.DebugView) Injector(com.google.inject.Injector) TimeUnit(java.util.concurrent.TimeUnit) View(bisq.desktop.common.view.View) MainView(bisq.desktop.main.MainView) Level(ch.qos.logback.classic.Level) Stage(javafx.stage.Stage) ImageUtil(bisq.desktop.util.ImageUtil) Paths(java.nio.file.Paths) Storage(bisq.common.storage.Storage) FilterWindow(bisq.desktop.main.overlays.windows.FilterWindow) SystemTray(bisq.desktop.SystemTray) Guice(com.google.inject.Guice) Image(javafx.scene.image.Image) ProposalCollectionsService(bisq.core.dao.proposal.ProposalCollectionsService) Platform(javafx.application.Platform) BlockStoreException(org.bitcoinj.store.BlockStoreException) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) UserThread(bisq.common.UserThread) LimitedKeyStrengthException(bisq.common.crypto.LimitedKeyStrengthException) BaseCurrencyNetwork(bisq.core.btc.BaseCurrencyNetwork) BouncyCastleProvider(org.bouncycastle.jce.provider.BouncyCastleProvider)

Example 12 with ExceptionUtils.getStackTrace

use of org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace in project cuba by cuba-platform.

the class PersistenceManager method refreshStatistics.

@Authenticated
@Override
public String refreshStatistics(String entityName) {
    if (StringUtils.isBlank(entityName))
        return "Pass an entity name (MetaClass name, e.g. sec$User) or 'all' to refresh statistics for all entities.\n" + "Be careful, it can take very long time.";
    try {
        log.info("Refreshing statistics for " + entityName);
        Consumer<MetaClass> refreshStatisticsForEntity = mc -> {
            MetaClass originalMetaClass = metadata.getExtendedEntities().getOriginalOrThisMetaClass(mc);
            Class javaClass = originalMetaClass.getJavaClass();
            Table annotation = (Table) javaClass.getAnnotation(Table.class);
            if (annotation != null) {
                persistenceManager.refreshStatisticsForEntity(originalMetaClass.getName());
            }
        };
        if ("all".equals(entityName)) {
            for (MetaClass metaClass : metadata.getSession().getClasses()) {
                refreshStatisticsForEntity.accept(metaClass);
            }
        } else {
            MetaClass metaClass = metadata.getSession().getClass(entityName);
            if (metaClass == null)
                return "MetaClass not found: " + entityName;
            refreshStatisticsForEntity.accept(metaClass);
        }
        return "Done";
    } catch (Exception e) {
        log.error("refreshStatistics error", e);
        return ExceptionUtils.getStackTrace(e);
    }
}
Also used : com.haulmont.cuba.core(com.haulmont.cuba.core) Authenticated(com.haulmont.cuba.security.app.Authenticated) Logger(org.slf4j.Logger) TextStringBuilder(org.apache.commons.text.TextStringBuilder) LoggerFactory(org.slf4j.LoggerFactory) Set(java.util.Set) ServerConfig(com.haulmont.cuba.core.app.ServerConfig) StringUtils(org.apache.commons.lang3.StringUtils) MetaClass(com.haulmont.chile.core.model.MetaClass) File(java.io.File) com.haulmont.cuba.core.global(com.haulmont.cuba.core.global) DbmsType(com.haulmont.cuba.core.sys.persistence.DbmsType) Inject(javax.inject.Inject) Consumer(java.util.function.Consumer) Component(org.springframework.stereotype.Component) List(java.util.List) Table(javax.persistence.Table) EntityStatistics(com.haulmont.cuba.core.entity.EntityStatistics) DbInitializationException(com.haulmont.cuba.core.sys.DbInitializationException) PersistenceManagerAPI(com.haulmont.cuba.core.app.PersistenceManagerAPI) Map(java.util.Map) DbUpdater(com.haulmont.cuba.core.sys.DbUpdater) PersistenceConfig(com.haulmont.cuba.core.app.PersistenceConfig) ExceptionUtils(org.apache.commons.lang3.exception.ExceptionUtils) Table(javax.persistence.Table) MetaClass(com.haulmont.chile.core.model.MetaClass) MetaClass(com.haulmont.chile.core.model.MetaClass) DbInitializationException(com.haulmont.cuba.core.sys.DbInitializationException) Authenticated(com.haulmont.cuba.security.app.Authenticated)

Example 13 with ExceptionUtils.getStackTrace

use of org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace in project sqlg by pietermartin.

the class GraphStrategy method apply.

void apply() {
    final Step<?, ?> startStep = traversal.getStartStep();
    if (!(startStep instanceof GraphStep)) {
        return;
    }
    final GraphStep originalGraphStep = (GraphStep) startStep;
    if (this.sqlgGraph.features().supportsBatchMode() && this.sqlgGraph.tx().isInNormalBatchMode()) {
        this.sqlgGraph.tx().flush();
    }
    if (originalGraphStep.getIds().length > 0) {
        Object id = originalGraphStep.getIds()[0];
        if (id != null) {
            Class clazz = id.getClass();
            if (!Stream.of(originalGraphStep.getIds()).allMatch(i -> clazz.isAssignableFrom(i.getClass())))
                throw Graph.Exceptions.idArgsMustBeEitherIdOrElement();
        }
    }
    if (this.canNotBeOptimized()) {
        this.logger.debug("gremlin not optimized due to path or tree step. " + this.traversal.toString() + "\nPath to gremlin:\n" + ExceptionUtils.getStackTrace(new Throwable()));
        return;
    }
    combineSteps();
}
Also used : TraversalHelper(org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper) MutableInt(org.apache.commons.lang3.mutable.MutableInt) Logger(org.slf4j.Logger) ListIterator(java.util.ListIterator) Graph(org.apache.tinkerpop.gremlin.structure.Graph) LoggerFactory(org.slf4j.LoggerFactory) GraphStep(org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep) ArrayList(java.util.ArrayList) Step(org.apache.tinkerpop.gremlin.process.traversal.Step) SqlgStep(org.umlg.sqlg.step.SqlgStep) AbstractStep(org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep) List(java.util.List) Stream(java.util.stream.Stream) ReplacedStep(org.umlg.sqlg.sql.parse.ReplacedStep) Traversal(org.apache.tinkerpop.gremlin.process.traversal.Traversal) Preconditions(com.google.common.base.Preconditions) SqlgGraphStep(org.umlg.sqlg.step.SqlgGraphStep) ExceptionUtils(org.apache.commons.lang3.exception.ExceptionUtils) GraphStep(org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep) SqlgGraphStep(org.umlg.sqlg.step.SqlgGraphStep)

Example 14 with ExceptionUtils.getStackTrace

use of org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace in project batfish by batfish.

the class Driver method mainRunWorkService.

private static void mainRunWorkService() {
    if (_mainSettings.getTracingEnable() && !GlobalTracer.isRegistered()) {
        initTracer();
    }
    String protocol = _mainSettings.getSslDisable() ? "http" : "https";
    String baseUrl = String.format("%s://%s", protocol, _mainSettings.getServiceBindHost());
    URI baseUri = UriBuilder.fromUri(baseUrl).port(_mainSettings.getServicePort()).build();
    _mainLogger.debug(String.format("Starting server at %s\n", baseUri));
    ResourceConfig rc = new ResourceConfig(Service.class).register(new JettisonFeature());
    if (_mainSettings.getTracingEnable()) {
        rc.register(ServerTracingDynamicFeature.class);
    }
    try {
        if (_mainSettings.getSslDisable()) {
            GrizzlyHttpServerFactory.createHttpServer(baseUri, rc);
        } else {
            CommonUtil.startSslServer(rc, baseUri, _mainSettings.getSslKeystoreFile(), _mainSettings.getSslKeystorePassword(), _mainSettings.getSslTrustAllCerts(), _mainSettings.getSslTruststoreFile(), _mainSettings.getSslTruststorePassword(), ConfigurationLocator.class, Driver.class);
        }
        if (_mainSettings.getCoordinatorRegister()) {
            // this function does not return until registration succeeds
            registerWithCoordinatorPersistent();
        }
        if (_mainSettings.getParentPid() > 0) {
            if (SystemUtils.IS_OS_WINDOWS) {
                _mainLogger.errorf("Parent process monitoring is not supported on Windows. We'll live without it.");
            } else {
                Executors.newScheduledThreadPool(1).scheduleAtFixedRate(new CheckParentProcessTask(_mainSettings.getParentPid()), 0, PARENT_CHECK_INTERVAL_MS, TimeUnit.MILLISECONDS);
                SignalHandler handler = signal -> _mainLogger.infof("BFS: Ignoring signal %s\n", signal);
                Signal.handle(new Signal("INT"), handler);
            }
        }
        // sleep indefinitely, check for parent pid and coordinator each time
        while (true) {
            Thread.sleep(COORDINATOR_CHECK_INTERVAL_MS);
            /*
         * every time we wake up, we check if the coordinator has polled us recently
         * if not, re-register the service. the coordinator might have died and come back.
         */
            if (_mainSettings.getCoordinatorRegister() && new Date().getTime() - _lastPollFromCoordinator.getTime() > COORDINATOR_POLL_TIMEOUT_MS) {
                // this function does not return until registration succeeds
                registerWithCoordinatorPersistent();
            }
        }
    } catch (ProcessingException e) {
        String msg = "FATAL ERROR: " + e.getMessage() + "\n";
        _mainLogger.error(msg);
        System.exit(1);
    } catch (Exception ex) {
        String stackTrace = ExceptionUtils.getStackTrace(ex);
        _mainLogger.error(stackTrace);
        System.exit(1);
    }
}
Also used : Arrays(java.util.Arrays) Date(java.util.Date) ConfigurationLocator(org.batfish.config.ConfigurationLocator) LRUMap(org.apache.commons.collections4.map.LRUMap) BfConsts(org.batfish.common.BfConsts) MediaType(javax.ws.rs.core.MediaType) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ReporterConfiguration(com.uber.jaeger.Configuration.ReporterConfiguration) References(io.opentracing.References) Answer(org.batfish.datamodel.answers.Answer) Map(java.util.Map) RoutesByVrf(org.batfish.datamodel.collections.RoutesByVrf) ResourceConfig(org.glassfish.jersey.server.ResourceConfig) Signal(sun.misc.Signal) UriBuilder(javax.ws.rs.core.UriBuilder) URI(java.net.URI) RuntimeMXBean(java.lang.management.RuntimeMXBean) DataPlane(org.batfish.datamodel.DataPlane) Redirect(java.lang.ProcessBuilder.Redirect) SSLHandshakeException(javax.net.ssl.SSLHandshakeException) TaskStatus(org.batfish.common.BfConsts.TaskStatus) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Logger(java.util.logging.Logger) EnvironmentSettings(org.batfish.config.Settings.EnvironmentSettings) Task(org.batfish.common.Task) Executors(java.util.concurrent.Executors) Settings(org.batfish.config.Settings) List(java.util.List) Response(javax.ws.rs.core.Response) JettisonFeature(org.glassfish.jersey.jettison.JettisonFeature) ConstSampler(com.uber.jaeger.samplers.ConstSampler) CoordConsts(org.batfish.common.CoordConsts) ProcessingException(javax.ws.rs.ProcessingException) CacheBuilder(com.google.common.cache.CacheBuilder) SortedMap(java.util.SortedMap) QuestionException(org.batfish.common.QuestionException) ExceptionUtils(org.apache.commons.lang3.exception.ExceptionUtils) BatfishLogger(org.batfish.common.BatfishLogger) SignalHandler(sun.misc.SignalHandler) SamplerConfiguration(com.uber.jaeger.Configuration.SamplerConfiguration) ServerTracingDynamicFeature(io.opentracing.contrib.jaxrs2.server.ServerTracingDynamicFeature) ForwardingAnalysis(org.batfish.datamodel.ForwardingAnalysis) CommonUtil(org.batfish.common.util.CommonUtil) Client(javax.ws.rs.client.Client) HashMap(java.util.HashMap) BatfishException(org.batfish.common.BatfishException) ConcurrentMap(java.util.concurrent.ConcurrentMap) Level(java.util.logging.Level) TestrigSettings(org.batfish.config.Settings.TestrigSettings) BgpAdvertisementsByVrf(org.batfish.datamodel.collections.BgpAdvertisementsByVrf) ImmutableList(com.google.common.collect.ImmutableList) Version(org.batfish.common.Version) Configuration(org.batfish.datamodel.Configuration) ManagementFactory(java.lang.management.ManagementFactory) Nullable(javax.annotation.Nullable) SystemUtils(org.apache.commons.lang3.SystemUtils) GlobalTracer(io.opentracing.util.GlobalTracer) IOException(java.io.IOException) JSONArray(org.codehaus.jettison.json.JSONArray) InputStreamReader(java.io.InputStreamReader) AnswerStatus(org.batfish.datamodel.answers.AnswerStatus) SpanContext(io.opentracing.SpanContext) TimeUnit(java.util.concurrent.TimeUnit) Batch(org.batfish.common.Task.Batch) CleanBatfishException(org.batfish.common.CleanBatfishException) Paths(java.nio.file.Paths) Snapshot(org.batfish.common.Snapshot) ActiveSpan(io.opentracing.ActiveSpan) GrizzlyHttpServerFactory(org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory) BufferedReader(java.io.BufferedReader) WebTarget(javax.ws.rs.client.WebTarget) Cache(com.google.common.cache.Cache) Collections(java.util.Collections) Signal(sun.misc.Signal) SignalHandler(sun.misc.SignalHandler) ResourceConfig(org.glassfish.jersey.server.ResourceConfig) JettisonFeature(org.glassfish.jersey.jettison.JettisonFeature) URI(java.net.URI) Date(java.util.Date) SSLHandshakeException(javax.net.ssl.SSLHandshakeException) ProcessingException(javax.ws.rs.ProcessingException) QuestionException(org.batfish.common.QuestionException) BatfishException(org.batfish.common.BatfishException) IOException(java.io.IOException) CleanBatfishException(org.batfish.common.CleanBatfishException) ProcessingException(javax.ws.rs.ProcessingException)

Example 15 with ExceptionUtils.getStackTrace

use of org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace in project batfish by batfish.

the class Driver method mainRunWatchdog.

private static void mainRunWatchdog() {
    while (true) {
        RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
        String classPath = runtimeMxBean.getClassPath();
        List<String> jvmArguments = runtimeMxBean.getInputArguments().stream().filter(// remove IntelliJ hooks
        arg -> !arg.startsWith("-agentlib:")).collect(ImmutableList.toImmutableList());
        int myPid = Integer.parseInt(runtimeMxBean.getName().split("@")[0]);
        List<String> command = new ImmutableList.Builder<String>().add(Paths.get(System.getProperty("java.home"), "bin", "java").toAbsolutePath().toString()).addAll(jvmArguments).add("-cp").add(classPath).add(Driver.class.getCanonicalName()).add("-" + Settings.ARG_RUN_MODE).add(RunMode.WORKSERVICE.toString()).add("-" + Settings.ARG_PARENT_PID).add(Integer.toString(myPid)).addAll(Arrays.asList(_mainArgs)).build();
        _mainLogger.debugf("Will start workservice with arguments: %s\n", command);
        ProcessBuilder builder = new ProcessBuilder(command);
        builder.redirectErrorStream(true);
        builder.redirectInput(Redirect.INHERIT);
        Process process;
        try {
            process = builder.start();
        } catch (IOException e) {
            _mainLogger.errorf("Exception starting process: %s", ExceptionUtils.getStackTrace(e));
            _mainLogger.errorf("Will try again in 1 second\n");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e1) {
                _mainLogger.errorf("Sleep was interrrupted: %s", ExceptionUtils.getStackTrace(e1));
            }
            continue;
        }
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()))) {
            reader.lines().forEach(line -> _mainLogger.output(line + "\n"));
        } catch (IOException e) {
            _mainLogger.errorf("Interrupted while reading subprocess stream: %s", ExceptionUtils.getStackTrace(e));
        }
        try {
            process.waitFor();
        } catch (InterruptedException e) {
            _mainLogger.infof("Subprocess was killed: %s.\nRestarting", ExceptionUtils.getStackTrace(e));
        }
    }
}
Also used : Arrays(java.util.Arrays) Date(java.util.Date) ConfigurationLocator(org.batfish.config.ConfigurationLocator) LRUMap(org.apache.commons.collections4.map.LRUMap) BfConsts(org.batfish.common.BfConsts) MediaType(javax.ws.rs.core.MediaType) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ReporterConfiguration(com.uber.jaeger.Configuration.ReporterConfiguration) References(io.opentracing.References) Answer(org.batfish.datamodel.answers.Answer) Map(java.util.Map) RoutesByVrf(org.batfish.datamodel.collections.RoutesByVrf) ResourceConfig(org.glassfish.jersey.server.ResourceConfig) Signal(sun.misc.Signal) UriBuilder(javax.ws.rs.core.UriBuilder) URI(java.net.URI) RuntimeMXBean(java.lang.management.RuntimeMXBean) DataPlane(org.batfish.datamodel.DataPlane) Redirect(java.lang.ProcessBuilder.Redirect) SSLHandshakeException(javax.net.ssl.SSLHandshakeException) TaskStatus(org.batfish.common.BfConsts.TaskStatus) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Logger(java.util.logging.Logger) EnvironmentSettings(org.batfish.config.Settings.EnvironmentSettings) Task(org.batfish.common.Task) Executors(java.util.concurrent.Executors) Settings(org.batfish.config.Settings) List(java.util.List) Response(javax.ws.rs.core.Response) JettisonFeature(org.glassfish.jersey.jettison.JettisonFeature) ConstSampler(com.uber.jaeger.samplers.ConstSampler) CoordConsts(org.batfish.common.CoordConsts) ProcessingException(javax.ws.rs.ProcessingException) CacheBuilder(com.google.common.cache.CacheBuilder) SortedMap(java.util.SortedMap) QuestionException(org.batfish.common.QuestionException) ExceptionUtils(org.apache.commons.lang3.exception.ExceptionUtils) BatfishLogger(org.batfish.common.BatfishLogger) SignalHandler(sun.misc.SignalHandler) SamplerConfiguration(com.uber.jaeger.Configuration.SamplerConfiguration) ServerTracingDynamicFeature(io.opentracing.contrib.jaxrs2.server.ServerTracingDynamicFeature) ForwardingAnalysis(org.batfish.datamodel.ForwardingAnalysis) CommonUtil(org.batfish.common.util.CommonUtil) Client(javax.ws.rs.client.Client) HashMap(java.util.HashMap) BatfishException(org.batfish.common.BatfishException) ConcurrentMap(java.util.concurrent.ConcurrentMap) Level(java.util.logging.Level) TestrigSettings(org.batfish.config.Settings.TestrigSettings) BgpAdvertisementsByVrf(org.batfish.datamodel.collections.BgpAdvertisementsByVrf) ImmutableList(com.google.common.collect.ImmutableList) Version(org.batfish.common.Version) Configuration(org.batfish.datamodel.Configuration) ManagementFactory(java.lang.management.ManagementFactory) Nullable(javax.annotation.Nullable) SystemUtils(org.apache.commons.lang3.SystemUtils) GlobalTracer(io.opentracing.util.GlobalTracer) IOException(java.io.IOException) JSONArray(org.codehaus.jettison.json.JSONArray) InputStreamReader(java.io.InputStreamReader) AnswerStatus(org.batfish.datamodel.answers.AnswerStatus) SpanContext(io.opentracing.SpanContext) TimeUnit(java.util.concurrent.TimeUnit) Batch(org.batfish.common.Task.Batch) CleanBatfishException(org.batfish.common.CleanBatfishException) Paths(java.nio.file.Paths) Snapshot(org.batfish.common.Snapshot) ActiveSpan(io.opentracing.ActiveSpan) GrizzlyHttpServerFactory(org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory) BufferedReader(java.io.BufferedReader) WebTarget(javax.ws.rs.client.WebTarget) Cache(com.google.common.cache.Cache) Collections(java.util.Collections) InputStreamReader(java.io.InputStreamReader) ImmutableList(com.google.common.collect.ImmutableList) RuntimeMXBean(java.lang.management.RuntimeMXBean) IOException(java.io.IOException) BufferedReader(java.io.BufferedReader)

Aggregations

ExceptionUtils (org.apache.commons.lang3.exception.ExceptionUtils)16 IOException (java.io.IOException)11 List (java.util.List)11 LoggerFactory (org.slf4j.LoggerFactory)9 Map (java.util.Map)7 ArrayList (java.util.ArrayList)6 TimeUnit (java.util.concurrent.TimeUnit)6 BlockStoreException (org.bitcoinj.store.BlockStoreException)6 Logger (org.slf4j.Logger)6 Paths (java.nio.file.Paths)4 Arrays (java.util.Arrays)4 Executors (java.util.concurrent.Executors)4 Level (ch.qos.logback.classic.Level)3 Logger (ch.qos.logback.classic.Logger)3 ThreadFactoryBuilder (com.google.common.util.concurrent.ThreadFactoryBuilder)3 Guice (com.google.inject.Guice)3 Injector (com.google.inject.Injector)3 URI (java.net.URI)3 HashMap (java.util.HashMap)3 Optional (java.util.Optional)3