Skip to content

Commit

Permalink
merged dev-1.0.2
Browse files Browse the repository at this point in the history
closes #935
closes #936
closes #937
closes #947
closes #948
closes #949
fixes #938
  • Loading branch information
Fuu3214 committed Aug 10, 2021
2 parents c833d4d + 8ae1a88 commit 9b3c2ad
Show file tree
Hide file tree
Showing 245 changed files with 10,692 additions and 171 deletions.
4 changes: 2 additions & 2 deletions assembly-combined-package/assembly-combined/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>com.webank.wedatasphere.linkis</groupId>
<artifactId>linkis</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -75,4 +75,4 @@
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion assembly-combined-package/config/linkis-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export SERVER_HEAP_SIZE="512M"
##The decompression directory and the installation directory need to be inconsistent
LINKIS_HOME=/appcom/Install/LinkisInstall

LINKIS_VERSION=1.0.1
LINKIS_VERSION=1.0.2

# for install
LINKIS_PUBLIC_MODULE=lib/linkis-commons/public-module
2 changes: 1 addition & 1 deletion assembly-combined-package/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>com.webank.wedatasphere.linkis</groupId>
<artifactId>linkis</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion linkis-commons/linkis-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion linkis-commons/linkis-hadoop-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion linkis-commons/linkis-httpclient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion linkis-commons/linkis-message-scheduler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion linkis-commons/linkis-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion linkis-commons/linkis-mybatis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion linkis-commons/linkis-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion linkis-commons/linkis-rpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion linkis-commons/linkis-scheduler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<artifactId>linkis-scheduler</artifactId>

Expand Down
2 changes: 1 addition & 1 deletion linkis-commons/linkis-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<version>1.0.1</version>
<version>1.0.2</version>
<groupId>com.webank.wedatasphere.linkis</groupId>
<artifactId>linkis</artifactId>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion linkis-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.webank.wedatasphere.linkis</groupId>
<artifactId>linkis-cli</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>linkis-cli-application</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.webank.wedatasphere.linkis</groupId>
<artifactId>linkis-cli</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>linkis-cli-common</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.webank.wedatasphere.linkis</groupId>
<artifactId>linkis-cli</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>linkis-cli-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<artifactId>linkis-cli</artifactId>
<packaging>pom</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>linkis</artifactId>
<groupId>com.webank.wedatasphere.linkis</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>

<artifactId>linkis-computation-client</artifactId>
Expand Down Expand Up @@ -54,6 +54,12 @@
<version>${linkis.version}</version>
</dependency>

<dependency>
<groupId>com.webank.wedatasphere.linkis</groupId>
<artifactId>linkis-bml-client</artifactId>
<version>${linkis.version}</version>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.webank.wedatasphere.linkis.computation.client


trait JobListener {

def onJobSubmitted(job: LinkisJob): Unit

def onJobRunning(job: LinkisJob): Unit

def onJobFinished(job: LinkisJob): Unit

def onJobUnknownError(job: LinkisJob, t: Throwable): Unit

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.webank.wedatasphere.linkis.computation.client

import java.util

import com.webank.wedatasphere.linkis.common.utils.{ByteTimeUtils, Logging}


trait ClientMetrics {

def getMetrics: Map[String, Any]
def getMetricString: String
def printIt(): Unit

}

abstract class AbstractJobMetrics extends ClientMetrics with Logging {
override def printIt(): Unit = info(getMetricString)
}

import scala.collection.convert.WrapAsScala._
class LinkisJobMetrics(taskId: String) extends AbstractJobMetrics {

private var clientSubmitTime: Long = 0
private var clientFinishedTime: Long = 0
private var clientGetJobInfoTime: Long = 0
private var clientFetchResultSetTime: Long = 0
private val metricsMap = new util.HashMap[String, Any]

def setClientSubmitTime(clientSubmitTime: Long): Unit = this.clientSubmitTime = clientSubmitTime
def setClientFinishedTime(clientFinishedTime: Long): Unit = this.clientFinishedTime = clientFinishedTime
def addClientGetJobInfoTime(getJobInfoTime: Long): Unit = this.clientGetJobInfoTime += getJobInfoTime
def addClientFetchResultSetTime(fetchResultSetTime: Long): Unit = this.clientFetchResultSetTime = clientFetchResultSetTime

def setLong(key: String, value: Long): Unit = metricsMap.put(key, value)

def addLong(key: String, value: Long): Unit = {
val v = if(metricsMap.containsKey(key)) metricsMap.get(key).asInstanceOf[Long] else 0
setLong(key, value + v)
}

override def getMetrics: Map[String, Any] = {
metricsMap.put("clientSubmitTime", clientSubmitTime)
metricsMap.put("clientFinishedTime", clientFinishedTime)
metricsMap.put("clientGetJobInfoTime", clientGetJobInfoTime)
metricsMap.put("clientFetchResultSetTime", clientFetchResultSetTime)
metricsMap.toMap
}

override def getMetricString: String = s"The metrics of job($taskId), costs ${ByteTimeUtils.msDurationToString(clientFinishedTime - clientSubmitTime)} to execute, costs ${ByteTimeUtils.msDurationToString(clientFetchResultSetTime)} to fetch all resultSets."

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.webank.wedatasphere.linkis.computation.client

import com.webank.wedatasphere.linkis.computation.client.operator.Operator


trait LinkisJob {

def getId: String

def kill(): Unit

def getOperator(operatorName: String): Operator[_]

def isCompleted: Boolean

def isSucceed: Boolean

def waitForCompleted(): Unit

def waitFor(mills: Long): Unit

def getJobMetrics: LinkisJobMetrics

}
Loading

0 comments on commit 9b3c2ad

Please sign in to comment.