Cleanup after merge/core upgrade

This should get us compiling against core, at least as of
7f2bcf1f97.

Original commit: elastic/x-pack-elasticsearch@3f27d83107
This commit is contained in:
Nik Everett 2017-06-29 09:35:02 -04:00
parent b713f091b2
commit f9da0b147f
4 changed files with 14 additions and 22 deletions

View File

@ -5,19 +5,13 @@
*/
package org.elasticsearch.xpack.sql.analysis.catalog;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.xpack.sql.type.DataType;
import org.elasticsearch.xpack.sql.type.Types;
import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
import java.util.Collections;
import java.util.Map;
public class EsType {
@ -49,7 +43,7 @@ public class EsType {
Map<String, Object> asMap;
try {
asMap = metaData.sourceAsMap();
} catch (IOException ex) {
} catch (ElasticsearchParseException ex) {
throw new MappingException("Cannot get mapping info", ex);
}

View File

@ -5,8 +5,8 @@
*/
package org.elasticsearch.xpack.sql.execution.search;
import org.elasticsearch.common.document.DocumentField;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHitField;
class DocValueExtractor implements HitExtractor {
private final String fieldName;
@ -17,7 +17,7 @@ class DocValueExtractor implements HitExtractor {
@Override
public Object get(SearchHit hit) {
SearchHitField field = hit.field(fieldName);
DocumentField field = hit.field(fieldName);
return field != null ? field.getValue() : null;
}

View File

@ -5,13 +5,13 @@
*/
package org.elasticsearch.xpack.sql.execution.search;
import java.util.Map;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.document.DocumentField;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHitField;
import org.elasticsearch.xpack.sql.execution.ExecutionException;
import java.util.Map;
class InnerHitExtractor implements HitExtractor {
private final String hitName, fieldName;
private final boolean useDocValue;
@ -28,7 +28,7 @@ class InnerHitExtractor implements HitExtractor {
@Override
public Object get(SearchHit hit) {
if (useDocValue) {
SearchHitField field = hit.field(fieldName);
DocumentField field = hit.field(fieldName);
return field != null ? field.getValue() : null;
}
else {

View File

@ -5,17 +5,15 @@
*/
package org.elasticsearch.xpack.sql.test.server;
import com.sun.net.httpserver.HttpServer;
import org.elasticsearch.client.Client;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.concurrent.Executors;
import org.elasticsearch.client.Client;
import com.sun.net.httpserver.HttpServer;
import static java.lang.String.format;
public abstract class ProtoHttpServer<R> {
private final ProtoHandler<R> handler;