## org.apache.mahout.common.iterator.sequencefile
Class SequenceFileIterable<K extends org.apache.hadoop.io.Writable,V extends org.apache.hadoop.io.Writable>

    java.lang.Object
      org.apache.mahout.common.iterator.sequencefile.SequenceFileIterable<K,V>

All Implemented Interfaces:
  Iterable<Pair<K,V>>

    public final class SequenceFileIterable<K extends org.apache.hadoop.io.Writable,V extends org.apache.hadoop.io.Writable>

extends Object
implements Iterable<Pair<K,V>>

`Iterable` counterpart to `SequenceFileIterator`.

Constructor Summary
`SequenceFileIterable(org.apache.hadoop.fs.Path path, boolean reuseKeyValueInstances, org.apache.hadoop.conf.Configuration conf)`
`SequenceFileIterable(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)` Like `SequenceFileIterable(Path, boolean, Configuration)` but key and value instances are not reused by default.

Method Summary
`Iterator<Pair<K,V>>` `iterator()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SequenceFileIterable

    public SequenceFileIterable(org.apache.hadoop.fs.Path path,
                                org.apache.hadoop.conf.Configuration conf)

  Like `SequenceFileIterable(Path, boolean, Configuration)` but key and value instances are not reused by default.

  Parameters:
    `path` - file to iterate over

### SequenceFileIterable

    public SequenceFileIterable(org.apache.hadoop.fs.Path path,
                                boolean reuseKeyValueInstances,
                                org.apache.hadoop.conf.Configuration conf)

Parameters:
  `path` - file to iterate over
  `reuseKeyValueInstances` - if true, reuses instances of the key and value object instead of creating a new one for each read from the file

Method Detail

### iterator

    public Iterator<Pair<K,V>> iterator()

  Specified by:
    `iterator` in interface `Iterable<Pair<K extends org.apache.hadoop.io.Writable,V extends org.apache.hadoop.io.Writable>>`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.