Package com.facebook.presto.util

Examples of com.facebook.presto.util.SetThreadName


        }
    }

    private synchronized void requestSucceeded(TaskInfo newValue, List<TaskSource> sources)
    {
        try (SetThreadName setThreadName = new SetThreadName("HttpRemoteTask-%s", taskId)) {
            updateTaskInfo(newValue);
            lastSuccessfulRequest.set(System.nanoTime());
            errorCount.set(0);
            errorsSinceLastSuccess.clear();
View Full Code Here


        }

        @Override
        public void success(TaskInfo value)
        {
            try (SetThreadName setThreadName = new SetThreadName("UpdateResponseHandler-%s", taskId)) {
                try {
                    requestSucceeded(value, sources);
                }
                finally {
                    scheduleUpdate();
View Full Code Here

        }

        @Override
        public void failed(Throwable cause)
        {
            try (SetThreadName setThreadName = new SetThreadName("UpdateResponseHandler-%s", taskId)) {
                try {
                    // on failure assume we need to update again
                    needsUpdate.set(true);

                    requestFailed(cause);
View Full Code Here

        }

        @Override
        public void fatal(Throwable cause)
        {
            try (SetThreadName setThreadName = new SetThreadName("UpdateResponseHandler-%s", taskId)) {
                failTask(cause);
            }
        }
View Full Code Here

            }
        }

        private synchronized void scheduleNextRequest()
        {
            try (SetThreadName setThreadName = new SetThreadName("ContinuousTaskInfoFetcher-%s", taskId)) {
                // stopped or done?
                TaskInfo taskInfo = HttpRemoteTask.this.taskInfo.get();
                if (!running || taskInfo.getState().isDone()) {
                    return;
                }
View Full Code Here

        }

        @Override
        public void success(TaskInfo value)
        {
            try (SetThreadName setThreadName = new SetThreadName("ContinuousTaskInfoFetcher-%s", taskId)) {
                synchronized (this) {
                    future = null;
                }

                try {
View Full Code Here

        }

        @Override
        public void failed(Throwable cause)
        {
            try (SetThreadName setThreadName = new SetThreadName("ContinuousTaskInfoFetcher-%s", taskId)) {
                synchronized (this) {
                    future = null;
                }

                try {
View Full Code Here

        }

        @Override
        public void fatal(Throwable cause)
        {
            try (SetThreadName setThreadName = new SetThreadName("ContinuousTaskInfoFetcher-%s", taskId)) {
                synchronized (this) {
                    future = null;
                }

                failTask(cause);
View Full Code Here

        }

        @Override
        public void run()
        {
            try (SetThreadName setThreadName = new SetThreadName("Query-%s", queryExecution.getQueryInfo().getQueryId())) {
                stats.queryStarted();
                queryExecution.start();
            }
        }
View Full Code Here

                queryMonitor,
                notificationExecutor,
                cpuTimerEnabled
        );

        try (SetThreadName setThreadName = new SetThreadName("Task-%s", taskId)) {
            task.start();
            task.addSources(sources);
            task.recordHeartbeat();
            return task;
        }
View Full Code Here

TOP

Related Classes of com.facebook.presto.util.SetThreadName

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.