APISonar


org.apache.kylin.job.common.PatternedLogger.log

> org > apache > kylin > job > common > PatternedLogger > log
org APIs apache APIs kylin APIs job APIs common APIs PatternedLogger APIs log APIs

Example 1
private final PatternedLogger stepLogger = new PatternedLogger(logger);

    protected void sqoopFlatHiveTable(KylinConfig config) throws IOException {
        String cmd = getParam("cmd");
        stepLogger.log(String.format(Locale.ROOT, "exe cmd:%s", cmd));
        Pair<Integer, String> response = config.getCliCommandExecutor().execute(cmd, stepLogger);
        getManager().addJobInfo(getId(), stepLogger.getInfo());
        if (response.getFirst() != 0) {
            throw new RuntimeException("Failed to create flat hive table, error code " + response.getFirst());
        }
    }
Example 2
private final PatternedLogger stepLogger = new PatternedLogger(logger);

    private void redistributeTable(KylinConfig config, int numReducers) throws Exception {
        StringBuffer statement = new StringBuffer();
        statement.append(getInitStatement());
        statement.append("set mapreduce.job.reduces=" + numReducers + ";\n");
        statement.append("set hive.merge.mapredfiles=false;\n");
        statement.append(getRedistributeDataStatement());

        stepLogger.log("Redistribute table, cmd: ");
        stepLogger.log(statement.toString());

        MRHiveDictUtil.runLivySqlJob(stepLogger, config, ImmutableList.of(statement.toString()), getManager(), getId());
    }