本文整理了Java中org.elasticsearch.hadoop.serialization.Generator.close()
方法的一些代码示例,展示了Generator.close()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Generator.close()
方法的具体详情如下:
包路径:org.elasticsearch.hadoop.serialization.Generator
类名称:Generator
方法名:close
暂无
代码示例来源:origin: elastic/elasticsearch-hadoop
public void close() {
generator.close();
}
}
代码示例来源:origin: elastic/elasticsearch-hadoop
static QueryBuilder randomRawQueryStringQuery(Random rand, int level) {
QueryBuilder query = randomQuery(rand);
FastByteArrayOutputStream out = new FastByteArrayOutputStream(256);
Generator generator = new JacksonJsonGenerator(out);
generator.writeBeginObject();
query.toJson(generator);
generator.writeEndObject();
generator.close();
try {
return new RawQueryBuilder(out.toString().trim(), false);
} catch (IOException e) {
throw new IllegalArgumentException("failed to parse raw query", e);
}
}
代码示例来源:origin: elastic/elasticsearch-hadoop
public static String printQueryBuilder(QueryBuilder builder, boolean addQuery) {
FastByteArrayOutputStream out = new FastByteArrayOutputStream(256);
Generator generator = new JacksonJsonGenerator(out);
if (addQuery) {
generator.writeBeginObject().writeFieldName("query");
}
generator.writeBeginObject();
builder.toJson(generator);
generator.writeEndObject();
if (addQuery) {
generator.writeEndObject();
}
generator.close();
return out.toString();
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop
public void close() {
generator.close();
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop-mr
public void close() {
generator.close();
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch-spark-13
public void close() {
generator.close();
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch-spark
public void close() {
generator.close();
}
}
内容来源于网络,如有侵权,请联系作者删除!