cascading.tap.local

## Class FileTap

- java.lang.Object
- - cascading.tap.Tap<java.util.Properties,java.io.InputStream,java.io.OutputStream>
  - - cascading.tap.local.FileTap

- All Implemented Interfaces:
    FlowElement, ScopedElement, FileType<java.util.Properties>, Traceable, java.io.Serializable

      public class FileTap
      extends Tap<java.util.Properties,java.io.InputStream,java.io.OutputStream>
      implements FileType<java.util.Properties>

  Class FileTap is a `Tap` sub-class that allows for direct local file access.

  FileTap must be used with the `LocalFlowConnector` to create `Flow` instances that run in "local" mode.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileTap(Scheme<java.util.Properties,java.io.InputStream,java.io.OutputStream,?,?> scheme, java.lang.String path)` Constructor FileTap creates a new FileTap instance using the given `Scheme` and file `path`.
    `FileTap(Scheme<java.util.Properties,java.io.InputStream,java.io.OutputStream,?,?> scheme, java.lang.String path, SinkMode sinkMode)` Constructor FileTap creates a new FileTap instance using the given `Scheme`, file `path`, and `SinkMode`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `commitResource(java.util.Properties conf)`
    `boolean` | `createResource(java.util.Properties conf)`
    `boolean` | `deleteResource(java.util.Properties conf)`
    `java.lang.String[]` | `getChildIdentifiers(FlowProcess<? extends java.util.Properties> flowProcess)`
    `java.lang.String[]` | `getChildIdentifiers(FlowProcess<? extends java.util.Properties> flowProcess, int depth, boolean fullyQualified)`
    `java.lang.String[]` | `getChildIdentifiers(java.util.Properties conf)`
    `java.lang.String[]` | `getChildIdentifiers(java.util.Properties conf, int depth, boolean fullyQualified)`
    `java.lang.String` | `getFullIdentifier(java.util.Properties conf)`
    `java.lang.String` | `getIdentifier()`
    `long` | `getModifiedTime(java.util.Properties conf)`
    `long` | `getSize(FlowProcess<? extends java.util.Properties> flowProcess)`
    `long` | `getSize(java.util.Properties conf)`
    `boolean` | `isDirectory(FlowProcess<? extends java.util.Properties> flowProcess)`
    `boolean` | `isDirectory(java.util.Properties conf)`
    `TupleEntryIterator` | `openForRead(FlowProcess<? extends java.util.Properties> flowProcess, java.io.InputStream input)`
    `TupleEntryCollector` | `openForWrite(FlowProcess<? extends java.util.Properties> flowProcess, java.io.OutputStream output)`
    `boolean` | `resourceExists(java.util.Properties conf)`

    - ### Methods inherited from class cascading.tap.Tap

      `createResource, deleteResource, equals, flowConfInit, getConfigDef, getFullIdentifier, getModifiedTime, getNodeConfigDef, getScheme, getSinkFields, getSinkMode, getSourceFields, getStepConfigDef, getTrace, hasConfigDef, hashCode, hasNodeConfigDef, hasStepConfigDef, id, isKeep, isReplace, isSink, isSource, isTemporary, isUpdate, openForRead, openForWrite, outgoingScopeFor, prepareResourceForRead, prepareResourceForWrite, presentSinkFields, presentSourceFields, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, resourceExists, retrieveSinkFields, retrieveSourceFields, rollbackResource, setScheme, sinkConfInit, sourceConfInit, taps, toString`

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

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

- - ### Constructor Detail

    - #### FileTap

          public FileTap(Scheme<java.util.Properties,java.io.InputStream,java.io.OutputStream,?,?> scheme,
                 java.lang.String path)

      Constructor FileTap creates a new FileTap instance using the given `Scheme` and file `path`.
      Parameters:
        `scheme` - of type LocalScheme
        `path` - of type String

    - #### FileTap

          public FileTap(Scheme<java.util.Properties,java.io.InputStream,java.io.OutputStream,?,?> scheme,
                 java.lang.String path,
                 SinkMode sinkMode)

      Constructor FileTap creates a new FileTap instance using the given `Scheme`, file `path`, and `SinkMode`.
      Parameters:
        `scheme` - of type LocalScheme
        `path` - of type String
        `sinkMode` - of type SinkMode

  - ### Method Detail

    - #### getIdentifier

          public java.lang.String getIdentifier()

      Specified by:
        `getIdentifier` in class `Tap<java.util.Properties,java.io.InputStream,java.io.OutputStream>`

    - #### getFullIdentifier

          public java.lang.String getFullIdentifier(java.util.Properties conf)

      Overrides:
        `getFullIdentifier` in class `Tap<java.util.Properties,java.io.InputStream,java.io.OutputStream>`

    - #### openForRead

          public TupleEntryIterator openForRead(FlowProcess<? extends java.util.Properties> flowProcess,
                                       java.io.InputStream input)
                                         throws java.io.IOException

      Specified by:
        `openForRead` in class `Tap<java.util.Properties,java.io.InputStream,java.io.OutputStream>`
      Throws:
        `java.io.IOException`

    - #### openForWrite

          public TupleEntryCollector openForWrite(FlowProcess<? extends java.util.Properties> flowProcess,
                                         java.io.OutputStream output)
                                           throws java.io.IOException

      Specified by:
        `openForWrite` in class `Tap<java.util.Properties,java.io.InputStream,java.io.OutputStream>`
      Throws:
        `java.io.IOException`

    - #### createResource

          public boolean createResource(java.util.Properties conf)
                                 throws java.io.IOException

      Specified by:
        `createResource` in class `Tap<java.util.Properties,java.io.InputStream,java.io.OutputStream>`
      Throws:
        `java.io.IOException`

    - #### deleteResource

          public boolean deleteResource(java.util.Properties conf)
                                 throws java.io.IOException

      Specified by:
        `deleteResource` in class `Tap<java.util.Properties,java.io.InputStream,java.io.OutputStream>`
      Throws:
        `java.io.IOException`

    - #### commitResource

          public boolean commitResource(java.util.Properties conf)
                                 throws java.io.IOException

      Overrides:
        `commitResource` in class `Tap<java.util.Properties,java.io.InputStream,java.io.OutputStream>`
      Throws:
        `java.io.IOException`

    - #### resourceExists

          public boolean resourceExists(java.util.Properties conf)
                                 throws java.io.IOException

      Specified by:
        `resourceExists` in class `Tap<java.util.Properties,java.io.InputStream,java.io.OutputStream>`
      Throws:
        `java.io.IOException`

    - #### getModifiedTime

          public long getModifiedTime(java.util.Properties conf)
                               throws java.io.IOException

      Specified by:
        `getModifiedTime` in class `Tap<java.util.Properties,java.io.InputStream,java.io.OutputStream>`
      Throws:
        `java.io.IOException`

    - #### isDirectory

          public boolean isDirectory(FlowProcess<? extends java.util.Properties> flowProcess)
                              throws java.io.IOException

      Specified by:
        `isDirectory` in interface `FileType<java.util.Properties>`
      Throws:
        `java.io.IOException`

    - #### isDirectory

          public boolean isDirectory(java.util.Properties conf)
                              throws java.io.IOException

      Specified by:
        `isDirectory` in interface `FileType<java.util.Properties>`
      Throws:
        `java.io.IOException`

    - #### getChildIdentifiers

          public java.lang.String[] getChildIdentifiers(FlowProcess<? extends java.util.Properties> flowProcess)
                                                 throws java.io.IOException

      Specified by:
        `getChildIdentifiers` in interface `FileType<java.util.Properties>`
      Throws:
        `java.io.IOException`

    - #### getChildIdentifiers

          public java.lang.String[] getChildIdentifiers(java.util.Properties conf)
                                                 throws java.io.IOException

      Specified by:
        `getChildIdentifiers` in interface `FileType<java.util.Properties>`
      Throws:
        `java.io.IOException`

    - #### getChildIdentifiers

          public java.lang.String[] getChildIdentifiers(FlowProcess<? extends java.util.Properties> flowProcess,
                                               int depth,
                                               boolean fullyQualified)
                                                 throws java.io.IOException

      Specified by:
        `getChildIdentifiers` in interface `FileType<java.util.Properties>`
      Throws:
        `java.io.IOException`

    - #### getChildIdentifiers

          public java.lang.String[] getChildIdentifiers(java.util.Properties conf,
                                               int depth,
                                               boolean fullyQualified)
                                                 throws java.io.IOException

      Specified by:
        `getChildIdentifiers` in interface `FileType<java.util.Properties>`
      Throws:
        `java.io.IOException`

    - #### getSize

          public long getSize(FlowProcess<? extends java.util.Properties> flowProcess)
                       throws java.io.IOException

      Specified by:
        `getSize` in interface `FileType<java.util.Properties>`
      Throws:
        `java.io.IOException`

    - #### getSize

          public long getSize(java.util.Properties conf)
                       throws java.io.IOException

      Specified by:
        `getSize` in interface `FileType<java.util.Properties>`
      Throws:
        `java.io.IOException`

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.