Java query Hbase —— Put the results in the List
来源:互联网 发布:证券软件免费下载 编辑:程序博客网 时间:2024/04/28 17:07
@Overridepublic String execute(){HbaseQueryService queryService = new HbaseQueryService();List<DynaBean> rows = new ArrayList<DynaBean>();if (isEmpty(Number) && isEmpty(StartDate) && isEmpty(EndDate)){try{ResultScanner resultScanner = queryService.prefixQuryforAllVersion(Number, StartDate, EndDate);for (Result result : resultScanner){rows.add(getRow(result));}}catch (IOException e){throw new RuntimeException("queryService prefixQuryforAllVersion Error", e);}System.out.println(rows.size());// HttpServletRequest request = ServletActionContext.getRequest();// request.setAttribute("list", rows);return INPUT;}elsereturn ERROR;}private static DynaBean getRow(Result result){DynaBean row = new LazyDynaBean();for (KeyValue kv : result.raw()){String columnName = new String(kv.getQualifier());String columnValue = new String(kv.getValue());row.set(columnName, columnValue);}return row;}
0 0
- Java query Hbase —— Put the results in the List
- Loading Data in the Background 之Handling the Results
- These query results are not updateable.Include the ROWID to get updateable results.
- 92 Examine the output of the query that you executed to list the objects in the recycle bin: SQL> SE
- Hibernate异常:query specified join fetching, but the owner of the fetched association was not present in the select list
- How to get the JSON results in ExtJS
- Reporting the Test Results in Microsoft Test Manager
- 【Java】——zookeeper伪集群搭建异常 My id 4 not in the peer list
- Randomly Sorting Query Results in SQL
- [转]Finding a query in UCM using the query builder
- whether the results are the same of getClass().getName() called in child class and parent class?
- How to sovle "tableExistException when creating hbase table" but cannot show the table by "list" in
- List all in the Directory
- Where to put the Image in an Image Caption Generator
- Handling the Results 处理结果
- 【DataStructure】 Five methods to init the List in java
- Question 9: Which of the following statements correctly describe the results of executing the code below in C++?
- Question 15: Which of the following statements describe the results of executing the code snippet below in C++?
- 和菜鸟一起学产品之产品经理的工作职责
- 插入排序总结
- Opengl读取及渲染斯坦福三维ply模型
- 文件io(二)--unix环境高级编程笔记
- 将图片转换成二进制写入sqlite
- Java query Hbase —— Put the results in the List
- Oracle 正则表达式函数
- ComboBox控件,通过SetCurSel()默认选中第一项
- ubunut 安装nginx基本目录结构介绍和配置使用方法
- jdk1.7降级到1.6
- drupal 中基本的数据库操作
- 创建进程后得到该进程的主窗口句柄
- Android 自定义对话框(仿iPhoneQQ)
- java虚拟机性能监控工具介绍