cascading.platform

## Class TestPlatform

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

-     public abstract class TestPlatform
      extends java.lang.Object

- - ### Field Summary

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

  - ### Constructor Summary

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

  - ### Method Summary

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

      See Also:
        Constant Field Values

    - #### PLATFORM_PREFIX

          public static final java.lang.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 java.util.Map<java.lang.Object,java.lang.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 java.lang.String getName()

    - #### supportsGroupByAfterMerge

          @Deprecated
          public boolean supportsGroupByAfterMerge()

      Deprecated.
      Prior versions of all the planners had challenges with Merge->GroupBy and related plans.

    - #### 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(java.util.Map<java.lang.Object,java.lang.Object> properties,
                            int numMapTasks)

    - #### setNumReduceTasks

          public void setNumReduceTasks(java.util.Map<java.lang.Object,java.lang.Object> properties,
                               int numReduceTasks)

    - #### setNumGatherPartitionTasks

          public void setNumGatherPartitionTasks(java.util.Map<java.lang.Object,java.lang.Object> properties,
                                        int numReduceTasks)

    - #### getNumMapTasks

          public java.lang.Integer getNumMapTasks(java.util.Map<java.lang.Object,java.lang.Object> properties)

    - #### getNumReduceTasks

          public java.lang.Integer getNumReduceTasks(java.util.Map<java.lang.Object,java.lang.Object> properties)

    - #### getNumGatherPartitionTasks

          public java.lang.Integer getNumGatherPartitionTasks(java.util.Map<java.lang.Object,java.lang.Object> properties)

    - #### setUp

          public abstract void setUp()
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getProperties

          public abstract java.util.Map<java.lang.Object,java.lang.Object> getProperties()

    - #### tearDown

          public abstract void tearDown()

    - #### setUseCluster

          public void setUseCluster(boolean useCluster)

    - #### isUseCluster

          public boolean isUseCluster()

    - #### copyFromLocal

          public abstract void copyFromLocal(java.lang.String inputFile)
                                      throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### copyToLocal

          public abstract void copyToLocal(java.lang.String outputFile)
                                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### remoteExists

          public abstract boolean remoteExists(java.lang.String outputFile)
                                        throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### remoteRemove

          public abstract boolean remoteRemove(java.lang.String outputFile,
                             boolean recursive)
                                        throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getFlowProcess

          public abstract FlowProcess getFlowProcess()

    - #### getFlowConnector

          public abstract FlowConnector getFlowConnector(java.util.Map<java.lang.Object,java.lang.Object> properties)

    - #### getFlowConnector

          public FlowConnector getFlowConnector()

    - #### getTap

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

    - #### getTextFile

          public Tap getTextFile(Fields sourceFields,
                        java.lang.String filename)

    - #### getTextFile

          public Tap getTextFile(java.lang.String filename)

    - #### getTextFile

          public Tap getTextFile(java.lang.String filename,
                        SinkMode mode)

    - #### getTextFile

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

    - #### getTextFile

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

    - #### getDelimitedFile

          public Tap getDelimitedFile(Fields fields,
                             java.lang.String delimiter,
                             java.lang.String filename)

    - #### getDelimitedFile

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

    - #### getTabDelimitedFile

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

    - #### getTabDelimitedFile

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

    - #### getDelimitedFile

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

    - #### getDelimitedFile

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

    - #### getDelimitedFile

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

    - #### getDelimitedFile

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

    - #### getDelimitedFile

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

    - #### getDelimitedFile

          public abstract Tap getDelimitedFile(java.lang.String delimiter,
                             java.lang.String quote,
                             FieldTypeResolver fieldTypeResolver,
                             java.lang.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 java.util.Comparator getLongComparator(boolean reverseSort)

    - #### getStringComparator

          public abstract java.util.Comparator getStringComparator(boolean reverseSort)

    - #### getHiddenTemporaryPath

          public abstract java.lang.String getHiddenTemporaryPath()

    - #### getApplicationJar

          protected java.lang.String getApplicationJar()

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