摘要: fastjson 实例 # fastjson ## 0、遇到的问题: ### 0.1 项目中有需求如下 ``` 把所有响应给前端的数据都只保留两位小数(在项目中,数字是BigDecimal类型)。由于是新接手的项目,有很多类中的属性需要改动(可能位置太多,找不全),如何一步到位? ``` ``` 所 阅读全文
posted @ 2020-12-03 19:14 Bonnie_ξ 阅读(541) 评论(0) 推荐(0) 编辑
摘要: 列的详细信息 得到某一行所有数据public static void getRow(String tableName, String rowKey) throws IOException{ HTable table = new HTable(conf, tableName); Get get = n 阅读全文
posted @ 2020-12-02 17:17 Bonnie_ξ 阅读(341) 评论(0) 推荐(0) 编辑
摘要: java 文件上传 private static String uploadFile(File file, String url) { CloseableHttpClient httpClient = null; String result = ""; try { httpClient = Http 阅读全文
posted @ 2020-12-02 16:39 Bonnie_ξ 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Caused by: java.lang.RuntimeException: can not run elasticsearch as root ES不允许以root权限运行 useradd liubei chown liubei elasticsearch-6.1.1 -R su liubei . 阅读全文
posted @ 2020-12-02 16:14 Bonnie_ξ 阅读(274) 评论(0) 推荐(0) 编辑
摘要: es 丢失分片重新获取 curl -XPOST 'localhost:9200/_cluster/reroute?retry_failed' 阅读全文
posted @ 2020-12-02 14:33 Bonnie_ξ 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 调整分页查询数据 company_register_base/_settings?preserve_existing=true 提交方式PUT {"max_result_window":"1000000"} 阅读全文
posted @ 2020-12-02 14:31 Bonnie_ξ 阅读(244) 评论(0) 推荐(0) 编辑
摘要: hbase 查询字段开头 public static List<ContentCommodityDto> loadData(int loadSize) { List<ContentCommodityDto> dataList = new ArrayList<>(); Table table = nu 阅读全文
posted @ 2020-12-02 14:23 Bonnie_ξ 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 可运行jar 打包插件 <build> <finalName>project_name</finalName> <resources> <resource> <directory>src/main/resources</directory> <!-- 资源根目录排除各环境的配置,使用单独的资源目录来 阅读全文
posted @ 2020-12-02 11:43 Bonnie_ξ 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 一. 用hbase自带的mapreduce程序来计算如下, /usr/hdp/2.3.0.0-2557/hbase/bin [root@node1 bin]# ./hbase org.apache.hadoop.hbase.mapreduce.RowCounter 'testtable0728' 阅读全文
posted @ 2020-12-02 11:19 Bonnie_ξ 阅读(250) 评论(0) 推荐(0) 编辑
摘要: hbase and or 连用查询空串空字段 private static void loadAllData2IfStatus(String tableName) { try { Table table = HbaseUtil.getTable(tableName); Scan scan = new 阅读全文
posted @ 2020-12-02 11:06 Bonnie_ξ 阅读(452) 评论(0) 推荐(0) 编辑