@Override public boolean deleteResource( Configuration conf ) throws IOException { String fullIdentifier = getFullIdentifier( conf ); return deleteFullIdentifier( conf, fullIdentifier ); }
@Override public boolean deleteResource( Configuration conf ) throws IOException { String fullIdentifier = getFullIdentifier( conf ); return deleteFullIdentifier( conf, fullIdentifier ); }
@Override public boolean createResource( Configuration conf ) throws IOException { if( LOG.isDebugEnabled() ) LOG.debug( "making dirs: {}", getFullIdentifier( conf ) ); return getFileSystem( conf ).mkdirs( getPath() ); }
@Override public boolean createResource( Configuration conf ) throws IOException { if( LOG.isDebugEnabled() ) LOG.debug( "making dirs: {}", getFullIdentifier( conf ) ); return getFileSystem( conf ).mkdirs( getPath() ); }
public boolean deleteChildResource( Configuration conf, String childIdentifier ) throws IOException { resetFileStatuses(); Path childPath = new Path( childIdentifier ).makeQualified( getFileSystem( conf ) ); if( !childPath.toString().startsWith( getFullIdentifier( conf ) ) ) return false; return deleteFullIdentifier( conf, childPath.toString() ); }
public boolean deleteChildResource( Configuration conf, String childIdentifier ) throws IOException { resetFileStatuses(); Path childPath = new Path( childIdentifier ).makeQualified( getFileSystem( conf ) ); if( !childPath.toString().startsWith( getFullIdentifier( conf ) ) ) return false; return deleteFullIdentifier( conf, childPath.toString() ); }
@Override public String[] getChildIdentifiers( Configuration conf, int depth, boolean fullyQualified ) throws IOException { if( !resourceExists( conf ) ) return new String[ 0 ]; if( depth == 0 && !fullyQualified ) return new String[]{getIdentifier()}; String fullIdentifier = getFullIdentifier( conf ); int trim = fullyQualified ? 0 : fullIdentifier.length() + 1; Set<String> results = new LinkedHashSet<String>(); getChildPaths( conf, results, trim, new Path( fullIdentifier ), depth ); return results.toArray( new String[ results.size() ] ); }
@Override public String[] getChildIdentifiers( Configuration conf, int depth, boolean fullyQualified ) throws IOException { if( !resourceExists( conf ) ) return new String[ 0 ]; if( depth == 0 && !fullyQualified ) return new String[]{getIdentifier()}; String fullIdentifier = getFullIdentifier( conf ); int trim = fullyQualified ? 0 : fullIdentifier.length() + 1; Set<String> results = new LinkedHashSet<String>(); getChildPaths( conf, results, trim, new Path( fullIdentifier ), depth ); return results.toArray( new String[ results.size() ] ); }
@Override public void sourceConfInit( FlowProcess<? extends Configuration> process, Configuration conf ) { String fullIdentifier = getFullIdentifier( conf ); applySourceConfInitIdentifiers( process, conf, fullIdentifier ); verifyNoDuplicates( conf ); }
@Override public void sourceConfInit( FlowProcess<? extends Configuration> process, Configuration conf ) { String fullIdentifier = getFullIdentifier( conf ); applySourceConfInitIdentifiers( process, conf, fullIdentifier ); verifyNoDuplicates( conf ); }
@Override public void sinkConfInit( FlowProcess<? extends Configuration> process, Configuration conf ) { Path qualifiedPath = new Path( getFullIdentifier( conf ) ); HadoopUtil.setOutputPath( conf, qualifiedPath ); super.sinkConfInit( process, conf ); makeLocal( conf, qualifiedPath, "forcing job to stand-alone mode, via sink: " ); TupleSerialization.setSerializations( conf ); // allows Hfs to be used independent of Flow }
@Override public void sinkConfInit( FlowProcess<? extends Configuration> process, Configuration conf ) { Path qualifiedPath = new Path( getFullIdentifier( conf ) ); HadoopUtil.setOutputPath( conf, qualifiedPath ); super.sinkConfInit( process, conf ); makeLocal( conf, qualifiedPath, "forcing job to stand-alone mode, via sink: " ); TupleSerialization.setSerializations( conf ); // allows Hfs to be used independent of Flow }