Java Code Examples for org.apache.kylin.rest.response.GeneralResponse#put()

The following examples show how to use org.apache.kylin.rest.response.GeneralResponse#put() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AdminController.java    From kylin-on-parquet-v2 with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/env", method = { RequestMethod.GET }, produces = { "application/json" })
@ResponseBody
public GeneralResponse getEnv() {
    Message msg = MsgPicker.getMsg();
    try {
        String env = adminService.getEnv();

        GeneralResponse envRes = new GeneralResponse();
        envRes.put("env", env);

        return envRes;
    } catch (ConfigurationException | UnsupportedEncodingException e) {
        throw new RuntimeException(msg.getGET_ENV_CONFIG_FAIL(), e);
    }
}
 
Example 2
Source File: AdminController.java    From kylin-on-parquet-v2 with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/version", method = { RequestMethod.GET }, produces = { "application/json" })
@ResponseBody
public GeneralResponse getKylinVersions() {
    try {
        GeneralResponse versionRes = new GeneralResponse();
        String commitId = KylinVersion.getGitCommitInfo();
        versionRes.put("kylin.version", VersionUtil.getKylinVersion());
        versionRes.put("kylin.version.commitId", commitId.replace(";", ""));
        return versionRes;
    } catch (Exception e) {
        throw new RuntimeException(e.getMessage(), e);
    }
}
 
Example 3
Source File: AdminController.java    From kylin-on-parquet-v2 with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/config", method = { RequestMethod.GET }, produces = { "application/json" })
@ResponseBody
public GeneralResponse getConfig() throws IOException {
    String config = KylinConfig.getInstanceFromEnv().exportAllToString();
    GeneralResponse configRes = new GeneralResponse();
    configRes.put("config", config);

    return configRes;
}
 
Example 4
Source File: AdminController.java    From kylin-on-parquet-v2 with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/public_config", method = { RequestMethod.GET }, produces = { "application/json" })
@ResponseBody
public GeneralResponse getPublicConfig() throws IOException {
    final String config = adminService.getPublicConfig();
    GeneralResponse configRes = new GeneralResponse();
    configRes.put("config", config);
    return configRes;
}
 
Example 5
Source File: AdminController.java    From kylin with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/env", method = { RequestMethod.GET }, produces = { "application/json" })
@ResponseBody
public GeneralResponse getEnv() {
    Message msg = MsgPicker.getMsg();
    try {
        String env = adminService.getEnv();

        GeneralResponse envRes = new GeneralResponse();
        envRes.put("env", env);

        return envRes;
    } catch (ConfigurationException | UnsupportedEncodingException e) {
        throw new RuntimeException(msg.getGET_ENV_CONFIG_FAIL(), e);
    }
}
 
Example 6
Source File: AdminController.java    From kylin with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/version", method = { RequestMethod.GET }, produces = { "application/json" })
@ResponseBody
public GeneralResponse getKylinVersions() {
    try {
        GeneralResponse versionRes = new GeneralResponse();
        String commitId = KylinVersion.getGitCommitInfo();
        versionRes.put("kylin.version", VersionUtil.getKylinVersion());
        versionRes.put("kylin.version.commitId", commitId.replace(";", ""));
        return versionRes;
    } catch (Exception e) {
        throw new RuntimeException(e.getMessage(), e);
    }
}
 
Example 7
Source File: AdminController.java    From kylin with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/config", method = { RequestMethod.GET }, produces = { "application/json" })
@ResponseBody
public GeneralResponse getConfig() throws IOException {
    String config = KylinConfig.getInstanceFromEnv().exportAllToString();
    GeneralResponse configRes = new GeneralResponse();
    configRes.put("config", config);

    return configRes;
}
 
Example 8
Source File: AdminController.java    From kylin with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/public_config", method = { RequestMethod.GET }, produces = { "application/json" })
@ResponseBody
public GeneralResponse getPublicConfig() throws IOException {
    final String config = adminService.getPublicConfig();
    GeneralResponse configRes = new GeneralResponse();
    configRes.put("config", config);
    return configRes;
}
 
Example 9
Source File: AdminController.java    From kylin with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/config/hdfs", method = { RequestMethod.GET }, produces = { "application/json" })
@ResponseBody
public GeneralResponse getHDFSConfig() throws IOException {
    String config = adminService.getHadoopConfigAsString();

    GeneralResponse configRes = new GeneralResponse();
    configRes.put("config", config);

    return configRes;
}
 
Example 10
Source File: AdminController.java    From kylin with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/config/hbase", method = { RequestMethod.GET }, produces = { "application/json" })
@ResponseBody
public GeneralResponse getHBaseConfig() throws IOException {
    String config = adminService.getHBaseConfigAsString();

    GeneralResponse configRes = new GeneralResponse();
    configRes.put("config", config);

    return configRes;
}
 
Example 11
Source File: AdminController.java    From Kylin with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/env", method = { RequestMethod.GET })
@ResponseBody
public GeneralResponse getEnv() {
    String env = adminService.getEnv();

    GeneralResponse envRes = new GeneralResponse();
    envRes.put("env", env);

    return envRes;
}
 
Example 12
Source File: AdminController.java    From Kylin with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/config", method = { RequestMethod.GET })
@ResponseBody
public GeneralResponse getConfig() {
    String config = adminService.getConfigAsString();

    GeneralResponse configRes = new GeneralResponse();
    configRes.put("config", config);

    return configRes;
}