Examples of RowPageBuilder


Examples of com.facebook.presto.operator.RowPageBuilder

    private static Page getPage()
            throws JsonProcessingException
    {
        int datapoints = 100;
        ObjectMapper mapper = new ObjectMapper();
        RowPageBuilder builder = RowPageBuilder.rowPageBuilder(BigintType.BIGINT, VarcharType.VARCHAR, VarcharType.VARCHAR);
        Random rand = new Random(0);
        for (int i = 0; i < datapoints; i++) {
            long label = rand.nextDouble() < 0.5 ? 0 : 1;
            builder.row(label, mapper.writeValueAsString(ImmutableMap.of(0, label + rand.nextGaussian())), "C=1");
        }

        return builder.build();
    }
View Full Code Here

Examples of com.facebook.presto.operator.RowPageBuilder

    private static Page getPage()
            throws JsonProcessingException
    {
        int datapoints = 100;
        ObjectMapper mapper = new ObjectMapper();
        RowPageBuilder builder = RowPageBuilder.rowPageBuilder(BigintType.BIGINT, VarcharType.VARCHAR, VarcharType.VARCHAR);
        Random rand = new Random(0);
        for (int i = 0; i < datapoints; i++) {
            long label = rand.nextDouble() < 0.5 ? 0 : 1;
            builder.row(label, mapper.writeValueAsString(ImmutableMap.of(0, label + rand.nextGaussian())), "C=1");
        }

        return builder.build();
    }
View Full Code Here

Examples of com.facebook.presto.operator.RowPageBuilder

    private static Page getPage()
            throws JsonProcessingException
    {
        int datapoints = 100;
        ObjectMapper mapper = new ObjectMapper();
        RowPageBuilder builder = RowPageBuilder.rowPageBuilder(BigintType.BIGINT, VarcharType.VARCHAR, VarcharType.VARCHAR);
        Random rand = new Random(0);
        for (int i = 0; i < datapoints; i++) {
            long label = rand.nextDouble() < 0.5 ? 0 : 1;
            builder.row(label, mapper.writeValueAsString(ImmutableMap.of(0, label + rand.nextGaussian())), "C=1");
        }

        return builder.build();
    }
View Full Code Here

Examples of com.facebook.presto.operator.RowPageBuilder

    private static Page getPage()
            throws JsonProcessingException
    {
        int datapoints = 100;
        ObjectMapper mapper = new ObjectMapper();
        RowPageBuilder builder = RowPageBuilder.rowPageBuilder(BigintType.BIGINT, VarcharType.VARCHAR, VarcharType.VARCHAR);
        Random rand = new Random(0);
        for (int i = 0; i < datapoints; i++) {
            long label = rand.nextDouble() < 0.5 ? 0 : 1;
            builder.row(label, mapper.writeValueAsString(ImmutableMap.of(0, label + rand.nextGaussian())), "C=1");
        }

        return builder.build();
    }
View Full Code Here

Examples of com.facebook.presto.operator.RowPageBuilder

    private static Page getPage()
            throws JsonProcessingException
    {
        int datapoints = 100;
        ObjectMapper mapper = new ObjectMapper();
        RowPageBuilder builder = RowPageBuilder.rowPageBuilder(BigintType.BIGINT, VarcharType.VARCHAR, VarcharType.VARCHAR);
        Random rand = new Random(0);
        for (int i = 0; i < datapoints; i++) {
            long label = rand.nextDouble() < 0.5 ? 0 : 1;
            builder.row(label, mapper.writeValueAsString(ImmutableMap.of(0, label + rand.nextGaussian())), "C=1");
        }

        return builder.build();
    }
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.