Examples of plusHours()


Examples of org.joda.time.DateTime.plusHours()

        List<AggregateNumericMetric> metrics = asList(
            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 2.0, 1.0, 3.0, bucket0Time.getMillis()),
            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 5.0, 4.0, 6.0, bucket0Time.plusHours(1).getMillis()),
            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 3.0, 3.0, 3.0, bucket0Time.plusHours(2).getMillis()),
            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 5.0, 2.0, 9.0, bucket59Time.getMillis()),
            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 5.0, 4.0, 6.0, bucket59Time.plusHours(1).getMillis()),
            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 3.0, 3.0, 3.0, bucket59Time.plusHours(2).getMillis())
        );
        for (AggregateNumericMetric metric : metrics) {
            dao.insert6HourData(metric).get();
        }
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 2.0, 1.0, 3.0, bucket0Time.getMillis()),
            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 5.0, 4.0, 6.0, bucket0Time.plusHours(1).getMillis()),
            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 3.0, 3.0, 3.0, bucket0Time.plusHours(2).getMillis()),
            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 5.0, 2.0, 9.0, bucket59Time.getMillis()),
            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 5.0, 4.0, 6.0, bucket59Time.plusHours(1).getMillis()),
            new AggregateNumericMetric(scheduleId, Bucket.SIX_HOUR, 3.0, 3.0, 3.0, bucket59Time.plusHours(2).getMillis())
        );
        for (AggregateNumericMetric metric : metrics) {
            dao.insert6HourData(metric).get();
        }
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

            .hourOfDay().get());

        populateRaw411Index(startTime, startTime.plusDays(1), scheduleIds(100, 112));
        populateRaw411Index(startTime.plusDays(1), startTime.plusDays(2), scheduleIds(100, 109));
        populateRaw411Index(endTime.minusHours(1), endTime, scheduleIds(105, 123));
        populate1Hour411Index(today, today.plusHours(6), scheduleIds(105, 123));
        populate6Hour411Index(today, today.plusDays(1), scheduleIds(100, 125));

        schemaManager = new SchemaManager("rhqadmin", "1eeb2f255e832171df8592078de921bc",
            new String[] {"127.0.0.1"}, 9042);
        schemaManager.install(new Properties());
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

        schemaManager.shutdown();

        assertRawIndexUpdated(startTime, startTime.plusDays(1), scheduleIds(100, 112));
        assertRawIndexUpdated(startTime.plusDays(1), startTime.plusDays(2), scheduleIds(100, 109));
        assertRawIndexUpdated(endTime.minusHours(1), endTime, scheduleIds(105, 123));
        assert1HourIndexUpdated(today, today.plusHours(6), scheduleIds(105, 123));
        assert6HourIndexUpdated(today, today.plusDays(1), scheduleIds(100, 125));
    }

    @Test
    public void replace412Index() throws Exception {
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

            .hourOfDay().get());

        populateRaw412Index(startTime, startTime.plusDays(1), scheduleIds(100, 112));
        populateRaw412Index(startTime.plusDays(1), startTime.plusDays(2), scheduleIds(100, 109));
        populateRaw412Index(endTime.minusHours(1), endTime, scheduleIds(105, 123));
        populate1Hour412Index(today, today.plusHours(6), scheduleIds(105, 123));
        populate6Hour412Index(today, today.plusDays(1), scheduleIds(100, 125));


        Cluster cluster = new Cluster.Builder()
            .addContactPoint("127.0.0.1")
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

        schemaManager.shutdown();

        assertRawIndexUpdated(startTime, startTime.plusDays(1), scheduleIds(100, 112));
        assertRawIndexUpdated(startTime.plusDays(1), startTime.plusDays(2), scheduleIds(100, 109));
        assertRawIndexUpdated(endTime.minusHours(1), endTime, scheduleIds(105, 123));
        assert1HourIndexUpdated(today, today.plusHours(6), scheduleIds(105, 123));
        assert6HourIndexUpdated(today, today.plusDays(1), scheduleIds(100, 125));
    }

    private void populateRaw411Index(DateTime startTime, DateTime endTime, List<Integer> scheduleIds) {
        populate411Index("one_hour_metrics", startTime, endTime, Hours.ONE.toStandardDuration(), scheduleIds);
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

            } else if (dt.getSecondOfMinute() != 0) {
                return dt.plusSeconds(1);
            } else if (dt.getMinuteOfHour() != 0) {
                return dt.plusMinutes(1);
            } else if (dt.getHourOfDay() != 0) {
                return dt.plusHours(1);
            } else {
                return dt.plusDays(1);
            }
        default:
            return null;
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

    availableSegments = Lists.newArrayList();
    for (int i = 0; i < 24; i++) {
      availableSegments.add(
          new DataSegment(
              "test",
              new Interval(start, start.plusHours(1)),
              new DateTime().toString(),
              Maps.<String, Object>newHashMap(),
              Lists.<String>newArrayList(),
              Lists.<String>newArrayList(),
              new NoneShardSpec(),
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

              new NoneShardSpec(),
              IndexIO.CURRENT_VERSION_ID,
              1
          )
      );
      start = start.plusHours(1);
    }

    ruleRunner = new DruidCoordinatorRuleRunner(new ReplicationThrottler(24, 1), coordinator);
  }
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

        // to set eventStart to the value we want
        // the arbitrary times of day are just a way to get the facets to be properly ordered in the web app
        final DateTime entryStartTime = ISODateTimeFormat.dateTime().parseDateTime(facet.startTimeStorage+"Z");
        switch (mealTypeId) {
            case 1:
                facet.start = entryStartTime.plusHours(8).getMillis();
                meal="Breakfast";
                break;
            case 2:
                facet.start = entryStartTime.plusHours(10).getMillis();
                meal="Morning Snack";
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.