org.apache.avro.io.JsonDecoder.configure()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(109)

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

JsonDecoder.configure介绍

[英]Reconfigures this JsonDecoder to use the InputStream provided.

If the InputStream provided is null, a NullPointerException is thrown.

Otherwise, this JsonDecoder will reset its state and then reconfigure its input.
[中]重新配置此JsonDecoder以使用提供的InputStream。
如果提供的InputStream为null,则会引发NullPointerException。
否则,此JsonDecoder将重置其状态,然后重新配置其输入。

代码示例

代码示例来源:origin: apache/avro

private JsonDecoder(Symbol root, InputStream in) throws IOException {
 super(root);
 configure(in);
}

代码示例来源:origin: apache/avro

private JsonDecoder(Symbol root, String in) throws IOException {
 super(root);
 configure(in);
}

代码示例来源:origin: org.apache.avro/avro

private JsonDecoder(Symbol root, InputStream in) throws IOException {
 super(root);
 configure(in);
}

代码示例来源:origin: org.apache.avro/avro

private JsonDecoder(Symbol root, String in) throws IOException {
 super(root);
 configure(in);
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

private JsonDecoder(Symbol root, InputStream in) throws IOException {
 super(root);
 configure(in);
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

private JsonDecoder(Symbol root, String in) throws IOException {
 super(root);
 configure(in);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro

private JsonDecoder(Symbol root, String in) throws IOException {
 super(root);
 configure(in);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro

private JsonDecoder(Symbol root, InputStream in) throws IOException {
 super(root);
 configure(in);
}

代码示例来源:origin: kite-sdk/kite

private Decoder prepare(InputStream in) throws IOException {
 Decoder decoder;
 if (isJson) {
  if (jsonDecoder == null) {
   jsonDecoder = DecoderFactory.get().jsonDecoder(writerSchema, in);
  } else {
   jsonDecoder.configure(in); // reuse for performance
  }
  decoder = jsonDecoder;
 } else {        
  binaryDecoder = DecoderFactory.get().binaryDecoder(in, binaryDecoder); // reuse for performance
  decoder = binaryDecoder;
 }
    
 if (datumReader == null) { // reuse for performance
  Schema readSchema = readerSchema != null ? readerSchema : writerSchema;
  datumReader = new FastGenericDatumReader<GenericContainer>(writerSchema, readSchema);  
  datumReader.setResolver(createResolver(writerSchema, readSchema));
 }
 return decoder;
}

代码示例来源:origin: org.kitesdk/kite-morphlines-avro

private Decoder prepare(InputStream in) throws IOException {
 Decoder decoder;
 if (isJson) {
  if (jsonDecoder == null) {
   jsonDecoder = DecoderFactory.get().jsonDecoder(writerSchema, in);
  } else {
   jsonDecoder.configure(in); // reuse for performance
  }
  decoder = jsonDecoder;
 } else {        
  binaryDecoder = DecoderFactory.get().binaryDecoder(in, binaryDecoder); // reuse for performance
  decoder = binaryDecoder;
 }
    
 if (datumReader == null) { // reuse for performance
  Schema readSchema = readerSchema != null ? readerSchema : writerSchema;
  datumReader = new FastGenericDatumReader<GenericContainer>(writerSchema, readSchema);  
  datumReader.setResolver(createResolver(writerSchema, readSchema));
 }
 return decoder;
}

代码示例来源:origin: com.cloudera.cdk/cdk-morphlines-avro

private Decoder prepare(InputStream in) throws IOException {
 Decoder decoder;
 if (isJson) {
  if (jsonDecoder == null) {
   jsonDecoder = DecoderFactory.get().jsonDecoder(writerSchema, in);
  } else {
   jsonDecoder.configure(in); // reuse for performance
  }
  decoder = jsonDecoder;
 } else {        
  binaryDecoder = DecoderFactory.get().binaryDecoder(in, binaryDecoder); // reuse for performance
  decoder = binaryDecoder;
 }
    
 if (datumReader == null) { // reuse for performance
  Schema readSchema = readerSchema != null ? readerSchema : writerSchema;
  datumReader = new FastGenericDatumReader<GenericContainer>(writerSchema, readSchema);  
  datumReader.setResolver(createResolver(writerSchema, readSchema));
 }
 return decoder;
}

相关文章