org.apache.pinot.common.utils.JsonUtils.inputStreamToObject()方法的使用及代码示例

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

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

JsonUtils.inputStreamToObject介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-pinot

@Nonnull
public static Schema fromInputSteam(@Nonnull InputStream schemaInputStream)
  throws IOException {
 return JsonUtils.inputStreamToObject(schemaInputStream, Schema.class);
}

代码示例来源:origin: apache/incubator-pinot

private RecordReaderConfig getReaderConfig(FileFormat fileFormat)
  throws IOException {
 RecordReaderConfig readerConfig = null;
 switch (fileFormat) {
  case CSV:
   if (_readerConfigFile == null) {
    readerConfig = new CSVRecordReaderConfig();
   } else {
    LOGGER.info("Reading CSV Record Reader Config from: {}", _readerConfigFile);
    Path readerConfigPath = new Path(_readerConfigFile);
    try (InputStream inputStream = _fileSystem.open(readerConfigPath)) {
     readerConfig = JsonUtils.inputStreamToObject(inputStream, CSVRecordReaderConfig.class);
    }
    LOGGER.info("CSV Record Reader Config: {}", readerConfig.toString());
   }
   break;
  case AVRO:
   break;
  case JSON:
   break;
  case THRIFT:
   readerConfig = new ThriftRecordReaderConfig();
  default:
   break;
 }
 return readerConfig;
}

代码示例来源:origin: apache/incubator-pinot

JsonUtils.inputStreamToObject(getMethod.getResponseBodyAsStream(), TableSizeInfo.class);
 serverToSegmentSizeInfoListMap.put(instance, tableSizeInfo.segments);
} catch (Exception e) {

相关文章