Package io.airlift.discovery.client.ServiceAnnouncement

Examples of io.airlift.discovery.client.ServiceAnnouncement.ServiceAnnouncementBuilder.addProperty()


        // presto announcement
        ServiceAnnouncementBuilder prestoAnnouncement = discoveryBinder(binder).bindHttpAnnouncement("presto")
                .addProperty("node_version", nodeVersion.toString());

        if (serverConfig.getDataSources() != null) {
            prestoAnnouncement.addProperty("datasources", serverConfig.getDataSources());
        }

        bindDataSource(binder, "presto-metastore", ForMetadata.class, ForShardManager.class);

        // statement resource
View Full Code Here


        // presto announcement
        ServiceAnnouncementBuilder prestoAnnouncement = discoveryBinder(binder).bindHttpAnnouncement("presto")
                .addProperty("node_version", nodeVersion.toString());

        if (serverConfig.getDataSources() != null) {
            prestoAnnouncement.addProperty("datasources", serverConfig.getDataSources());
        }

        bindDataSource(binder, "presto-metastore", ForMetadata.class, ForShardManager.class);
        Multibinder<ResultSetMapper<?>> resultSetMapperBinder = newSetBinder(binder, new TypeLiteral<ResultSetMapper<?>>() {}, ForMetadata.class);
        resultSetMapperBinder.addBinding().to(TableColumnMapper.class).in(Scopes.SINGLETON);
View Full Code Here

        // presto announcement
        ServiceAnnouncementBuilder prestoAnnouncement = discoveryBinder(binder).bindHttpAnnouncement("presto")
                .addProperty("node_version", nodeVersion.toString());

        if (serverConfig.getDataSources() != null) {
            prestoAnnouncement.addProperty("datasources", serverConfig.getDataSources());
        }

        bindDataSource(binder, "presto-metastore", ForMetadata.class, ForShardManager.class);

        // statement resource
View Full Code Here

        // build announcement with updated sources
        ServiceAnnouncementBuilder builder = serviceAnnouncement(announcement.getType());
        for (Map.Entry<String, String> entry : announcement.getProperties().entrySet()) {
            if (!entry.getKey().equals("datasources")) {
                builder.addProperty(entry.getKey(), entry.getValue());
            }
        }
        builder.addProperty("datasources", Joiner.on(',').join(datasources));

        // update announcement
View Full Code Here

        for (Map.Entry<String, String> entry : announcement.getProperties().entrySet()) {
            if (!entry.getKey().equals("datasources")) {
                builder.addProperty(entry.getKey(), entry.getValue());
            }
        }
        builder.addProperty("datasources", Joiner.on(',').join(datasources));

        // update announcement
        announcer.removeServiceAnnouncement(announcement.getId());
        announcer.addServiceAnnouncement(builder.build());
    }
View Full Code Here

        // build announcement with updated sources
        ServiceAnnouncementBuilder builder = serviceAnnouncement(announcement.getType());
        for (Map.Entry<String, String> entry : announcement.getProperties().entrySet()) {
            if (!entry.getKey().equals("datasources")) {
                builder.addProperty(entry.getKey(), entry.getValue());
            }
        }
        builder.addProperty("datasources", Joiner.on(',').join(datasources));

        // update announcement
View Full Code Here

        for (Map.Entry<String, String> entry : announcement.getProperties().entrySet()) {
            if (!entry.getKey().equals("datasources")) {
                builder.addProperty(entry.getKey(), entry.getValue());
            }
        }
        builder.addProperty("datasources", Joiner.on(',').join(datasources));

        // update announcement
        announcer.removeServiceAnnouncement(announcement.getId());
        announcer.addServiceAnnouncement(builder.build());
    }
View Full Code Here

        // presto announcement
        ServiceAnnouncementBuilder prestoAnnouncement = discoveryBinder(binder).bindHttpAnnouncement("presto")
                .addProperty("node_version", nodeVersion.toString());

        if (serverConfig.getDataSources() != null) {
            prestoAnnouncement.addProperty("datasources", serverConfig.getDataSources());
        }

        bindDataSource(binder, "presto-metastore", ForMetadata.class, ForShardManager.class);
        Multibinder<ResultSetMapper<?>> resultSetMapperBinder = newSetBinder(binder, new TypeLiteral<ResultSetMapper<?>>() {}, ForMetadata.class);
        resultSetMapperBinder.addBinding().to(TableColumnMapper.class).in(Scopes.SINGLETON);
View Full Code Here

        // build announcement with updated sources
        ServiceAnnouncementBuilder builder = serviceAnnouncement(announcement.getType());
        for (Map.Entry<String, String> entry : announcement.getProperties().entrySet()) {
            if (!entry.getKey().equals("datasources")) {
                builder.addProperty(entry.getKey(), entry.getValue());
            }
        }
        builder.addProperty("datasources", Joiner.on(',').join(datasources));

        // update announcement
View Full Code Here

        for (Map.Entry<String, String> entry : announcement.getProperties().entrySet()) {
            if (!entry.getKey().equals("datasources")) {
                builder.addProperty(entry.getKey(), entry.getValue());
            }
        }
        builder.addProperty("datasources", Joiner.on(',').join(datasources));

        // update announcement
        announcer.removeServiceAnnouncement(announcement.getId());
        announcer.addServiceAnnouncement(builder.build());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.