本文整理了Java中org.apache.hadoop.hbase.client.Query.setAttribute
方法的一些代码示例,展示了Query.setAttribute
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setAttribute
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Query
类名称:Query
方法名:setAttribute
暂无
代码示例来源:origin: apache/hbase
@Override
public Get setAttribute(String name, byte[] value) {
return (Get) super.setAttribute(name, value);
}
代码示例来源:origin: apache/hbase
@Override
public Scan setAttribute(String name, byte[] value) {
return (Scan) super.setAttribute(name, value);
}
代码示例来源:origin: apache/hbase
/**
* Set the isolation level for this query. If the
* isolation level is set to READ_UNCOMMITTED, then
* this query will return data from committed and
* uncommitted transactions. If the isolation level
* is set to READ_COMMITTED, then this query will return
* data from committed transactions only. If a isolation
* level is not explicitly set on a Query, then it
* is assumed to be READ_COMMITTED.
* @param level IsolationLevel for this query
*/
public Query setIsolationLevel(IsolationLevel level) {
setAttribute(ISOLATION_LEVEL, level.toBytes());
return this;
}
代码示例来源:origin: apache/hbase
/**
* 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;
}
代码示例来源:origin: apache/hbase
/**
* @param user User short name
* @param perms Permissions for the user
*/
public Query setACL(String user, Permission perms) {
setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
AccessControlUtil.toUsersAndPermissions(user, perms).toByteArray());
return this;
}
代码示例来源:origin: apache/hbase
/**
* @param perms A map of permissions for a user or users
*/
public Query setACL(Map<String, Permission> perms) {
ListMultimap<String, Permission> permMap = ArrayListMultimap.create();
for (Map.Entry<String, Permission> entry : perms.entrySet()) {
permMap.put(entry.getKey(), entry.getValue());
}
setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
AccessControlUtil.toUsersAndPermissions(permMap).toByteArray());
return this;
}
代码示例来源:origin: org.apache.hbase/hbase-client
@Override
public Get setAttribute(String name, byte[] value) {
return (Get) super.setAttribute(name, value);
}
代码示例来源:origin: org.apache.hbase/hbase-client
@Override
public Scan setAttribute(String name, byte[] value) {
return (Scan) super.setAttribute(name, value);
}
代码示例来源:origin: org.apache.hbase/hbase-client
/**
* Set the isolation level for this query. If the
* isolation level is set to READ_UNCOMMITTED, then
* this query will return data from committed and
* uncommitted transactions. If the isolation level
* is set to READ_COMMITTED, then this query will return
* data from committed transactions only. If a isolation
* level is not explicitly set on a Query, then it
* is assumed to be READ_COMMITTED.
* @param level IsolationLevel for this query
*/
public Query setIsolationLevel(IsolationLevel level) {
setAttribute(ISOLATION_LEVEL, level.toBytes());
return this;
}
代码示例来源:origin: org.apache.hbase/hbase-client
/**
* 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;
}
代码示例来源:origin: org.apache.hbase/hbase-client
/**
* @param user User short name
* @param perms Permissions for the user
*/
public Query setACL(String user, Permission perms) {
setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
AccessControlUtil.toUsersAndPermissions(user, perms).toByteArray());
return this;
}
代码示例来源:origin: org.apache.hbase/hbase-client
/**
* @param perms A map of permissions for a user or users
*/
public Query setACL(Map<String, Permission> perms) {
ListMultimap<String, Permission> permMap = ArrayListMultimap.create();
for (Map.Entry<String, Permission> entry : perms.entrySet()) {
permMap.put(entry.getKey(), entry.getValue());
}
setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
AccessControlUtil.toUsersAndPermissions(permMap).toByteArray());
return this;
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
@Override
public Scan setAttribute(String name, byte[] value) {
return (Scan) super.setAttribute(name, value);
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
@Override
public Get setAttribute(String name, byte[] value) {
return (Get) super.setAttribute(name, value);
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
/**
* 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;
}
代码示例来源:origin: harbby/presto-connectors
/**
* @param user User short name
* @param perms Permissions for the user
*/
public Query setACL(String user, Permission perms) {
setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
ProtobufUtil.toUsersAndPermissions(user, perms).toByteArray());
return this;
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
/**
* @param user User short name
* @param perms Permissions for the user
*/
public Query setACL(String user, Permission perms) {
setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
AccessControlUtil.toUsersAndPermissions(user, perms).toByteArray());
return this;
}
代码示例来源:origin: harbby/presto-connectors
/**
* 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;
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
/**
* @param perms A map of permissions for a user or users
*/
public Query setACL(Map<String, Permission> perms) {
ListMultimap<String, Permission> permMap = ArrayListMultimap.create();
for (Map.Entry<String, Permission> entry : perms.entrySet()) {
permMap.put(entry.getKey(), entry.getValue());
}
setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
AccessControlUtil.toUsersAndPermissions(permMap).toByteArray());
return this;
}
代码示例来源:origin: harbby/presto-connectors
/**
* @param perms A map of permissions for a user or users
*/
public Query setACL(Map<String, Permission> perms) {
ListMultimap<String, Permission> permMap = ArrayListMultimap.create();
for (Map.Entry<String, Permission> entry : perms.entrySet()) {
permMap.put(entry.getKey(), entry.getValue());
}
setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,
ProtobufUtil.toUsersAndPermissions(permMap).toByteArray());
return this;
}
内容来源于网络,如有侵权,请联系作者删除!