Java 类org.apache.hadoop.hbase.security.visibility.VisibilityConstants 实例源码

项目:ditb    文件:TestImportTSVWithVisibilityLabels.java   
@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();
}
项目:Gaffer    文件:MiniHBaseStore.java   
@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());
}
项目:pbase    文件:TestImportTSVWithVisibilityLabels.java   
@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();
}
项目:HIndex    文件:TestThriftHBaseServiceHandlerWithLabels.java   
@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();
}
项目:HIndex    文件:TestImportTSVWithVisibilityLabels.java   
@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();
}
项目:hbase    文件:TestThriftHBaseServiceHandlerWithLabels.java   
@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();
}
项目:hbase    文件:TestSecureExport.java   
/**
 * 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));
}
项目:PyroDB    文件:TestThriftHBaseServiceHandlerWithLabels.java   
@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();
}
项目:PyroDB    文件:TestImportTSVWithVisibilityLabels.java   
@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();
}
项目:ditb    文件:TestThriftHBaseServiceHandlerWithLabels.java   
@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();
}
项目:ditb    文件:TestScannersWithLabels.java   
@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);
}
项目:HIndex    文件:TestScannersWithLabels.java   
@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);
}
项目:hbase    文件:TestImportTSVWithVisibilityLabels.java   
@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();
}
项目:hbase    文件:TestScannersWithLabels.java   
@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);
}
项目:PyroDB    文件:TestScannersWithLabels.java   
@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);
}
项目:ditb    文件:Query.java   
/**
 * 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;
}
项目:ditb    文件:Query.java   
/**
 * @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);
}
项目:ditb    文件:Mutation.java   
/**
 * 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;
}
项目:ditb    文件:Mutation.java   
/**
 * @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);
}
项目:pbase    文件:Query.java   
/**
 * 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;
}
项目:pbase    文件:Query.java   
/**
 * @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);
}
项目:pbase    文件:Mutation.java   
/**
 * @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);
}
项目:HIndex    文件:Query.java   
/**
 * 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());
}
项目:HIndex    文件:Query.java   
/**
 * @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);
}
项目:HIndex    文件:Mutation.java   
/**
 * @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);
}
项目:hbase    文件:Query.java   
/**
 * 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;
}
项目:hbase    文件:Query.java   
/**
 * @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);
}
项目:hbase    文件:Mutation.java   
/**
 * 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;
}
项目:hbase    文件:Mutation.java   
/**
 * @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);
}
项目:PyroDB    文件:Query.java   
/**
 * 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());
}
项目:PyroDB    文件:Query.java   
/**
 * @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);
}
项目:PyroDB    文件:Mutation.java   
/**
 * @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);
}
项目:pbase    文件:Mutation.java   
/**
 * 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;
}
项目:HIndex    文件:Mutation.java   
/**
 * 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 void setCellVisibility(CellVisibility expression) {
  this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil
      .toCellVisibility(expression).toByteArray());
}
项目:PyroDB    文件:Mutation.java   
/**
 * 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 void setCellVisibility(CellVisibility expression) {
  this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil
      .toCellVisibility(expression).toByteArray());
}