org.apache.hadoop.hbase.client.Query.setAttribute()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(288)

本文整理了Java中org.apache.hadoop.hbase.client.Query.setAttribute方法的一些代码示例,展示了Query.setAttribute的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setAttribute方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Query
类名称:Query
方法名:setAttribute

Query.setAttribute介绍

暂无

代码示例

代码示例来源:origin: apache/hbase

  1. @Override
  2. public Get setAttribute(String name, byte[] value) {
  3. return (Get) super.setAttribute(name, value);
  4. }

代码示例来源:origin: apache/hbase

  1. @Override
  2. public Scan setAttribute(String name, byte[] value) {
  3. return (Scan) super.setAttribute(name, value);
  4. }

代码示例来源:origin: apache/hbase

  1. /**
  2. * Set the isolation level for this query. If the
  3. * isolation level is set to READ_UNCOMMITTED, then
  4. * this query will return data from committed and
  5. * uncommitted transactions. If the isolation level
  6. * is set to READ_COMMITTED, then this query will return
  7. * data from committed transactions only. If a isolation
  8. * level is not explicitly set on a Query, then it
  9. * is assumed to be READ_COMMITTED.
  10. * @param level IsolationLevel for this query
  11. */
  12. public Query setIsolationLevel(IsolationLevel level) {
  13. setAttribute(ISOLATION_LEVEL, level.toBytes());
  14. return this;
  15. }

代码示例来源:origin: apache/hbase

  1. /**
  2. * Sets the authorizations to be used by this Query
  3. * @param authorizations
  4. */
  5. public Query setAuthorizations(Authorizations authorizations) {
  6. this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil
  7. .toAuthorizations(authorizations).toByteArray());
  8. return this;
  9. }

代码示例来源:origin: apache/hbase

  1. /**
  2. * @param user User short name
  3. * @param perms Permissions for the user
  4. */
  5. public Query setACL(String user, Permission perms) {
  6. setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
  7. AccessControlUtil.toUsersAndPermissions(user, perms).toByteArray());
  8. return this;
  9. }

代码示例来源:origin: apache/hbase

  1. /**
  2. * @param perms A map of permissions for a user or users
  3. */
  4. public Query setACL(Map<String, Permission> perms) {
  5. ListMultimap<String, Permission> permMap = ArrayListMultimap.create();
  6. for (Map.Entry<String, Permission> entry : perms.entrySet()) {
  7. permMap.put(entry.getKey(), entry.getValue());
  8. }
  9. setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
  10. AccessControlUtil.toUsersAndPermissions(permMap).toByteArray());
  11. return this;
  12. }

代码示例来源:origin: org.apache.hbase/hbase-client

  1. @Override
  2. public Get setAttribute(String name, byte[] value) {
  3. return (Get) super.setAttribute(name, value);
  4. }

代码示例来源:origin: org.apache.hbase/hbase-client

  1. @Override
  2. public Scan setAttribute(String name, byte[] value) {
  3. return (Scan) super.setAttribute(name, value);
  4. }

代码示例来源:origin: org.apache.hbase/hbase-client

  1. /**
  2. * Set the isolation level for this query. If the
  3. * isolation level is set to READ_UNCOMMITTED, then
  4. * this query will return data from committed and
  5. * uncommitted transactions. If the isolation level
  6. * is set to READ_COMMITTED, then this query will return
  7. * data from committed transactions only. If a isolation
  8. * level is not explicitly set on a Query, then it
  9. * is assumed to be READ_COMMITTED.
  10. * @param level IsolationLevel for this query
  11. */
  12. public Query setIsolationLevel(IsolationLevel level) {
  13. setAttribute(ISOLATION_LEVEL, level.toBytes());
  14. return this;
  15. }

代码示例来源:origin: org.apache.hbase/hbase-client

  1. /**
  2. * Sets the authorizations to be used by this Query
  3. * @param authorizations
  4. */
  5. public Query setAuthorizations(Authorizations authorizations) {
  6. this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil
  7. .toAuthorizations(authorizations).toByteArray());
  8. return this;
  9. }

代码示例来源:origin: org.apache.hbase/hbase-client

  1. /**
  2. * @param user User short name
  3. * @param perms Permissions for the user
  4. */
  5. public Query setACL(String user, Permission perms) {
  6. setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
  7. AccessControlUtil.toUsersAndPermissions(user, perms).toByteArray());
  8. return this;
  9. }

代码示例来源:origin: org.apache.hbase/hbase-client

  1. /**
  2. * @param perms A map of permissions for a user or users
  3. */
  4. public Query setACL(Map<String, Permission> perms) {
  5. ListMultimap<String, Permission> permMap = ArrayListMultimap.create();
  6. for (Map.Entry<String, Permission> entry : perms.entrySet()) {
  7. permMap.put(entry.getKey(), entry.getValue());
  8. }
  9. setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
  10. AccessControlUtil.toUsersAndPermissions(permMap).toByteArray());
  11. return this;
  12. }

代码示例来源:origin: com.aliyun.hbase/alihbase-client

  1. @Override
  2. public Scan setAttribute(String name, byte[] value) {
  3. return (Scan) super.setAttribute(name, value);
  4. }

代码示例来源:origin: com.aliyun.hbase/alihbase-client

  1. @Override
  2. public Get setAttribute(String name, byte[] value) {
  3. return (Get) super.setAttribute(name, value);
  4. }

代码示例来源:origin: com.aliyun.hbase/alihbase-client

  1. /**
  2. * Sets the authorizations to be used by this Query
  3. * @param authorizations
  4. */
  5. public Query setAuthorizations(Authorizations authorizations) {
  6. this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil
  7. .toAuthorizations(authorizations).toByteArray());
  8. return this;
  9. }

代码示例来源:origin: harbby/presto-connectors

  1. /**
  2. * @param user User short name
  3. * @param perms Permissions for the user
  4. */
  5. public Query setACL(String user, Permission perms) {
  6. setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
  7. ProtobufUtil.toUsersAndPermissions(user, perms).toByteArray());
  8. return this;
  9. }

代码示例来源:origin: com.aliyun.hbase/alihbase-client

  1. /**
  2. * @param user User short name
  3. * @param perms Permissions for the user
  4. */
  5. public Query setACL(String user, Permission perms) {
  6. setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
  7. AccessControlUtil.toUsersAndPermissions(user, perms).toByteArray());
  8. return this;
  9. }

代码示例来源:origin: harbby/presto-connectors

  1. /**
  2. * Sets the authorizations to be used by this Query
  3. * @param authorizations
  4. */
  5. public Query setAuthorizations(Authorizations authorizations) {
  6. this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil
  7. .toAuthorizations(authorizations).toByteArray());
  8. return this;
  9. }

代码示例来源:origin: com.aliyun.hbase/alihbase-client

  1. /**
  2. * @param perms A map of permissions for a user or users
  3. */
  4. public Query setACL(Map<String, Permission> perms) {
  5. ListMultimap<String, Permission> permMap = ArrayListMultimap.create();
  6. for (Map.Entry<String, Permission> entry : perms.entrySet()) {
  7. permMap.put(entry.getKey(), entry.getValue());
  8. }
  9. setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
  10. AccessControlUtil.toUsersAndPermissions(permMap).toByteArray());
  11. return this;
  12. }

代码示例来源:origin: harbby/presto-connectors

  1. /**
  2. * @param perms A map of permissions for a user or users
  3. */
  4. public Query setACL(Map<String, Permission> perms) {
  5. ListMultimap<String, Permission> permMap = ArrayListMultimap.create();
  6. for (Map.Entry<String, Permission> entry : perms.entrySet()) {
  7. permMap.put(entry.getKey(), entry.getValue());
  8. }
  9. setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
  10. ProtobufUtil.toUsersAndPermissions(permMap).toByteArray());
  11. return this;
  12. }

相关文章