Move PainlessExecuteAction into action package (#40752)
This commit is contained in:
parent
7c27e5f243
commit
a042b22d24
|
@ -32,6 +32,7 @@ import org.elasticsearch.common.settings.Setting;
|
|||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.settings.SettingsFilter;
|
||||
import org.elasticsearch.painless.action.PainlessContextAction;
|
||||
import org.elasticsearch.painless.action.PainlessExecuteAction;
|
||||
import org.elasticsearch.painless.spi.PainlessExtension;
|
||||
import org.elasticsearch.painless.spi.Whitelist;
|
||||
import org.elasticsearch.painless.spi.WhitelistLoader;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.painless;
|
||||
package org.elasticsearch.painless.action;
|
||||
|
||||
import org.apache.lucene.analysis.Analyzer;
|
||||
import org.apache.lucene.index.DirectoryReader;
|
||||
|
@ -95,7 +95,7 @@ import static org.elasticsearch.rest.RestRequest.Method.POST;
|
|||
|
||||
public class PainlessExecuteAction extends Action<PainlessExecuteAction.Response> {
|
||||
|
||||
static final PainlessExecuteAction INSTANCE = new PainlessExecuteAction();
|
||||
public static final PainlessExecuteAction INSTANCE = new PainlessExecuteAction();
|
||||
private static final String NAME = "cluster:admin/scripts/painless/execute";
|
||||
|
||||
private PainlessExecuteAction() {
|
||||
|
@ -593,9 +593,9 @@ public class PainlessExecuteAction extends Action<PainlessExecuteAction.Response
|
|||
}
|
||||
}
|
||||
|
||||
static class RestAction extends BaseRestHandler {
|
||||
public static class RestAction extends BaseRestHandler {
|
||||
|
||||
RestAction(Settings settings, RestController controller) {
|
||||
public RestAction(Settings settings, RestController controller) {
|
||||
super(settings);
|
||||
controller.registerHandler(GET, "/_scripts/painless/_execute", this);
|
||||
controller.registerHandler(POST, "/_scripts/painless/_execute", this);
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
package org.elasticsearch.painless;
|
||||
|
||||
import org.elasticsearch.painless.PainlessExecuteAction.PainlessTestScript;
|
||||
import org.elasticsearch.painless.action.PainlessExecuteAction.PainlessTestScript;
|
||||
import org.elasticsearch.painless.lookup.PainlessLookupBuilder;
|
||||
import org.elasticsearch.painless.spi.Whitelist;
|
||||
import org.objectweb.asm.util.Textifier;
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.elasticsearch.painless.PainlessExecuteAction.PainlessTestScript;
|
||||
import static org.elasticsearch.painless.action.PainlessExecuteAction.PainlessTestScript;
|
||||
import static org.elasticsearch.painless.node.SSource.MainMethodReserved;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
|
||||
|
|
|
@ -16,15 +16,16 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.painless;
|
||||
package org.elasticsearch.painless.action;
|
||||
|
||||
import org.elasticsearch.common.bytes.BytesArray;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.query.MatchQueryBuilder;
|
||||
import org.elasticsearch.painless.PainlessExecuteAction.Request;
|
||||
import org.elasticsearch.painless.PainlessExecuteAction.Response;
|
||||
import org.elasticsearch.painless.PainlessPlugin;
|
||||
import org.elasticsearch.painless.action.PainlessExecuteAction.Request;
|
||||
import org.elasticsearch.painless.action.PainlessExecuteAction.Response;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.script.Script;
|
||||
import org.elasticsearch.script.ScriptException;
|
||||
|
@ -39,7 +40,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import static java.util.Collections.singletonMap;
|
||||
import static org.elasticsearch.painless.PainlessExecuteAction.TransportAction.innerShardOperation;
|
||||
import static org.elasticsearch.painless.action.PainlessExecuteAction.TransportAction.innerShardOperation;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class PainlessExecuteApiTests extends ESSingleNodeTestCase {
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.painless;
|
||||
package org.elasticsearch.painless.action;
|
||||
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
|
@ -30,7 +30,7 @@ import org.elasticsearch.common.xcontent.XContentParser;
|
|||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.query.MatchAllQueryBuilder;
|
||||
import org.elasticsearch.index.query.QueryBuilder;
|
||||
import org.elasticsearch.painless.PainlessExecuteAction.Request.ContextSetup;
|
||||
import org.elasticsearch.painless.action.PainlessExecuteAction.Request.ContextSetup;
|
||||
import org.elasticsearch.script.Script;
|
||||
import org.elasticsearch.script.ScriptContext;
|
||||
import org.elasticsearch.script.ScriptType;
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.painless;
|
||||
package org.elasticsearch.painless.action;
|
||||
|
||||
import org.elasticsearch.test.AbstractStreamableTestCase;
|
||||
|
|
@ -24,7 +24,7 @@ import org.elasticsearch.painless.FeatureTest;
|
|||
import org.elasticsearch.painless.Locals.Variable;
|
||||
import org.elasticsearch.painless.Location;
|
||||
import org.elasticsearch.painless.Operation;
|
||||
import org.elasticsearch.painless.PainlessExecuteAction.PainlessTestScript;
|
||||
import org.elasticsearch.painless.action.PainlessExecuteAction.PainlessTestScript;
|
||||
import org.elasticsearch.painless.ScriptClassInfo;
|
||||
import org.elasticsearch.painless.antlr.Walker;
|
||||
import org.elasticsearch.painless.lookup.PainlessCast;
|
||||
|
|
Loading…
Reference in New Issue