Package io.crate.operation.reference.sys.job

Examples of io.crate.operation.reference.sys.job.JobContext


        NodeSettingsService nodeSettingsService = new NodeSettingsService(ImmutableSettings.EMPTY);
        Settings settings = ImmutableSettings.builder()
                .put(CrateSettings.STATS_ENABLED.settingName(), true).build();
        StatsTables stats = new StatsTables(settings, nodeSettingsService);

        stats.jobsLog.get().add(new JobContextLog(new JobContext(UUID.randomUUID(), "select 1", 1L), null));

        stats.listener.onRefreshSettings(ImmutableSettings.builder()
                .put(CrateSettings.STATS_ENABLED.settingName(), true)
                .put(CrateSettings.STATS_JOBS_LOG_SIZE.settingName(), 200).build());
View Full Code Here


     */
    public void jobStarted(UUID jobId, String statement) {
        if (!isEnabled()) {
            return;
        }
        jobsTable.put(jobId, new JobContext(jobId, statement, System.currentTimeMillis()));
    }
View Full Code Here

     */
    public void jobFinished(UUID jobId, @Nullable String errorMessage) {
        if (!isEnabled()) {
            return;
        }
        JobContext jobContext = jobsTable.remove(jobId);
        if (jobContext == null) {
            return;
        }
        BlockingQueue<JobContextLog> jobContextLogs = jobsLog.get();
        jobContextLogs.offer(new JobContextLog(jobContext, errorMessage));
View Full Code Here

TOP

Related Classes of io.crate.operation.reference.sys.job.JobContext

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.