APISonar


uk.gov.gchq.gaffer.parquetstore.testutils.TestUtils.DATE

> uk > gov > gchq > gaffer > parquetstore > testutils > TestUtils > DATE
uk APIs gov APIs gchq APIs gaffer APIs parquetstore APIs testutils APIs TestUtils APIs DATE APIs

Example 1
private static void generateData(final String file, final SchemaUtils schemaUtils) throws IOException {
        final ParquetWriter<Element> writer = new ParquetElementWriter
                .Builder(new Path(file))
                .withSparkSchema(schemaUtils.getSparkSchema(TestGroups.ENTITY))
                .withType(schemaUtils.getParquetSchema(TestGroups.ENTITY))
                .usingConverter(schemaUtils.getConverter(TestGroups.ENTITY))
                .build();
        for (int i = 19; i >= 0; i--) {
            writer.write(DataGen.getEntity(TestGroups.ENTITY, (long) i, (byte) 'a', 3f,
                    TestUtils.getTreeSet1(), 5L * i, (short) 6, TestUtils.DATE, TestUtils.getFreqMap1(), 1, "A"));
            writer.write(DataGen.getEntity(TestGroups.ENTITY, (long) i, (byte) 'b', 4f,
                    TestUtils.getTreeSet2(), 6L * i, (short) 7, TestUtils.DATE, TestUtils.getFreqMap2(), 1, "A"));
        }
        writer.close();
    }
Example 2
protected List<Element> getResultsForGetElementsWithSeedsAndViewTest() {
        final List<Element> results = new ArrayList<>();
        results.add(DataGen.getEdge(TestGroups.EDGE, 15L, 16L, true, (byte) 'b', 6f, TestUtils.MERGED_TREESET, 95L, (short) 13, TestUtils.DATE, TestUtils.MERGED_FREQMAP, 2, null));
        results.add(DataGen.getEdge(TestGroups.EDGE, 14L, 15L, true, (byte) 'b', 6f, TestUtils.MERGED_TREESET, 89L, (short) 13, TestUtils.DATE, TestUtils.MERGED_FREQMAP, 2, null));
        results.add(DataGen.getEntity(TestGroups.ENTITY, 2L, (byte) 'b', 7f, TestUtils.MERGED_TREESET, 22L, (short) 13, TestUtils.DATE, TestUtils.MERGED_FREQMAP, 2, null));
        return results;
    }
Example 3
protected Edge getEdgeWithIdenticalSrcAndDst() {
        final TypeValue t0v10 = new TypeValue("type0", "vrt10");
        return DataGen.getEdge(TestGroups.EDGE_2, t0v10, t0v10, true, (byte) 'a', 6f, TestUtils.MERGED_TREESET, 95L, (short) 13, TestUtils.DATE, TestUtils.MERGED_FREQMAP, 2, null);
    }