本文整理了Java中org.elasticsearch.hadoop.serialization.Generator.writeNumber()
方法的一些代码示例,展示了Generator.writeNumber()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Generator.writeNumber()
方法的具体详情如下:
包路径:org.elasticsearch.hadoop.serialization.Generator
类名称:Generator
方法名:writeNumber
暂无
代码示例来源:origin: elastic/elasticsearch-hadoop
@Override
public Result write(Writable writable, Generator generator) {
if (writable instanceof ByteWritable) {
generator.writeNumber(((ByteWritable) writable).get());
generator.writeNumber(((DoubleWritable) writable).get());
generator.writeNumber(((ShortWritable) writable).get());
代码示例来源:origin: elastic/elasticsearch-hadoop
generator.writeNumber(((Integer) value).intValue());
generator.writeNumber(((Long) value).longValue());
generator.writeNumber(((Float) value).floatValue());
generator.writeNumber(((Double) value).doubleValue());
generator.writeNumber(((Short) value).shortValue());
generator.writeNumber(((Byte) value).byteValue());
double d = n.doubleValue();
if (Math.floor(d) == d) {
generator.writeNumber(n.longValue());
generator.writeNumber(d);
代码示例来源:origin: elastic/elasticsearch-hadoop
generator.writeNumber(WritableCompatUtil.unwrap(writable));
generator.writeNumber(((IntWritable) writable).get());
generator.writeNumber(((LongWritable) writable).get());
generator.writeNumber(((VLongWritable) writable).get());
generator.writeNumber(((VIntWritable) writable).get());
generator.writeNumber(((ByteWritable) writable).get());
generator.writeNumber(((DoubleWritable) writable).get());
generator.writeNumber(((FloatWritable) writable).get());
代码示例来源:origin: elastic/elasticsearch-hadoop
@Override
public void toJson(Generator out) {
if (filter == null) {
throw new IllegalArgumentException("inner clause [filter] cannot be null.");
}
out.writeFieldName("constant_score");
out.writeBeginObject();
out.writeFieldName("filter");
out.writeBeginObject();
filter.toJson(out);
out.writeEndObject();
out.writeFieldName("boost");
out.writeNumber(boost);
out.writeEndObject();
}
}
代码示例来源:origin: elastic/elasticsearch-hadoop
break;
case DataType.INTEGER:
generator.writeNumber(((Number) object).intValue());
break;
case DataType.LONG:
generator.writeNumber(((Number) object).longValue());
break;
case DataType.FLOAT:
generator.writeNumber(((Number) object).floatValue());
break;
case DataType.DOUBLE:
generator.writeNumber(((Number) object).doubleValue());
break;
case DataType.BYTE:
generator.writeNumber((Byte) object);
break;
case DataType.CHARARRAY:
代码示例来源:origin: elastic/elasticsearch-hadoop
switch (parser.numberType()) {
case INT:
generator.writeNumber(parser.intValue());
break;
case LONG:
generator.writeNumber(parser.longValue());
break;
case DOUBLE:
generator.writeNumber(parser.doubleValue());
break;
case FLOAT:
generator.writeNumber(parser.floatValue());
break;
代码示例来源:origin: elastic/elasticsearch-hadoop
.writeNumber(host.getTimezoneOffsetSec());
代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop
@Override
public Result write(Writable writable, Generator generator) {
if (writable instanceof ByteWritable) {
generator.writeNumber(((ByteWritable) writable).get());
generator.writeNumber(((DoubleWritable) writable).get());
generator.writeNumber(((ShortWritable) writable).get());
代码示例来源:origin: org.elasticsearch/elasticsearch-spark-13
generator.writeNumber(((Integer) value).intValue());
generator.writeNumber(((Long) value).longValue());
generator.writeNumber(((Float) value).floatValue());
generator.writeNumber(((Double) value).doubleValue());
generator.writeNumber(((Short) value).shortValue());
generator.writeNumber(((Byte) value).byteValue());
double d = n.doubleValue();
if (Math.floor(d) == d) {
generator.writeNumber(n.longValue());
generator.writeNumber(d);
代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop-mr
generator.writeNumber(WritableCompatUtil.unwrap(writable));
generator.writeNumber(((IntWritable) writable).get());
generator.writeNumber(((LongWritable) writable).get());
generator.writeNumber(((VLongWritable) writable).get());
generator.writeNumber(((VIntWritable) writable).get());
generator.writeNumber(((ByteWritable) writable).get());
generator.writeNumber(((DoubleWritable) writable).get());
generator.writeNumber(((FloatWritable) writable).get());
代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop
generator.writeNumber(WritableCompatUtil.unwrap(writable));
generator.writeNumber(((IntWritable) writable).get());
generator.writeNumber(((LongWritable) writable).get());
generator.writeNumber(((VLongWritable) writable).get());
generator.writeNumber(((VIntWritable) writable).get());
generator.writeNumber(((ByteWritable) writable).get());
generator.writeNumber(((DoubleWritable) writable).get());
generator.writeNumber(((FloatWritable) writable).get());
代码示例来源:origin: org.elasticsearch/elasticsearch-spark-13
generator.writeNumber(WritableCompatUtil.unwrap(writable));
generator.writeNumber(((IntWritable) writable).get());
generator.writeNumber(((LongWritable) writable).get());
generator.writeNumber(((VLongWritable) writable).get());
generator.writeNumber(((VIntWritable) writable).get());
generator.writeNumber(((ByteWritable) writable).get());
generator.writeNumber(((DoubleWritable) writable).get());
generator.writeNumber(((FloatWritable) writable).get());
代码示例来源:origin: org.elasticsearch/elasticsearch-spark
generator.writeNumber(WritableCompatUtil.unwrap(writable));
generator.writeNumber(((IntWritable) writable).get());
generator.writeNumber(((LongWritable) writable).get());
generator.writeNumber(((VLongWritable) writable).get());
generator.writeNumber(((VIntWritable) writable).get());
generator.writeNumber(((ByteWritable) writable).get());
generator.writeNumber(((DoubleWritable) writable).get());
generator.writeNumber(((FloatWritable) writable).get());
代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop
@Override
public void toJson(Generator out) {
if (filter == null) {
throw new IllegalArgumentException("inner clause [filter] cannot be null.");
}
out.writeFieldName("constant_score");
out.writeBeginObject();
out.writeFieldName("filter");
out.writeBeginObject();
filter.toJson(out);
out.writeEndObject();
out.writeFieldName("boost");
out.writeNumber(boost);
out.writeEndObject();
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch-spark-13
@Override
public void toJson(Generator out) {
if (filter == null) {
throw new IllegalArgumentException("inner clause [filter] cannot be null.");
}
out.writeFieldName("constant_score");
out.writeBeginObject();
out.writeFieldName("filter");
out.writeBeginObject();
filter.toJson(out);
out.writeEndObject();
out.writeFieldName("boost");
out.writeNumber(boost);
out.writeEndObject();
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop-mr
@Override
public void toJson(Generator out) {
if (filter == null) {
throw new IllegalArgumentException("inner clause [filter] cannot be null.");
}
out.writeFieldName("constant_score");
out.writeBeginObject();
out.writeFieldName("filter");
out.writeBeginObject();
filter.toJson(out);
out.writeEndObject();
out.writeFieldName("boost");
out.writeNumber(boost);
out.writeEndObject();
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch-spark-13
switch (parser.numberType()) {
case INT:
generator.writeNumber(parser.intValue());
break;
case LONG:
generator.writeNumber(parser.longValue());
break;
case DOUBLE:
generator.writeNumber(parser.doubleValue());
break;
case FLOAT:
generator.writeNumber(parser.floatValue());
break;
代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop
switch (parser.numberType()) {
case INT:
generator.writeNumber(parser.intValue());
break;
case LONG:
generator.writeNumber(parser.longValue());
break;
case DOUBLE:
generator.writeNumber(parser.doubleValue());
break;
case FLOAT:
generator.writeNumber(parser.floatValue());
break;
代码示例来源:origin: org.elasticsearch/elasticsearch-spark
switch (parser.numberType()) {
case INT:
generator.writeNumber(parser.intValue());
break;
case LONG:
generator.writeNumber(parser.longValue());
break;
case DOUBLE:
generator.writeNumber(parser.doubleValue());
break;
case FLOAT:
generator.writeNumber(parser.floatValue());
break;
代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop-mr
switch (parser.numberType()) {
case INT:
generator.writeNumber(parser.intValue());
break;
case LONG:
generator.writeNumber(parser.longValue());
break;
case DOUBLE:
generator.writeNumber(parser.doubleValue());
break;
case FLOAT:
generator.writeNumber(parser.floatValue());
break;
内容来源于网络,如有侵权,请联系作者删除!