Examples of historics()


Examples of com.datasift.client.DataSiftClient.historics()

    public static void main(String... args) throws InterruptedException {
        DataSiftConfig config = new DataSiftConfig("zcourts", "acbf4788f875db9fdf6bbd2131b10752");
        final DataSiftClient datasift = new DataSiftClient(config);
        Stream stream = Stream.fromString("13e9347e7da32f19fcdb08e297019d2e");

        PreparedHistoricsQuery historic = datasift.historics().prepare(stream.hash(), DateTime.now().minusHours(5),
                DateTime.now().minusHours(4), "Historics pull test").sync();

        PushSubscription historicsSubscription = datasift.push()
                .createPull(PullJsonType.JSON_NEW_LINE, historic, "pull test " + DateTime.now()).sync();
View Full Code Here

Examples of com.datasift.client.DataSiftClient.historics()

        PushSubscription historicsSubscription = datasift.push()
                .createPull(PullJsonType.JSON_NEW_LINE, historic, "pull test " + DateTime.now()).sync();

        //don't forget to start it, AFTER creating the pull subscription
        datasift.historics().start(historic).sync();

        PulledInteractions historicSubscriptions = datasift.push().pull(historicsSubscription).sync();

        Interaction interaction;
        while (!((interaction = historicSubscriptions.take()) instanceof LastInteraction)) {
View Full Code Here

Examples of com.datasift.client.DataSiftClient.historics()

        DateTime fiveHrsAgo = DateTime.now().minusHours(5);
        DateTime fourHrsAgo = fiveHrsAgo.plusHours(1);
        String name = "My awesome Historics";
        //prepare our query
        PreparedHistoricsQuery query = datasift.historics().prepare(stream.hash(), fiveHrsAgo, fourHrsAgo, name).sync();
        //have to create a push subscription to the newly created historics before starting
        datasift.push().create(s3, FutureData.wrap(query), "Subscription name").sync();
        DataSiftResult historics = datasift.historics().start(query).sync();

        //stop a query
View Full Code Here

Examples of com.datasift.client.DataSiftClient.historics()

        String name = "My awesome Historics";
        //prepare our query
        PreparedHistoricsQuery query = datasift.historics().prepare(stream.hash(), fiveHrsAgo, fourHrsAgo, name).sync();
        //have to create a push subscription to the newly created historics before starting
        datasift.push().create(s3, FutureData.wrap(query), "Subscription name").sync();
        DataSiftResult historics = datasift.historics().start(query).sync();

        //stop a query
        datasift.historics().stop(query, "some reason").sync();
        //get a single historics query
        datasift.historics().get(query.getId()).sync();
View Full Code Here

Examples of com.datasift.client.DataSiftClient.historics()

        //have to create a push subscription to the newly created historics before starting
        datasift.push().create(s3, FutureData.wrap(query), "Subscription name").sync();
        DataSiftResult historics = datasift.historics().start(query).sync();

        //stop a query
        datasift.historics().stop(query, "some reason").sync();
        //get a single historics query
        datasift.historics().get(query.getId()).sync();
        //get your list of historics
        datasift.historics().list().sync();
        //delete a query
View Full Code Here

Examples of com.datasift.client.DataSiftClient.historics()

        DataSiftResult historics = datasift.historics().start(query).sync();

        //stop a query
        datasift.historics().stop(query, "some reason").sync();
        //get a single historics query
        datasift.historics().get(query.getId()).sync();
        //get your list of historics
        datasift.historics().list().sync();
        //delete a query
        datasift.historics().delete(query).sync();
    }
View Full Code Here

Examples of com.datasift.client.DataSiftClient.historics()

        //stop a query
        datasift.historics().stop(query, "some reason").sync();
        //get a single historics query
        datasift.historics().get(query.getId()).sync();
        //get your list of historics
        datasift.historics().list().sync();
        //delete a query
        datasift.historics().delete(query).sync();
    }

    public static void main(String... args) throws InterruptedException {
View Full Code Here

Examples of com.datasift.client.DataSiftClient.historics()

        //get a single historics query
        datasift.historics().get(query.getId()).sync();
        //get your list of historics
        datasift.historics().list().sync();
        //delete a query
        datasift.historics().delete(query).sync();
    }

    public static void main(String... args) throws InterruptedException {
        new HistoricsApi();
    }
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.