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

How to use
fail
method
in
cascading.pipe.MergeGroupPlatformTest

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

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.pipeMergeGroupPlatformTestfail

Popular methods of MergeGroupPlatformTest

  • getPlatform

Popular in Java

  • Making http post requests using okhttp
  • putExtra (Intent)
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JFileChooser (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top plugins for Android Studio
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