gpt4 book ai didi

org.elasticsearch.hadoop.mr.WritableValueWriter.write()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 12:31:05 32 4
gpt4 key购买 nike

本文整理了Java中org.elasticsearch.hadoop.mr.WritableValueWriter.write()方法的一些代码示例,展示了WritableValueWriter.write()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WritableValueWriter.write()方法的具体详情如下:
包路径:org.elasticsearch.hadoop.mr.WritableValueWriter
类名称:WritableValueWriter
方法名:write

WritableValueWriter.write介绍

暂无

代码示例

代码示例来源:origin: elastic/elasticsearch-hadoop

return super.write(writable, generator);

代码示例来源:origin: elastic/elasticsearch-hadoop

@SuppressWarnings("unchecked")
@Override
public Result write(SinkCall<Object[], ?> sinkCall, Generator generator) {
  Tuple tuple = CascadingUtils.coerceToString(sinkCall);
  // consider names (in case of aliases these are already applied)
  List<String> names = (List<String>) sinkCall.getContext()[SINK_CTX_ALIASES];
  generator.writeBeginObject();
  for (int i = 0; i < tuple.size(); i++) {
    String name = (i < names.size() ? names.get(i) : "tuple" + i);
    // filter out fields
    if (shouldKeep(generator.getParentPath(), name)) {
      generator.writeFieldName(name);
      Object object = tuple.getObject(i);
      Result result = jdkWriter.write(object, generator);
      if (!result.isSuccesful()) {
        if (object instanceof Writable) {
          return writableWriter.write((Writable) object, generator);
        }
        return Result.FAILED(object);
      }
    }
  }
  generator.writeEndObject();
  return Result.SUCCESFUL();
}

代码示例来源:origin: elastic/elasticsearch-hadoop

generator.writeBeginArray();
for (Writable wrt : ((ArrayWritable) writable).get()) {
  Result result = write(wrt, generator);
  if (!result.isSuccesful()) {
    return result;
  if (shouldKeep(generator.getParentPath(), fieldName)) {
    generator.writeFieldName(fieldName);
    Result result = write(entry.getValue(), generator);

代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop

return super.write(writable, generator);

代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop

@SuppressWarnings("unchecked")
@Override
public Result write(SinkCall<Object[], ?> sinkCall, Generator generator) {
  Tuple tuple = CascadingUtils.coerceToString(sinkCall);
  // consider names (in case of aliases these are already applied)
  List<String> names = (List<String>) sinkCall.getContext()[SINK_CTX_ALIASES];
  generator.writeBeginObject();
  for (int i = 0; i < tuple.size(); i++) {
    String name = (i < names.size() ? names.get(i) : "tuple" + i);
    // filter out fields
    if (shouldKeep(generator.getParentPath(), name)) {
      generator.writeFieldName(name);
      Object object = tuple.getObject(i);
      Result result = jdkWriter.write(object, generator);
      if (!result.isSuccesful()) {
        if (object instanceof Writable) {
          return writableWriter.write((Writable) object, generator);
        }
        return Result.FAILED(object);
      }
    }
  }
  generator.writeEndObject();
  return Result.SUCCESFUL();
}

代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop-mr

generator.writeBeginArray();
for (Writable wrt : ((ArrayWritable) writable).get()) {
  Result result = write(wrt, generator);
  if (!result.isSuccesful()) {
    return result;
  if (shouldKeep(generator.getParentPath(), fieldName)) {
    generator.writeFieldName(fieldName);
    Result result = write(entry.getValue(), generator);

代码示例来源:origin: org.elasticsearch/elasticsearch-spark

generator.writeBeginArray();
for (Writable wrt : ((ArrayWritable) writable).get()) {
  Result result = write(wrt, generator);
  if (!result.isSuccesful()) {
    return result;
  if (shouldKeep(generator.getParentPath(), fieldName)) {
    generator.writeFieldName(fieldName);
    Result result = write(entry.getValue(), generator);

代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop

generator.writeBeginArray();
for (Writable wrt : ((ArrayWritable) writable).get()) {
  Result result = write(wrt, generator);
  if (!result.isSuccesful()) {
    return result;
  if (shouldKeep(generator.getParentPath(), fieldName)) {
    generator.writeFieldName(fieldName);
    Result result = write(entry.getValue(), generator);

代码示例来源:origin: org.elasticsearch/elasticsearch-spark-13

generator.writeBeginArray();
for (Writable wrt : ((ArrayWritable) writable).get()) {
  Result result = write(wrt, generator);
  if (!result.isSuccesful()) {
    return result;
  if (shouldKeep(generator.getParentPath(), fieldName)) {
    generator.writeFieldName(fieldName);
    Result result = write(entry.getValue(), generator);

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com