本文整理了Java中org.apache.avro.io.Encoder.writeMapEnd()
方法的一些代码示例,展示了Encoder.writeMapEnd()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Encoder.writeMapEnd()
方法的具体详情如下:
包路径:org.apache.avro.io.Encoder
类名称:Encoder
方法名:writeMapEnd
[英]Call this method to terminate the inner-most, currently-opened map. See #writeArrayStart for more details.
[中]调用此方法以终止最内部的、当前打开的映射。有关更多详细信息,请参阅#writeArrayStart。
代码示例来源:origin: apache/avro
@Override
public void writeMapEnd() throws IOException { e.writeMapEnd(); }
@Override
代码示例来源:origin: apache/avro
@Override
public void writeMapEnd() throws IOException {
parser.advance(Symbol.MAP_END);
out.writeMapEnd();
pop();
}
代码示例来源:origin: org.apache.avro/avro
@Override
public void writeMapEnd() throws IOException {
parser.advance(Symbol.MAP_END);
out.writeMapEnd();
pop();
}
代码示例来源:origin: apache/avro
/** Called to write a map. May be overridden for alternate map
* representations.*/
protected void writeMap(Schema schema, Object datum, Encoder out)
throws IOException {
Schema value = schema.getValueType();
int size = getMapSize(datum);
int actualSize = 0;
out.writeMapStart();
out.setItemCount(size);
for (Map.Entry<Object,Object> entry : getMapEntries(datum)) {
out.startItem();
writeString(entry.getKey().toString(), out);
write(value, entry.getValue(), out);
actualSize++;
}
out.writeMapEnd();
if (actualSize != size) {
throw new ConcurrentModificationException("Size of map written was " +
size + ", but number of entries written was " + actualSize + ". ");
}
}
代码示例来源:origin: org.apache.avro/avro
/** Called to write a map. May be overridden for alternate map
* representations.*/
protected void writeMap(Schema schema, Object datum, Encoder out)
throws IOException {
Schema value = schema.getValueType();
int size = getMapSize(datum);
int actualSize = 0;
out.writeMapStart();
out.setItemCount(size);
for (Map.Entry<Object,Object> entry : getMapEntries(datum)) {
out.startItem();
writeString(entry.getKey().toString(), out);
write(value, entry.getValue(), out);
actualSize++;
}
out.writeMapEnd();
if (actualSize != size) {
throw new ConcurrentModificationException("Size of map written was " +
size + ", but number of entries written was " + actualSize + ". ");
}
}
代码示例来源:origin: apache/avro
out.writeBytes(v0);
out.writeMapEnd();
if (actualSize0 != size0)
throw new java.util.ConcurrentModificationException("Map-size written was " + size0 + ", but element count was " + actualSize0 + ".");
代码示例来源:origin: apache/avro
out.writeString(v0);
out.writeMapEnd();
if (actualSize0 != size0)
throw new java.util.ConcurrentModificationException("Map-size written was " + size0 + ", but element count was " + actualSize0 + ".");
out.writeString(v1.toString());
out.writeMapEnd();
if (actualSize1 != size1)
throw new java.util.ConcurrentModificationException("Map-size written was " + size1 + ", but element count was " + actualSize1 + ".");
代码示例来源:origin: apache/avro
out.writeBytes(v0);
out.writeMapEnd();
if (actualSize0 != size0)
throw new java.util.ConcurrentModificationException("Map-size written was " + size0 + ", but element count was " + actualSize0 + ".");
代码示例来源:origin: apache/avro
encode(e, v, n.get(key));
e.writeMapEnd();
break;
case UNION:
代码示例来源:origin: apache/avro
write(node.get(name), out);
out.writeMapEnd();
break;
default:
代码示例来源:origin: apache/avro
case END_OBJECT:
assertFalse(isArray[stackTop]);
cos.writeMapEnd();
stackTop--;
break;
代码示例来源:origin: org.apache.avro/avro
encode(e, v, n.get(key));
e.writeMapEnd();
break;
case UNION:
代码示例来源:origin: org.apache.avro/avro
write(node.get(name), out);
out.writeMapEnd();
break;
default:
代码示例来源:origin: apache/avro
@Override
void writeInternal(Encoder e) throws IOException {
int items = sourceData.length/4;
e.writeMapStart();
e.setItemCount(items);
Utf8 foo = new Utf8("foo");
for (int i = 0; i < sourceData.length;i+=4) {
e.startItem();
e.writeString(foo);
e.writeFloat(sourceData[i]);
e.writeFloat(sourceData[i+1]);
e.writeFloat(sourceData[i+2]);
e.writeFloat(sourceData[i+3]);
}
e.writeMapEnd();
}
}
代码示例来源:origin: apache/avro
out.writeString(v0);
out.writeMapEnd();
if (actualSize0 != size0)
throw new java.util.ConcurrentModificationException("Map-size written was " + size0 + ", but element count was " + actualSize0 + ".");
代码示例来源:origin: apache/avro
static void generateComplexData(Encoder e) throws IOException {
e.writeArrayStart();
e.setItemCount(1);
e.startItem();
e.writeInt(1);
e.writeArrayEnd();
e.writeMapStart();
e.setItemCount(2);
e.startItem();
e.writeString("foo");
e.writeInt(-1);
e.writeDouble(33.3);
e.startItem();
e.writeString("bar");
e.writeInt(1);
e.writeDouble(-33.3);
e.writeMapEnd();
e.flush();
}
代码示例来源:origin: apache/avro
break;
case '}':
vw.writeMapEnd();
break;
case 'c':
代码示例来源:origin: co.cask.cdap/cdap-app-fabric
private void endMap() throws IOException {
// end the map when all the request entries have been processed
encoder.writeMapEnd();
mapEnded = true;
}
代码示例来源:origin: org.apache.cassandra.deps/avro
@Override
public void writeMapEnd() throws IOException {
parser.advance(Symbol.MAP_END);
out.writeMapEnd();
pop();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro
@Override
public void writeMapEnd() throws IOException {
parser.advance(Symbol.MAP_END);
out.writeMapEnd();
pop();
}
内容来源于网络,如有侵权,请联系作者删除!