Search in sources :

Example 1 with HSAdminRefreshProtocol

use of org.apache.hadoop.mapreduce.v2.api.HSAdminRefreshProtocol in project hadoop by apache.

the class HSAdmin method refreshJobRetentionSettings.

private int refreshJobRetentionSettings() throws IOException {
    // Refresh job retention settings
    Configuration conf = getConf();
    InetSocketAddress address = conf.getSocketAddr(JHAdminConfig.JHS_ADMIN_ADDRESS, JHAdminConfig.DEFAULT_JHS_ADMIN_ADDRESS, JHAdminConfig.DEFAULT_JHS_ADMIN_PORT);
    HSAdminRefreshProtocol refreshProtocol = HSProxies.createProxy(conf, address, HSAdminRefreshProtocol.class, UserGroupInformation.getCurrentUser());
    refreshProtocol.refreshJobRetentionSettings();
    return 0;
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) InetSocketAddress(java.net.InetSocketAddress) HSAdminRefreshProtocol(org.apache.hadoop.mapreduce.v2.api.HSAdminRefreshProtocol)

Example 2 with HSAdminRefreshProtocol

use of org.apache.hadoop.mapreduce.v2.api.HSAdminRefreshProtocol in project hadoop by apache.

the class HSAdmin method refreshLoadedJobCache.

private int refreshLoadedJobCache() throws IOException {
    // Refresh the loaded job cache
    Configuration conf = getConf();
    InetSocketAddress address = conf.getSocketAddr(JHAdminConfig.JHS_ADMIN_ADDRESS, JHAdminConfig.DEFAULT_JHS_ADMIN_ADDRESS, JHAdminConfig.DEFAULT_JHS_ADMIN_PORT);
    HSAdminRefreshProtocol refreshProtocol = HSProxies.createProxy(conf, address, HSAdminRefreshProtocol.class, UserGroupInformation.getCurrentUser());
    refreshProtocol.refreshLoadedJobCache();
    return 0;
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) InetSocketAddress(java.net.InetSocketAddress) HSAdminRefreshProtocol(org.apache.hadoop.mapreduce.v2.api.HSAdminRefreshProtocol)

Example 3 with HSAdminRefreshProtocol

use of org.apache.hadoop.mapreduce.v2.api.HSAdminRefreshProtocol in project hadoop by apache.

the class HSAdmin method refreshLogRetentionSettings.

private int refreshLogRetentionSettings() throws IOException {
    // Refresh log retention settings
    Configuration conf = getConf();
    InetSocketAddress address = conf.getSocketAddr(JHAdminConfig.JHS_ADMIN_ADDRESS, JHAdminConfig.DEFAULT_JHS_ADMIN_ADDRESS, JHAdminConfig.DEFAULT_JHS_ADMIN_PORT);
    HSAdminRefreshProtocol refreshProtocol = HSProxies.createProxy(conf, address, HSAdminRefreshProtocol.class, UserGroupInformation.getCurrentUser());
    refreshProtocol.refreshLogRetentionSettings();
    return 0;
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) InetSocketAddress(java.net.InetSocketAddress) HSAdminRefreshProtocol(org.apache.hadoop.mapreduce.v2.api.HSAdminRefreshProtocol)

Example 4 with HSAdminRefreshProtocol

use of org.apache.hadoop.mapreduce.v2.api.HSAdminRefreshProtocol in project hadoop by apache.

the class HSAdmin method refreshAdminAcls.

private int refreshAdminAcls() throws IOException {
    // Refresh the admin acls
    Configuration conf = getConf();
    InetSocketAddress address = conf.getSocketAddr(JHAdminConfig.JHS_ADMIN_ADDRESS, JHAdminConfig.DEFAULT_JHS_ADMIN_ADDRESS, JHAdminConfig.DEFAULT_JHS_ADMIN_PORT);
    HSAdminRefreshProtocol refreshProtocol = HSProxies.createProxy(conf, address, HSAdminRefreshProtocol.class, UserGroupInformation.getCurrentUser());
    refreshProtocol.refreshAdminAcls();
    return 0;
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) InetSocketAddress(java.net.InetSocketAddress) HSAdminRefreshProtocol(org.apache.hadoop.mapreduce.v2.api.HSAdminRefreshProtocol)

Aggregations

InetSocketAddress (java.net.InetSocketAddress)4 Configuration (org.apache.hadoop.conf.Configuration)4 HSAdminRefreshProtocol (org.apache.hadoop.mapreduce.v2.api.HSAdminRefreshProtocol)4