java set的first_Java Pair.setFirst方法代码示例
import org.apache.hadoop.hbase.util.Pair; //导入方法依赖的package包/类
/**
* Checks whether cell contains any tag with type as VISIBILITY_TAG_TYPE. This
* tag type is reserved and should not be explicitly set by user.
*
* @param cell
* - the cell under consideration
* @param pair - an optional pair of type which would be reused
* if already set and new one will be created if null is passed
* @return a pair - if the boolean is false then it indicates
* that the cell has a RESERVERD_VIS_TAG and with boolean as true, not
* null tag indicates that a string modified tag was found.
*/
private Pair checkForReservedVisibilityTagPresence(Cell cell,
Pair pair) throws IOException {
if (pair == null) {
pair = new Pair(false, null);
} else {
pair.setFirst(false);
pair.setSecond(null);
}
// Bypass this check when the operation is done by a system/super user.
// This is done because, while Replication, the Cells coming to the peer cluster with reserved
// typed tags and this is fine and should get added to the peer cluster table
if (isSystemOrSuperUser()) {
// Does the cell contain special tag which indicates that the replicated
// cell visiblilty tags
// have been modified
Tag modifiedTag = null;
if (cell.getTagsLength() > 0) {
Iterator tagsIterator = CellUtil.tagsIterator(cell.getTagsArray(),
cell.getTagsOffset(), cell.getTagsLength());
while (tagsIterator.hasNext()) {
Tag tag = tagsIterator.next();
if (tag.getType() == TagType.STRING_VIS_TAG_TYPE) {
modifiedTag = tag;
break;
}
}
}
pair.setFirst(true);
pair.setSecond(modifiedTag);
return pair;
}
if (cell.getTagsLength() > 0) {
Iterator tagsItr = CellUtil.tagsIterator(cell.getTagsArray(), cell.getTagsOffset(),
cell.getTagsLength());
while (tagsItr.hasNext()) {
if (RESERVED_VIS_TAG_TYPES.contains(tagsItr.next().getType())) {
return pair;
}
}
}
pair.setFirst(true);
return pair;
}
java set的first_Java Pair.setFirst方法代码示例相关推荐
- java secretkey用法_Java SecretKeyFactory.generateSecret方法代码示例
本文整理汇总了Java中javax.crypto.SecretKeyFactory.generateSecret方法的典型用法代码示例.如果您正苦于以下问题:Java SecretKeyFactory ...
- java set的first_Java TreeSet pollFirst()方法与示例
TreeSet类pollFirst()方法pollFirst()方法在java.util包中可用. pollFirst()方法用于返回第一个最小元素,然后从此TreeSet中删除第一个元素. poll ...
- java polygon 用法_Java Polygon.getBounds方法代码示例
import java.awt.Polygon; //导入方法依赖的package包/类 private SelectionShape translatePointsToRealSize(Select ...
- java makedir用法_Java Files.makeDir方法代码示例
import org.nutz.lang.Files; //导入方法依赖的package包/类 protected void download(String openid, String media_ ...
- java args包_Java Args.positive方法代码示例
import org.apache.http.util.Args; //导入方法依赖的package包/类 /** * Creates new instance of BHttpConnectionB ...
- java shape用法_Java PShape.scale方法代码示例
import processing.core.PShape; //导入方法依赖的package包/类 public void updateAnim(){ if(pg_src_small == null ...
- java round指令_Java PApplet.round方法代码示例
import processing.core.PApplet; //导入方法依赖的package包/类 public static final void updatePos() { if(follow ...
- Java 怎么 get char_Java KeyCharacterMap.getDeadChar方法代码示例
import android.view.KeyCharacterMap; //导入方法依赖的package包/类 @Override public boolean onKeyDown(int keyC ...
- java gettext用法_Java Context.getText方法代码示例
import android.content.Context; //导入方法依赖的package包/类 /** * Song Details * * @param context * @param t ...
最新文章
- 拿下中科大的计算机课程全靠它了!
- 品牌才是硬道理——一线、二线主板品牌集中营品牌才是硬道理——一线、二线主板品牌集中营...
- 秒格式化 “秒” 为 天 时 分 秒
- python代码块缩进_Python代码需要缩进吗
- 线程休眠 sleep
- 订单管理中根据订单来源批量修改服务部门
- Google AI 的焦虑:拆分搜索和人工智能部门
- Android studio 怎么使用已经下载好的Android SDK ?
- html大作业网页代码 web网页设计实例作业 ——二手书店-大学生书店(13页) 学生个人网站作业模板 简单个人网页制作
- 启动计算机 登管理员用户,Windows xp系统使用管理员账户登入系统的技巧
- [线段树]打字练习记录
- Deferred Shading介绍
- 屏幕折射问题(非调试问题避坑)
- 使用calibre制作带目录的mobi电子书
- docker-compose 部署jmeter+grafana+prometheus/influxdb,构建性能测试可视化实时监控(二)...
- OpenBUGS、WinBUGS下载安装网址更新
- 《Head First设计模式(中文版)》
- 迅捷画图怎样绘制出有创意的思维导图
- 解析某个94aw演示备忘
- 牛客网输入规范总结(c++部分)
热门文章
- springfox源码_Spring boot整合Springfox在线生成restful的api doc
- 挪车+php,还在苦苦寻找占你车位的人?关注这个微信号实现“一键挪车”
- 解决Can 't connect to local MySQL server throug
- spring boot之session store type is 'null'
- trigger 触发器(mysql)
- Struts2笔记——15.Spring的事务
- 基于Vue-cli和Vux的webpack配置
- linux关闭内核命令,Linux内核关闭IPv6协议的方式
- python中hashset_python中的集合
- left join on用法_MySQL 多表查询 quot;Joinquot;+“case when”语句总结