APISonar


org.apache.kylin.common.util.BufferedLogger.log

> org > apache > kylin > common > util > BufferedLogger > log
org APIs apache APIs kylin APIs common APIs util APIs BufferedLogger APIs log APIs

Example 1
final BufferedLogger reporter = new BufferedLogger(logger);

    private void checkErrorMeta() {
        reporter.log("## Checking metadata");

        CubeManager cubeManager = CubeManager.getInstance(config);
        for (String cube : cubeManager.getErrorCubes()) {
            reporter.log("Error loading CubeDesc at " + cube);
        }

        DataModelManager modelManager = DataModelManager.getInstance(config);
        for (String model : modelManager.getErrorModels()) {
            reporter.log("Error loading DataModelDesc at " + model);
        }
    }
Example 2
private final BufferedLogger stepLogger = new BufferedLogger(logger);

    protected void createFlatHiveTable(KylinConfig config) throws IOException {
        final HiveCmdBuilder hiveCmdBuilder = new HiveCmdBuilder();
        hiveCmdBuilder.addStatement(getInitStatement());
        hiveCmdBuilder.addStatement(getCreateTableStatement());
        final String cmd = hiveCmdBuilder.toString();

        stepLogger.log("Create and distribute table, cmd: ");
        stepLogger.log(cmd);

        Pair<Integer, String> response = config.getCliCommandExecutor().execute(cmd, stepLogger);
        if (response.getFirst() != 0) {
            throw new RuntimeException("Failed to create flat hive table, error code " + response.getFirst());
        }
    }
Example 3
final BufferedLogger reporter = new BufferedLogger(logger);

    private void checkTooManySegments(List<CubeInstance> cubes) {
        reporter.log("## Checking too many segments of Cubes");
        int warningSegmentNum = config.getWarningSegmentNum();
        if (warningSegmentNum < 0) {
            return;
        }
        for (CubeInstance cube : cubes) {
            if (cube.getSegments().size() >= warningSegmentNum) {
                reporter.log("Too many segments: {} for cube: {}, project: {}, please merge the segments",
                        cube.getSegments().size(), cube.getName(), cube.getProject());
            }
        }
    }