Package com.asakusafw.compiler.fileio.model

Examples of com.asakusafw.compiler.fileio.model.Ex1


            FileStatus[] statuses = fs.globStatus(path);
            List<Ex1> results = new ArrayList<Ex1>();
            for (FileStatus status : statuses) {
                SequenceFile.Reader reader = new SequenceFile.Reader(fs, status.getPath(), tester.configuration());
                try {
                    Ex1 model = new Ex1();
                    while (reader.next(NullWritable.get(), model)) {
                        Ex1 copy = new Ex1();
                        copy.copyFrom(model);
                        results.add(copy);
                    }
                } finally {
                    reader.close();
                }
View Full Code Here


     * @param result result
     */
    @CoGroup
    public void cogroupAdd(@Key(group = "STRING", order = "SID") List<Ex1> list, Result<Ex1> result) {
        Iterator<Ex1> iter = list.iterator();
        Ex1 first = iter.next();
        while (iter.hasNext()) {
            Ex1 next = iter.next();
            first.getValueOption().add(next.getValueOption());
        }
        result.add(first);
    }
View Full Code Here

        checkResults(1, 2, 3, 4, 5, 6, 7, 8);
    }

    private void writeEx1(ModelOutput<Ex1> output, int... sids) throws IOException {
        try {
            Ex1 value = new Ex1();
            for (int sid : sids) {
                value.setSid(sid);
                value.setValue(sid);
                value.setStringAsString(String.valueOf(sid));
                output.write(value);
            }
        } finally {
            output.close();
        }
View Full Code Here

            assertThat(ex1.getValueOption(), is(new IntOption(value)));
        }
    }

    private void writeTestData(ModelOutput<Ex1> source) throws IOException {
        Ex1 value = new Ex1();
        source.write(value);
        value.setSid(1);
        source.write(value);
        value.setSid(2);
        source.write(value);
        value.setSid(3);
        source.write(value);
        value.setSid(4);
        source.write(value);
        value.setSid(5);
        source.write(value);
        value.setSid(6);
        source.write(value);
        value.setSid(7);
        source.write(value);
        value.setSid(8);
        source.write(value);
        value.setSid(9);
        source.write(value);
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.fileio.model.Ex1

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.