Categories
- FFMpeg (5)
- Libav (1)
- Google (3)
- iBeacon (1)
- LDAP (3)
- Me (2)
- Network (11)
- OS (149)
- RTMP (4)
- SIP (1)
- Kamailio (1)
- SNMP (1)
- VMware (20)
- VCP考試 (1)
- 伺服器 網站服務 (105)
- 名詞解釋 (4)
- 專案管理 (1)
- 工具軟體 (51)
- Adobe (1)
- FMS (1)
- Cloudera (1)
- Docker (1)
- Eclipse (4)
- Intellij (2)
- OBS (2)
- Office (10)
- Excel (4)
- PowerPoint (5)
- Postman (2)
- Splunk (13)
- Virtualbox (2)
- Visual Studio (2)
- 文字編輯器 (10)
- Sublime Text 2 (6)
- Sublime Text 3 (3)
- Vim (3)
- 連線工具 (1)
- Xshell (1)
- Adobe (1)
- 程式語言 (80)
- CSS (2)
- HTML (2)
- iOS (1)
- Java (30)
- JavaScript (5)
- jQuery (4)
- jsTree (2)
- JSP (3)
- PHP (16)
- Python (8)
- Ruby (1)
- sed (1)
- Shell Script (8)
- Windows Bash Script (1)
- XML (1)
- 資料庫 (37)
- FFMpeg (5)
Category Archives: 資料庫
[HBase] Scan with filter by partial rowkey using HBase shell
If we have these rowkey list data. xx_abc xx_abc_def xx_abd xx_abd_rfg To get rowkey which contain “abc” scan ‘TableName’, FILTER => “RowFilter(=, ‘substring:abc’)” We will get these. xx_abc xx_abc_def But if we want only get “xx_abc” scan ‘TableName’, FILTER => … Continue reading
Posted in HBase
Leave a comment
[HBase] get/scan String or Integer value
get String Value get ‘Table_Name’, ‘RowKey’, {COLUMNS=>’Column_Family:Qualify:toString’} get Integer Value get ‘Table_Name’, ‘RowKey’, {COLUMNS=>’Column_Family:Qualify:toInt’} scan and get String Value scan ‘Table_Name’, {COLUMNS=>’Column_Family:Qualify:toString’} scan and get Integer Value scan ‘Table_Name’, {COLUMNS=>’Column_Family:Qualify:toInt’}
Posted in HBase
Leave a comment
[HBase] run hbase command by ruby
echo ‘list.each {|t| truncate t}; quit;’ | hbase shell or Drop Table echo ‘list.each {|t| disable t; drop t}; quit;’ | hbase shell Scan Table list.each {|t| print t; scan t, {LIMIT=>1};}
Posted in HBase, Ruby
Leave a comment
[MySQL] Resolve duplicate entry error in MySQL Replication
while [ 1 ]; do if [ $(mysql -uroot -ppassword -e”show slave status G;” | grep “Duplicate entry” | wc -l) -eq 1 ] ; then mysql -uroot -ppassword -e”stop slave; set global sql_slave_skip_counter=1; start slave;”; fi; sleep 1; mysql … Continue reading
Posted in MySQL
Leave a comment
[Java, HBase] Hostname is very important!
If the connection is failed, try to check the hdfs uri setting, it might be used hostname.
Posted in HBase, Java
Leave a comment
[HBase] Use SingleColumnFilter in shell.
scan ‘TABLENAME’, {FILTER=>”(SingleColumnValueFilter(‘CF’, ‘CQ’, =, ‘binary:VALUE’, true, true))”} the first true means filterIfColumnMissing the second true means setLatestVersionOnly Ref. Spinning Thoughts: Applying Filters in HBase shell
Posted in HBase
2 Comments
[Java、HBase] Retrieving timestamp form HBase row
Ref. stackoverflow: retrieving timestamp from hbase row HTableInterface hTableInterface = CONNECTION.getTable(Table.SCHEMA_NAME); Result result = hTableInterface.get(get); Date date = new Date(result.raw()[0].getTimestamp()); System.out.println(“DateTime: ” + sdf.format(date)); we must edit HBaseSettings to set hbaseConf.set(HBASE_ENV_KEY_ZOOKEEPER_QUORUM, “target_zookeeper_address”);
HBase get
get ‘TableName’, ‘RowKey’ get ‘TableName’, ‘RowKey’, ‘cf:qualifier’ get ‘TableName’, ‘RowKey’, {FILTER => “ValueFilter(=, ‘binary:Search Key’)”}
Posted in HBase
Leave a comment
HBase scan
scan ‘TableName’, FILTER => “ValueFilter(=, ‘binary:Search key’)” scan ‘TableName’, {FILTER => “ValueFilter(=, ‘binary:Search key1’) OR ValueFilter(=, ‘binary:Search key2’)”} scan ‘TableName’, {COLUMNS => ‘cf:qualifer’, FILTER => “ValueFilter(>=, ‘binary:Search key1’) AND ValueFilter(<, ‘binary:Search key1~’)”} scan ‘TableName’, FILTER => “ValueFilter(=, ‘binaryprefix:+8869’)” //符合+8869開頭的 scan … Continue reading
Posted in HBase
Leave a comment
[Apache HBase] Install Apache HBase in Ubuntu 14.04
Java 1.7 add-apt-repository ppa:webupd8team/java apt-get update apt-get install oracle-java7-installer apt-get install oracle-java7-set-default Cloudera HBase Ref. installing-apache-hbase-on-ubuntu-for-standalone-mode Note. hbase tar file choose http://archive.apache.org/dist/hbase/hbase-0.98.5/hbase-0.98.5-hadoop1-bin.tar.gz (or http://ftp.mirror.tw/pub/apache/hbase/hbase-0.98.11/hbase-0.98.11-hadoop1-bin.tar.gz )
Posted in HBase, Ubuntu
Leave a comment