private static boolean exists( FileSystem fileSystem, Path path ) { try { return fileSystem.exists( path ); } catch( IOException exception ) { throw new FlowException( "could not test file exists: " + path ); } }
private static FileSystem getFileSystem( Configuration config, Path path ) { try { return path.getFileSystem( config ); } catch( IOException exception ) { throw new FlowException( "unable to get handle to underlying filesystem", exception ); } }
public static FileSystem getDefaultFS( Configuration config ) { try { return FileSystem.get( config ); } catch( IOException exception ) { throw new FlowException( "unable to get handle to underlying filesystem", exception ); } }
public static LocalFileSystem getLocalFS( Configuration config ) { try { return FileSystem.getLocal( config ); } catch( IOException exception ) { throw new FlowException( "unable to get handle to underlying filesystem", exception ); } }
private static boolean exists( FileSystem fileSystem, Path path ) { try { return fileSystem.exists( path ); } catch( IOException exception ) { throw new FlowException( "could not test file exists: " + path ); } }
private static FileSystem getFileSystem( Configuration config, Path path ) { try { return path.getFileSystem( config ); } catch( IOException exception ) { throw new FlowException( "unable to get handle to underlying filesystem", exception ); } }
public static FileSystem getDefaultFS( Configuration config ) { try { return FileSystem.get( config ); } catch( IOException exception ) { throw new FlowException( "unable to get handle to underlying filesystem", exception ); } }
public static LocalFileSystem getLocalFS( Configuration config ) { try { return FileSystem.getLocal( config ); } catch( IOException exception ) { throw new FlowException( "unable to get handle to underlying filesystem", exception ); } }
public static Object createProtectedObject( Class type, Object[] parameters, Class[] parameterTypes ) { try { Constructor constructor = type.getDeclaredConstructor( parameterTypes ); constructor.setAccessible( true ); return constructor.newInstance( parameters ); } catch( Exception exception ) { LOG.error( "unable to instantiate type: {}, with exception: {}", type.getName(), exception ); throw new FlowException( "unable to instantiate type: " + type.getName(), exception ); } }
@Override public boolean isSuccessful() { try { return super.isSuccessful(); } catch( NullPointerException exception ) { throw new FlowException( "Hadoop is not keeping a large enough job history, please increase the \'mapred.jobtracker.completeuserjobs.maximum\' property", exception ); } }
private String pack( Object object, Configuration conf ) { try { return serializeBase64( object, conf, true ); } catch( IOException exception ) { throw new FlowException( "unable to pack object: " + object.getClass().getCanonicalName(), exception ); } }
private String pack( Object object, Configuration conf ) { try { return serializeBase64( object, conf, true ); } catch( IOException exception ) { throw new FlowException( "unable to pack object: " + object.getClass().getCanonicalName(), exception ); } }
@Override public boolean isSuccessful() { try { return super.isSuccessful(); } catch( NullPointerException exception ) { throw new FlowException( "Hadoop is not keeping a large enough job history, please increase the \'mapred.jobtracker.completeuserjobs.maximum\' property", exception ); } }
public static String pack( Object object, Configuration conf ) { if( object == null ) return ""; try { return serializeBase64( object, conf, true ); } catch( IOException exception ) { throw new FlowException( "unable to pack object: " + object.getClass().getCanonicalName(), exception ); } }
public static String pack( Object object, Configuration conf ) { if( object == null ) return ""; try { return serializeBase64( object, conf, true ); } catch( IOException exception ) { throw new FlowException( "unable to pack object: " + object.getClass().getCanonicalName(), exception ); } }
private TezConfiguration getSourceConf( FlowProcess<TezConfiguration> flowProcess, TezConfiguration conf, String property ) { Map<String, String> priorConf; try { priorConf = (Map<String, String>) HadoopUtil.deserializeBase64( property, conf, HashMap.class, true ); } catch( IOException exception ) { throw new FlowException( "unable to deserialize properties", exception ); } return flowProcess.mergeMapIntoConfig( conf, priorConf ); }
private JobConf getSourceConf( HadoopFlowProcess flowProcess, JobConf conf, String property ) { Map<String, String> priorConf; try { priorConf = (Map<String, String>) HadoopUtil.deserializeBase64( property, conf, HashMap.class, true ); } catch( IOException exception ) { throw new FlowException( "unable to deserialize properties", exception ); } return flowProcess.mergeMapIntoConfig( conf, priorConf ); }
@Override protected void internalStart() { try { deleteSinksIfReplace(); deleteTrapsIfReplace(); } catch( IOException exception ) { throw new FlowException( "unable to delete sinks", exception ); } }
private JobConf getSourceConf( HadoopFlowProcess flowProcess, JobConf conf, String property ) { Map<String, String> priorConf; try { priorConf = (Map<String, String>) HadoopUtil.deserializeBase64( property, conf, HashMap.class, true ); } catch( IOException exception ) { throw new FlowException( "unable to deserialize properties", exception ); } return flowProcess.mergeMapIntoConfig( conf, priorConf ); }
@Override protected void internalStart() { try { deleteSinksIfReplace(); deleteTrapsIfReplace(); deleteCheckpointsIfReplace(); } catch( IOException exception ) { throw new FlowException( "unable to delete sinks", exception ); } }