本文整理汇总了Java中org.apache.hadoop.hbase.security.visibility.VisibilityConstants类的典型用法代码示例。如果您正苦于以下问题:Java VisibilityConstants类的具体用法?Java VisibilityConstants怎么用?Java VisibilityConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VisibilityConstants类属于org.apache.hadoop.hbase.security.visibility包,在下文中一共展示了VisibilityConstants类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: provisionCluster
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
@BeforeClass
public static void provisionCluster() throws Exception {
conf = util.getConfiguration();
SUPERUSER = User.createUserForTesting(conf, "admin", new String[] { "supergroup" });
conf.set("hbase.superuser", "admin,"+User.getCurrent().getName());
conf.setInt("hfile.format.version", 3);
conf.set("hbase.coprocessor.master.classes", VisibilityController.class.getName());
conf.set("hbase.coprocessor.region.classes", VisibilityController.class.getName());
conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS, SimpleScanLabelGenerator.class,
ScanLabelGenerator.class);
util.setJobWithoutMRCluster();
util.startMiniCluster();
// Wait for the labels table to become available
util.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
createLabels();
}
开发者ID:fengchen8086,项目名称:ditb,代码行数:17,代码来源:TestImportTSVWithVisibilityLabels.java
示例2: preInitialise
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
@SuppressFBWarnings({"DE_MIGHT_IGNORE", "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"})
@Override
public void preInitialise(final String graphId, final Schema schema, final StoreProperties properties)
throws StoreException {
setProperties(properties);
if (null == utility) {
try {
final Configuration conf = setupConf();
utility = new HBaseTestingUtility(conf);
utility.startMiniCluster();
utility.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
conf.set(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY, CommonConfigurationKeysPublic.FS_DEFAULT_NAME_DEFAULT);
addLabels(getMiniHBaseVisibilities());
} catch (final Exception e) {
throw new StoreException(e);
}
}
super.preInitialise(graphId, schema, getProperties());
}
开发者ID:gchq,项目名称:Gaffer,代码行数:22,代码来源:MiniHBaseStore.java
示例3: provisionCluster
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
@BeforeClass
public static void provisionCluster() throws Exception {
conf = util.getConfiguration();
SUPERUSER = User.createUserForTesting(conf, "admin", new String[] { "supergroup" });
conf.set("hbase.superuser", "admin,"+User.getCurrent().getName());
conf.setInt("hfile.format.version", 3);
conf.set("hbase.coprocessor.master.classes", VisibilityController.class.getName());
conf.set("hbase.coprocessor.region.classes", VisibilityController.class.getName());
conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS, SimpleScanLabelGenerator.class,
ScanLabelGenerator.class);
util.startMiniCluster();
// Wait for the labels table to become available
util.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
createLabels();
Admin admin = new HBaseAdmin(util.getConfiguration());
util.startMiniMapReduceCluster();
}
开发者ID:grokcoder,项目名称:pbase,代码行数:18,代码来源:TestImportTSVWithVisibilityLabels.java
示例4: beforeClass
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
@BeforeClass
public static void beforeClass() throws Exception {
SUPERUSER = User.createUserForTesting(conf, "admin",
new String[] { "supergroup" });
conf = UTIL.getConfiguration();
conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS,
SimpleScanLabelGenerator.class, ScanLabelGenerator.class);
conf.set("hbase.superuser", SUPERUSER.getShortName());
conf.set("hbase.coprocessor.master.classes",
VisibilityController.class.getName());
conf.set("hbase.coprocessor.region.classes",
VisibilityController.class.getName());
conf.setInt("hfile.format.version", 3);
UTIL.startMiniCluster(1);
// Wait for the labels table to become available
UTIL.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
createLabels();
HBaseAdmin admin = new HBaseAdmin(UTIL.getConfiguration());
HTableDescriptor tableDescriptor = new HTableDescriptor(
TableName.valueOf(tableAname));
for (HColumnDescriptor family : families) {
tableDescriptor.addFamily(family);
}
admin.createTable(tableDescriptor);
setAuths();
}
开发者ID:tenggyut,项目名称:HIndex,代码行数:27,代码来源:TestThriftHBaseServiceHandlerWithLabels.java
示例5: provisionCluster
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
@BeforeClass
public static void provisionCluster() throws Exception {
conf = util.getConfiguration();
SUPERUSER = User.createUserForTesting(conf, "admin", new String[] { "supergroup" });
conf.set("hbase.superuser", "admin,"+User.getCurrent().getName());
conf.setInt("hfile.format.version", 3);
conf.set("hbase.coprocessor.master.classes", VisibilityController.class.getName());
conf.set("hbase.coprocessor.region.classes", VisibilityController.class.getName());
conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS, SimpleScanLabelGenerator.class,
ScanLabelGenerator.class);
util.startMiniCluster();
// Wait for the labels table to become available
util.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
createLabels();
HBaseAdmin admin = new HBaseAdmin(util.getConfiguration());
util.startMiniMapReduceCluster();
}
开发者ID:tenggyut,项目名称:HIndex,代码行数:18,代码来源:TestImportTSVWithVisibilityLabels.java
示例6: beforeClass
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
@BeforeClass
public static void beforeClass() throws Exception {
SUPERUSER = User.createUserForTesting(conf, "admin",
new String[] { "supergroup" });
conf = UTIL.getConfiguration();
conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS,
SimpleScanLabelGenerator.class, ScanLabelGenerator.class);
conf.set("hbase.superuser", SUPERUSER.getShortName());
VisibilityTestUtil.enableVisiblityLabels(conf);
UTIL.startMiniCluster(1);
// Wait for the labels table to become available
UTIL.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
createLabels();
Admin admin = UTIL.getAdmin();
HTableDescriptor tableDescriptor = new HTableDescriptor(
TableName.valueOf(tableAname));
for (HColumnDescriptor family : families) {
tableDescriptor.addFamily(family);
}
admin.createTable(tableDescriptor);
admin.close();
setAuths();
}
开发者ID:apache,项目名称:hbase,代码行数:24,代码来源:TestThriftHBaseServiceHandlerWithLabels.java
示例7: beforeClass
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
/**
* Sets the security firstly for getting the correct default realm.
* @throws Exception
*/
@BeforeClass
public static void beforeClass() throws Exception {
UserProvider.setUserProviderForTesting(UTIL.getConfiguration(), HadoopSecurityEnabledUserProviderForTesting.class);
setUpKdcServer();
SecureTestUtil.enableSecurity(UTIL.getConfiguration());
UTIL.getConfiguration().setBoolean(AccessControlConstants.EXEC_PERMISSION_CHECKS_KEY, true);
VisibilityTestUtil.enableVisiblityLabels(UTIL.getConfiguration());
SecureTestUtil.verifyConfiguration(UTIL.getConfiguration());
setUpClusterKdc();
UTIL.startMiniCluster();
UTIL.waitUntilAllRegionsAssigned(AccessControlLists.ACL_TABLE_NAME);
UTIL.waitUntilAllRegionsAssigned(VisibilityConstants.LABELS_TABLE_NAME);
UTIL.waitTableEnabled(AccessControlLists.ACL_TABLE_NAME, 50000);
UTIL.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME, 50000);
SecureTestUtil.grantGlobal(UTIL, USER_ADMIN,
Permission.Action.ADMIN,
Permission.Action.CREATE,
Permission.Action.EXEC,
Permission.Action.READ,
Permission.Action.WRITE);
addLabels(UTIL.getConfiguration(), Arrays.asList(USER_OWNER),
Arrays.asList(PRIVATE, CONFIDENTIAL, SECRET, TOPSECRET));
}
开发者ID:apache,项目名称:hbase,代码行数:28,代码来源:TestSecureExport.java
示例8: beforeClass
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
@BeforeClass
public static void beforeClass() throws Exception {
SUPERUSER = User.createUserForTesting(conf, "admin",
new String[] { "supergroup" });
conf = UTIL.getConfiguration();
conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS,
SimpleScanLabelGenerator.class, ScanLabelGenerator.class);
conf.set("hbase.superuser", SUPERUSER.getShortName());
conf.set("hbase.coprocessor.master.classes",
VisibilityController.class.getName());
conf.set("hbase.coprocessor.region.classes",
VisibilityController.class.getName());
conf.setInt("hfile.format.version", 3);
UTIL.startMiniCluster(1);
// Wait for the labels table to become available
UTIL.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
createLabels();
Admin admin = new HBaseAdmin(UTIL.getConfiguration());
HTableDescriptor tableDescriptor = new HTableDescriptor(
TableName.valueOf(tableAname));
for (HColumnDescriptor family : families) {
tableDescriptor.addFamily(family);
}
admin.createTable(tableDescriptor);
admin.close();
setAuths();
}
开发者ID:fengchen8086,项目名称:ditb,代码行数:28,代码来源:TestThriftHBaseServiceHandlerWithLabels.java
示例9: setUpBeforeClass
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
SUPERUSER = User.createUserForTesting(conf, "admin",
new String[] { "supergroup" });
conf = TEST_UTIL.getConfiguration();
conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS,
SimpleScanLabelGenerator.class, ScanLabelGenerator.class);
conf.setInt("hfile.format.version", 3);
conf.set("hbase.superuser", SUPERUSER.getShortName());
conf.set("hbase.coprocessor.master.classes", VisibilityController.class.getName());
conf.set("hbase.coprocessor.region.classes", VisibilityController.class.getName());
TEST_UTIL.startMiniCluster(1);
// Wait for the labels table to become available
TEST_UTIL.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
createLabels();
setAuths();
REST_TEST_UTIL.startServletContainer(conf);
client = new Client(new Cluster().add("localhost", REST_TEST_UTIL.getServletPort()));
context = JAXBContext.newInstance(CellModel.class, CellSetModel.class, RowModel.class,
ScannerModel.class);
marshaller = context.createMarshaller();
unmarshaller = context.createUnmarshaller();
Admin admin = TEST_UTIL.getHBaseAdmin();
if (admin.tableExists(TABLE)) {
return;
}
HTableDescriptor htd = new HTableDescriptor(TABLE);
htd.addFamily(new HColumnDescriptor(CFA));
htd.addFamily(new HColumnDescriptor(CFB));
admin.createTable(htd);
insertData(TABLE, COLUMN_1, 1.0);
insertData(TABLE, COLUMN_2, 0.5);
}
开发者ID:fengchen8086,项目名称:ditb,代码行数:34,代码来源:TestScannersWithLabels.java
示例10: setUpBeforeClass
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
SUPERUSER = User.createUserForTesting(conf, "admin",
new String[] { "supergroup" });
conf = TEST_UTIL.getConfiguration();
conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS,
SimpleScanLabelGenerator.class, ScanLabelGenerator.class);
conf.setInt("hfile.format.version", 3);
conf.set("hbase.superuser", SUPERUSER.getShortName());
conf.set("hbase.coprocessor.master.classes", VisibilityController.class.getName());
conf.set("hbase.coprocessor.region.classes", VisibilityController.class.getName());
TEST_UTIL.startMiniCluster(1);
// Wait for the labels table to become available
TEST_UTIL.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
createLabels();
setAuths();
REST_TEST_UTIL.startServletContainer(conf);
client = new Client(new Cluster().add("localhost", REST_TEST_UTIL.getServletPort()));
context = JAXBContext.newInstance(CellModel.class, CellSetModel.class, RowModel.class,
ScannerModel.class);
marshaller = context.createMarshaller();
unmarshaller = context.createUnmarshaller();
HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
if (admin.tableExists(TABLE)) {
return;
}
HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(TABLE));
htd.addFamily(new HColumnDescriptor(CFA));
htd.addFamily(new HColumnDescriptor(CFB));
admin.createTable(htd);
insertData(TABLE, COLUMN_1, 1.0);
insertData(TABLE, COLUMN_2, 0.5);
}
开发者ID:tenggyut,项目名称:HIndex,代码行数:34,代码来源:TestScannersWithLabels.java
示例11: provisionCluster
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
@BeforeClass
public static void provisionCluster() throws Exception {
conf = util.getConfiguration();
SUPERUSER = User.createUserForTesting(conf, "admin", new String[] { "supergroup" });
conf.set("hbase.superuser", "admin,"+User.getCurrent().getName());
VisibilityTestUtil.enableVisiblityLabels(conf);
conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS, SimpleScanLabelGenerator.class,
ScanLabelGenerator.class);
util.startMiniCluster();
// Wait for the labels table to become available
util.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
createLabels();
}
开发者ID:apache,项目名称:hbase,代码行数:14,代码来源:TestImportTSVWithVisibilityLabels.java
示例12: setUpBeforeClass
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
SUPERUSER = User.createUserForTesting(conf, "admin",
new String[] { "supergroup" });
conf = TEST_UTIL.getConfiguration();
conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS,
SimpleScanLabelGenerator.class, ScanLabelGenerator.class);
conf.set("hbase.superuser", SUPERUSER.getShortName());
VisibilityTestUtil.enableVisiblityLabels(conf);
TEST_UTIL.startMiniCluster(1);
// Wait for the labels table to become available
TEST_UTIL.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
createLabels();
setAuths();
REST_TEST_UTIL.startServletContainer(conf);
client = new Client(new Cluster().add("localhost", REST_TEST_UTIL.getServletPort()));
context = JAXBContext.newInstance(CellModel.class, CellSetModel.class, RowModel.class,
ScannerModel.class);
marshaller = context.createMarshaller();
unmarshaller = context.createUnmarshaller();
Admin admin = TEST_UTIL.getAdmin();
if (admin.tableExists(TABLE)) {
return;
}
HTableDescriptor htd = new HTableDescriptor(TABLE);
htd.addFamily(new HColumnDescriptor(CFA));
htd.addFamily(new HColumnDescriptor(CFB));
admin.createTable(htd);
insertData(TABLE, COLUMN_1, 1.0);
insertData(TABLE, COLUMN_2, 0.5);
}
开发者ID:apache,项目名称:hbase,代码行数:32,代码来源:TestScannersWithLabels.java
示例13: setAuthorizations
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
/**
* Sets the authorizations to be used by this Query
* @param authorizations
*/
public Query setAuthorizations(Authorizations authorizations) {
this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil
.toAuthorizations(authorizations).toByteArray());
return this;
}
开发者ID:fengchen8086,项目名称:ditb,代码行数:10,代码来源:Query.java
示例14: getAuthorizations
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
/**
* @return The authorizations this Query is associated with.
* @throws DeserializationException
*/
public Authorizations getAuthorizations() throws DeserializationException {
byte[] authorizationsBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);
if (authorizationsBytes == null) return null;
return ProtobufUtil.toAuthorizations(authorizationsBytes);
}
开发者ID:fengchen8086,项目名称:ditb,代码行数:10,代码来源:Query.java
示例15: setCellVisibility
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
/**
* Sets the visibility expression associated with cells in this Mutation.
* It is illegal to set <code>CellVisibility</code> on <code>Delete</code> mutation.
* @param expression
*/
public Mutation setCellVisibility(CellVisibility expression) {
this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil
.toCellVisibility(expression).toByteArray());
return this;
}
开发者ID:fengchen8086,项目名称:ditb,代码行数:11,代码来源:Mutation.java
示例16: getCellVisibility
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
/**
* @return CellVisibility associated with cells in this Mutation.
* @throws DeserializationException
*/
public CellVisibility getCellVisibility() throws DeserializationException {
byte[] cellVisibilityBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);
if (cellVisibilityBytes == null) return null;
return ProtobufUtil.toCellVisibility(cellVisibilityBytes);
}
开发者ID:fengchen8086,项目名称:ditb,代码行数:10,代码来源:Mutation.java
示例17: getCellVisibility
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
/**
* @return CellVisibility associated with cells in this Mutation.
* @throws DeserializationException
*/
public CellVisibility getCellVisibility() throws DeserializationException {
byte[] cellVisibilityBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);
if (cellVisibilityBytes == null) return null;
return ProtobufUtil.toCellVisibility(cellVisibilityBytes);
}
开发者ID:grokcoder,项目名称:pbase,代码行数:10,代码来源:Mutation.java
示例18: setAuthorizations
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
/**
* Sets the authorizations to be used by this Query
* @param authorizations
*/
public void setAuthorizations(Authorizations authorizations) {
this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil
.toAuthorizations(authorizations).toByteArray());
}
开发者ID:tenggyut,项目名称:HIndex,代码行数:9,代码来源:Query.java
示例19: setCellVisibility
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
/**
* Sets the visibility expression associated with cells in this Mutation.
* @param expression
*/
public Mutation setCellVisibility(CellVisibility expression) {
this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY,
toCellVisibility(expression).toByteArray());
return this;
}
开发者ID:apache,项目名称:hbase,代码行数:10,代码来源:Mutation.java
示例20: getCellVisibility
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants; //导入依赖的package包/类
/**
* @return CellVisibility associated with cells in this Mutation.
* @throws DeserializationException
*/
public CellVisibility getCellVisibility() throws DeserializationException {
byte[] cellVisibilityBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);
if (cellVisibilityBytes == null) return null;
return toCellVisibility(cellVisibilityBytes);
}
开发者ID:apache,项目名称:hbase,代码行数:10,代码来源:Mutation.java
注:本文中的org.apache.hadoop.hbase.security.visibility.VisibilityConstants类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论