Package org.elasticsearch.hadoop.serialization

Examples of org.elasticsearch.hadoop.serialization.ScrollReader


@SuppressWarnings({ "rawtypes", "unchecked" })
public class HiveValueReaderTest {

    @Test
    public void testDateMapping() throws Exception {
        ScrollReader reader = new ScrollReader(new HiveValueReader(), mapping("hive-date.json"), false, "_mapping");
        InputStream stream = getClass().getResourceAsStream("hive-date-source.json");
        List<Object[]> read = reader.read(stream);
        assertEquals(1, read.size());
        Object[] doc = read.get(0);
        Map map = (Map) doc[1];
        System.out.println(map);
        assertTrue(map.containsKey(new Text("type")));
View Full Code Here


            FieldPresenceValidation validation = settings.getFieldExistanceValidation();
            if (validation.isRequired()) {
                MappingUtils.validateMapping(fields, mapping, validation, log);
            }

            input = QueryBuilder.query(settings).fields(StringUtils.concatenate(fields,  ",")).build(client, new ScrollReader(new JdkValueReader(), mapping));
        }
        return new TupleEntrySchemeIterator<Properties, ScrollQuery>(flowProcess, getScheme(), input, getIdentifier());
    }
View Full Code Here

            }
            else {
                log.warn(String.format("No mapping found for [%s] - either no index exists or the split configuration has been corrupted", esSplit));
            }

            scrollReader = new ScrollReader(reader, mapping);

            // heart-beat
            beat = new HeartBeat(progressable, cfg, settings.getHeartBeatLead(), log);

            // initialize REST client
View Full Code Here

TOP

Related Classes of org.elasticsearch.hadoop.serialization.ScrollReader

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.