티스토리 뷰
hbase shell에서 데이터를 조회할 때 특정 데이터를 필터링 할 수 있습니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################### | |
# 데이터 필터링 | |
import org.apache.hadoop.hbase.util.Bytes; | |
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter; | |
import org.apache.hadoop.hbase.filter.BinaryComparator; | |
import org.apache.hadoop.hbase.filter.CompareFilter; | |
import org.apache.hadoop.hbase.filter.Filter; | |
# personal data 칼럼 패밀리의 city 칼럼에서 A 라는 데이터를 조회(equal) | |
scan 'emp', { FILTER => SingleColumnValueFilter.new(Bytes.toBytes('personal data'), Bytes.toBytes('city'), CompareFilter::CompareOp.valueOf('EQUAL'), BinaryComparator.new(Bytes.toBytes('A')))} |
반응형
'빅데이터 > hbase' 카테고리의 다른 글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 하둡
- 백준
- build
- HIVE
- Python
- 하이브
- mysql
- error
- HDFS
- 다이나믹
- oozie
- 알고리즘
- hbase
- Tez
- 오류
- airflow
- nodejs
- java
- SPARK
- Hadoop
- bash
- yarn
- Linux
- 파이썬
- ubuntu
- SQL
- emr
- AWS
- 정올
- S3
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함