in lambda-kafka-function/src/main/java/com/amazonaws/hbase/lambda/RecordValidator.java [38:66]
public void validateRecord(HBaseCell cell) throws InvalidInAppRecordException {
byte[] cfamily = cell.getFamily();
byte[] cqualifier = cell.getQualifier();
byte[] rowkey = cell.getRow();
long ts = cell.getTimeStamp();
String type = cell.getType();
byte[] value = cell.getValue();
switch (type.toLowerCase()) {
case "put":
case "deletefamily":
// some valid operations
break;
default:
throw new InvalidInAppRecordException(cell.toString());
}
if (
isValidUTF8(cfamily) &&
isValidUTF8(cqualifier) &&
isValidUTF8(rowkey)
) {
// It's fine.
} else {
throw new InvalidInAppRecordException(cell.toString());
}
}