Package org.elasticsearch.action

Examples of org.elasticsearch.action.TimestampParsingException


                return timestampAsString;
            } catch (NumberFormatException e) {
                try {
                    ts = dateTimeFormatter.parser().parseMillis(timestampAsString);
                } catch (RuntimeException e1) {
                    throw new TimestampParsingException(timestampAsString);
                }
            }
            return Long.toString(ts);
        }
View Full Code Here


            String defaultTimestamp = TimestampFieldMapper.Defaults.DEFAULT_TIMESTAMP;
            if (mappingMd != null && mappingMd.timestamp() != null) {
                defaultTimestamp = mappingMd.timestamp().defaultTimestamp();
            }
            if (!Strings.hasText(defaultTimestamp)) {
                throw new TimestampParsingException("timestamp is required by mapping");
            }
            if (defaultTimestamp.equals(TimestampFieldMapper.Defaults.DEFAULT_TIMESTAMP)) {
                timestamp = Long.toString(System.currentTimeMillis());
            } else {
                timestamp = MappingMetaData.Timestamp.parseStringTimestamp(defaultTimestamp, mappingMd.timestamp().dateTimeFormatter());
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.TimestampParsingException

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.