Skip to content

Commit

Permalink
upgrade version to 2.0.0 and make employee incr process pass
Browse files Browse the repository at this point in the history
  • Loading branch information
莫正华 authored and 莫正华 committed Oct 19, 2020
1 parent 94ea23a commit 62dd49e
Show file tree
Hide file tree
Showing 60 changed files with 1,522 additions and 273 deletions.
4 changes: 2 additions & 2 deletions create-ln.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ ln -s /Users/mozhenghua/j2ee_solution/project/plugins/tis-asyncmsg-rocketmq-plug

#for tis-scala-compiler-dependencies
rm -f /opt/data/tis/libs/tis-scala-compiler-dependencies/*
cd /Users/mozhenghua/j2ee_solution/project/tis-saturn2/tis-scala-compiler-dependencies
cd /Users/mozhenghua/j2ee_solution/project/tis-saturn3/tis-scala-compiler-dependencies
mvn dependency:copy-dependencies
mkdir -p /opt/data/tis/libs/tis-scala-compiler-dependencies
ln -s /Users/mozhenghua/j2ee_solution/project/tis-saturn2/tis-scala-compiler-dependencies/target/dependency/* /opt/data/tis/libs/tis-scala-compiler-dependencies
ln -s /Users/mozhenghua/j2ee_solution/project/tis-saturn3/tis-scala-compiler-dependencies/target/dependency/* /opt/data/tis/libs/tis-scala-compiler-dependencies


#/Users/mozhenghua/Desktop/j2ee_solution/project/tis-ibatis/target/dependency
Expand Down
2 changes: 1 addition & 1 deletion maven-tpi-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<packaging>pom</packaging>
<name>terminator-job-trigger-parent</name>
<name>tis-solr-parent</name>
<url>http://maven.apache.org</url>
<properties>
<timestamp>${maven.build.timestamp}</timestamp>
Expand Down
1 change: 0 additions & 1 deletion setversion.bat

This file was deleted.

1 change: 1 addition & 0 deletions setversion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mvn versions:set -DnewVersion=2.0.0 -DprocessDependencies=true -DgenerateBackupPoms=false
4 changes: 1 addition & 3 deletions solr-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
<parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>
<groupId>com.qlangtech.tis</groupId>
<artifactId>solr-webapp</artifactId>
<packaging>jar</packaging>
<version>saturn-1.0.0-SNAPSHOT</version>
<name>solr-webapp Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
Expand Down
2 changes: 1 addition & 1 deletion tis-assemble/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion tis-builder-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
5 changes: 1 addition & 4 deletions tis-collection-info-collect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
<parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-collection-info-collect</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>tis-collection-info-collect</name>
Expand Down
4 changes: 2 additions & 2 deletions tis-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-common</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<packaging>jar</packaging>

<name>tis-common</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ public static void registerDependencyDbsFacadeConfig(String collection, long tim
List<DBNode> dbs = null;
try (InputStream input = FileUtils.openInputStream(StreamContextConstant.getDbDependencyConfigMetaFile(collection, timestamp))) {
dbs = DBNode.load(input);
Map<String, DBConfig> dbConfigsMap = dbs.stream().collect(Collectors.toMap((db) -> db.getDbName(), (db) -> GitUtils.$().getDbLinkMetaData(db.getDbName(), DbScope.FACADE)));
Map<String, DBConfig> dbConfigsMap
= dbs.stream().collect(Collectors.toMap((db) -> db.getDbName()
, (db) -> GitUtils.$().getDbLinkMetaData(db.getDbName(), DbScope.FACADE)));

for (Map.Entry<String, DBConfig> entry : dbConfigsMap.entrySet()) {
SpringDBRegister dbRegister = new SpringDBRegister(entry.getKey(), entry.getValue(), factory);
dbRegister.visitFirst();
}
// return dbConfigsMap;

}
} catch (Exception e) {
throw new RuntimeException(e);
Expand Down
2 changes: 1 addition & 1 deletion tis-console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions tis-ds-dump/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
</parent>

<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-ds-dump</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<packaging>jar</packaging>

<name>tis-ds-dump</name>
Expand Down
4 changes: 2 additions & 2 deletions tis-hadoop-rpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-hadoop-rpc</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<packaging>jar</packaging>

<name>tis-hadoop-rpc</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
* Copyright (c) 2020 QingLang, Inc. <[email protected]>
*
* <p>
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* <p>
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* <p>
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
Expand All @@ -34,6 +34,7 @@
import org.apache.zookeeper.Watcher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.Closeable;
import java.io.IOException;
import java.net.InetSocketAddress;
Expand Down Expand Up @@ -69,6 +70,7 @@ public static AtomicReference<AssembleSvcCompsite> getService(ITISCoordinator zo
// public void close() {
// }
// };

/**
* 连接日志收集节点地址
*
Expand All @@ -79,12 +81,11 @@ public static AtomicReference<AssembleSvcCompsite> getService(ITISCoordinator zo
private void connect2RemoteIncrStatusServer(final ITISCoordinator zookeeper, boolean reConnect, final AssembleSvcCompsiteCallback rpcCallback) throws Exception {
// 增量状态收集节点
final String incrStateCollectAddress = ZkUtils.getFirstChildValue(zookeeper, ZkUtils.ZK_ASSEMBLE_LOG_COLLECT_PATH, new AbstractWatcher() {

@Override
protected void process(Watcher watcher) throws KeeperException, InterruptedException {
try {
connect2RemoteIncrStatusServer(zookeeper, false, /* reConnect */
rpcCallback);
rpcCallback);
} catch (Exception e) {
error(e.getMessage(), e);
logger.error(e.getMessage(), e);
Expand Down Expand Up @@ -162,29 +163,34 @@ public void close() {
private AtomicReference<AssembleSvcCompsite> connect2RemoteIncrStatusServer(ITISCoordinator zookeeper, AdapterAssembleSvcCompsiteCallback... callbacks) throws Exception {
final AtomicReference<AssembleSvcCompsite> ref = new AtomicReference<>();
ref.set(AssembleSvcCompsite.MOCK_PRC);
if (!zookeeper.shallConnect2RemoteIncrStatusServer()) {
return ref;
}


StatusRpcClient statusRpcClient = new StatusRpcClient();
statusRpcClient.connect2RemoteIncrStatusServer(zookeeper, true, /* reConnect */
new AssembleSvcCompsiteCallback() {

@Override
public AssembleSvcCompsite process(AssembleSvcCompsite oldrpc, AssembleSvcCompsite newrpc) {
ref.compareAndSet(oldrpc, newrpc);
for (AdapterAssembleSvcCompsiteCallback c : callbacks) {
c.process(oldrpc, newrpc);
}
return newrpc;
}
new AssembleSvcCompsiteCallback() {

@Override
public AssembleSvcCompsite process(AssembleSvcCompsite oldrpc, AssembleSvcCompsite newrpc) {
ref.compareAndSet(oldrpc, newrpc);
for (AdapterAssembleSvcCompsiteCallback c : callbacks) {
c.process(oldrpc, newrpc);
}
return newrpc;
}

@Override
public AssembleSvcCompsite getOld() {
return ref.get();
}
@Override
public AssembleSvcCompsite getOld() {
return ref.get();
}

@Override
public void errorOccur(AssembleSvcCompsite oldrpc, Exception e) {
ref.compareAndSet(oldrpc, AssembleSvcCompsite.MOCK_PRC);
}
});
@Override
public void errorOccur(AssembleSvcCompsite oldrpc, Exception e) {
ref.compareAndSet(oldrpc, AssembleSvcCompsite.MOCK_PRC);
}
});
return ref;
}

Expand All @@ -204,7 +210,6 @@ public interface AssembleSvcCompsiteCallback {
public abstract static class AssembleSvcCompsite {

public static final AssembleSvcCompsite MOCK_PRC = new AssembleSvcCompsite(new MockIncrStatusUmbilicalProtocol(), new MockLogReporter()) {

@Override
public void close() {
}
Expand Down
2 changes: 1 addition & 1 deletion tis-index-builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 1 addition & 3 deletions tis-manage-pojo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
<parent>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-solr-parent</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-manage-pojo</artifactId>
<version>saturn-1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>tis-manage-pojo</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
/**
* Copyright (c) 2020 QingLang, Inc. <[email protected]>
*
* <p>
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* <p>
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* <p>
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.qlangtech.tis.cloud;

import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.data.Stat;

import java.util.List;

/**
Expand All @@ -26,6 +27,13 @@
*/
public interface ITISCoordinator {

/**
* 是否应该连接Assemble日志收集服务,单元测试过程中需要返回false
*
* @return
*/
boolean shallConnect2RemoteIncrStatusServer();

List<String> getChildren(String zkPath, Watcher watcher, boolean b);

void addOnReconnect(IOnReconnect onReconnect);
Expand Down
Loading

0 comments on commit 62dd49e

Please sign in to comment.