public void run()

in computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/BatchInsertTask.java [43:76]


    public void run() {
        int retryCount = 0;
        int retryTimes = this.config.get(ComputerOptions.OUTPUT_RETRY_TIMES);
        do {
            try {
                this.insertBatch(this.batch);
                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 <= retryTimes);

        int count = this.batch.size();
        // This metrics just for current element mapping
        this.plusLoadSuccess(count);
    }