Package org.elasticsearch

Examples of org.elasticsearch.ElasticSearchParseException


                singles = (long) (Double.parseDouble(sValue.substring(0, sValue.length() - 1)) * SizeUnit.C3);
            } else {
                singles = Long.parseLong(sValue);
            }
        } catch (NumberFormatException e) {
            throw new ElasticSearchParseException("Failed to parse [" + sValue + "]", e);
        }
        return new SizeValue(singles, SizeUnit.SINGLE);
    }
View Full Code Here


                bytes = Long.parseLong(sValue.substring(0, sValue.length() - 1));
            } else {
                bytes = Long.parseLong(sValue);
            }
        } catch (NumberFormatException e) {
            throw new ElasticSearchParseException("Failed to parse [" + sValue + "]", e);
        }
        return new ByteSizeValue(bytes, ByteSizeUnit.BYTES);
    }
View Full Code Here

        if (LZF.isCompressed(source.bytes(), source.offset(), source.length())) {
            try {
                // TODO decompress without doing an extra copy!
                this.source = new BytesHolder(LZFDecoder.decode(source.copyBytes()));
            } catch (IOException e) {
                throw new ElasticSearchParseException("failed to decompress source", e);
            }
        }
        return this.source;
    }
View Full Code Here

            try {
                parser = XContentFactory.xContent(source, sourceOffset, sourceLength)
                        .createParser(source, sourceOffset, sourceLength);
                routing = mappingMd.parseRouting(parser);
            } catch (Exception e) {
                throw new ElasticSearchParseException("failed to parse doc to extract routing", e);
            } finally {
                if (parser != null) {
                    parser.close();
                }
            }
View Full Code Here

    } else {
      try {
        ret = TimeValue.parseTimeValue(XContentMapValues.nodeStringValue(jiraSettings.get(key), null),
            new TimeValue(defaultDuration, defaultTimeUnit)).millis();
      } catch (ElasticSearchParseException e) {
        throw new ElasticSearchParseException(e.getMessage() + " for setting: " + key);
      }
    }
    return ret;
  }
View Full Code Here

    } else {
      try {
        ret = TimeValue.parseTimeValue(XContentMapValues.nodeStringValue(settings.get(key), null),
            new TimeValue(defaultDuration, defaultTimeUnit)).millis();
      } catch (ElasticSearchParseException e) {
        throw new ElasticSearchParseException(e.getMessage() + " for setting: " + key);
      }
    }
    return ret;
  }
View Full Code Here

    } else {
      try {
        ret = TimeValue.parseTimeValue(XContentMapValues.nodeStringValue(jiraSettings.get(key), null),
            new TimeValue(defaultDuration, defaultTimeUnit)).millis();
      } catch (ElasticSearchParseException e) {
        throw new ElasticSearchParseException(e.getMessage() + " for setting: " + key);
      }
    }
    return ret;
  }
View Full Code Here

    } else {
      try {
        ret = TimeValue.parseTimeValue(XContentMapValues.nodeStringValue(settings.get(key), null),
            new TimeValue(defaultDuration, defaultTimeUnit)).millis();
      } catch (ElasticSearchParseException e) {
        throw new ElasticSearchParseException(e.getMessage() + " for setting: " + key);
      }
    }
    return ret;
  }
View Full Code Here

    } else {
      try {
        ret = TimeValue.parseTimeValue(XContentMapValues.nodeStringValue(settings.get(key), null),
            new TimeValue(defaultDuration, defaultTimeUnit)).millis();
      } catch (ElasticsearchParseException e) {
        throw new ElasticsearchParseException(e.getMessage() + " for setting: " + key);
      }
    }
    return ret;
  }
View Full Code Here

    } else {
      try {
        ret = TimeValue.parseTimeValue(XContentMapValues.nodeStringValue(jiraSettings.get(key), null),
            new TimeValue(defaultDuration, defaultTimeUnit)).millis();
      } catch (ElasticsearchParseException e) {
        throw new ElasticsearchParseException(e.getMessage() + " for setting: " + key);
      }
    }
    return ret;
  }
View Full Code Here

TOP

Related Classes of org.elasticsearch.ElasticSearchParseException

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.