Package io.druid.segment.indexing.granularity

Examples of io.druid.segment.indexing.granularity.UniformGranularitySpec


    }
    catch (Exception e) {
      throw Throwables.propagate(e);
    }

    final UniformGranularitySpec granularitySpec = (UniformGranularitySpec) schema.getDataSchema().getGranularitySpec();

    Assert.assertEquals(
        "getIntervals",
        Lists.newArrayList(new Interval("2012-01-01/P1D")),
        granularitySpec.getIntervals().get()
    );

    Assert.assertEquals(
        "getSegmentGranularity",
        "HOUR",
        granularitySpec.getSegmentGranularity().toString()
    );
  }
View Full Code Here


    }
    catch (Exception e) {
      throw Throwables.propagate(e);
    }

    final UniformGranularitySpec granularitySpec = (UniformGranularitySpec) schema.getDataSchema().getGranularitySpec();

    Assert.assertEquals(
        "getIntervals",
        Lists.newArrayList(new Interval("2012-02-01/P1D")),
        granularitySpec.getIntervals().get()
    );

    Assert.assertEquals(
        "getSegmentGranularity",
        "DAY",
        granularitySpec.getSegmentGranularity().toString()
    );
  }
View Full Code Here

    HadoopIngestionSpec spec = new HadoopIngestionSpec(
        null, null, null,
        "foo",
        new TimestampSpec("timestamp", "auto"),
        new JSONDataSpec(ImmutableList.of("foo"), null),
        new UniformGranularitySpec(
            Granularity.HOUR,
            QueryGranularity.MINUTE,
            ImmutableList.of(new Interval("2010-01-01/P1D")),
            Granularity.HOUR
        ),
View Full Code Here

                null, null, null, null
            ),
            new AggregatorFactory[]{
                new CountAggregatorFactory("count")
            },
            new UniformGranularitySpec(Granularity.HOUR, QueryGranularity.MINUTE, null, Granularity.HOUR)
        ),
        new RealtimeIOConfig(
            null,
            new RealtimePlumberSchool(
                null, null, null, null, null, null, null, null, null, null, null, null, null, 0
View Full Code Here

      this.spec = new FireDepartment(
          new DataSchema(
              spec.getDataSource(),
              firehoseFactory == null ? null : firehoseFactory.getParser(),
              spec.getAggregators(),
              new UniformGranularitySpec(segmentGranularity, spec.getIndexGranularity(), null, segmentGranularity)
          ),
          new RealtimeIOConfig(firehoseFactory, null),
          new RealtimeTuningConfig(
              fireDepartmentConfig == null ? null : fireDepartmentConfig.getMaxRowsInMemory(),
              fireDepartmentConfig == null ? null : fireDepartmentConfig.getIntermediatePersistPeriod(),
View Full Code Here

        break;
      }
    }

    config.setGranularitySpec(
        new UniformGranularitySpec(
            segmentGranularity,
            config.getGranularitySpec().getQueryGranularity(),
            Lists.newArrayList(bucketsToRun),
            segmentGranularity
        )
View Full Code Here

            Utils.openInputStream(groupByJob, intervalInfoPath), new TypeReference<List<Interval>>()
        {
        }
        );
        config.setGranularitySpec(
            new UniformGranularitySpec(
                config.getGranularitySpec().getSegmentGranularity(),
                config.getGranularitySpec().getQueryGranularity(),
                intervals,
                config.getGranularitySpec().getSegmentGranularity()
            )
View Full Code Here

  {
    final DataSchema schema = new DataSchema(
        "test",
        null,
        new AggregatorFactory[]{new CountAggregatorFactory("rows")},
        new UniformGranularitySpec(Granularity.HOUR, QueryGranularity.MINUTE, null, Granularity.HOUR)
    );

    final Interval interval = new Interval("2013-01-01/2013-01-02");
    final String version = new DateTime().toString();
    RealtimeTuningConfig tuningConfig = new RealtimeTuningConfig(
View Full Code Here

    schema = new DataSchema(
        "test",
        null,
        new AggregatorFactory[]{new CountAggregatorFactory("rows")},
        new UniformGranularitySpec(Granularity.HOUR, QueryGranularity.NONE, null, Granularity.HOUR)
    );
    RealtimeIOConfig ioConfig = new RealtimeIOConfig(
        new FirehoseFactory()
        {
          @Override
View Full Code Here

          {
            return null;
          }
        },
        new AggregatorFactory[]{new CountAggregatorFactory("rows")},
        new UniformGranularitySpec(Granularity.HOUR, QueryGranularity.NONE, null, Granularity.HOUR)
    );

    announcer = EasyMock.createMock(DataSegmentAnnouncer.class);
    announcer.announceSegment(EasyMock.<DataSegment>anyObject());
    EasyMock.expectLastCall().anyTimes();
View Full Code Here

TOP

Related Classes of io.druid.segment.indexing.granularity.UniformGranularitySpec

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.