Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nizhikov committed Dec 22, 2024
1 parent f2ab882 commit e01d585
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.apache.ignite.internal.util.typedef.internal.U;
import org.jetbrains.annotations.Nullable;

import static org.apache.ignite.internal.processors.odbc.ClientListenerConnectionContext.MANAGEMENT_CLIENT_ATTR;
import static org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.MANAGEMENT_CLIENT_ATTR;

/**
* Adapter of new management API command for {@code control.sh} execution flow.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
import org.apache.ignite.internal.util.nio.GridNioSession;
import org.jetbrains.annotations.Nullable;

import static org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.MANAGEMENT_CLIENT_ATTR;

/**
* SQL listener connection context.
*/
public interface ClientListenerConnectionContext {
/** {@code True} if a management client. Internal operations will be available. */
String MANAGEMENT_CLIENT_ATTR = "ignite.internal.management-client";

/**
* @return Client type.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import org.apache.ignite.internal.processors.platform.client.ClientConnectionContext;
import org.apache.ignite.internal.processors.platform.client.ClientStatus;
import org.apache.ignite.internal.processors.security.OperationSecurityContext;
import org.apache.ignite.internal.processors.security.SecurityContext;
import org.apache.ignite.internal.util.GridSpinBusyLock;
import org.apache.ignite.internal.util.nio.GridNioFuture;
import org.apache.ignite.internal.util.nio.GridNioServerListenerAdapter;
Expand Down Expand Up @@ -76,6 +75,9 @@ public class ClientListenerNioListener extends GridNioServerListenerAdapter<Clie
/** Connection-related metadata key. */
public static final int CONN_CTX_META_KEY = GridNioSessionMetaKey.nextUniqueKey();

/** {@code True} if a management client. Internal operations will be available. */
public static final String MANAGEMENT_CLIENT_ATTR = "ignite.internal.management-client";

/** Connection shifted ID for management clients. */
public static final long MANAGEMENT_CONNECTION_SHIFTED_ID = -1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.ignite.plugin.security;

import org.apache.ignite.cluster.ClusterState;
import org.apache.ignite.internal.processors.odbc.ClientListenerConnectionContext;
import org.apache.ignite.internal.processors.odbc.ClientListenerNioListener;
import org.jetbrains.annotations.Nullable;

/**
Expand Down Expand Up @@ -122,7 +122,7 @@ public enum SecurityPermission {

/**
* Connect as a management client.
* @see ClientListenerConnectionContext#MANAGEMENT_CLIENT_ATTR
* @see ClientListenerNioListener#MANAGEMENT_CLIENT_ATTR
*/
CONNECT_AS_MAMAGEMENT_CLIENT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

import static org.apache.ignite.internal.GridKernalState.STARTED;
import static org.apache.ignite.internal.IgnitionEx.gridx;
import static org.apache.ignite.internal.processors.odbc.ClientListenerConnectionContext.MANAGEMENT_CLIENT_ATTR;
import static org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.MANAGEMENT_CLIENT_ATTR;
import static org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.MANAGEMENT_CONNECTION_SHIFTED_ID;
import static org.apache.ignite.internal.processors.odbc.ClientListenerProcessor.CLI_CONN_VIEW;
import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import static java.util.function.Function.identity;
import static java.util.stream.Collectors.toMap;
import static org.apache.ignite.client.Config.SERVER;
import static org.apache.ignite.internal.processors.odbc.ClientListenerConnectionContext.MANAGEMENT_CLIENT_ATTR;
import static org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.MANAGEMENT_CLIENT_ATTR;
import static org.apache.ignite.testframework.GridTestUtils.assertThrowsAnyCause;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
import static java.util.Collections.singletonMap;
import static org.apache.ignite.configuration.DataPageEvictionMode.RANDOM_LRU;
import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_EXPIRED;
import static org.apache.ignite.internal.processors.odbc.ClientListenerConnectionContext.MANAGEMENT_CLIENT_ATTR;
import static org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.MANAGEMENT_CLIENT_ATTR;
import static org.apache.ignite.internal.util.lang.GridFunc.t;
import static org.apache.ignite.plugin.security.SecurityPermission.CACHE_CREATE;
import static org.apache.ignite.plugin.security.SecurityPermission.CACHE_DESTROY;
Expand Down

0 comments on commit e01d585

Please sign in to comment.