public void execute()

in hugegraph-loader/src/main/java/org/apache/hugegraph/loader/task/BatchInsertTask.java [47:86]


    public void execute() {
        int retryCount = 0;
        do {
            try {
                if (this.mapping.updateStrategies().isEmpty()) {
                    this.insertBatch(this.batch, this.options().checkVertex);
                } else {
                    this.updateBatch(this.batch, this.options().checkVertex);
                }
                break;
            } catch (ClientException e) {
                LOG.debug("client exception: {}", e.getMessage());
                Throwable cause = e.getCause();
                if (cause != null && cause.getMessage() != null) {
                    if (StringUtils.containsAny(cause.getMessage(),
                                                UNACCEPTABLE_MESSAGES)) {
                        throw e;
                    }
                }
                retryCount = this.waitThenRetry(retryCount, e);
            } catch (ServerException e) {
                String message = e.getMessage();
                LOG.error("server exception: {}", message);
                if (UNACCEPTABLE_EXCEPTIONS.contains(e.exception())) {
                    throw e;
                }
                if (StringUtils.containsAny(message, UNACCEPTABLE_MESSAGES)) {
                    throw e;
                }
                retryCount = this.waitThenRetry(retryCount, e);
            }
        } while (retryCount > 0 && retryCount <= this.options().retryTimes);

        // TODO:need to write to error log when insertBatch fails
        int count = this.batch.size();
        // This metrics just for current element mapping
        this.plusLoadSuccess(count);
        Printer.printProgress(this.context, this.type(),
                              BATCH_PRINT_FREQ, count);
    }