Skip to content

Commit

Permalink
docker-compose.sql 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ni-ze committed Sep 11, 2022
1 parent 0296c37 commit 31f63df
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ target/
*.iml
*.ipr
*.gz
*/dipper.cs
*/rsqldb.cs

### NetBeans ###
nbproject/private/
Expand All @@ -32,4 +32,4 @@ _book/

*/dependency-reduced-pom.xml
/rsqldb-disk/log/
/rsqldb-disk/server/dipper.cs
/rsqldb-disk/server/rsqldb.cs
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ services:
command: sh mqbroker -c /home/rocketmq/rocketmq-4.9.4/conf/broker.conf

rsqldb:
image: unclerangoo/rsqldb:0.1
image: unclerangoo/rsqldb:0.2
hostname: rsqldb
container_name: rsqldb
networks:
Expand All @@ -53,7 +53,7 @@ services:
- NAMESRV_ADDR=namesrv:9876

rsqldb-client:
image: unclerangoo/rsqldb-client:0.1
image: unclerangoo/rsqldb-client:0.2
hostname: rsqldb-client
container_name: rsqldb-client
networks:
Expand Down
2 changes: 1 addition & 1 deletion rsqldb-disk/bin/startAll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [ ! -d log ]; then
mkdir log
fi

path=$homeDir/dipper.cs
path=$homeDir/rsqldb.cs

sysOS=`uname -s`

Expand Down
5 changes: 5 additions & 0 deletions rsqldb-disk/client/rocketmq.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ CREATE TABLE `task_sink_2`
) WITH (
type = 'print'
);
-- 写入rocketmq中
-- type = 'rocketmq',
-- topic = 'rsqldb-sink',
-- groupName = 'rsqldb-group',
-- namesrvAddr = '127.0.0.1:9876'

insert into task_sink_2
select field_1
Expand Down
2 changes: 1 addition & 1 deletion rsqldb-disk/client/sendDataFromFile.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CREATE TABLE `test_source`
) WITH (
type = 'file',
-- 需要根据自身填写data.txt的绝对路径
filePath = '',
filePath = '/Users/nize/code/github/rsqldb/rsqldb-disk/client/data.txt',
isJsonData = 'true',
msgIsJsonArray = 'false'
);
Expand Down
4 changes: 2 additions & 2 deletions rsqldb-disk/conf/rsqldb.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dipper.configurable.service.type=file
dipper.window.default.iterval.size.time=10

#client产生的流计算任务位置,目前需要填绝对路径,client生成后,runner从该位置读取流计算任务。配置形式为:
#filePathAndName=/Users/rsqldb/rsqldb-disk/server/dipper.cs
filePathAndName=/Users/nize/code/github/rsqldb/rsqldb-disk/server/dipper.cs
#filePathAndName=/Users/rsqldb/rsqldb-disk/server/rsqldb.cs
filePathAndName=/Users/nize/code/github/rsqldb/rsqldb-disk/server/rsqldb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,19 @@ public static void main(String[] args) throws Throwable {
Properties properties = new Properties();
properties.load(in);

Map<String, String> env = System.getenv();
String namesrvAddrEnv = env.get(MixAll.NAMESRV_ADDR_ENV);
if (namesrvAddrEnv != null) {
properties.put(MixAll.NAMESRV_ADDR_ENV, namesrvAddrEnv);
}

String filePathAndName = properties.getProperty("filePathAndName");
if (StringUtils.isEmpty(filePathAndName)) {
throw new IllegalArgumentException("filePathAndName is required.");
}

//使用env中配置的namesrv地址覆盖rsqldb.conf中的;
Map<String, String> env = System.getenv();
String namesrvAddrEnv = env.get(MixAll.NAMESRV_ADDR_ENV);
if (namesrvAddrEnv != null) {
properties.put(MixAll.NAMESRV_ADDR_ENV, namesrvAddrEnv);
}

String namesrvAddrs = properties.getProperty(MixAll.NAMESRV_ADDR_ENV);

String[] temp = namesrvAddrs.trim().split(";");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public static void main(String[] args) {
if (!file.exists()) {
boolean result = file.mkdirs();
if (!result) {
throw new RuntimeException("create dipper.cs path error");
throw new RuntimeException("create rsqldb.cs path error");
}
}

System.setProperty("cs.dir", dipperCsParentPath + "/dipper.cs");
System.setProperty("cs.dir", dipperCsParentPath + "/rsqldb.cs");

System.out.println(System.getProperty("cs.dir"));

Expand Down

0 comments on commit 31f63df

Please sign in to comment.