Tabnine Logo
MergeGroupPlatformTest.getPlatform
Code IndexAdd Tabnine to your IDE (free)

How to use
getPlatform
method
in
cascading.pipe.MergeGroupPlatformTest

Best Java code snippets using cascading.pipe.MergeGroupPlatformTest.getPlatform (Showing top 4 results out of 315)

origin: cwensel/cascading

@Test
public void testBuildMerge()
 {
 Tap sourceLower = getPlatform().getTextFile( "file1" );
 Tap sourceUpper = getPlatform().getTextFile( "file2" );
 Map sources = new HashMap();
 sources.put( "lower", sourceLower );
 sources.put( "upper", sourceUpper );
 Function splitter = new RegexSplitter( new Fields( "num", "char" ), " " );
 Tap sink = getPlatform().getTextFile( "outpath", SinkMode.REPLACE );
 Pipe pipeLower = new Each( new Pipe( "lower" ), new Fields( "line" ), splitter );
 Pipe pipeUpper = new Each( new Pipe( "upper" ), new Fields( "line" ), splitter );
 Pipe splice = new GroupBy( "merge", Pipe.pipes( pipeLower, pipeUpper ), new Fields( "num" ), null, false );
 Flow flow = getPlatform().getFlowConnector().connect( sources, sink, splice );
 }
origin: cascading/cascading-platform

@Test
public void testBuildMerge()
 {
 Tap sourceLower = getPlatform().getTextFile( "file1" );
 Tap sourceUpper = getPlatform().getTextFile( "file2" );
 Map sources = new HashMap();
 sources.put( "lower", sourceLower );
 sources.put( "upper", sourceUpper );
 Function splitter = new RegexSplitter( new Fields( "num", "char" ), " " );
 Tap sink = getPlatform().getTextFile( "outpath", SinkMode.REPLACE );
 Pipe pipeLower = new Each( new Pipe( "lower" ), new Fields( "line" ), splitter );
 Pipe pipeUpper = new Each( new Pipe( "upper" ), new Fields( "line" ), splitter );
 Pipe splice = new GroupBy( "merge", Pipe.pipes( pipeLower, pipeUpper ), new Fields( "num" ), null, false );
 Flow flow = getPlatform().getFlowConnector().connect( sources, sink, splice );
 }
origin: cwensel/cascading

@Test
public void testBuildMergeFail()
 {
 Tap sourceLower = getPlatform().getTextFile( "file1" );
 Tap sourceUpper = getPlatform().getTextFile( "file2" );
 Map sources = new HashMap();
 sources.put( "lower", sourceLower );
 sources.put( "upper", sourceUpper );
 Function splitter1 = new RegexSplitter( new Fields( "num", "foo" ), " " );
 Function splitter2 = new RegexSplitter( new Fields( "num", "bar" ), " " );
 Tap sink = getPlatform().getTextFile( "outpath", SinkMode.REPLACE );
 Pipe pipeLower = new Each( new Pipe( "lower" ), new Fields( "line" ), splitter1 );
 Pipe pipeUpper = new Each( new Pipe( "upper" ), new Fields( "line" ), splitter2 );
 Pipe splice = new GroupBy( "merge", Pipe.pipes( pipeLower, pipeUpper ), new Fields( "num" ), null, false );
 try
  {
  Flow flow = getPlatform().getFlowConnector().connect( sources, sink, splice );
  fail( "did not fail on mismatched field names" );
  }
 catch( Exception exception )
  {
  // test passes
  }
 }
}
origin: cascading/cascading-platform

@Test
public void testBuildMergeFail()
 {
 Tap sourceLower = getPlatform().getTextFile( "file1" );
 Tap sourceUpper = getPlatform().getTextFile( "file2" );
 Map sources = new HashMap();
 sources.put( "lower", sourceLower );
 sources.put( "upper", sourceUpper );
 Function splitter1 = new RegexSplitter( new Fields( "num", "foo" ), " " );
 Function splitter2 = new RegexSplitter( new Fields( "num", "bar" ), " " );
 Tap sink = getPlatform().getTextFile( "outpath", SinkMode.REPLACE );
 Pipe pipeLower = new Each( new Pipe( "lower" ), new Fields( "line" ), splitter1 );
 Pipe pipeUpper = new Each( new Pipe( "upper" ), new Fields( "line" ), splitter2 );
 Pipe splice = new GroupBy( "merge", Pipe.pipes( pipeLower, pipeUpper ), new Fields( "num" ), null, false );
 try
  {
  Flow flow = getPlatform().getFlowConnector().connect( sources, sink, splice );
  fail( "did not fail on mismatched field names" );
  }
 catch( Exception exception )
  {
  // test passes
  }
 }
}
cascading.pipeMergeGroupPlatformTestgetPlatform

Popular methods of MergeGroupPlatformTest

  • fail

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (Timer)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Table (org.hibernate.mapping)
    A relational table
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now