File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,10 @@ BLOOMFILTER=${BLOOMFILTER-'ROW'}
19
19
COMPRESSION=${COMPRESSION-' LZO' }
20
20
# All compression codec names are upper case (NONE, LZO, SNAPPY, etc).
21
21
COMPRESSION=` echo " $COMPRESSION " | tr a-z A-Z`
22
- DATA_BLOCK_ENCODING=${DATA_BLOCK_ENCODING-' NONE' }
22
+ # DIFF encoding is very useful for OpenTSDB's case that many small KVs and common prefix.
23
+ # This can save a lot of storage space.
24
+ DATA_BLOCK_ENCODING=${DATA_BLOCK_ENCODING-' DIFF' }
25
+ DATA_BLOCK_ENCODING=` echo " $DATA_BLOCK_ENCODING " | tr a-z A-Z`
23
26
TSDB_TTL=${TSDB_TTL-' FOREVER' }
24
27
25
28
case $COMPRESSION in
@@ -29,6 +32,13 @@ case $COMPRESSION in
29
32
;;
30
33
esac
31
34
35
+ case $DATA_BLOCK_ENCODING in
36
+ (NONE|PREFIX|DIFF|FAST_DIFF|ROW_INDEX_V1) : ;; # Know good
37
+ (* )
38
+ echo >&2 " warning: encoding '$DATA_BLOCK_ENCODING ' might not be supported."
39
+ ;;
40
+ esac
41
+
32
42
# HBase scripts also use a variable named `HBASE_HOME', and having this
33
43
# variable in the environment with a value somewhat different from what
34
44
# they expect can confuse them in some cases. So rename the variable.
You can’t perform that action at this time.
0 commit comments