Skip to content

Commit

Permalink
[BACKLOG-16725] decouple abort step as a plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcsantos committed Jul 24, 2017
1 parent f66e9ee commit f567a61
Show file tree
Hide file tree
Showing 25 changed files with 208 additions and 14 deletions.
Expand Up @@ -297,7 +297,6 @@ BaseStep.TypeLongDesc.DetectEmptyStream=Detect empty stream
BaseStep.TypeTooltipDesc.MonetDBBulkLoader=Load data into MonetDB by using their bulk load command in streaming mode.
BaseStep.TypeTooltipDesc.MonetDBAgileMart=Load data into MonetDB for Agile BI use cases
BaseStep.ColumnName.StartDate=start_date
BaseStep.TypeTooltipDesc.Abort=Abort a transformation
BaseStep.TypeTooltipDesc.SynchronizeAfterMerge=This step perform insert/update/delete in one go based on the value of a field.
BaseStep.TypeTooltipDesc.HTTP=Call a web service over HTTP by supplying a base URL by allowing parameters to be set dynamically
BaseStep.TypeTooltipDesc.TableOutput=Write information to a database table
Expand Down Expand Up @@ -363,7 +362,6 @@ BaseStep.TypeLongDesc.TableAgileMart=Table Agile Mart
BaseStep.TypeLongDesc.InfobrightOutput=Infobright Loader
BaseStep.TypeLongDesc.ReservoirSampling=Reservoir Sampling
BaseStep.TypeLongDesc.AccessInput=Microsoft Access Input
BaseStep.TypeLongDesc.Abort=Abort
BaseStep.TypeLongDesc.XSDValidator=XSD Validator
BaseStep.Category.Job=Job
BaseStep.TypeLongDesc.UniqueRows=Unique rows
Expand Down
Expand Up @@ -381,7 +381,6 @@ BaseStep.TypeTooltipDesc.MonetDBBulkLoader=Chargement de donn\u00E9es en bloc ve
BaseStep.ColumnName.StartDate=date_d\u00E9marrage
BaseStep.TypeTooltipDesc.Rest=Client Rest
BaseStep.TypeLongDesc.MailInput=Extraction messages (POP3/IMAP)
BaseStep.TypeTooltipDesc.Abort=Mise en \u00E9chec de la transformation
BaseStep.TypeTooltipDesc.SynchronizeAfterMerge=Cette \u00E9tape permet de r\u00E9aliser une insertion/mise \u00E0 jour/suppression\nselon la valeur d''un champ cr\u00E9\u00E9 dans une \u00E9tape pr\u00E9c\u00E9dente.
BaseStep.TypeTooltipDesc.HTTP=Appel d''un service HTTP en soumettant l''adresse (URL) et des param\u00E8tres
BaseStep.TypeTooltipDesc.TableOutput=\u00C9crire informations dans table BDD
Expand Down Expand Up @@ -459,7 +458,6 @@ BaseStep.TypeTooltipDesc.Rowflattener=Flattens consequetive rows based on the or
BaseStep.TypeLongDesc.Output=Insertion dans table
BaseStep.TypeLongDesc.ReservoirSampling=Echantillonnage al\u00E9atoire
BaseStep.TypeLongDesc.AccessInput=Extraction depuis une base MS Access
BaseStep.TypeLongDesc.Abort=Mise en \u00E9chec transformation
BaseStep.Category.Job=Lien avec T\u00E2che
BaseStep.TypeLongDesc.XSDValidator=Validation XML par XSD
BaseStep.TypeLongDesc.WebServiceAvailable=V\u00E9rification disponibilit\u00E9 service web
Expand Down
Expand Up @@ -312,7 +312,6 @@ BaseStep.TypeLongDesc.DetectEmptyStream=\u7a7a\u30b9\u30c8\u30ea\u30fc\u30e0\u63
BaseStep.TypeTooltipDesc.MonetDBBulkLoader=MonetDB Bulk Loader\n\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u30e2\u30fc\u30c9\u306e\u30d0\u30eb\u30af\u30ed\u30fc\u30c0\u30fc\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066MonetDB\u306b\u30c7\u30fc\u30bf\u3092\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002
BaseStep.TypeTooltipDesc.MonetDBAgileMart=MonetDB Agile Mart\n\u30a2\u30b8\u30e3\u30a4\u30ebBI\u7528\u306bMonetDB\u3078\u30c7\u30fc\u30bf\u3092\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002
BaseStep.ColumnName.StartDate=\u958b\u59cb\u65e5\u6642
BaseStep.TypeTooltipDesc.Abort=Abort\n\u30c7\u30fc\u30bf\u5909\u63db\u3092\u505c\u6b62\u3057\u307e\u3059\u3002
BaseStep.TypeTooltipDesc.SynchronizeAfterMerge=Synchronize after merge\n\u5024\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u633f\u5165/\u66f4\u65b0/\u524a\u9664\u306e\u51e6\u7406\u3092\u4e00\u5ea6\u306b\u884c\u3044\u307e\u3059\u3002
BaseStep.TypeTooltipDesc.HTTP=HTTP client\n\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u52d5\u7684\u306b\u8a2d\u5b9a\u3057\u3001\u30d9\u30fc\u30b9URL\u3092\u4f7f\u7528\u3057\u3066HTTP\u3067\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002
BaseStep.TypeTooltipDesc.TableOutput=Table output\n\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u30c7\u30fc\u30bf\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002
Expand Down Expand Up @@ -378,7 +377,6 @@ BaseStep.TypeLongDesc.TableAgileMart=\u30c6\u30fc\u30d6\u30eb\u30a2\u30b8\u30e3\
BaseStep.TypeLongDesc.InfobrightOutput=Infobright\u30d0\u30eb\u30af\u30ed\u30fc\u30c9
BaseStep.TypeLongDesc.ReservoirSampling=\u8caf\u7559\u5c64\u30b5\u30f3\u30d7\u30ea\u30f3\u30b0
BaseStep.TypeLongDesc.AccessInput=Access\u5165\u529b
BaseStep.TypeLongDesc.Abort=\u505c\u6b62
BaseStep.TypeLongDesc.XSDValidator=XSD\u691c\u8a3c
BaseStep.Category.Job=\u30b8\u30e7\u30d6
BaseStep.TypeLongDesc.UniqueRows=\u91cd\u8907\u884c\u524a\u9664
Expand Down
Expand Up @@ -30,7 +30,6 @@ BaseStepDialog.ErrorHandling.MaxErr.Label=\uCD5C\uB300\uB85C \uAC00\uB2A5\uD55C
BaseStep.ColumnName.LinesReaded=lines_read
BaseStep.Category.Statistics=Statistics
BaseStepDialog.Cancel=\uCDE8\uC18C(&C)
BaseStep.TypeTooltipDesc.Abort=Transformation \uC911\uC9C0
BaseStep.status.Paused=\uC77C\uC2DC\uC911\uC9C0
BaseStep.ColumnName.Errors=errors
BaseStep.Category.Bulk=Bulk loading
Expand Down
Expand Up @@ -195,7 +195,6 @@ BaseStep.Category.Palo=Palo
BaseStep.Category.Utility=\u5e94\u7528
BaseStep.Category.Validation=\u68c0\u9a8c

BaseStep.TypeLongDesc.Abort=\u4e2d\u6b62
BaseStep.TypeLongDesc.AccessInput=Access \u8f93\u5165
BaseStep.TypeLongDesc.AccessOutput=Access \u8f93\u51fa
BaseStep.TypeLongDesc.AddXML=\u589e\u52a0XML\u5217
Expand Down
Expand Up @@ -26,8 +26,8 @@
import org.junit.Test;
import org.pentaho.di.cluster.ClusterSchema;
import org.pentaho.di.cluster.SlaveServer;
import org.pentaho.di.core.util.AbstractStepMeta;
import org.pentaho.di.partition.PartitionSchema;
import org.pentaho.di.trans.steps.abort.AbortMeta;
import org.pentaho.di.utils.TestUtils;
import org.pentaho.di.trans.steps.missing.MissingTrans;

Expand Down Expand Up @@ -88,7 +88,7 @@ public void stepMetaXmlConsistency() throws Exception {
}

private static StepMeta createTestMeta() throws Exception {
StepMetaInterface stepMetaInterface = mock( AbortMeta.class );
StepMetaInterface stepMetaInterface = mock( AbstractStepMeta.class );
when( stepMetaInterface.clone() ).thenReturn( stepMetaInterface );

StepMeta meta = new StepMeta( STEP_ID, "stepname", stepMetaInterface );
Expand Down
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2016 by Pentaho : http://www.pentaho.com
* Copyright (C) 2002-2017 by Pentaho : http://www.pentaho.com
*
*******************************************************************************
*
Expand All @@ -28,13 +28,14 @@
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.pentaho.di.core.logging.LogChannel;
import org.pentaho.di.core.util.AbstractStepMeta;
import org.pentaho.di.trans.Trans;
import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.trans.step.StepDataInterface;
import org.pentaho.di.trans.step.StepInterface;
import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.trans.step.StepMetaInterface;
import org.pentaho.di.trans.steps.StepMockUtil;
import org.pentaho.di.trans.steps.abort.AbortMeta;
import org.pentaho.di.trans.steps.datagrid.DataGridMeta;
import org.pentaho.di.trans.steps.mock.StepMockHelper;

Expand All @@ -44,7 +45,19 @@ public class MissingTransStepTest {

@Test
public void testInit() {
StepMetaInterface stepMetaInterface = new AbortMeta();
StepMetaInterface stepMetaInterface = new AbstractStepMeta() {

@Override
public void setDefault() { }

@Override
public StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr,
TransMeta transMeta,
Trans trans ) {
return null;
}
};

StepMeta stepMeta = new StepMeta();

stepMeta.setName( "TestMetaStep" );
Expand Down
26 changes: 26 additions & 0 deletions plugins/abort/assemblies/plugin/pom.xml
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>pdi-abort-assemblies</artifactId>
<groupId>org.pentaho.di.plugins</groupId>
<version>8.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>

<packaging>pom</packaging>

<artifactId>pdi-abort-plugin</artifactId>
<name>PDI Abort Step Plugin Distribution</name>

<dependencies>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>pdi-abort-plugin-impl</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
26 changes: 26 additions & 0 deletions plugins/abort/assemblies/plugin/src/assembly/assembly.xml
@@ -0,0 +1,26 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>plugin</id>
<formats>
<format>zip</format>
</formats>
<baseDirectory>pdi-abort-plugin</baseDirectory>

<files>
<file>
<source>${project.basedir}/src/main/resources/version.xml</source>
<outputDirectory>.</outputDirectory>
<filtered>true</filtered>
</file>
</files>

<dependencySets>
<dependencySet>
<outputDirectory>.</outputDirectory>
<includes>
<include>org.pentaho.di.plugins:pdi-abort-plugin-impl:jar</include>
</includes>
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
</dependencySets>
</assembly>
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<version branch='TRUNK'>${project.version}</version>
21 changes: 21 additions & 0 deletions plugins/abort/assemblies/pom.xml
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>abort</artifactId>
<groupId>org.pentaho.di.plugins</groupId>
<version>8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<packaging>pom</packaging>

<artifactId>pdi-abort-assemblies</artifactId>
<name>PDI Abort Step Plugin Assemblies</name>

<modules>
<module>plugin</module>
</modules>

</project>
69 changes: 69 additions & 0 deletions plugins/abort/impl/pom.xml
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>abort</artifactId>
<groupId>org.pentaho.di.plugins</groupId>
<version>8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>pdi-abort-plugin-impl</artifactId>
<name>PDI Abort Step Plugin Impl</name>

<properties>
<kettle.version>8.0-SNAPSHOT</kettle.version>
<mockito-core.version>1.10.19</mockito-core.version>
</properties>

<dependencies>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<version>${kettle.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<version>${kettle.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-ui-swt</artifactId>
<version>${kettle.version}</version>
<scope>provided</scope>
</dependency>

<!-- SWT it required to compile any version of any architecture will work -->
<dependency>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.gtk.linux.x86_64</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<version>${kettle.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
</dependencies>

</project>
@@ -0,0 +1,4 @@
#${project.name} build information

version=${project.version}
builddate=${maven.build.timestamp}
Binary file added plugins/abort/impl/src/main/resources/ABR.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions plugins/abort/impl/src/main/resources/ABR.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -20,3 +20,5 @@ AbortDialog.Stepname.Label=Step Name\:
AbortDialog.AlwaysLogRows.Tooltip=Always log rows even if below current log level
AbortDialog.AbortWithError.Label=Abort with error
AbortDialog.AbortWithError.Tooltip=Abort with error
Abort.Name=Abort
Abort.Description=Abort a transformation
Expand Up @@ -17,4 +17,6 @@ Abort.Log.ThresholdInvalid=Threshold number of rows is invalid ({0}), resetting
Abort.Log.DefaultAbortMessage=Aborting after having seen {0} rows.
AbortMeta.Exception.UnableToSaveStepInfoToRepository=Unable to save step information to the repository for id_step\=
AbortDialog.Stepname.Label=\u30b9\u30c6\u30c3\u30d7\u540d
AbortDialog.AlwaysLogRows.Tooltip=\u30ed\u30b0\u306b\u51fa\u529b\u3059\u308b\u5834\u5408\u306f\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
AbortDialog.AlwaysLogRows.Tooltip=\u30ed\u30b0\u306b\u51fa\u529b\u3059\u308b\u5834\u5408\u306f\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
Abort.Name=\u505c\u6b62
Abort.Description=Abort\n\u30c7\u30fc\u30bf\u5909\u63db\u3092\u505c\u6b62\u3057\u307e\u3059\u3002
Expand Up @@ -10,3 +10,4 @@ AbortDialog.AlwaysLogRows.Tooltip=Always log rows even if below current log leve
AbortDialog.AlwaysLogRows.Label=Always log rows
AbortDialog.Stepname.Label=Step \uC774\uB984
AbortDialog.AbortMessage.Tooltip=Message to put in log upon aborting
Abort.Description=Transformation \uC911\uC9C0
Expand Up @@ -14,3 +14,4 @@ Abort.Log.ThresholdInvalid=\u65e0\u6548\u7684\u8bb0\u5f55\u503c({0}),\u91cd\u7f6
Abort.Log.DefaultAbortMessage=\u7b2c{0}\u884c\u540e\u4e2d\u6b62
AbortDialog.AlwaysLogRows.Tooltip=\u65e0\u8bba\u4e0b\u9762\u7684\u65e5\u5fd7\u7ea7\u522b\u5982\u4f55\u8bbe\u7f6e,\u603b\u662f\u5728\u65e5\u5fd7\u4e2d\u8bb0\u5f55\u884c
AbortDialog.Stepname.Label=\u6b65\u9aa4\u540d
Abort.Name=\u4e2d\u6b62
21 changes: 21 additions & 0 deletions plugins/abort/pom.xml
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>pdi-plugins</artifactId>
<groupId>org.pentaho.di.plugins</groupId>
<version>8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>abort</artifactId>
<packaging>pom</packaging>
<name>PDI Abort Step Plugin</name>

<modules>
<module>assemblies</module>
<module>impl</module>
</modules>

</project>

0 comments on commit f567a61

Please sign in to comment.