static void init(Settings settings, Log log) { InitializationUtils.checkIdForOperation(settings); InitializationUtils.setFieldExtractorIfNotSet(settings, HiveFieldExtractor.class, log); try { InitializationUtils.discoverEsVersion(settings, log); } catch (IOException ex) { throw new EsHadoopIllegalStateException("Cannot discover Elasticsearch version", ex); } }
static Settings addDefaultsToSettings( Properties flowProperties, Properties tapProperties, Log log) { Settings settings = HadoopSettingsManager.loadFrom(CascadingUtils.extractOriginalProperties(flowProperties)) .merge(tapProperties); InitializationUtils.discoverNodesIfNeeded(settings, log); InitializationUtils.filterNonClientNodesIfNeeded(settings, log); InitializationUtils.discoverEsVersion(settings, log); InitializationUtils.setValueWriterIfNotSet(settings, CascadingValueWriter.class, log); InitializationUtils.setValueReaderIfNotSet(settings, JdkValueReader.class, log); InitializationUtils.setBytesConverterIfNeeded( settings, CascadingLocalBytesConverter.class, log); InitializationUtils.setFieldExtractorIfNotSet(settings, CascadingFieldExtractor.class, log); return settings; }