1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.hadoop.hbase.mob;
20
21 import org.apache.hadoop.hbase.classification.InterfaceAudience;
22 import org.apache.hadoop.hbase.classification.InterfaceStability;
23 import org.apache.hadoop.hbase.HConstants;
24 import org.apache.hadoop.hbase.Tag;
25 import org.apache.hadoop.hbase.TagType;
26 import org.apache.hadoop.hbase.util.Bytes;
27
28
29
30
31 @InterfaceAudience.Public
32 @InterfaceStability.Evolving
33 public class MobConstants {
34
35 public static final String MOB_SCAN_RAW = "hbase.mob.scan.raw";
36 public static final String MOB_CACHE_BLOCKS = "hbase.mob.cache.blocks";
37 public static final String MOB_SCAN_REF_ONLY = "hbase.mob.scan.ref.only";
38 public static final String EMPTY_VALUE_ON_MOBCELL_MISS = "empty.value.on.mobcell.miss";
39
40 public static final String MOB_FILE_CACHE_SIZE_KEY = "hbase.mob.file.cache.size";
41 public static final int DEFAULT_MOB_FILE_CACHE_SIZE = 1000;
42
43 public static final String MOB_DIR_NAME = "mobdir";
44 public static final String MOB_REGION_NAME = ".mob";
45 public static final byte[] MOB_REGION_NAME_BYTES = Bytes.toBytes(MOB_REGION_NAME);
46
47 public static final String MOB_CLEANER_PERIOD = "hbase.master.mob.ttl.cleaner.period";
48 public static final int DEFAULT_MOB_CLEANER_PERIOD = 24 * 60 * 60;
49
50 public static final String MOB_SWEEP_TOOL_COMPACTION_START_DATE =
51 "hbase.mob.sweep.tool.compaction.start.date";
52 public static final String MOB_SWEEP_TOOL_COMPACTION_RATIO =
53 "hbase.mob.sweep.tool.compaction.ratio";
54 public static final String MOB_SWEEP_TOOL_COMPACTION_MERGEABLE_SIZE =
55 "hbase.mob.sweep.tool.compaction.mergeable.size";
56
57 public static final float DEFAULT_SWEEP_TOOL_MOB_COMPACTION_RATIO = 0.5f;
58 public static final long DEFAULT_SWEEP_TOOL_MOB_COMPACTION_MERGEABLE_SIZE = 128 * 1024 * 1024;
59
60 public static final String MOB_SWEEP_TOOL_COMPACTION_TEMP_DIR_NAME = "mobcompaction";
61
62 public static final String MOB_SWEEP_TOOL_COMPACTION_MEMSTORE_FLUSH_SIZE =
63 "hbase.mob.sweep.tool.compaction.memstore.flush.size";
64 public static final long DEFAULT_MOB_SWEEP_TOOL_COMPACTION_MEMSTORE_FLUSH_SIZE =
65 1024 * 1024 * 128;
66
67 public static final String MOB_CACHE_EVICT_PERIOD = "hbase.mob.cache.evict.period";
68 public static final String MOB_CACHE_EVICT_REMAIN_RATIO = "hbase.mob.cache.evict.remain.ratio";
69 public static final Tag MOB_REF_TAG = new Tag(TagType.MOB_REFERENCE_TAG_TYPE,
70 HConstants.EMPTY_BYTE_ARRAY);
71
72 public static final float DEFAULT_EVICT_REMAIN_RATIO = 0.5f;
73 public static final long DEFAULT_MOB_CACHE_EVICT_PERIOD = 3600l;
74
75 public final static String TEMP_DIR_NAME = ".tmp";
76 public final static String BULKLOAD_DIR_NAME = ".bulkload";
77 public final static byte[] MOB_TABLE_LOCK_SUFFIX = Bytes.toBytes(".mobLock");
78 public final static String EMPTY_STRING = "";
79
80
81
82
83 public static final String MOB_COMPACTION_MERGEABLE_THRESHOLD =
84 "hbase.mob.compaction.mergeable.threshold";
85 public static final long DEFAULT_MOB_COMPACTION_MERGEABLE_THRESHOLD = 10 * 128 * 1024 * 1024;
86
87
88
89
90
91 public static final String MOB_DELFILE_MAX_COUNT = "hbase.mob.delfile.max.count";
92 public static final int DEFAULT_MOB_DELFILE_MAX_COUNT = 3;
93
94
95
96
97
98
99
100 public static final String MOB_COMPACTION_BATCH_SIZE =
101 "hbase.mob.compaction.batch.size";
102 public static final int DEFAULT_MOB_COMPACTION_BATCH_SIZE = 100;
103
104
105
106
107 public static final String MOB_COMPACTION_CHORE_PERIOD =
108 "hbase.mob.compaction.chore.period";
109 public static final int DEFAULT_MOB_COMPACTION_CHORE_PERIOD =
110 24 * 60 * 60 * 7;
111 public static final String MOB_COMPACTOR_CLASS_KEY = "hbase.mob.compactor.class";
112
113
114
115 public static final String MOB_COMPACTION_THREADS_MAX =
116 "hbase.mob.compaction.threads.max";
117 public static final int DEFAULT_MOB_COMPACTION_THREADS_MAX = 1;
118 private MobConstants() {
119
120 }
121 }