Package com.facebook.presto.kafka

Examples of com.facebook.presto.kafka.KafkaFieldValueProvider


    @Override
    public KafkaFieldValueProvider decode(final String value, final KafkaColumnHandle columnHandle)
    {
        checkNotNull(columnHandle, "columnHandle is null");

        return new KafkaFieldValueProvider()
        {
            @Override
            public boolean accept(KafkaColumnHandle handle)
            {
                return columnHandle.equals(handle);
View Full Code Here


    @Override
    public KafkaFieldValueProvider decode(Void value, KafkaColumnHandle columnHandle)
    {
        checkNotNull(columnHandle, "columnHandle is null");

        return new KafkaFieldValueProvider()
        {
            @Override
            public boolean accept(KafkaColumnHandle handle)
            {
                return false;
View Full Code Here

        return null;
    }

    public static void checkValue(Set<KafkaFieldValueProvider> providers, KafkaColumnHandle handle, String value)
    {
        KafkaFieldValueProvider provider = findValueProvider(providers, handle);
        assertNotNull(provider);
        assertEquals(new String(provider.getSlice().getBytes(), StandardCharsets.UTF_8), value);
    }
View Full Code Here

        assertEquals(new String(provider.getSlice().getBytes(), StandardCharsets.UTF_8), value);
    }

    public static void checkValue(Set<KafkaFieldValueProvider> providers, KafkaColumnHandle handle, long value)
    {
        KafkaFieldValueProvider provider = findValueProvider(providers, handle);
        assertNotNull(provider);
        assertEquals(provider.getLong(), value);
    }
View Full Code Here

        assertEquals(provider.getLong(), value);
    }

    public static void checkValue(Set<KafkaFieldValueProvider> providers, KafkaColumnHandle handle, double value)
    {
        KafkaFieldValueProvider provider = findValueProvider(providers, handle);
        assertNotNull(provider);
        assertEquals(provider.getDouble(), value, 0.0001);
    }
View Full Code Here

        assertEquals(provider.getDouble(), value, 0.0001);
    }

    public static void checkValue(Set<KafkaFieldValueProvider> providers, KafkaColumnHandle handle, boolean value)
    {
        KafkaFieldValueProvider provider = findValueProvider(providers, handle);
        assertNotNull(provider);
        assertEquals(provider.getBoolean(), value);
    }
View Full Code Here

        assertEquals(provider.getBoolean(), value);
    }

    public static void checkIsNull(Set<KafkaFieldValueProvider> providers, KafkaColumnHandle handle)
    {
        KafkaFieldValueProvider provider = findValueProvider(providers, handle);
        assertNotNull(provider);
        assertTrue(provider.isNull());
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.kafka.KafkaFieldValueProvider

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.