Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorg groot #887

Merged
merged 30 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ jobs:

- name: gremlin-test
run: |
cd interactive_engine/src/v2
cd interactive_engine/src/servers
mvn test -Pgremlin-test

- uses: actions/upload-artifact@v2
Expand Down
110 changes: 55 additions & 55 deletions interactive_engine/distribution/pom.xml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>maxgraph-parent</artifactId>
<groupId>com.alibaba.maxgraph</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>maxgraph-parent</artifactId>
<groupId>com.alibaba.maxgraph</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>distribution</artifactId>
<artifactId>distribution</artifactId>

<dependencies>
<dependency>
<groupId>com.alibaba.maxgraph</groupId>
<artifactId>v2</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.maxgraph</groupId>
<artifactId>maxgraph-executor</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.maxgraph</groupId>
<artifactId>data_load_tools</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!--<dependency>-->
<!--<groupId>com.alibaba.maxgraph</groupId>-->
<!--<artifactId>gaia-adaptor</artifactId>-->
<!--<version>${project.parent.version}</version>-->
<!--</dependency>-->
</dependencies>
<dependencies>
<dependency>
<groupId>com.alibaba.maxgraph</groupId>
<artifactId>servers</artifactId>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a more specific and self-described name would be better?
i.e., groot-server.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.maxgraph</groupId>
<artifactId>maxgraph-executor</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.maxgraph</groupId>
<artifactId>data_load_tools</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!--<dependency>-->
<!--<groupId>com.alibaba.maxgraph</groupId>-->
<!--<artifactId>gaia-adaptor</artifactId>-->
<!--<version>${project.parent.version}</version>-->
<!--</dependency>-->
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<finalName>maxgraph</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<finalName>maxgraph</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
40 changes: 7 additions & 33 deletions interactive_engine/distribution/src/bin/store_ctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ cat <<END
max_node_gaia start max_node of gaia
max_node_maxgraph start max_node of maxgraph
maxgraph start maxgraph with v2
admin_tools start admin_tools of v2
load_tools start load_tools of maxgraph
END
}
Expand Down Expand Up @@ -78,37 +77,13 @@ max_node() {
type=$1; shift
_setup_maxgraph_env

if [[ "${type}" == "gaia" ]]; then
java -server \
-Dlogback.configurationFile="${MAXGRAPH_LOGBACK_FILE}" \
-Dconfig.file="${MAXGRAPH_CONF_FILE}" \
-Dlog.dir="${LOG_DIR}" \
-Dlog.name="${LOG_NAME}" \
-cp "${libpath}" com.alibaba.graphscope.gaia.MaxNode \
"$@" > >(tee -a "${LOG_DIR}/${LOG_NAME}.out") 2> >(tee -a "${LOG_DIR}/${LOG_NAME}.err" >&2)
else
java -server \
-Dlogback.configurationFile="${MAXGRAPH_LOGBACK_FILE}" \
-Dconfig.file="${MAXGRAPH_CONF_FILE}" \
-Dlog.dir="${LOG_DIR}" \
-Dlog.name="${LOG_NAME}" \
-cp "${libpath}" com.alibaba.maxgraph.v2.MaxNode \
"$@" > >(tee -a "${LOG_DIR}/${LOG_NAME}.out") 2> >(tee -a "${LOG_DIR}/${LOG_NAME}.err" >&2)
fi
}

# start admin_tools of v2
admin_tools() {
_setup_maxgraph_env

java_opt="-server ${MAXGRAPH_JAVA_OPTS}"
java ${java_opt} \
-Dlogback.configurationFile="${MAXGRAPH_LOGBACK_FILE}" \
-Dconfig.file="${MAXGRAPH_CONF_FILE}" \
-Dlog.dir="${LOG_DIR}" \
-Dlog.name="${LOG_NAME}" \
-cp "${libpath}" com.alibaba.maxgraph.v2.AdminTools \
"$@" > >(tee -a "${LOG_DIR}/${LOG_NAME}.out") 2> >(tee -a "${LOG_DIR}/${LOG_NAME}.err" >&2)
java -server \
-Dlogback.configurationFile="${MAXGRAPH_LOGBACK_FILE}" \
-Dconfig.file="${MAXGRAPH_CONF_FILE}" \
-Dlog.dir="${LOG_DIR}" \
-Dlog.name="${LOG_NAME}" \
-cp "${libpath}" com.alibaba.maxgraph.servers.MaxNode \
"$@" > >(tee -a "${LOG_DIR}/${LOG_NAME}.out") 2> >(tee -a "${LOG_DIR}/${LOG_NAME}.err" >&2)
}

load_tools() {
Expand Down Expand Up @@ -159,7 +134,6 @@ while test $# -ne 0; do
max_node_gaia) max_node "gaia" "$@"; exit;;
max_node_maxgraph) max_node "maxgraph" "$@"; exit;;
maxgraph) maxgraph "$@"; exit;;
admin_tools) admin_tools "$@"; exit;;
load_tools) load_tools "$@"; exit;;
*)
echo "unrecognized option or command '${arg}'"
Expand Down
3 changes: 1 addition & 2 deletions interactive_engine/distribution/src/conf/config.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ingestor.node.count=2
coordinator.node.count=1
ingestor.queue.count=2
partition.count=8
engine.type=pegasus
engine.type=maxgraph
discovery.mode=zookeeper

## Ingestor Config
Expand All @@ -34,7 +34,6 @@ kafka.servers=graph_env:9092
kafka.topic=graph_test

## Frontend Config
graph.store.type=maxgraph
gremlin.server.port=12312

executor.worker.per.process=2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
/**
* Copyright 2020 Alibaba Group Holding Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
*
* <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.maxgraph.groot.sdk;
package com.alibaba.maxgraph.sdkcommon.common;

import com.alibaba.maxgraph.proto.v2.DataLoadTargetPb;
import com.alibaba.maxgraph.proto.DataLoadTargetPb;

public class DataLoadTarget {
private String label;
Expand All @@ -26,7 +24,13 @@ public class DataLoadTarget {
private int srcLabelId;
private int dstLabelId;

private DataLoadTarget(String label, String srcLabel, String dstLabel, int labelId, int srcLabelId, int dstLabelId) {
private DataLoadTarget(
String label,
String srcLabel,
String dstLabel,
int labelId,
int srcLabelId,
int dstLabelId) {
this.label = label;
this.srcLabel = srcLabel;
this.dstLabel = dstLabel;
Expand Down Expand Up @@ -60,7 +64,7 @@ public int getDstLabelId() {
return dstLabelId;
}

public DataLoadTargetPb toProto(){
public DataLoadTargetPb toProto() {
DataLoadTargetPb.Builder builder = DataLoadTargetPb.newBuilder();
builder.setLabel(this.label);
builder.setLabelId(this.labelId);
Expand All @@ -87,11 +91,17 @@ public static DataLoadTarget parseProto(DataLoadTargetPb proto) {

@Override
public String toString() {
return "DataLoadTarget{" +
"label='" + label + '\'' +
", srcLabel='" + srcLabel + '\'' +
", dstLabel='" + dstLabel + '\'' +
'}';
return "DataLoadTarget{"
+ "label='"
+ label
+ '\''
+ ", srcLabel='"
+ srcLabel
+ '\''
+ ", dstLabel='"
+ dstLabel
+ '\''
+ '}';
}

public static Builder newBuilder() {
Expand All @@ -111,9 +121,7 @@ public static class Builder {
private String dstVertexLabel;
private int dstVertexLabelId;

private Builder() {

}
private Builder() {}

private Builder(DataLoadTarget target) {
this.label = target.getLabel();
Expand Down Expand Up @@ -155,7 +163,12 @@ public Builder setDstLabelId(int dstVertexLabelId) {
}

public DataLoadTarget build() {
return new DataLoadTarget(label, srcVertexLabel, dstVertexLabel, labelId, srcVertexLabelId,
return new DataLoadTarget(
label,
srcVertexLabel,
dstVertexLabel,
labelId,
srcVertexLabelId,
dstVertexLabelId);
}
}
Expand Down
Loading