Gets a reference to the underlying delegate used by this OutputFormat.

@param conf the configuration to derive the delegate from.
@return the underlying wrapped delegate.
@throws IOException if unable to get the delegate.
334621
@SuppressWarnings("unchecked")
  protected synchronized FileOutputFormat<K, V> getDelegate(Configuration conf) throws IOException {
    if (delegate == null) {
      delegate = BigQueryOutputConfiguration.getFileOutputFormat(conf);
      logger.atInfo().log("Delegating functionality to '%s'.", delegate.getClass().getSimpleName());
    }
    return delegate;
  }
802801
public static VcfHeader header(final File file) throws IOException {
        checkNotNull(file);
        // could also use Files.asCharSource(file, Charsets.UTF_8).openBufferedStream()
        try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
            return header(reader);
        }
    }
114620
public OvhReverseDelegation ip_delegation_target_GET(String ip, String target) throws IOException {
		String qPath = "/ip/{ip}/delegation/{target}";
		StringBuilder sb = path(qPath, ip, target);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhReverseDelegation.class);
	}
1195763
public static Class<? extends CobolComplexType> getInputKeyRecordType(Configuration conf) {
      return conf.getClass(CONF_INPUT_KEY_RECORD_TYPE, null, CobolComplexType.class);
    }
106433
public RecordWriter<K,VariantContextWritable> getRecordWriter(
			TaskAttemptContext ctx, Path out)
		throws IOException
	{
		if (this.header == null)
			throw new IOException(
				"Can't create a RecordWriter without the VCF header");

		final boolean wh = ctx.getConfiguration().getBoolean(
			WRITE_HEADER_PROPERTY, true);

		switch (format) {
			case BCF: return new KeyIgnoringBCFRecordWriter<K>(out,header,wh,ctx);
			case VCF: return new KeyIgnoringVCFRecordWriter<K>(out,header,wh,ctx);
			default: assert false; return null;
		}
	}
1181582
public static <T extends VersionedProtocol> T getProxy(
      Class<T> protocol,
      long clientVersion, InetSocketAddress addr,
      Configuration conf, SocketFactory factory) throws IOException {
    return getProtocolProxy(protocol, clientVersion,
        addr, conf, factory).getProxy();
  }
1198316
public static LocalFileSystem getLocal(Configuration conf)
    throws IOException {
    return (LocalFileSystem)get(LocalFileSystem.NAME, conf);
  }
1116379
public static String drpcPids(Map conf) throws IOException {
        String ret = drpc_local_dir(conf) + FILE_SEPERATEOR + "pids";
        try {
            FileUtils.forceMkdir(new File(ret));
        } catch (IOException e) {
            LOG.error("Failed to create dir " + ret, e);
            throw e;
        }
        return ret;
    }
1097067
@Override
    public VirtualConnectionFactory getOutboundVCFactory() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "getOutboundVCFactory");
        }

        // Handle case where existing vcf has been destroyed.
        if (vcf != null) {
            OutboundVirtualConnectionFactoryImpl outboundVCF = (OutboundVirtualConnectionFactoryImpl) vcf;
            if (outboundVCF.getRefCount() == 0) {
                // VCF has been destroyed.
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Found destroyed vcf, nulling it out to build another");
                }
                vcf = null;
            }
        }

        // Check to see if a vcf already exists.
        if (vcf == null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Existing vcf not available.  Build one.");
            }
            // Determine if the outbound chain already exists.
            if (outboundChainData != null) {
                // The outbound chain has already been created. Use its name.
                try {
                    vcf = framework.getOutboundVCFactory(outboundChainData.getName());
                } catch (Exception e) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "Caught exception while getting VCFactory: " + e);
                    }
                    vcf = null;
                }
            } else {
                // The outbound chain data does NOT exist.
                try {
                    // This method will end up calling setOutboundVCFactory to assign
                    // a valid value to vcf.
                    // This method will also call setOutboundChainData.
                    this.framework.prepareEndPoint(this);
                } catch (ChannelFrameworkException e) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "Caught exception while preparing CFEndPoint: " + e);
                    }
                    this.vcf = null;
                }
            }
        } else {
            OutboundVirtualConnectionFactoryImpl outboundVCF = (OutboundVirtualConnectionFactoryImpl) vcf;
            outboundVCF.incrementRefCount();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Found an existing VCF, updating the ref count to " + outboundVCF.getRefCount());
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "getOutboundVCFactory");
        }
        return vcf;
    }
624786
public JavacFiler getJavacFiler(Object filer) {
		if (filer instanceof JavacFiler) return (JavacFiler) filer;
		
		// try to find a "delegate" field in the object, and use this to check for a JavacFiler
		for (Class<?> filerClass = filer.getClass(); filerClass != null; filerClass = filerClass.getSuperclass()) {
			try {
				return getJavacFiler(tryGetDelegateField(filerClass, filer));
			} catch (final Exception e) {
				// delegate field was not found, try on superclass
			}
		}
		
		processingEnv.getMessager().printMessage(Kind.WARNING,
			"Can't get a JavacFiler from " + filer.getClass().getName() + ". Lombok won't work.");
		return null;
	}
102997
public long getSaving(Configuration conf) {
    try {
      DFSClient dfs = ((DistributedFileSystem)FileSystem.get(conf)).getClient();
      Counters raidedCounters = stateToSourceCounters.get(RaidState.RAIDED);
      long physical = raidedCounters.getNumBytes() +
          parityCounters.getNumBytes();
      long logical = raidedCounters.getNumLogical();
      return logical * dfs.getDefaultReplication() - physical;
    } catch (Exception e) {
      return -1;
    }
  }
969674
public static Object readObject(DataInput in, Configuration conf)
    throws IOException {
    return readObject(in, null, conf);
  }
378745
public static IHttpCredentialsPlugin GetUiHttpCredentialsPlugin(Map conf) {
        String klassName = (String) conf.get(Config.UI_HTTP_CREDS_PLUGIN);
        return AuthUtils.GetHttpCredentialsPlugin(conf, klassName);
    }
726840
@Override
  public String toFormattedString(Field f) throws IOException {
    return this.getClass().getName() + " " + f.name();
  }
99095
@VisibleForTesting
    public final Configuration getConfig(final File configFile) throws IOException {
        try (FileInputStream in = new FileInputStream(configFile)) {
            return getConfig(configFile, in);
        }
    }
97287
public static Path getOutputPath(JobConf conf) {
    String name = conf.get("mapred.output.dir");
    return name == null ? null: new Path(name);
  }
708387
static ConverterFactory getConverterFactory(Configuration conf) {
    Class<? extends ConverterFactory> converterFactoryClass = conf.getClass(CONVERTER_FACTORY, null,
        ConverterFactory.class);
    if (converterFactoryClass == null) {
      throw new RuntimeException("ConverterFactory class was not set on the configuration");
    }
    LOG.debug("Got input ConverterFactory class from conf: {}", converterFactoryClass);
    return ReflectionUtils.newInstance(converterFactoryClass, conf);
  }