cascading.platform

## Class TestPlatform

- java.lang.Object
- - cascading.platform.TestPlatform

-     public abstract class TestPlatform
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CLUSTER_TESTING_PROPERTY`
    `protected int` | `numGatherPartitions`
    `protected int` | `numMappers`
    `protected int` | `numReducers`
    `static String` | `PLATFORM_PREFIX`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `TestPlatform()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `copyFromLocal(String inputFile)`
    `abstract void` | `copyToLocal(String outputFile)`
    `protected String` | `getApplicationJar()`
    `abstract Tap` | `getDelimitedFile(Fields fields, boolean skipHeader, boolean writeHeader, String delimiter, String quote, Class[] types, String filename, SinkMode mode)`
    `abstract Tap` | `getDelimitedFile(Fields fields, boolean hasHeader, String delimiter, String quote, Class[] types, String filename, SinkMode mode)`
    `Tap` | `getDelimitedFile(Fields fields, boolean hasHeader, String delimiter, String quote, String filename, SinkMode mode)`
    `Tap` | `getDelimitedFile(Fields fields, String delimiter, Class[] types, String filename, SinkMode mode)`
    `Tap` | `getDelimitedFile(Fields fields, String delimiter, String filename)`
    `Tap` | `getDelimitedFile(Fields fields, String delimiter, String filename, SinkMode mode)`
    `Tap` | `getDelimitedFile(Fields fields, String delimiter, String quote, String filename, SinkMode mode)`
    `abstract Tap` | `getDelimitedFile(String delimiter, String quote, FieldTypeResolver fieldTypeResolver, String filename, SinkMode mode)`
    `FlowConnector` | `getFlowConnector()`
    `abstract FlowConnector` | `getFlowConnector(Map<Object,Object> properties)`
    `abstract FlowProcess` | `getFlowProcess()`
    `static Map<Object,Object>` | `getGlobalProperties()` Method getGlobalProperties fetches all "platform." prefixed system properties.
    `abstract String` | `getHiddenTemporaryPath()`
    `abstract Comparator` | `getLongComparator(boolean reverseSort)`
    `String` | `getName()`
    `int` | `getNumGatherPartitions()`
    `Integer` | `getNumGatherPartitionTasks(Map<Object,Object> properties)`
    `int` | `getNumMappers()`
    `Integer` | `getNumMapTasks(Map<Object,Object> properties)`
    `int` | `getNumReducers()`
    `Integer` | `getNumReduceTasks(Map<Object,Object> properties)`
    `abstract Tap` | `getPartitionTap(Tap sink, Partition partition, int openThreshold)`
    `abstract Map<Object,Object>` | `getProperties()`
    `abstract Comparator` | `getStringComparator(boolean reverseSort)`
    `Tap` | `getTabDelimitedFile(Fields fields, boolean hasHeader, String filename, SinkMode mode)`
    `Tap` | `getTabDelimitedFile(Fields fields, String filename, SinkMode mode)`
    `abstract Tap` | `getTap(Scheme scheme, String filename, SinkMode mode)`
    `abstract Scheme` | `getTestConfigDefScheme()`
    `abstract Scheme` | `getTestFailScheme()`
    `abstract Tap` | `getTextFile(Fields sourceFields, Fields sinkFields, String filename, SinkMode mode)`
    `Tap` | `getTextFile(Fields sourceFields, String filename)`
    `Tap` | `getTextFile(Fields sourceFields, String filename, SinkMode mode)`
    `Tap` | `getTextFile(String filename)`
    `Tap` | `getTextFile(String filename, SinkMode mode)`
    `boolean` | `isDAG()`
    `boolean` | `isMapReduce()`
    `boolean` | `isUseCluster()`
    `abstract boolean` | `remoteExists(String outputFile)`
    `abstract boolean` | `remoteRemove(String outputFile, boolean recursive)`
    `void` | `setNumGatherPartitions(int numGatherPartitions)`
    `void` | `setNumGatherPartitionTasks(Map<Object,Object> properties, int numReduceTasks)`
    `void` | `setNumMappers(int numMappers)`
    `void` | `setNumMapTasks(Map<Object,Object> properties, int numMapTasks)`
    `void` | `setNumReducers(int numReducers)`
    `void` | `setNumReduceTasks(Map<Object,Object> properties, int numReduceTasks)`
    `abstract void` | `setUp()`
    `void` | `setUseCluster(boolean useCluster)`
    `boolean` | `supportsGroupByAfterMerge()`
    `abstract void` | `tearDown()`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CLUSTER_TESTING_PROPERTY

          public static final String CLUSTER_TESTING_PROPERTY

      See Also:
        Constant Field Values

    - #### PLATFORM_PREFIX

          public static final String PLATFORM_PREFIX

      See Also:
        Constant Field Values

    - #### numMappers

          protected int numMappers

    - #### numReducers

          protected int numReducers

    - #### numGatherPartitions

          protected int numGatherPartitions

  - ### Constructor Detail

    - #### TestPlatform

          protected TestPlatform()

  - ### Method Detail

    - #### getGlobalProperties

          public static Map<Object,Object> getGlobalProperties()

      Method getGlobalProperties fetches all "platform." prefixed system properties.

      Sub-classes of TestPlatform should use these values as overrides before returning from `getProperties()`.
      Returns:
        a Map of properties

    - #### getName

          public String getName()

    - #### supportsGroupByAfterMerge

          public boolean supportsGroupByAfterMerge()

    - #### isMapReduce

          public boolean isMapReduce()

    - #### isDAG

          public boolean isDAG()

    - #### getNumMappers

          public int getNumMappers()

    - #### setNumMappers

          public void setNumMappers(int numMappers)

    - #### getNumReducers

          public int getNumReducers()

    - #### setNumReducers

          public void setNumReducers(int numReducers)

    - #### getNumGatherPartitions

          public int getNumGatherPartitions()

    - #### setNumGatherPartitions

          public void setNumGatherPartitions(int numGatherPartitions)

    - #### setNumMapTasks

          public void setNumMapTasks(Map<Object,Object> properties,
                            int numMapTasks)

    - #### setNumReduceTasks

          public void setNumReduceTasks(Map<Object,Object> properties,
                               int numReduceTasks)

    - #### setNumGatherPartitionTasks

          public void setNumGatherPartitionTasks(Map<Object,Object> properties,
                                        int numReduceTasks)

    - #### getNumMapTasks

          public Integer getNumMapTasks(Map<Object,Object> properties)

    - #### getNumReduceTasks

          public Integer getNumReduceTasks(Map<Object,Object> properties)

    - #### getNumGatherPartitionTasks

          public Integer getNumGatherPartitionTasks(Map<Object,Object> properties)

    - #### setUp

          public abstract void setUp()
                              throws IOException

      Throws:
        `IOException`

    - #### getProperties

          public abstract Map<Object,Object> getProperties()

    - #### tearDown

          public abstract void tearDown()

    - #### setUseCluster

          public void setUseCluster(boolean useCluster)

    - #### isUseCluster

          public boolean isUseCluster()

    - #### copyFromLocal

          public abstract void copyFromLocal(String inputFile)
                                      throws IOException

      Throws:
        `IOException`

    - #### copyToLocal

          public abstract void copyToLocal(String outputFile)
                                    throws IOException

      Throws:
        `IOException`

    - #### remoteExists

          public abstract boolean remoteExists(String outputFile)
                                        throws IOException

      Throws:
        `IOException`

    - #### remoteRemove

          public abstract boolean remoteRemove(String outputFile,
                             boolean recursive)
                                        throws IOException

      Throws:
        `IOException`

    - #### getFlowProcess

          public abstract FlowProcess getFlowProcess()

    - #### getFlowConnector

          public abstract FlowConnector getFlowConnector(Map<Object,Object> properties)

    - #### getFlowConnector

          public FlowConnector getFlowConnector()

    - #### getTap

          public abstract Tap getTap(Scheme scheme,
                   String filename,
                   SinkMode mode)

    - #### getTextFile

          public Tap getTextFile(Fields sourceFields,
                        String filename)

    - #### getTextFile

          public Tap getTextFile(String filename)

    - #### getTextFile

          public Tap getTextFile(String filename,
                        SinkMode mode)

    - #### getTextFile

          public Tap getTextFile(Fields sourceFields,
                        String filename,
                        SinkMode mode)

    - #### getTextFile

          public abstract Tap getTextFile(Fields sourceFields,
                        Fields sinkFields,
                        String filename,
                        SinkMode mode)

    - #### getDelimitedFile

          public Tap getDelimitedFile(Fields fields,
                             String delimiter,
                             String filename)

    - #### getDelimitedFile

          public Tap getDelimitedFile(Fields fields,
                             String delimiter,
                             String filename,
                             SinkMode mode)

    - #### getTabDelimitedFile

          public Tap getTabDelimitedFile(Fields fields,
                                String filename,
                                SinkMode mode)

    - #### getTabDelimitedFile

          public Tap getTabDelimitedFile(Fields fields,
                                boolean hasHeader,
                                String filename,
                                SinkMode mode)

    - #### getDelimitedFile

          public Tap getDelimitedFile(Fields fields,
                             boolean hasHeader,
                             String delimiter,
                             String quote,
                             String filename,
                             SinkMode mode)

    - #### getDelimitedFile

          public Tap getDelimitedFile(Fields fields,
                             String delimiter,
                             String quote,
                             String filename,
                             SinkMode mode)

    - #### getDelimitedFile

          public Tap getDelimitedFile(Fields fields,
                             String delimiter,
                             Class[] types,
                             String filename,
                             SinkMode mode)

    - #### getDelimitedFile

          public abstract Tap getDelimitedFile(Fields fields,
                             boolean hasHeader,
                             String delimiter,
                             String quote,
                             Class[] types,
                             String filename,
                             SinkMode mode)

    - #### getDelimitedFile

          public abstract Tap getDelimitedFile(Fields fields,
                             boolean skipHeader,
                             boolean writeHeader,
                             String delimiter,
                             String quote,
                             Class[] types,
                             String filename,
                             SinkMode mode)

    - #### getDelimitedFile

          public abstract Tap getDelimitedFile(String delimiter,
                             String quote,
                             FieldTypeResolver fieldTypeResolver,
                             String filename,
                             SinkMode mode)

    - #### getPartitionTap

          public abstract Tap getPartitionTap(Tap sink,
                            Partition partition,
                            int openThreshold)

    - #### getTestConfigDefScheme

          public abstract Scheme getTestConfigDefScheme()

    - #### getTestFailScheme

          public abstract Scheme getTestFailScheme()

    - #### getLongComparator

          public abstract Comparator getLongComparator(boolean reverseSort)

    - #### getStringComparator

          public abstract Comparator getStringComparator(boolean reverseSort)

    - #### getHiddenTemporaryPath

          public abstract String getHiddenTemporaryPath()

    - #### getApplicationJar

          protected String getApplicationJar()

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