protected AbstractIndexShardComponent(ShardId shardId, IndexSettings indexSettings) { this.shardId = shardId; this.indexSettings = indexSettings; this.logger = Loggers.getLogger(getClass(), shardId); this.deprecationLogger = new DeprecationLogger(logger); }
/** * Constructs a new index component, with the index name and its settings. */ protected AbstractIndexComponent(IndexSettings indexSettings) { this.logger = Loggers.getLogger(getClass(), indexSettings.getIndex()); this.deprecationLogger = new DeprecationLogger(logger); this.indexSettings = indexSettings; }
analyzerProviders = new HashMap<>(analyzerProviders); Logger logger = LogManager.getLogger(getClass()); DeprecationLogger deprecationLogger = new DeprecationLogger(logger); Map<String, NamedAnalyzer> analyzerAliases = new HashMap<>(); Map<String, NamedAnalyzer> analyzers = new HashMap<>();
public AbstractComponent(Settings settings, Class customClass) { this.logger = LogManager.getLogger(customClass); this.deprecationLogger = new DeprecationLogger(logger); this.settings = settings; }
public AbstractComponent(Settings settings, Class customClass) { this.logger = LogManager.getLogger(customClass); this.deprecationLogger = new DeprecationLogger(logger); this.settings = settings; }
public AbstractComponent(Settings settings) { this.logger = LogManager.getLogger(getClass()); this.deprecationLogger = new DeprecationLogger(logger); this.settings = settings; }
double deletesPctAllowed = indexSettings.getValue(INDEX_MERGE_POLICY_DELETES_PCT_ALLOWED_SETTING); this.mergesEnabled = indexSettings.getSettings().getAsBooleanLenientForPreEs6Indices(indexSettings.getIndexVersionCreated(), INDEX_MERGE_ENABLED, true, new DeprecationLogger(logger)); if (mergesEnabled == false) { logger.warn("[{}] is set to false, this should only be used in tests and can cause serious problems in production" +
protected AbstractIndexShardComponent(ShardId shardId, IndexSettings indexSettings) { this.shardId = shardId; this.indexSettings = indexSettings; this.logger = Loggers.getLogger(getClass(), shardId); this.deprecationLogger = new DeprecationLogger(logger); }
public AbstractComponent(Settings settings) { this.logger = Loggers.getLogger(getClass(), settings); this.deprecationLogger = new DeprecationLogger(logger); this.settings = settings; }
public TypeParser() { Logger logger = Loggers.getLogger(getClass()); this.deprecationLogger = new DeprecationLogger(logger); }
static void checkConfigExtension(String extension) { if (".yaml".equals(extension) || ".json".equals(extension)) { final DeprecationLogger deprecationLogger = new DeprecationLogger(Loggers.getLogger(Bootstrap.class)); deprecationLogger.deprecated("elasticsearch{} is deprecated; rename your configuration file to elasticsearch.yml", extension); } }
public NativeScriptEngineService(Settings settings, Map<String, NativeScriptFactory> scripts) { super(settings); if (scripts.isEmpty() == false) { Logger logger = Loggers.getLogger(ScriptModule.class); DeprecationLogger deprecationLogger = new DeprecationLogger(logger); deprecationLogger.deprecated("Native scripts are deprecated. Use a custom ScriptEngine to write scripts in java."); } this.scripts = unmodifiableMap(scripts); }
@Inject public MissingQueryParser() { ESLogger logger = Loggers.getLogger(getClass()); deprecationLogger = new DeprecationLogger(logger); }
protected AbstractIndexShardComponent(ShardId shardId, IndexSettings indexSettings) { this.shardId = shardId; this.indexSettings = indexSettings; this.logger = Loggers.getLogger(getClass(), this.indexSettings.getSettings(), shardId); this.deprecationLogger = new DeprecationLogger(logger); }
private void logDeprecation() { if (deprecationEmitted == false) { Logger logger = Loggers.getLogger(getClass()); DeprecationLogger deprecationLogger = new DeprecationLogger(logger); deprecationLogger.deprecated("Using _index is deprecated. Create a custom ScriptEngine to access index internals."); deprecationEmitted = true; } }
/** * Constructs a new index component, with the index name and its settings. */ protected AbstractIndexComponent(IndexSettings indexSettings) { this.logger = Loggers.getLogger(getClass(), indexSettings.getIndex()); this.deprecationLogger = new DeprecationLogger(logger); this.indexSettings = indexSettings; }
/** * Constructs a new index component, with the index name and its settings. */ protected AbstractIndexComponent(IndexSettings indexSettings) { this.logger = Loggers.getLogger(getClass(), indexSettings.getSettings(), indexSettings.getIndex()); this.deprecationLogger = new DeprecationLogger(logger); this.indexSettings = indexSettings; }
/** * We have to lazy initialize the deprecation logger as otherwise a static logger here would be constructed before logging is configured * leading to a runtime failure (see {@link LogConfigurator#checkErrorListener()} ). The premature construction would come from any * {@link Setting} object constructed in, for example, {@link org.elasticsearch.env.Environment}. */ static class DeprecationLoggerHolder { static DeprecationLogger deprecationLogger = new DeprecationLogger(Loggers.getLogger(Settings.class)); }
private static Boolean parseBoolean(String key, String value) { // let the parser handle all cases for non-proper booleans without a deprecation warning by throwing IAE boolean booleanValue = Booleans.parseBooleanExact(value); if (Booleans.isStrictlyBoolean(value) == false) { DeprecationLogger deprecationLogger = new DeprecationLogger(Loggers.getLogger(Setting.class)); deprecationLogger.deprecated("Expected a boolean [true/false] for setting [{}] but got [{}]", key, value); } return booleanValue; }
/** Logs a deprecation warning if the setting is deprecated and used. */ protected void checkDeprecation(Settings settings) { // They're using the setting, so we need to tell them to stop if (this.isDeprecated() && this.exists(settings) && settings.addDeprecatedSetting(this)) { // It would be convenient to show its replacement key, but replacement is often not so simple final DeprecationLogger deprecationLogger = new DeprecationLogger(Loggers.getLogger(getClass())); deprecationLogger.deprecated("[{}] setting was deprecated in Elasticsearch and will be removed in a future release! " + "See the breaking changes documentation for the next major version.", getKey()); } }