本文整理了Java中org.apache.hadoop.hbase.client.Admin.getSecurityCapabilities()
方法的一些代码示例,展示了Admin.getSecurityCapabilities()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Admin.getSecurityCapabilities()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Admin
类名称:Admin
方法名:getSecurityCapabilities
[英]Return the set of supported security capabilities.
[中]返回支持的安全功能集。
代码示例来源:origin: apache/hbase
/**
* Return true if cell visibility features are supported and enabled
* @param connection The connection to use
* @return true if cell visibility features are supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isCellVisibilityEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.CELL_VISIBILITY);
}
代码示例来源:origin: apache/hbase
/**
* Return true if cell authorization is supported and enabled
* @param connection The connection to use
* @return true if cell authorization is supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isCellAuthorizationEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.CELL_AUTHORIZATION);
}
代码示例来源:origin: apache/hbase
/**
* Return true if authorization is supported and enabled
* @param connection The connection to use
* @return true if authorization is supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isAuthorizationEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.AUTHORIZATION);
}
代码示例来源:origin: apache/hbase
@Test
public void testSecurityCapabilities() throws Exception {
List<SecurityCapability> capabilities = TEST_UTIL.getConnection().getAdmin()
.getSecurityCapabilities();
assertTrue("CELL_VISIBILITY capability is missing",
capabilities.contains(SecurityCapability.CELL_VISIBILITY));
}
代码示例来源:origin: apache/hbase
@Test
public void testSecurityCapabilities() throws Exception {
List<SecurityCapability> capabilities = TEST_UTIL.getConnection().getAdmin()
.getSecurityCapabilities();
assertTrue("AUTHORIZATION capability is missing",
capabilities.contains(SecurityCapability.AUTHORIZATION));
assertTrue("CELL_AUTHORIZATION capability is missing",
capabilities.contains(SecurityCapability.CELL_AUTHORIZATION));
}
代码示例来源:origin: org.apache.hbase/hbase-client
/**
* Return true if authorization is supported and enabled
* @param connection The connection to use
* @return true if authorization is supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isAuthorizationEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.AUTHORIZATION);
}
代码示例来源:origin: org.apache.hbase/hbase-client
/**
* Return true if cell authorization is supported and enabled
* @param connection The connection to use
* @return true if cell authorization is supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isCellAuthorizationEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.CELL_AUTHORIZATION);
}
代码示例来源:origin: org.apache.hbase/hbase-client
/**
* Return true if cell visibility features are supported and enabled
* @param connection The connection to use
* @return true if cell visibility features are supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isCellVisibilityEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.CELL_VISIBILITY);
}
代码示例来源:origin: larsgeorge/hbase-book
@Override
public Void run() throws Exception {
Connection connection = superuser.getConnection();
Admin admin = connection.getAdmin();
List<SecurityCapability> sc = admin.getSecurityCapabilities();
System.out.println("Superuser: Available security capabilities:");
for (SecurityCapability cap : sc) {
System.out.println(" " + cap);
}
admin.close();
System.out.println("Superuser: Report Visibility features...");
System.out.println(" Visibility Controller Running: " +
VisibilityClient.isCellVisibilityEnabled(connection)); // co VisibilityLabelExample-02-CheckStatus Determine if the visibility labels are enabled on the cluster.
return null;
}
});
代码示例来源:origin: larsgeorge/hbase-book
Table table = connection.getTable(tableName);
List<SecurityCapability> sc = admin.getSecurityCapabilities(); // co AccessControlExample-04-ListCaps List the security capabilities as reported from the Master.
System.out.println("Superuser: Available security capabilities:");
for (SecurityCapability cap : sc) {
代码示例来源:origin: harbby/presto-connectors
/**
* Return true if authorization is supported and enabled
* @param connection The connection to use
* @return true if authorization is supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isAuthorizationEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.AUTHORIZATION);
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
/**
* Return true if cell authorization is supported and enabled
* @param connection The connection to use
* @return true if cell authorization is supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isCellAuthorizationEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.CELL_AUTHORIZATION);
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
/**
* Return true if cell visibility features are supported and enabled
* @param connection The connection to use
* @return true if cell visibility features are supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isCellVisibilityEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.CELL_VISIBILITY);
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
/**
* Return true if authorization is supported and enabled
* @param connection The connection to use
* @return true if authorization is supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isAuthorizationEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.AUTHORIZATION);
}
代码示例来源:origin: harbby/presto-connectors
/**
* Return true if cell authorization is supported and enabled
* @param connection The connection to use
* @return true if cell authorization is supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isCellAuthorizationEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.CELL_AUTHORIZATION);
}
代码示例来源:origin: harbby/presto-connectors
/**
* Return true if cell visibility features are supported and enabled
* @param connection The connection to use
* @return true if cell visibility features are supported and enabled, false otherwise
* @throws IOException
*/
public static boolean isCellVisibilityEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities()
.contains(SecurityCapability.CELL_VISIBILITY);
}
代码示例来源:origin: org.apache.hbase/hbase-server
@Test
public void testSecurityCapabilities() throws Exception {
List<SecurityCapability> capabilities = TEST_UTIL.getConnection().getAdmin()
.getSecurityCapabilities();
assertTrue("AUTHORIZATION capability is missing",
capabilities.contains(SecurityCapability.AUTHORIZATION));
assertTrue("CELL_AUTHORIZATION capability is missing",
capabilities.contains(SecurityCapability.CELL_AUTHORIZATION));
}
代码示例来源:origin: org.apache.hbase/hbase-server
@Test
public void testSecurityCapabilities() throws Exception {
List<SecurityCapability> capabilities = TEST_UTIL.getConnection().getAdmin()
.getSecurityCapabilities();
assertTrue("CELL_VISIBILITY capability is missing",
capabilities.contains(SecurityCapability.CELL_VISIBILITY));
}
内容来源于网络,如有侵权,请联系作者删除!