@Test public void testTemporarySinkPathIsDeleted() throws Exception { getPlatform().copyFromLocal( inputFileLowerOffset ); Tap source = getPlatform().getDelimitedFile( new Fields( "a", "b" ), " ", inputFileLowerOffset ); Pipe pipe = new Pipe( "test" ); String outputPath = getOutputPath( "partition-tap-sink" ); Tap sink = getPlatform().getDelimitedFile( new Fields( "a" ), " ", outputPath ); sink = getPlatform().getPartitionTap( sink, new DelimitedPartition( new Fields( "b" ) ), 1 ); Flow flow = getPlatform().getFlowConnector().connect( source, sink, pipe ); flow.complete(); Path tempPath = new Path( outputPath, Hadoop18TapUtil.TEMPORARY_PATH ); FileSystem fileSystem = tempPath.getFileSystem( (Configuration) flow.getConfigCopy() ); assertFalse( fileSystem.exists( tempPath ) ); }
@Test public void testTemporarySinkPathIsDeleted() throws Exception { getPlatform().copyFromLocal( inputFileLowerOffset ); Tap source = getPlatform().getDelimitedFile( new Fields( "a", "b" ), " ", inputFileLowerOffset ); Pipe pipe = new Pipe( "test" ); String outputPath = getOutputPath( "partition-tap-sink" ); Tap sink = getPlatform().getDelimitedFile( new Fields( "a" ), " ", outputPath ); sink = getPlatform().getPartitionTap( sink, new DelimitedPartition( new Fields( "b" ) ), 1 ); Flow flow = getPlatform().getFlowConnector().connect( source, sink, pipe ); flow.complete(); Path tempPath = new Path( outputPath, Hadoop18TapUtil.TEMPORARY_PATH ); FileSystem fileSystem = tempPath.getFileSystem( (Configuration) flow.getConfigCopy() ); assertFalse( fileSystem.exists( tempPath ) ); }
assertFalse( "wrong scheme", new Path( path ).toUri().getScheme().equalsIgnoreCase( "file" ) );
assertFalse( "wrong scheme", new Path( path ).toUri().getScheme().equalsIgnoreCase( "file" ) );