use of com.baidu.hugegraph.exception.LimitExceedException in project incubator-hugegraph by apache.
the class HugeTask method checkPropertySize.
private void checkPropertySize(int propertyLength, String propertyName) {
long propertyLimit = BytesBuffer.STRING_LEN_MAX;
HugeGraph graph = this.scheduler().graph();
if (propertyName.equals(P.INPUT)) {
propertyLimit = graph.option(CoreOptions.TASK_INPUT_SIZE_LIMIT);
} else if (propertyName.equals(P.RESULT)) {
propertyLimit = graph.option(CoreOptions.TASK_RESULT_SIZE_LIMIT);
}
if (propertyLength > propertyLimit) {
throw new LimitExceedException("Task %s size %s exceeded limit %s bytes", P.unhide(propertyName), propertyLength, propertyLimit);
}
}
Aggregations