本文整理匯總了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);
}
}