Package io.druid.query.metadata.metadata

Examples of io.druid.query.metadata.metadata.SegmentAnalysis


          }
        }

        return Sequences.simple(
            Arrays.asList(
                new SegmentAnalysis(
                    segment.getIdentifier(),
                    Arrays.asList(segment.getDataInterval()),
                    columns,
                    totalSize
                )
View Full Code Here


            for (String columnName : rightColumnNames) {
              columns.put(columnName, rightColumns.get(columnName));
            }

            return new SegmentAnalysis("merged", newIntervals, columns, arg1.getSize() + arg2.getSize());
          }
        };
      }
    };
  }
View Full Code Here

    HashMap<String,Object> context = new HashMap<String, Object>();
    Iterable<SegmentAnalysis> results = Sequences.toList(
        runner.run(query, context),
        Lists.<SegmentAnalysis>newArrayList()
    );
    SegmentAnalysis val = results.iterator().next();
    Assert.assertEquals("testSegment", val.getId());
    Assert.assertEquals(69843, val.getSize());
    Assert.assertEquals(
        Arrays.asList(new Interval("2011-01-12T00:00:00.000Z/2011-04-15T00:00:00.001Z")),
        val.getIntervals()
    );
    Assert.assertEquals(1, val.getColumns().size());
    final ColumnAnalysis columnAnalysis = val.getColumns().get("placement");
    Assert.assertEquals("STRING", columnAnalysis.getType());
    Assert.assertEquals(10881, columnAnalysis.getSize());
    Assert.assertEquals(new Integer(1), columnAnalysis.getCardinality());
    Assert.assertNull(columnAnalysis.getErrorMessage());
View Full Code Here

        new QueryableIndexSegment("test_1", TestIndex.getMMappedTestIndex())
    );

    Assert.assertEquals(1, results.size());

    final SegmentAnalysis analysis = results.get(0);
    Assert.assertEquals("test_1", analysis.getId());

    final Map<String, ColumnAnalysis> columns = analysis.getColumns();
    Assert.assertEquals(TestIndex.COLUMNS.length, columns.size()); // All columns including time

    for (String dimension : TestIndex.DIMENSIONS) {
      final ColumnAnalysis columnAnalysis = columns.get(dimension.toLowerCase());
View Full Code Here

TOP

Related Classes of io.druid.query.metadata.metadata.SegmentAnalysis

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.