本文整理汇总了Java中org.apache.parquet.io.api.RecordMaterializer.RecordMaterializationException类的典型用法代码示例。如果您正苦于以下问题:Java RecordMaterializationException类的具体用法?Java RecordMaterializationException怎么用?Java RecordMaterializationException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RecordMaterializationException类属于org.apache.parquet.io.api.RecordMaterializer包,在下文中一共展示了RecordMaterializationException类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: incErrors
import org.apache.parquet.io.api.RecordMaterializer.RecordMaterializationException; //导入依赖的package包/类
public void incErrors(RecordMaterializationException cause) throws ParquetDecodingException {
numErrors++;
LOG.warn(String.format("Error while reading an input record (%s out of %s): ",
numErrors, totalNumRecords), cause);
if (numErrors > 0 && errorThreshold <= 0) { // no errors are tolerated
throw new ParquetDecodingException("Error while decoding records", cause);
}
double errRate = numErrors/(double)totalNumRecords;
if (errRate > errorThreshold) {
String message = String.format("Decoding error rate of at least %s/%s crosses configured threshold of %s",
numErrors, totalNumRecords, errorThreshold);
LOG.error(message);
throw new ParquetDecodingException(message, cause);
}
}