protected void validateAccumuloOptions()

in client/migrationx/migrationx-transformer/src/main/java/com/aliyun/dataworks/migrationx/transformer/core/sqoop/BaseSqoopTool.java [1386:1427]


    protected void validateAccumuloOptions(SqoopOptions options)
        throws InvalidOptionsException {
        if ((options.getAccumuloColFamily() != null
            && options.getAccumuloTable() == null)
            || (options.getAccumuloColFamily() == null
            && options.getAccumuloTable() != null)) {
            throw new InvalidOptionsException(
                "Both --accumulo-table and --accumulo-column-family must be set."
                    + HELP_STR);
        }

        if (options.getAccumuloTable() != null
            && options.getHBaseTable() != null) {
            throw new InvalidOptionsException("HBase import is incompatible with "
                + "Accumulo import.");
        }
        if (options.getAccumuloTable() != null
            && options.getFileLayout() != SqoopOptions.FileLayout.TextFile) {
            throw new InvalidOptionsException("Accumulo import is not compatible "
                + "with importing into file format.");
        }
        if (options.getAccumuloTable() != null
            && options.getHBaseColFamily() != null) {
            throw new InvalidOptionsException("Use --accumulo-column-family with "
                + "Accumulo import.");
        }
        if (options.getAccumuloTable() != null
            && options.getAccumuloUser() == null) {
            throw
                new InvalidOptionsException("Must specify Accumulo user.");
        }
        if (options.getAccumuloTable() != null
            && options.getAccumuloInstance() == null) {
            throw new
                InvalidOptionsException("Must specify Accumulo instance.");
        }
        if (options.getAccumuloTable() != null
            && options.getAccumuloZookeepers() == null) {
            throw new
                InvalidOptionsException("Must specify Zookeeper server(s).");
        }
    }