org.apache.accumulo.core.file.map
Class MyMapFile.Writer

java.lang.Object
  extended by org.apache.accumulo.core.file.map.MyMapFile.Writer
Enclosing class:
MyMapFile

public static class MyMapFile.Writer
extends Object

Writes a new map.


Constructor Summary
MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, String dirName, Class keyClass, Class valClass)
          Create the named map for keys of the named class.
MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, String dirName, Class keyClass, Class valClass, MySequenceFile.CompressionType compressionType)
          Create the named map for keys of the named class.
MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, String dirName, Class keyClass, Class valClass, MySequenceFile.CompressionType compress, org.apache.hadoop.io.compress.CompressionCodec codec, org.apache.hadoop.util.Progressable progress)
          Create the named map for keys of the named class.
MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, String dirName, Class keyClass, Class valClass, MySequenceFile.CompressionType compress, org.apache.hadoop.util.Progressable progress)
          Create the named map for keys of the named class.
MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, String dirName, org.apache.hadoop.io.WritableComparator comparator, Class valClass)
          Create the named map using the named key comparator.
MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, String dirName, org.apache.hadoop.io.WritableComparator comparator, Class valClass, MySequenceFile.CompressionType compress)
          Create the named map using the named key comparator.
MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, String dirName, org.apache.hadoop.io.WritableComparator comparator, Class valClass, MySequenceFile.CompressionType compress, org.apache.hadoop.io.compress.CompressionCodec codec, org.apache.hadoop.util.Progressable progress)
          Create the named map using the named key comparator.
MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, String dirName, org.apache.hadoop.io.WritableComparator comparator, Class valClass, MySequenceFile.CompressionType compress, org.apache.hadoop.util.Progressable progress)
          Create the named map using the named key comparator.
 
Method Summary
 void append(org.apache.hadoop.io.WritableComparable key, org.apache.hadoop.io.Writable val)
          Append a key/value pair to the map.
 void close()
          Close the map.
 int getIndexInterval()
          The number of entries that are added before an index entry is added.
static void setIndexInterval(org.apache.hadoop.conf.Configuration conf, int interval)
          Sets the index interval and stores it in conf
 void setIndexInterval(int interval)
          Sets the index interval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyMapFile.Writer

public MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf,
                        org.apache.hadoop.fs.FileSystem fs,
                        String dirName,
                        Class keyClass,
                        Class valClass)
                 throws IOException
Create the named map for keys of the named class.

Throws:
IOException

MyMapFile.Writer

public MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf,
                        org.apache.hadoop.fs.FileSystem fs,
                        String dirName,
                        Class keyClass,
                        Class valClass,
                        MySequenceFile.CompressionType compress,
                        org.apache.hadoop.util.Progressable progress)
                 throws IOException
Create the named map for keys of the named class.

Throws:
IOException

MyMapFile.Writer

public MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf,
                        org.apache.hadoop.fs.FileSystem fs,
                        String dirName,
                        Class keyClass,
                        Class valClass,
                        MySequenceFile.CompressionType compress,
                        org.apache.hadoop.io.compress.CompressionCodec codec,
                        org.apache.hadoop.util.Progressable progress)
                 throws IOException
Create the named map for keys of the named class.

Throws:
IOException

MyMapFile.Writer

public MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf,
                        org.apache.hadoop.fs.FileSystem fs,
                        String dirName,
                        Class keyClass,
                        Class valClass,
                        MySequenceFile.CompressionType compressionType)
                 throws IOException
Create the named map for keys of the named class.

Throws:
IOException

MyMapFile.Writer

public MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf,
                        org.apache.hadoop.fs.FileSystem fs,
                        String dirName,
                        org.apache.hadoop.io.WritableComparator comparator,
                        Class valClass)
                 throws IOException
Create the named map using the named key comparator.

Throws:
IOException

MyMapFile.Writer

public MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf,
                        org.apache.hadoop.fs.FileSystem fs,
                        String dirName,
                        org.apache.hadoop.io.WritableComparator comparator,
                        Class valClass,
                        MySequenceFile.CompressionType compress)
                 throws IOException
Create the named map using the named key comparator.

Throws:
IOException

MyMapFile.Writer

public MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf,
                        org.apache.hadoop.fs.FileSystem fs,
                        String dirName,
                        org.apache.hadoop.io.WritableComparator comparator,
                        Class valClass,
                        MySequenceFile.CompressionType compress,
                        org.apache.hadoop.util.Progressable progress)
                 throws IOException
Create the named map using the named key comparator.

Throws:
IOException

MyMapFile.Writer

public MyMapFile.Writer(org.apache.hadoop.conf.Configuration conf,
                        org.apache.hadoop.fs.FileSystem fs,
                        String dirName,
                        org.apache.hadoop.io.WritableComparator comparator,
                        Class valClass,
                        MySequenceFile.CompressionType compress,
                        org.apache.hadoop.io.compress.CompressionCodec codec,
                        org.apache.hadoop.util.Progressable progress)
                 throws IOException
Create the named map using the named key comparator.

Throws:
IOException
Method Detail

getIndexInterval

public int getIndexInterval()
The number of entries that are added before an index entry is added.


setIndexInterval

public void setIndexInterval(int interval)
Sets the index interval.

See Also:
getIndexInterval()

setIndexInterval

public static void setIndexInterval(org.apache.hadoop.conf.Configuration conf,
                                    int interval)
Sets the index interval and stores it in conf

See Also:
getIndexInterval()

close

public void close()
           throws IOException
Close the map.

Throws:
IOException

append

public void append(org.apache.hadoop.io.WritableComparable key,
                   org.apache.hadoop.io.Writable val)
            throws IOException
Append a key/value pair to the map. The key must be greater or equal to the previous key added to the map.

Throws:
IOException


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.