原创 Phoenix 二級索引源碼分析

phoenix 二級索引使用協處理器構建的. 主要入口爲org.apache.phoenix.hbase.index.Indexer這裏有兩個屬性 protected IndexWriter writer; protected

原创 postgres postgis 基本使用

postgis 範圍搜索 創建擴展 CREATE EXTENSION IF NOT EXISTS postgis SCHEMA public; 設置給系統的schema ALTER EXTENSION postgis S

原创 spring boot rabbtimq rpc 模式

使用Spring Boot 與Rabbitmq 實現rpc 調用 定義接口 首先定義一個公用的接口 public interface RemoteLoginInterface { SecurityUserDetails

原创 使用java把 byte 或 byte 數組轉換成無符號數字

byte/ byte 數組轉換成16進制字符串 (需要Netty) ByteBufUtil.hexDump(new byte[]{0x11, 0x11, 0x11, 0x11}) ByteBufUtil.hexDump(new

原创 spring cloud feign 自動配置

自動配置 org.springframework.cloud.openfeign.FeignAutoConfiguration 注意@ConditionalOnMissingClass("com.netflix.loadbala

原创 HBASE hbck2 解決 rit

配置HBCK2 git clone https://github.com/apache/hbase-operator-tools.git --depth 1 mvn clean package -Dmaven.skip.test

原创 Rabbitmq 消息可靠性總結

Rabbitmq 消息可靠性 rabbitmq Server exchange 持久化 queque 持久化 message 持久化 生產者消費者 生產者 publisher-confirms: true # 關於可靠性投

原创 使用redis zset做流式數據預聚合統計

IoT場景流計算 在IoT場景有時我們想看某個設備的每小時/每天的工時信息. 電壓的平均值.油耗的總值 平均值 等這時我們可以用一些流計算框架來做例如flink sparkstream 等. 但是如果用flink來做的話 每臺設

原创 Rabbitmq 的兩種消費模式

拉模式 入口 com.rabbitmq.client.Channel#basicGet 推模式 入口 com.rabbitmq.client.Consumer#handleDelivery 參考 https://ww

原创 postgres流複製,主從環境配置

主機規劃 主庫ip: 192.168.1.100 備庫ip: 192.168.1.101 192.168.1.100 主庫的配置 修改pg_hba.conf,增加replica用戶,進行同步。 host replicatio

原创 postgresql 獲取schema,table 信息

postgresql 獲取schema,table 信息 獲取schema 信息 SELECT pn.oid AS schema_oid, iss.catalog_name, iss.schema_owner, iss.schem

原创 PostgreSql 的hash_code 函數

PostgreSql 實現的hash_code 函數與java hash_code方法一致 CREATE FUNCTION hash_code(text) RETURNS integer LANGUAGE plpgsql

原创 spring boot 與 jasypt 結合實現關鍵配置項加密

添加依賴 <dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artif

原创 shell 腳本編排微服務

使用shell腳本編排微服務. 解決依賴問題 #!/bin/bash # 基本參數 pid=0 : ${SLEEP_SECOND:=2} JVM_OPTS=" -Xms128M -Xmx128M " BASE_PATH="./b

原创 druid 密碼加密配置

使用druid 的spring boot starter 配置 application.yml spring: datasource: druid: url: jdbc:postgresql://127