V
- store data typepublic class LocalPersistentStore<V> extends BasePersistentStore<V>
ExecConstants.DRILL_SYS_FILE_SUFFIX
suffix.Constructor and Description |
---|
LocalPersistentStore(DrillFileSystem fs,
org.apache.hadoop.fs.Path base,
PersistentStoreConfig<V> config) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
contains(String key)
Checks if lookup key is present in store.
|
void |
delete(String key)
Removes the value corresponding to the given key if exists, nothing happens otherwise.
|
V |
get(String key)
Returns the value for the given key if exists, null otherwise.
|
static DrillFileSystem |
getFileSystem(DrillConfig config,
org.apache.hadoop.fs.Path root) |
static org.apache.hadoop.fs.Path |
getLogDir() |
PersistentStoreMode |
getMode()
Returns storage
mode of this store. |
Iterator<Map.Entry<String,V>> |
getRange(int skip,
int take)
Returns an iterator of desired number of entries offsetting by the skip value.
|
void |
put(String key,
V value)
Stores the (key, value) tuple in the store.
|
boolean |
putIfAbsent(String key,
V value)
Stores the (key, value) tuple in the store only if it does not exists.
|
getAll
public LocalPersistentStore(DrillFileSystem fs, org.apache.hadoop.fs.Path base, PersistentStoreConfig<V> config)
public PersistentStoreMode getMode()
Store
mode
of this store.public static org.apache.hadoop.fs.Path getLogDir()
public static DrillFileSystem getFileSystem(DrillConfig config, org.apache.hadoop.fs.Path root) throws IOException
IOException
public Iterator<Map.Entry<String,V>> getRange(int skip, int take)
Store
skip
- number of records to skip from beginningtake
- max number of records to returnpublic boolean contains(String key)
PersistentStore
key
- lookup keypublic V get(String key)
PersistentStore
key
- lookup keypublic void put(String key, V value)
PersistentStore
mode
.key
- lookup keyvalue
- value to storepublic boolean putIfAbsent(String key, V value)
Store
key
- lookup keyvalue
- value to storepublic void delete(String key)
Store
key
- lookup keypublic void close()
Copyright © 1970 The Apache Software Foundation. All rights reserved.