Skip to content

Commit

Permalink
Several enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
siyuan0322 committed Sep 13, 2023
1 parent 85492a7 commit 1f92acc
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion charts/graphscope-store/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ javaOpts: ""

graphName: "graphscope"

rpcMaxBytesMb: 4
rpcMaxBytesMb: 20

engineType: "gaia"

Expand Down
2 changes: 1 addition & 1 deletion docs/storage_engine/groot.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ skip.header=true
load.after.build=true
# This is not required when load.after.build=true
# hadoop.endpoint=127.0.0.1:9000
# ```
```

Details of the parameters are listed below:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ public static void main(String[] args) throws IOException {
client.clearIngest(uniquePath);
throw ex;
}
try {
client.clearIngest(uniquePath);
} catch (Exception ex) {
logger.error("Clear ingest failed, ignored.");
}
}
}

Expand Down
1 change: 0 additions & 1 deletion interactive_engine/groot-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
<argument>com.alibaba.graphscope.groot.sdk.example.RealtimeWrite</argument>
</arguments>
<mainClass>com.alibaba.graphscope.groot.sdk.example.RealtimeWrite</mainClass>
<complianceLevel>1.11</complianceLevel>
<killAfter>-1</killAfter>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ private void recoverInternal() throws IOException, ExecutionException, Interrupt
this.graphDefRef.set(graphDef);
this.ready = true;
logger.info("SchemaManager recovered. version [" + graphDef.getVersion() + "]");
logger.info(graphDef.toProto().toString());
}

public void stop() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,11 @@ public void clearIngest(
int storeCount = this.metaService.getStoreCount();
AtomicInteger counter = new AtomicInteger(storeCount);
AtomicBoolean finished = new AtomicBoolean(false);
String dataPath = request.getDataPath();
for (int i = 0; i < storeCount; i++) {
this.storeIngestor.clearIngest(
i,
dataPath,
new CompletionCallback<Void>() {
@Override
public void onCompleted(Void res) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public void onCompleted() {}
});
}

public void storeClearIngest(CompletionCallback<Void> callback) {
public void storeClearIngest(String path, CompletionCallback<Void> callback) {
this.stub.storeClearIngest(
StoreClearIngestRequest.newBuilder().build(),
StoreClearIngestRequest.newBuilder().setDataPath(path).build(),
new StreamObserver<StoreClearIngestResponse>() {
@Override
public void onNext(StoreClearIngestResponse storeClearIngestResponse) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void ingest(
}

@Override
public void clearIngest(int storeId, CompletionCallback<Void> callback) {
this.getClient(storeId).storeClearIngest(callback);
public void clearIngest(int storeId, String path, CompletionCallback<Void> callback) {
this.getClient(storeId).storeClearIngest(path, callback);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ void ingest(
Map<String, String> config,
CompletionCallback<Void> callback);

void clearIngest(int storeId, CompletionCallback<Void> callback);
void clearIngest(int storeId, String path, CompletionCallback<Void> callback);
}
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ public boolean batchWrite(StoreDataBatch storeDataBatch)
long snapshotId = storeDataBatch.getSnapshotId();
List<Map<Integer, OperationBatch>> dataBatch = storeDataBatch.getDataBatch();
AtomicBoolean hasDdl = new AtomicBoolean(false);
int maxRetry = 10;
for (Map<Integer, OperationBatch> partitionToBatch : dataBatch) {
while (!shouldStop && partitionToBatch.size() != 0) {
while (!shouldStop && partitionToBatch.size() != 0 && maxRetry > 0) {
partitionToBatch = writeStore(snapshotId, partitionToBatch, hasDdl);
maxRetry--;
}
}
return hasDdl.get();
Expand Down Expand Up @@ -364,12 +366,11 @@ private void ingestDataInternal(
}

public void clearIngest(String dataPath) throws IOException {
String dataRoot = StoreConfig.STORE_DATA_PATH.get(storeConfigs);
if (dataPath == null || dataPath.isEmpty()) {
logger.warn("Must set a sub-path for clearing.");
return;
}

String dataRoot = StoreConfig.STORE_DATA_PATH.get(storeConfigs);
Path downloadPath = Paths.get(dataRoot, "download", dataPath);
try {
logger.info("Clearing directory {}", downloadPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public AbstractService makeGraphService(
ChannelFetcher channelFetcher =
new RpcChannelManagerFetcher(channelManager, executorCount, RoleType.GAIA_RPC);
com.alibaba.graphscope.common.config.Configs irConfigs = getConfigs();
logger.info("IR Config: {}", irConfigs);
logger.info("IR configs: {}", irConfigs);
IrMetaFetcher irMetaFetcher = new GrootMetaFetcher(schemaFetcher);
SnapshotUpdateCommitter updateCommitter = new SnapshotUpdateCommitter(channelManager);
int frontendId = CommonConfig.NODE_IDX.get(configs);
Expand Down
10 changes: 10 additions & 0 deletions interactive_engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@
</modules>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand Down Expand Up @@ -216,6 +223,9 @@
<exec.maven.version>3.0.0</exec.maven.version>
<scala.maven.version>3.2.2</scala.maven.version>
<cobertura.maven.version>2.7</cobertura.maven.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

<noe4j.version>4.4.0</noe4j.version>
</properties>

Expand Down

0 comments on commit 1f92acc

Please sign in to comment.