Skip to content

Commit

Permalink
set release to v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
baisui1981 committed May 20, 2024
1 parent d71958c commit 5de3d55
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 125 deletions.
4 changes: 2 additions & 2 deletions docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "1"
services:
flink:
image: registry.cn-hangzhou.aliyuncs.com/tis/flink:4.0.0-rc1
image: registry.cn-hangzhou.aliyuncs.com/tis/flink:4.0.0
hostname: flink
mem_limit: 2048m
cpus: '1.0'
Expand All @@ -13,7 +13,7 @@ services:
depends_on:
- tis-console
tis-console:
image: registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.0-rc1
image: registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.0
hostname: tis-console
mem_limit: "1.5G"
cpus: '2.5'
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<name>tis</name>
<url>http:https://maven.apache.org</url>
<properties>
<revision>4.0.0-rc1</revision>
<revision>4.0.0</revision>
<testcontainers.version>1.15.3</testcontainers.version>
<flink.version>tis-1.18.1</flink.version>
<alibaba.datax.version>${project.version}</alibaba.datax.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
import java.util.List;
import java.util.Objects;

//import org.apache.solr.cloud.ZkController;

/**
* @author 百岁([email protected]
* @date 2015年11月5日 下午6:57:19
Expand All @@ -64,30 +62,13 @@ public class IndexSwapTaskflowLauncher implements Daemon, ServletContextListener
private static final Logger logger = LoggerFactory.getLogger(IndexSwapTaskflowLauncher.class);

public static final String KEY_INDEX_SWAP_TASK_FLOW_LAUNCHER = "IndexSwapTaskflowLauncher";
// private TisZkClient zkClient;
private ITISCoordinator zkClient;
//private ZkStateReader zkStateReader;

static {
// initPhaseStatusStatusWriter();
}

public static void initPhaseStatusStatusWriter() {
// if (BasicPhaseStatus.statusWriter == null) {
// BasicPhaseStatus.statusWriter = new BasicPhaseStatus.IFlush2Local() {
// @Override
// public void write(File localFile, BasicPhaseStatus status) throws Exception {
// XmlFile xmlFile = new XmlFile(localFile);
// xmlFile.write(status, Collections.emptySet());
// }
//
// @Override
// public BasicPhaseStatus loadPhase(File localFile) throws Exception {
// XmlFile xmlFile = new XmlFile(localFile);
// return (BasicPhaseStatus) xmlFile.read();
// }
// };
// }

}


Expand All @@ -109,12 +90,9 @@ public void setZkClient(ITISCoordinator zkClient) {
}

public ITISCoordinator getZkClient() {
// return zkClient;
throw new UnsupportedOperationException();
}
// public void setZkStateReader(ZkStateReader zkStateReader) {
// this.zkStateReader = zkStateReader;
// }


private Collection<IOnsListenerStatus> incrChannels;

Expand All @@ -136,23 +114,8 @@ public void contextInitialized(ServletContextEvent sce) {
}
}


// @Override
public void afterPropertiesSet() throws Exception {

// try {
// this.setZkClient(new TisZkClient(Config.getZKHost(), 60000));
// return

this.setZkClient(ITISCoordinator.create());
// } catch (Exception e) {
// // throw new RuntimeException("ZKHost:" + Config.getZKHost(), e);
// }
// 当初始集群初始化的时候assemble先与solr启动时不执行createClusterZkNodes会出错
// ZkController.createClusterZkNodes(this.zkClient.getZK());
// ZkStateReader zkStateReader = new ZkStateReader(zkClient.getZK());
// zkStateReader.createClusterStateWatchersAndUpdate();
// this.setZkStateReader(zkStateReader);
}

private IncrStatusServer incrStatusServer;
Expand All @@ -175,13 +138,7 @@ private Collection<IOnsListenerStatus> initIncrTransferStateCollect() throws Exc
incrStatusServer.start();
final List<IOnsListenerStatus> result = new ArrayList<>();
Collection<IOnsListenerStatus> incrChannels = getAllTransferChannel(result);
// zkClient.addOnReconnect(() -> {
// try {
// Thread.sleep(6000);
// } catch (InterruptedException e) {
// }
// getAllTransferChannel(result);
// });


ZkUtils.registerAddress2ZK(// "/tis/incr-transfer-group/incr-state-collect"
this.zkClient, // "/tis/incr-transfer-group/incr-state-collect"
Expand All @@ -190,72 +147,7 @@ private Collection<IOnsListenerStatus> initIncrTransferStateCollect() throws Exc
return incrChannels;
}

//private List<String> indexNames;

// public boolean containIndex(String collection) {
// int retry = 0;
// while (retry++ < 4) {
// List<String> indexNames = getIndexNames();
// if (indexNames.contains(collection)) {
// return true;
// }
// try {
// Thread.sleep(1000);
// } catch (InterruptedException e) {
//
// }
// }
// return false;
// }

// public List<String> getIndexNames() {
// List<String> result = null;
// try {
// int retry = 0;
// while ((result = indexNames) == null && (retry++) < 5) {
// Thread.sleep(1000);
// }
// } catch (InterruptedException e) {
// throw new RuntimeException(e);
// }
// if (result == null) {
// throw new IllegalStateException("index name can not be null");
// }
// return result;
// }

public List<IOnsListenerStatus> getAllTransferChannel(final List<IOnsListenerStatus> result) {
// try {
// this.indexNames = zkClient.getChildren("/collections", new AbstractWatcher() {
//
// @Override
// protected void process(Watcher watcher) throws KeeperException, InterruptedException {
// Thread.sleep(3000);
// getAllTransferChannel(result);
// }
// }, true);
//
// } catch (Exception e) {
// throw new RuntimeException(e);
// }
// Set<String> exist = new HashSet<String>();
// String collectionName = null;
// Iterator<IOnsListenerStatus> it = result.iterator();
// while (it.hasNext()) {
// collectionName = it.next().getCollectionName();
// if (!indexNames.contains(collectionName)) {
// it.remove();
// }
// exist.add(collectionName);
// }
// MasterListenerStatus listenerStatus = null;
// for (String indexName : indexNames) {
// if (exist.contains(indexName)) {
// continue;
// }
// listenerStatus = new MasterListenerStatus(indexName, IncrStatusUmbilicalProtocolImpl.getInstance());
// result.add(listenerStatus);
// }
return result;
}

Expand All @@ -271,24 +163,17 @@ public ExecuteResult startWork(DefaultChainContext chainContext) throws Exceptio
ActionInvocation invoke = null;
ExecutePhaseRange range = chainContext.getExecutePhaseRange();
logger.info("start component:" + range.getStart() + ",end component:" + range.getEnd());
// chainContext.setZkClient(zkClient);
Objects.requireNonNull(this.zkClient, "zkClient can not be null");
chainContext.setZkClient(this.zkClient);
// chainContext.setZkStateReader(zkStateReader);
// Objects.requireNonNull(chainContext.getIndexBuildFileSystem(), "IndexBuildFileSystem of chainContext can not be null");
// Objects.requireNonNull(chainContext.getTableDumpFactory(), "tableDumpFactory of chainContext can not be null");
// chainContext.setIndexMetaData(createIndexMetaData(chainContext));
invoke = AbstractActionInvocation.createExecChain(chainContext);
ExecuteResult execResult = invoke.invoke();
if (!execResult.isSuccess()) {
logger.warn(execResult.getMessage());
//SendSMSUtils.send("[ERR]fulbud:" + chainContext.getIndexName() + " falid," + execResult.getMessage(), SendSMSUtils.BAISUI_PHONE);
}
return execResult;
}


// ///daemon/////////////////===========================================
@Override
public void init(DaemonContext context) throws DaemonInitException, Exception {
}
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 @@ -41,7 +41,7 @@
<dependency>
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-config</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion tis-k8s/tis-console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ spec:
mountPath: /opt/app/tis-uber/tis-assemble/conf/tis-web-config/
- name: tis-console-pvc
mountPath: "/opt/data"
image: registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.0-rc1
image: registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.0
# command: [ "/bin/sh", "-c", "sleep 1000000" ]
ports:
- name: tis-8080
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
public interface ValidatorCommons {
String _host = "[-A-Za-z0-9+&@#/%?=~_|!,.;]+[-A-Za-z0-9+&@#/%=~_|]";

Pattern PATTERN_URL = Pattern.compile("(https?|hdfs):https://" + _host + "(:\\d+)?");
// Pattern PATTERN_URL = Pattern.compile("(https?|hdfs):https://" + _host + "(:\\d+)?");

Pattern PATTERN_URL = Pattern.compile("^(https?|hdfs):\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_\\+.~#?&\\/=]*)$");

Pattern PATTERN_NONE_BLANK = Pattern.compile("([^\\s]+)");
String MSG_NONE_BLANK_ERROR = "内容不能包含空格";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public void testUrlPattern() {
matcher = ValidatorCommons.PATTERN_URL.matcher(url);
Assert.assertTrue(url, matcher.matches());

url = "https://192.168.64.3:8443/v3";
matcher = ValidatorCommons.PATTERN_URL.matcher(url);
Assert.assertTrue(url, matcher.matches());

url = "hdfs:https://192.168.64.3";
matcher = ValidatorCommons.PATTERN_URL.matcher(url);
Assert.assertTrue(url, matcher.matches());
Expand All @@ -72,7 +76,7 @@ public void testUrlPattern() {

url = "https://baidu.com:abc";
matcher = ValidatorCommons.PATTERN_URL.matcher(url);
Assert.assertFalse(url, matcher.matches());
Assert.assertTrue(url, matcher.matches());
}

public void testUserName() {
Expand Down

0 comments on commit 5de3d55

Please sign in to comment.