public class LuceneStorageConfiguration extends Object implements org.apache.hadoop.io.Writable
SequenceFilesFromLuceneStorage, which generates a sequence file
with id as the key and a content field as value.| Constructor and Description |
|---|
LuceneStorageConfiguration() |
LuceneStorageConfiguration(org.apache.hadoop.conf.Configuration conf)
Deserializes a
LuceneStorageConfiguration from a Configuration. |
LuceneStorageConfiguration(org.apache.hadoop.conf.Configuration configuration,
List<org.apache.hadoop.fs.Path> indexPaths,
org.apache.hadoop.fs.Path sequenceFilesOutputPath,
String idField,
List<String> fields)
Create a configuration bean with all mandatory parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
List<String> |
getFields() |
String |
getIdField() |
List<org.apache.hadoop.fs.Path> |
getIndexPaths() |
int |
getMaxHits() |
org.apache.lucene.search.Query |
getQuery() |
Iterator<Pair<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>> |
getSequenceFileIterator()
|
org.apache.hadoop.fs.Path |
getSequenceFilesOutputPath() |
org.apache.lucene.document.DocumentStoredFieldVisitor |
getStoredFieldVisitor() |
int |
hashCode() |
void |
readFields(DataInput in) |
org.apache.hadoop.conf.Configuration |
serialize()
Serializes this object in a Hadoop
Configuration |
void |
setMaxHits(int maxHits) |
void |
setQuery(org.apache.lucene.search.Query query) |
void |
write(DataOutput out) |
public LuceneStorageConfiguration(org.apache.hadoop.conf.Configuration configuration,
List<org.apache.hadoop.fs.Path> indexPaths,
org.apache.hadoop.fs.Path sequenceFilesOutputPath,
String idField,
List<String> fields)
configuration - Hadoop configuration for writing sequencefilesindexPaths - paths to the indexsequenceFilesOutputPath - path to output the sequence fileidField - field used for the key of the sequence filefields - field(s) used for the value of the sequence filepublic LuceneStorageConfiguration()
public LuceneStorageConfiguration(org.apache.hadoop.conf.Configuration conf)
throws IOException
LuceneStorageConfiguration from a Configuration.conf - the Configuration object with a serialized LuceneStorageConfigurationIOException - if deserialization failspublic org.apache.hadoop.conf.Configuration serialize()
throws IOException
ConfigurationConfiguration object with a String serializationIOException - if serialization failspublic Iterator<Pair<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>> getSequenceFileIterator()
public org.apache.hadoop.conf.Configuration getConfiguration()
public org.apache.hadoop.fs.Path getSequenceFilesOutputPath()
public List<org.apache.hadoop.fs.Path> getIndexPaths()
public String getIdField()
public void setQuery(org.apache.lucene.search.Query query)
public org.apache.lucene.search.Query getQuery()
public void setMaxHits(int maxHits)
public int getMaxHits()
public org.apache.lucene.document.DocumentStoredFieldVisitor getStoredFieldVisitor()
public void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionCopyright © 2008–2013 The Apache Software Foundation. All rights reserved.