try { DynConstructors.Ctor<DoFn<Object, Object>> ctor = new DynConstructors.Builder(DoFn.class) .loader(loader) .impl(transform)
try { DynConstructors.Ctor<DoFn<Record, Record>> ctor = new DynConstructors.Builder(DoFn.class) .loader(loaderForJars(jars)) .impl(transform)
try { DynConstructors.Ctor<DoFn<Record, Record>> ctor = new DynConstructors.Builder(DoFn.class) .loader(loaderForJars(jars)) .impl(transform)
try { DynConstructors.Ctor<DoFn<Record, Record>> ctor = new DynConstructors.Builder(DoFn.class) .loader(loaderForJars(jars)) .impl(transform)
public Builder ctorImpl(Class<?> targetClass, Class<?>... argClasses) { // don't do any work if an implementation has been found if (method != null) { return this; } try { this.method = new DynConstructors.Builder() .impl(targetClass, argClasses) .buildChecked(); } catch (NoSuchMethodException e) { // not the right implementation } return this; }
public Builder ctorImpl(String className, Class<?>... argClasses) { // don't do any work if an implementation has been found if (method != null) { return this; } try { this.method = new DynConstructors.Builder() .impl(className, argClasses) .buildChecked(); } catch (NoSuchMethodException e) { // not the right implementation } return this; }
public Builder ctorImpl(String className, Class<?>... argClasses) { // don't do any work if an implementation has been found if (method != null) { return this; } try { this.method = new DynConstructors.Builder() .impl(className, argClasses) .buildChecked(); } catch (NoSuchMethodException e) { // not the right implementation } return this; }
public Builder ctorImpl(Class<?> targetClass, Class<?>... argClasses) { // don't do any work if an implementation has been found if (method != null) { return this; } try { this.method = new DynConstructors.Builder() .impl(targetClass, argClasses) .buildChecked(); } catch (NoSuchMethodException e) { // not the right implementation } return this; }
private static Class<?> findTypeInfoClass(String className) { try { return new DynConstructors.Builder(TypeInfo.class) .impl(className).buildChecked().getConstructedClass(); } catch (NoSuchMethodException e) { return null; } }
private synchronized static void checkHiveDependencies() { if (Loader.HIVE_CONF == null) { // check that Hive is available by resolving the HiveConf constructor // this is also needed by newHiveConf(Configuration) Loader.HIVE_CONF = new DynConstructors.Builder() .impl("org.apache.hadoop.hive.conf.HiveConf", Configuration.class, Class.class) .build(); } }
public static <K, V> FileInputFormat<K, V> newInputFormatInstance( DatasetDescriptor descriptor) { DynConstructors.Ctor<FileInputFormat<K, V>> ctor = new DynConstructors.Builder() .impl(descriptor.getProperty(INPUT_FORMAT_CLASS_PROP)) .build(); return ctor.newInstance(); }
private static Class<?> findTypeInfoClass(String className) { try { return new DynConstructors.Builder(TypeInfo.class) .impl(className).buildChecked().getConstructedClass(); } catch (NoSuchMethodException e) { return null; } }
private synchronized static void checkHiveDependencies() { if (Loader.HIVE_CONF == null) { // check that Hive is available by resolving the HiveConf constructor // this is also needed by newHiveConf(Configuration) Loader.HIVE_CONF = new DynConstructors.Builder() .impl("org.apache.hadoop.hive.conf.HiveConf", Configuration.class, Class.class) .build(); } }