@InterfaceAudience.Private public final class DictionaryCache extends Object
Modifier and Type | Field and Description |
---|---|
private static org.apache.hbase.thirdparty.com.google.common.cache.LoadingCache<String,byte[]> |
CACHE |
static int |
DEFAULT_DICTIONARY_MAX_SIZE |
static String |
DICTIONARY_MAX_SIZE_KEY |
private static org.slf4j.Logger |
LOG |
static String |
RESOURCE_SCHEME |
Modifier | Constructor and Description |
---|---|
private |
DictionaryCache() |
Modifier and Type | Method and Description |
---|---|
static boolean |
contains(String dictionaryPath) |
static byte[] |
getDictionary(org.apache.hadoop.conf.Configuration conf,
String path)
Load a dictionary or return a previously cached load.
|
private static byte[] |
loadFromHadoopFs(org.apache.hadoop.conf.Configuration conf,
String s,
int maxSize) |
static byte[] |
loadFromResource(org.apache.hadoop.conf.Configuration conf,
String s,
int maxSize) |
public static final String DICTIONARY_MAX_SIZE_KEY
public static final int DEFAULT_DICTIONARY_MAX_SIZE
public static final String RESOURCE_SCHEME
private static final org.slf4j.Logger LOG
private DictionaryCache()
public static byte[] getDictionary(org.apache.hadoop.conf.Configuration conf, String path) throws IOException
conf
- configurationpath
- the hadoop Path where the dictionary is located, as a StringIOException
public static byte[] loadFromResource(org.apache.hadoop.conf.Configuration conf, String s, int maxSize) throws IOException
IOException
private static byte[] loadFromHadoopFs(org.apache.hadoop.conf.Configuration conf, String s, int maxSize) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.