Skip to content

Commit d912c3c

Browse files
committed
parent pom
1 parent 82fb644 commit d912c3c

9 files changed

Lines changed: 90 additions & 22 deletions

File tree

bin/ignite-web-agent-4.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
#
20+
# Router command line loader.
21+
#
22+
23+
#
24+
# Import common functions.
25+
#
26+
if [ "${IGNITE_HOME}" = "" ]; then
27+
IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")"
28+
else
29+
IGNITE_HOME_TMP=${IGNITE_HOME}
30+
fi
31+
32+
#
33+
# Set SCRIPTS_HOME - base path to scripts.
34+
#
35+
SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
36+
37+
source "${SCRIPTS_HOME}"/include/functions.sh
38+
39+
#
40+
# Discover IGNITE_HOME environment variable.
41+
#
42+
setIgniteHome
43+
44+
#
45+
# Set router service environment.
46+
#
47+
export DEFAULT_CONFIG="--config config/agents/4.properties"
48+
export MAIN_CLASS=org.apache.ignite.console.agent.AgentLauncher
49+
50+
#
51+
# Start router service.
52+
#
53+
. "${SCRIPTS_HOME}"/ignite.sh $@

modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2117,7 +2117,7 @@ public CacheConfiguration<K, V> setPartitionLossPolicy(PartitionLossPolicy partL
21172117
/**
21182118
* Sets query entities configuration. add@byron
21192119
*
2120-
* @param qryEntities Query entities.
2120+
* @param qryEntity Query entities.
21212121
* @return {@code this} for chaining.
21222122
*/
21232123
public CacheConfiguration<K, V> setQueryEntity(QueryEntity qryEntity) {

parent-internal/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<version>1.8</version>
6666
<dependencies>
6767
<dependency>
68-
<groupId>${project.groupId}</groupId>
68+
<groupId>org.apache.ignite</groupId>
6969
<artifactId>ignite-tools</artifactId>
7070
<version>${project.version}</version>
7171
</dependency>
@@ -85,6 +85,10 @@
8585
<plugin>
8686
<groupId>org.codehaus.mojo</groupId>
8787
<artifactId>flatten-maven-plugin</artifactId>
88+
<configuration>
89+
<embedBuildProfileDependencies>true</embedBuildProfileDependencies>
90+
<!-- 其他配置 -->
91+
</configuration>
8892
<executions>
8993
<!-- disable flattering for parent pom. -->
9094
<execution>

parent/pom.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@
489489
<version>${surefire.version}</version>
490490
<dependencies>
491491
<dependency>
492-
<groupId>${project.groupId}</groupId>
492+
<groupId>org.apache.ignite</groupId>
493493
<artifactId>ignite-tools</artifactId>
494494
<version>${ignite.version}</version>
495495
</dependency>
@@ -591,7 +591,10 @@
591591
<plugin>
592592
<groupId>org.codehaus.mojo</groupId>
593593
<artifactId>flatten-maven-plugin</artifactId>
594-
594+
<configuration>
595+
<embedBuildProfileDependencies>true</embedBuildProfileDependencies>
596+
<!-- 其他配置 -->
597+
</configuration>
595598
<executions>
596599
<!-- disable flattering for parent pom. -->
597600
<execution>

web-console/web-agent/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@
4747
<groupId>org.apache.tinkerpop</groupId>
4848
<artifactId>gremlin-groovy</artifactId>
4949
<version>${tinkerpop.version}</version>
50+
<scope>provided</scope>
5051
</dependency>
5152

5253
<dependency>
5354
<groupId>org.apache.tinkerpop</groupId>
5455
<artifactId>gremlin-driver</artifactId>
5556
<version>${tinkerpop.version}</version>
57+
<scope>provided</scope>
5658
</dependency>
5759

5860
<dependency>

web-console/web-agent/src/main/java/org/apache/ignite/console/agent/commandline/CommandsProviderExtImpl.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
import org.apache.ignite.client.IgniteClient;
3030
import org.apache.ignite.console.agent.IgniteClusterLauncher;
3131
import org.apache.ignite.console.agent.handlers.RestClusterHandler;
32-
import org.apache.ignite.internal.client.GridClient;
32+
3333

3434
import org.apache.ignite.internal.dto.IgniteDataTransferObject;
3535
import org.apache.ignite.internal.management.api.Argument;
3636
import org.apache.ignite.internal.management.api.Command;
3737
import org.apache.ignite.internal.management.api.CommandsProvider;
38-
import org.apache.ignite.internal.management.api.LocalCommand;
38+
import org.apache.ignite.internal.management.api.NativeCommand;
3939
import org.apache.ignite.internal.util.typedef.F;
4040
import org.apache.ignite.internal.util.typedef.internal.U;
4141
import org.jetbrains.annotations.Nullable;
@@ -55,7 +55,7 @@ public class CommandsProviderExtImpl implements CommandsProvider {
5555
}
5656

5757
/** */
58-
public static class NodeStartCommand implements LocalCommand<NodeStartCommandArg, Boolean> {
58+
public static class NodeStartCommand implements NativeCommand<NodeStartCommandArg, Boolean> {
5959
/** {@inheritDoc} */
6060
@Override public String description() {
6161
return "在当前Ignite进程内新启动一个名称为输入参数的Instance";
@@ -107,14 +107,14 @@ public static class NodeStartCommandArg extends IgniteDataTransferObject {
107107

108108

109109
/** {@inheritDoc} */
110-
@Override protected void writeExternalData(ObjectOutput out) throws IOException {
110+
@Override public void writeExternal(ObjectOutput out) throws IOException {
111111
U.writeString(out, instanceName);
112112
U.writeString(out, clusterId);
113113
U.writeString(out, cfgPath);
114114
}
115115

116116
/** {@inheritDoc} */
117-
@Override protected void readExternalData(ObjectInput in) throws IOException {
117+
@Override public void readExternal(ObjectInput in) throws IOException {
118118
instanceName = U.readString(in);
119119
clusterId = U.readString(in);
120120
cfgPath = U.readString(in);
@@ -152,7 +152,7 @@ public String cfgPath() {
152152
}
153153

154154
/** */
155-
public static class NodeStopCommand implements LocalCommand<NodeStopCommandArg, Boolean> {
155+
public static class NodeStopCommand implements NativeCommand<NodeStopCommandArg, Boolean> {
156156
/** {@inheritDoc} */
157157
@Override public String description() {
158158
return "在当前Ignite进程内新关闭一个名称为输入参数的Instance";
@@ -186,13 +186,13 @@ public static class NodeStopCommandArg extends IgniteDataTransferObject {
186186
private String clusterId; // UUID
187187

188188
/** {@inheritDoc} */
189-
@Override protected void writeExternalData(ObjectOutput out) throws IOException {
189+
@Override public void writeExternal(ObjectOutput out) throws IOException {
190190
U.writeString(out, instanceName);
191191
U.writeString(out, clusterId);
192192
}
193193

194194
/** {@inheritDoc} */
195-
@Override protected void readExternalData(ObjectInput in) throws IOException {
195+
@Override public void readExternal(ObjectInput in) throws IOException {
196196
instanceName = U.readString(in);
197197
clusterId = U.readString(in);
198198
}

web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/VisorQueryIndex.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ public List<VisorQueryIndexField> getFields() {
8686
}
8787

8888
/** {@inheritDoc} */
89-
@Override protected void writeExternalData(ObjectOutput out) throws IOException {
89+
@Override public void writeExternal(ObjectOutput out) throws IOException {
9090
U.writeString(out, name);
9191
U.writeEnum(out, type);
9292
U.writeCollection(out, fields);
9393
}
9494

9595
/** {@inheritDoc} */
96-
@Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
96+
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
9797
name = U.readString(in);
9898
type = QueryIndexType.fromOrdinal(in.readByte());
9999
fields = U.readList(in);

web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/VisorQueryIndexField.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,22 @@ public boolean getSortOrder() {
8888
}
8989

9090
/** {@inheritDoc} */
91-
@Override protected void writeExternalData(ObjectOutput out) throws IOException {
91+
@Override
92+
public void writeExternal(ObjectOutput out) throws IOException {
9293
U.writeString(out, name);
9394
out.writeBoolean(sort);
9495
}
9596

9697
/** {@inheritDoc} */
97-
@Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
98+
@Override
99+
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
98100
name = U.readString(in);
99101
sort = in.readBoolean();
100102
}
101103

102104
/** {@inheritDoc} */
103-
@Override public String toString() {
105+
@Override
106+
public String toString() {
104107
return S.toString(VisorQueryIndexField.class, this);
105108
}
106109
}

web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/DatabaseHandler.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import org.apache.ignite.IgniteLogger;
3232
import org.apache.ignite.Ignition;
33+
import org.apache.ignite.cache.CacheMode;
3334
import org.apache.ignite.console.agent.AgentConfiguration;
3435
import org.apache.ignite.console.agent.db.DBInfo;
3536
import org.apache.ignite.console.agent.db.DataSourceManager;
@@ -45,7 +46,6 @@
4546
import org.apache.ignite.console.websocket.TopologySnapshot;
4647
import org.apache.ignite.console.websocket.WebSocketRequest;
4748
import org.apache.ignite.internal.IgniteEx;
48-
import org.apache.ignite.internal.client.GridClientCacheMode;
4949
import org.apache.ignite.internal.processors.rest.client.message.GridClientCacheBean;
5050
import org.apache.ignite.internal.processors.rest.client.message.GridClientNodeBean;
5151
import org.apache.ignite.internal.util.typedef.F;
@@ -234,7 +234,7 @@ public Collection<DbTable> collectDbMetadata(WebSocketRequest evt) throws SQLExc
234234

235235
List<String> schemas = args.getJsonArray("schemas").getList();
236236

237-
if (schemas.size()==0)
237+
if (schemas.isEmpty())
238238
throw new IllegalArgumentException("Missing select schemas in arguments: " + args);
239239

240240
boolean tblsOnly = args.getBoolean("tablesOnly", false);
@@ -304,7 +304,7 @@ public Collection<GridClientCacheBean> schemas(DBInfo info) {
304304
Collection<String> schemas = dbMetaReader.schemas(conn, true);
305305
Collection<GridClientCacheBean> caches = new ArrayList<>();
306306
schemas.forEach((name)->{
307-
GridClientCacheBean cache = new GridClientCacheBean(name,GridClientCacheMode.REPLICATED,name);
307+
GridClientCacheBean cache = new GridClientCacheBean(name, CacheMode.REPLICATED,name);
308308
caches.add(cache);
309309
});
310310
return caches;
@@ -320,7 +320,8 @@ public boolean isDBCluster(String clusterId) {
320320
return clusterId!=null && databaseListener.isDBCluster(clusterId);
321321
}
322322

323-
public RestResult restCommand(String clusterId, JsonObject params) throws Throwable {
323+
@Override
324+
public RestResult restCommand(String clusterId, JsonObject params) throws Throwable {
324325
RestResult res = jdbcExecutor.sendRequest(clusterId, params);
325326
return res;
326327
}
@@ -329,7 +330,8 @@ public RestResult restCommand(String clusterId, JsonObject params) throws Throwa
329330
/**
330331
* @return Topology snapshot for demo cluster.
331332
*/
332-
public List<TopologySnapshot> topologySnapshot() {
333+
@Override
334+
public List<TopologySnapshot> topologySnapshot() {
333335
List<TopologySnapshot> tops = new LinkedList<>();
334336

335337
for (Entry<String, DBInfo> ent: databaseListener.clusters.entrySet()) {
@@ -384,6 +386,7 @@ public List<TopologySnapshot> topologySnapshot() {
384386
return tops;
385387
}
386388

389+
@Override
387390
public void close() {
388391
for (Entry<String, DBInfo> ent: databaseListener.clusters.entrySet()) {
389392
DBInfo info = ent.getValue();

0 commit comments

Comments
 (0)