public class CSVIndexWriter extends java.lang.Object implements IndexWriter
describe()
.
Note: works only in local mode, to be used with index option
-noCommit
.
Modifier and Type | Class and Description |
---|---|
protected class |
CSVIndexWriter.Separator
represent separators (also quote and escape characters) as char(s) and
byte(s) in the output encoding for efficiency.
|
Modifier and Type | Field and Description |
---|---|
protected FSDataOutputStream |
csvout |
protected java.nio.charset.Charset |
encoding
encoding of CSV file
|
static org.slf4j.Logger |
LOG |
X_POINT_ID
Constructor and Description |
---|
CSVIndexWriter() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
commit()
(nothing to commit)
|
void |
delete(java.lang.String key)
(deletion of documents is not supported)
|
java.util.Map<java.lang.String,java.util.Map.Entry<java.lang.String,java.lang.Object>> |
describe()
Returns
Map with the specific parameters the IndexWriter instance can take. |
Configuration |
getConf() |
static void |
main(java.lang.String[] args) |
void |
open(Configuration conf,
java.lang.String name) |
void |
open(IndexWriterParams parameters)
Initializes the internal variables from a given index writer configuration.
|
void |
setConf(Configuration conf) |
void |
update(NutchDocument doc) |
void |
write(NutchDocument doc) |
public static final org.slf4j.Logger LOG
protected java.nio.charset.Charset encoding
protected FSDataOutputStream csvout
public void open(Configuration conf, java.lang.String name) throws java.io.IOException
open
in interface IndexWriter
java.io.IOException
public void open(IndexWriterParams parameters) throws java.io.IOException
open
in interface IndexWriter
parameters
- Params from the index writer configuration.java.io.IOException
- Some exception thrown by writer.public void write(NutchDocument doc) throws java.io.IOException
write
in interface IndexWriter
java.io.IOException
public void delete(java.lang.String key)
delete
in interface IndexWriter
public void update(NutchDocument doc) throws java.io.IOException
update
in interface IndexWriter
java.io.IOException
public void close() throws java.io.IOException
close
in interface IndexWriter
java.io.IOException
public void commit()
commit
in interface IndexWriter
public Configuration getConf()
getConf
in interface Configurable
public java.util.Map<java.lang.String,java.util.Map.Entry<java.lang.String,java.lang.Object>> describe()
Map
with the specific parameters the IndexWriter instance can take.describe
in interface IndexWriter
public void setConf(Configuration conf)
setConf
in interface Configurable
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
Copyright © 2019 The Apache Software Foundation