Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@ name: Java CI with Maven

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK 1.11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 1.11
java-version: "11"
distribution: temurin
- name: Build with Maven
run: mvn -B package --file pom.xml
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# MorphStream

![Java CI with Maven](https://github.com/intellistream/MorphStream/workflows/Java%20CI%20with%20Maven/badge.svg?branch=master)
![Java CI with Maven](https://github.com/DataSysResearch/MorphStream/actions/workflows/maven.yml/badge.svg?branch=main)

- This project aims at building a scalable transactional stream processing engine on modern hardware. It allows ACID
transactions to be run directly on streaming data. It shares similar project vision with
Expand All @@ -12,7 +12,7 @@
- MorphStream is built based on our previous work of TStream (ICDE'20) but with significant changes: the codebase are
exclusive.
- The code is still under active development and more features will be introduced. We are also actively maintaining the
project [wiki](https://github.com/intellistream/MorphStream/wiki). Please checkout it for more detailed desciptions.
project [wiki](https://github.com/DataSysResearch/MorphStream/wiki). Please check it for more detailed descriptions.
- We welcome your contributions, if you are interested to contribute to the project, please fork and submit a PR.

## How to Cite MorphStream
Expand Down Expand Up @@ -71,7 +71,7 @@ If you use MorphStream in your paper, please cite our work.
bibtex_show = {true},
selected = {true},
pdf = {papers/MorphStream.pdf},
code = {https://github.com/intellistream/MorphStream},
code = {https://github.com/DataSysResearch/MorphStream},
tag = {full paper}
}
@inproceedings{zhang2020towards,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package intellistream.morphstream.common.io.Rdma.Msg;

import intellistream.morphstream.common.io.Rdma.RdmaUtils.Block.RdmaShuffleManagerId;
import javafx.util.Pair;
import intellistream.morphstream.common.util.Pair;

import java.io.DataInputStream;
import java.io.DataOutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import intellistream.morphstream.common.io.Rdma.ByteBufferBackedInputStream;
import intellistream.morphstream.common.io.Rdma.RdmaByteBufferManagedBuffer;
import javafx.util.Pair;
import intellistream.morphstream.common.util.Pair;

import java.io.DataInputStream;
import java.io.DataOutputStream;
Expand Down Expand Up @@ -66,4 +66,3 @@ enum RdmaRpcMsgType {

}


Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package intellistream.morphstream.common.io.Rdma.Msg;

import intellistream.morphstream.common.io.Rdma.RdmaUtils.Block.RdmaShuffleManagerId;
import javafx.util.Pair;
import intellistream.morphstream.common.util.Pair;

import java.io.DataInputStream;
import java.io.DataOutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import intellistream.morphstream.common.io.Rdma.RdmaUtils.Block.RdmaShuffleManagerId;
import intellistream.morphstream.common.io.Rdma.RdmaUtils.Stats.RdmaShuffleReaderStats;
import intellistream.morphstream.common.io.Rdma.Shuffle.RW.Read.Result.FetchResult;
import javafx.util.Pair;
import intellistream.morphstream.common.util.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package intellistream.morphstream.common.io.Rdma.Shuffle.RW;

import javafx.util.Pair;
import intellistream.morphstream.common.util.Pair;

import java.util.Iterator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import intellistream.morphstream.common.io.Rdma.Shuffle.Handle.ShuffleDependency;
import intellistream.morphstream.common.io.Rdma.Shuffle.Handle.ShuffleHandle;
import intellistream.morphstream.common.io.Rdma.Shuffle.RW.ShuffleWriter;
import javafx.util.Pair;
import intellistream.morphstream.common.util.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package intellistream.morphstream.common.util;

import java.io.Serializable;
import java.util.Objects;

/**
* Minimal immutable pair used by MorphStream's internal data paths.
*/
public final class Pair<K, V> implements Serializable {
private static final long serialVersionUID = 1L;

private final K key;
private final V value;

public Pair(K key, V value) {
this.key = key;
this.value = value;
}

public K getKey() {
return key;
}

public V getValue() {
return value;
}

@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof Pair)) {
return false;
}
Pair<?, ?> pair = (Pair<?, ?>) other;
return Objects.equals(key, pair.key) && Objects.equals(value, pair.value);
}

@Override
public int hashCode() {
return Objects.hash(key, value);
}

@Override
public String toString() {
return key + "=" + value;
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
package intellistream.morphstream.api.input;

import intellistream.morphstream.api.launcher.MorphStreamEnv;
import junit.framework.TestCase;

import java.io.IOException;

public class FileDataGeneratorTest extends TestCase {
public FileDataGeneratorTest() {
super("FileDataGenerator");
}
public void testApp() throws IOException {
assertTrue(true);
MorphStreamEnv.get().databaseInitializer().configure_db();
public void testCanConstructGeneratorWithoutRuntimeConfiguration() {
FileDataGenerator fileDataGenerator = new FileDataGenerator();
fileDataGenerator.prepareInputData(false);
assertNotNull(fileDataGenerator);
}
}
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
package intellistream.morphstream.api.input;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import java.io.IOException;

import static org.junit.Assert.assertTrue;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;

public class InputSourceTest extends TestCase {
public InputSourceTest(String testName) {
super(testName);
}
public static Test suite()
{
return new TestSuite( InputSourceTest.class );
}
public void testApp() throws IOException {
assertTrue(true);
InputSource inputSource = new InputSource();
inputSource.initialize("/Users/curryzjj/hair-loss/MorphStream/Benchmark/inputs/events.txt", InputSource.InputSourceType.FILE_STRING, 4);
for (int i = 0; i < 100; i++) {
public void testFileInputIsDistributedAcrossSpouts() throws IOException {
Path inputFile = Files.createTempFile("morphstream-events", ".txt");
try {
Files.write(inputFile, Arrays.asList(
"accounts:1;amount:10;amount:int;deposit;false",
"accounts:2;amount:20;amount:int;deposit;false"
));

InputSource inputSource = new InputSource();
inputSource.initialize(
inputFile.toString(),
InputSource.InputSourceType.FILE_STRING,
2
);

assertEquals(1, inputSource.getInputQueue(0).size());
assertEquals(1, inputSource.getInputQueue(1).size());
assertEquals(inputFile.toString(), inputSource.getStaticFilePath());
} finally {
Files.deleteIfExists(inputFile);
}
}
}
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<module>morph-clients</module>
<module>morph-web</module>
<module>morph-common</module>
<module>morph-common</module>
</modules>

<build>
Expand Down
Loading