org.apache.ignite.internal.processors.hadoop

## Class GridHadoopFileBlock

- java.lang.Object
- - org.apache.ignite.internal.processors.hadoop.GridHadoopInputSplit
  - - org.apache.ignite.internal.processors.hadoop.GridHadoopFileBlock

All Implemented Interfaces:
  Externalizable, Serializable

    public class GridHadoopFileBlock
    extends GridHadoopInputSplit

Hadoop file block.

See Also:
  Serialized Form

### Field Summary

Fields
`protected URI` `file`
`protected long` `len`
`protected long` `start`

### Fields inherited from class org.apache.ignite.internal.processors.hadoop.GridHadoopInputSplit

`hosts`

### Constructor Summary

Constructors
Constructor and Description
`GridHadoopFileBlock()` Creates new file block.
`GridHadoopFileBlock(String[] hosts, URI file, long start, long len)` Creates new file block.

### Method Summary

Methods
`boolean` `equals(Object o)` This method must be implemented for purpose of internal implementation.
`URI` `file()`
`void` `file(URI file)`
`int` `hashCode()` This method must be implemented for purpose of internal implementation.
`void` `hosts(String[] hosts)`
`long` `length()`
`void` `length(long len)`
`void` `readExternal(ObjectInput in)`
`long` `start()`
`void` `start(long start)`
`String` `toString()`
`void` `writeExternal(ObjectOutput out)`

### Methods inherited from class org.apache.ignite.internal.processors.hadoop.GridHadoopInputSplit

`hosts`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### file

    @GridToStringInclude
    protected URI file

#### start

    @GridToStringInclude
    protected long start

#### len

    @GridToStringInclude
    protected long len

### Constructor Detail

#### GridHadoopFileBlock

    public GridHadoopFileBlock()

Creates new file block.

#### GridHadoopFileBlock

    public GridHadoopFileBlock(String[] hosts,
                       URI file,
                       long start,
                       long len)

Creates new file block.

Parameters:
  `hosts` - List of hosts where the block resides.
  `file` - File URI.
  `start` - Start position of the block in the file.
  `len` - Length of the block.

### Method Detail

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Throws:
  `IOException`
  `ClassNotFoundException`

#### length

    public long length()

Returns:
  Length.

#### length

    public void length(long len)

Parameters:
  `len` - New length.

#### start

    public long start()

Returns:
  Start.

#### start

    public void start(long start)

Parameters:
  `start` - New start.

#### file

    public URI file()

Returns:
  File.

#### file

    public void file(URI file)

Parameters:
  `file` - New file.

#### hosts

    public void hosts(String[] hosts)

Parameters:
  `hosts` - New hosts.

#### equals

    public boolean equals(Object o)

This method must be implemented for purpose of internal implementation.

Specified by:
  `equals` in class `GridHadoopInputSplit`
Parameters:
  `o` - Another object.
Returns:
  `true` If objects are equal.

#### hashCode

    public int hashCode()

This method must be implemented for purpose of internal implementation.

Specified by:
  `hashCode` in class `GridHadoopInputSplit`
Returns:
  Hash code of the object.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015